This function takes json string and returns parse tree.
The function returns tree.
SQL>create procedure json_tree_example () { declare qr, url, cnt, tree, xt, hdr any; cnt := ' { "head": { "link": [], "vars": ["s", "p", "o"] }, "results": { "distinct": false, "ordered": true, "bindings": [ { "s": { "type": "uri", "value": "http://example.org/node" } , "p": { "type": "uri", "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#type" } , "o": { "type": "uri", "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#type" }}, { "s": { "type": "uri", "value": "http://example.org/node" } , "p": { "type": "uri", "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#type" } , "o": { "type": "uri", "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#type" }} ] } }'; tree := json_parse (cnt); tree := get_keyword ('results', tree); tree := get_keyword ('bindings', tree); return tree[0][1]; } ; Done. SQL> SELECT json_tree_example(); json_tree_example VARCHAR structure No. of rows in result: 1