Re: json accessors

Поиск
Список
Период
Сортировка
От Andrew Dunstan
Тема Re: json accessors
Дата
Msg-id 50BF82E6.3000105@dunslane.net
обсуждение исходный текст
Ответ на Re: json accessors  ("David E. Wheeler" <david@justatheory.com>)
Список pgsql-hackers
On 12/05/2012 12:11 PM, David E. Wheeler wrote:
> On Dec 4, 2012, at 10:05 AM, Josh Berkus <josh@agliodbs.com> wrote:
>
>>>     json_get(json, variadic text) => json
>> Given that I already do the equivalent in Python, this would suit me
>> well.  Not sure about other users ...
> Well, given that sometimes you will have mixed arrays and objects, how would you distinguish "42" as an object key or
anarray index?
 


if the thing is an array, test to see if the string is a valid integer 
string, and if so use the integer value.


cheers

andrew



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

Предыдущее
От: "David E. Wheeler"
Дата:
Сообщение: Re: json accessors
Следующее
От: Andrew Dunstan
Дата:
Сообщение: Re: json accessors