Re: JSON and unicode surrogate pairs

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Hannu Krosing <hannu(at)2ndQuadrant(dot)com>
Cc: stefan(at)drees(dot)name, Andres Freund <andres(at)2ndQuadrant(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Robert Haas <robertmhaas(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: JSON and unicode surrogate pairs
Date: 2013-06-11 13:54:48
Message-ID: 51B72C28.4010606@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


On 06/11/2013 09:23 AM, Hannu Krosing wrote:

>
> I can see no possible JavaScript structure which could produce duplicate
> key when serialised.
>
> And I don't think that any standard JSON reader supports this either.

You are quite wrong. This was discussed quite recently on -hackers, too.
V8 will happily accept a JSON string with duplicate keys via eval() and
resolve it in favor of the lexically latest value. I gather most other
JSON processors do likewise.

Can we PLEASE PLEASE stop sending this discussion off track and
concentrate on the actual problem we have at hand? It's BETA and there
is not much time. I get that you don't like how we have implemented
JSON. But we're not going back over that ground now. It's done and in
use and LOTS of people are finding it very useful.

cheers

andrew

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Hannu Krosing 2013-06-11 13:58:02 Re: JSON and unicode surrogate pairs
Previous Message Tom Lane 2013-06-11 13:45:23 Re: how to find out whether a view is updatable