#PARSE JSON IN PICK

129 views
Skip to first unread message

Hyezus

unread,
Apr 13, 2022, 1:33:42 PM4/13/22
to Pick and MultiValue Databases
I have a REST API in php to which I query data from Pick through curl, my problem is the following, I don't know any method in pick to walk or to easily go through JSON in Pick, could someone help or advise me?

TOM MARRACCI

unread,
Apr 13, 2022, 1:40:33 PM4/13/22
to mvd...@googlegroups.com
Some people have remarked that this is trivial.  My experience is completely the opposite.

I created a generalized json parser using the techniques that the underlying php extension module uses with a state machine.  Then I defined my own pick structure to handle names and index them to attributes.  The end result is a pick record that can be inspected to find values referenced in the original json by name.  To update or insert json data I had to create subroutines to access this special pick formatted record with special attention to types (strings, numbers, arrays, and objects).  Then finally, an encoder to create a json string suitable for use with javascript from this pick record.

I can share my code with you if you like.

Tom




On Apr 13, 2022, at 4:19 AM, Hyezus <alsar...@gmail.com> wrote:

I have a REST API in php to which I query data from Pick through curl, my problem is the following, I don't know any method in pick to walk or to easily go through JSON in Pick, could someone help or advise me?

--
You received this message because you are subscribed to
the "Pick and MultiValue Databases" group.
To post, email to: mvd...@googlegroups.com
To unsubscribe, email to: mvdbms+un...@googlegroups.com
For more options, visit http://groups.google.com/group/mvdbms
---
You received this message because you are subscribed to the Google Groups "Pick and MultiValue Databases" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mvdbms+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mvdbms/fbba17de-2d5b-430f-bc1f-fcbfb532798fn%40googlegroups.com.

David Green

unread,
Apr 15, 2022, 7:14:21 PM4/15/22
to mvd...@googlegroups.com

UniData has a built in json parser.  But you still need to write a nice wrapper in order to give it javascript object type notation.

 

David

--

Reply all
Reply to author
Forward
0 new messages