json DOM

Discussions related to Visual Prolog
augustinharrison
Posts: 19
Joined: 28 Jul 2010 1:28

json DOM

Unread post by augustinharrison » 8 Feb 2017 21:38

is the DOM for json available to visual prolog so that i can map the recursive structure required
to break down the levels in the json objects i will be parsing? the breakdown of the 7 types is
good but i have some extensive nested examples to figure out. i will look at the java DOM json reference to get started.

the rpc/json project is a great deal of help to get going, Thanks!!!


AEH
aeh

User avatar
Thomas Linder Puls
VIP Member
Posts: 1164
Joined: 28 Feb 2000 0:01

Unread post by Thomas Linder Puls » 9 Feb 2017 13:07

The domain json::jsonValue can represent any JSON value. You should notice that a JSON object is basically represented as a Visual Prolog mapM{string, jsonValue}.

I.e. a map from the keys to the jsonValue that is attached to the key (if any).

If you are not familiar with maps (sets and other collections) you should read the Collection library tutorial.
Regards Thomas Linder Puls
PDC

Post Reply