Re: Duplicate JSON Object Keys

Поиск
Список
Период
Сортировка
От David E. Wheeler
Тема Re: Duplicate JSON Object Keys
Дата
Msg-id 46479E46-F635-44BB-8B44-1357F623F1A8@justatheory.com
обсуждение исходный текст
Ответ на Re: Duplicate JSON Object Keys  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Список pgsql-hackers
On Mar 8, 2013, at 1:01 PM, Alvaro Herrera <alvherre@2ndquadrant.com> wrote:

>> 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.

Yes, it is wrong, because multiple keys are specifically disallowed for accessing values. Hence this new error:
  david=# select json_get('{"foo": 1, "foo": 2}', 'foo');  ERROR:  field name is not unique in json object

I really don’t think that should be possible.

Best,

David


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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: Duplicate JSON Object Keys
Следующее
От: Gavin Flower
Дата:
Сообщение: Re: Duplicate JSON Object Keys