Re: Stability of JSON textual representation

Поиск
Список
Период
Сортировка
От Gavin Flower
Тема Re: Stability of JSON textual representation
Дата
Msg-id 54D8302E.6040705@archidevsys.co.nz
обсуждение исходный текст
Ответ на Stability of JSON textual representation  (David Evans <david.evans@cantab.net>)
Ответы Re: Stability of JSON textual representation  (David Evans <david.evans@cantab.net>)
Список pgsql-general
On 03/02/15 00:06, David Evans wrote:
> I've noticed that when representing lists as JSON, Postgres 9.4
> sometimes outputs spaces after commas, and other times does not.
>
>     # SELECT array_to_json(array[1, 2, 3]), json_build_array(1, 2, 3);
>
>      array_to_json | json_build_array
>     ---------------+------------------
>      [1,2,3]       | [1, 2, 3]
>
>
> This matters to me because I'm intending the hash the JSON text and
> use the hash for change detection.
>
> This difference in behaviour doesn't seem to be documented anywhere.
> Does anyone know whether it is likely to be stable?
>
> Many thanks,
>
> Dave
  Would using jsonb be more consistent?


Cheers,
Gavin


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

Предыдущее
От: Paul Jungwirth
Дата:
Сообщение: Re: Stability of JSON textual representation
Следующее
От: Pavel Stehule
Дата:
Сообщение: Re: dbmsscheduler