cyga / www_fdw

fdw extension for postgres
http://wiki.postgresql.org/wiki/WWW_FDW
123 stars 21 forks source link

JSON serializers should wrap key-value pairs in {}, not [] #13

Closed lepot311 closed 9 years ago

lepot311 commented 9 years ago

With request_serialize_type as json, the value of quals in the request_serialize_callback was not valid JSON. Trying to cast quals::json resulted in an error.

The problem existed in serialize_node_with_children_callback_json and serialize_node_without_children_callback_json, where the value of params was wrapped in brackets [ ] instead of objects { }. This fixed the issue for me, and now parsing quals as ::json is easy.