On 12/9/15, jeremy at copiousfreetime.org <jeremy at copiousfreetime.org> wrote:
> So far it looks as if the way to distinguish between a json key existing
> with a
> value of null vs. not existing is to use `json_type`
>
>   sqlite> select json_type('{"a":2,"c":[4,5,{"f":7}]}', '$.x') IS NULL;
>   1
>   sqlite> select json_type('{"x": null, "a":2,"c":[4,5,{"f":7}]}', '$.x');
>   null
>
> Is this correct?

Yes.

>
> Also are there optimizations in place so that a column that is a json string
> is only
> parsed once if it is involved in json1 functions? For example:
>

No.  The JSON parsing turned out to be so fast that such optimizations
didn't seem worth the effort.  Of course, things might change in the
future.
-- 
D. Richard Hipp
drh at sqlite.org

Reply via email to