Extract Jsonb key and values

Started by hari.prasathover 9 years ago2 messages
#1hari.prasath
hari.prasath@zohocorp.com

Hi all,

I am having jsonb as C character string received by WAL decoding and want to extract all its key and value pairs.

Which is the best approach for extracting keys and its values?

i) Converting the C string to a PostgreSQL jsonb object
ii) Using open-source json-c library

cheers

- Harry

#2Robert Haas
robertmhaas@gmail.com
In reply to: hari.prasath (#1)
Re: Extract Jsonb key and values

On Thu, Jun 23, 2016 at 8:52 AM, hari.prasath <hari.prasath@zohocorp.com> wrote:

Hi all,
I am having jsonb as C character string received by WAL decoding and
want to extract all its key and value pairs.

Which is the best approach for extracting keys and its values?

i) Converting the C string to a PostgreSQL jsonb object
ii) Using open-source json-c library

I'm pretty sure there's some built-in function which can do this, but
this question is off-topic for this mailing list, which is about
feature development for PostgreSQL. You probably want to ask
questions like this on pgsql-general.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers