Paulo Vieira <paulovieira@gmail.com> writes:
> On Mon, Aug 3, 2015 at 5:40 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> This does not seem like a bug, because the value of the data field is
>> just abc, and that isn't JSON. You'd need something more like
>>
>> input_data json := '{"id": 1, "data": "\"abc\""}';
> I'm confused. In my example the value is <double quotes>abc<double quotes>,
> which is a valid json value (and not simply abc).
No, the value of the field is just abc --- the quotes are JSON syntax
decoration, they are not part of the represented value. If we do it
as you seem to have in mind, it would be impossible to deal sanely
with data values that contain quotes or backslashes.
regards, tom lane