Re: Duplicate JSON Object Keys

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Duplicate JSON Object Keys
Дата
Msg-id 20130308210110.GE5352@alvh.no-ip.org
обсуждение исходный текст
Ответ на Re: Duplicate JSON Object Keys  (Hannu Krosing <hannu@2ndQuadrant.com>)
Ответы Re: Duplicate JSON Object Keys  ("David E. Wheeler" <david@justatheory.com>)
Re: Duplicate JSON Object Keys  (Gavin Flower <GavinFlower@archidevsys.co.nz>)
Re: Duplicate JSON Object Keys  (Andrew Dunstan <andrew@dunslane.net>)
Re: Duplicate JSON Object Keys  (Hannu Krosing <hannu@2ndQuadrant.com>)
Список pgsql-hackers
Hannu Krosing escribió:
> On 03/08/2013 09:39 PM, Robert Haas wrote:
> >On Thu, Mar 7, 2013 at 2:48 PM, David E. Wheeler <david@justatheory.com> wrote:
> >>In the spirit of being liberal about what we accept but strict about what we store, it seems to me that JSON object
keyuniqueness should be enforced either by throwing an error on duplicate keys, or by flattening so that the latest key
wins(as happens in JavaScript). I realize that tracking keys will slow parsing down, and potentially make it more
memory-intensive,but such is the price for correctness. 
> >I'm with Andrew.  That's a rathole I emphatically don't want to go
> >down.  I wrote this code originally, and I had the thought clearly in
> >mind that I wanted to accept JSON that was syntactically well-formed,
> >not JSON that met certain semantic constraints.
>
> If it does not meet these "semantic" constraints, then it is not
> really JSON - it is merely JSON-like.
>
> this sounds very much like MySQLs decision to support timestamp
> "0000-00-00 00:00" - syntactically correct, but semantically wrong.

Is it wrong?  The standard cited says SHOULD, not MUST.

--
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Hannu Krosing
Дата:
Сообщение: Re: Duplicate JSON Object Keys
Следующее
От: "David E. Wheeler"
Дата:
Сообщение: Re: Duplicate JSON Object Keys