PREFIX json: <http://jsa.aksw.org/fn/json/> PREFIX norse: <https://w3id.org/aksw/norse#>Functions
BIND(json:array(?node1, ?node2, ..., ?nodeN) as ?jsonArray)
BIND(json:binaryString(?number) as ?binaryString)
BIND(json:convert(?node) as ?json)
BIND(json:entries(?jsonIn) as ?jsonOut)
VALUES ?json { "{'a': 2, 'b': 5}"^^norse:json }
?json json:explode ("json_") .
# now do something with ?json_a and ?json_b
VALUES ?json { "[ 2, 5 ]"^^norse:json }
?json json:explode ("json_" 1) .
# now do something with ?json_1 and ?json_2
BIND(json:get(?json, ?key) as ?element)
BIND(json:get(?json, ?index) as ?element)
BIND(json:length(?array) as ?length)
BIND(json:object(?key1 ?val1 ?key2 ?val2 ... ?keyN ?valN) as ?jsonObject)
BIND(json:path(?json, ?path) as ?element)
BIND(json:reverse(?jsonArray) as ?reverseJsonArray)
BIND(json:set(?jsonObject, ?key, ?value) as ?newJsonObject)
BIND(json:split(?string, ?separator) as ?jsonArray)
SELECT * {
?jsonArray json:unnest (?element ?index) .
}
SELECT * {
BIND(json:entries(?jsonObject) as ?jsonEntries)
?jsonEntries array:unnest (?entry) .
BIND(json:get(?entry, "key") as ?key)
BIND(json:get(?entry, "value") as ?value)
}