Works as documented. "If the value of a path/value pair is an SQLite TEXT value, then it is normally inserted as a quoted JSON string, even if the string looks like valid JSON. However, if the value is the result of another json1 function (such as json() or json_array() or json_object()) then it is interpreted as JSON and is inserted as JSON retaining all of its substructure." 'true' is a string, so json_set inserts a quoted string. json('true') is a json object, so json_set inserts the json object without adding quotes.