4 ms·
Indeed! There is at least one other difference, which is that the presence of null characters will cause an error in `jsonb`, but not `json`: # select '{ "id":
by clarkdave 3y ago
Indeed! There is at least one other difference, which is that the presence of null characters will cause an error in `jsonb`, but not `json`:
# select '{ "id": "\u0000" }'::json;
-> { "id": "\u0000" }
# select '{ "id": "\u0000" }'::jsonb;
-> ERROR: unsupported Unicode escape sequence
- cryptonector 3y agoThe object key order thing is not a JSON spec compliance issue, but this one is. Either PG should store this escaped or use counted byte strings, but you can see why neither is desirable for a high-performance binary JSON format.