(json-ld/expand
{"@context" {"ex" "http://example.org/"}
"@id" "ex:jsonTest"
"ex:myJSON" {"@value" {"some" {"json" 42}}
"@type" "@json"}})
;;=>
{:idx [], :id "http://example.org/jsonTest", "http://example.org/myJSON" [{:value {"some" {"json" 42}}, :type "@json", :idx ["ex:myJSON"]}]}
(json-ld/expand
{"@context" {"ex" "http://example.org/"
"myJSON" {"@id" "http://example.org/myJSON",
"@type" "@json"}}
"@id" "ex:jsonTest"
"myJSON" {"some" {"json" 42}}})
;;=>
{:idx [], :id "http://example.org/jsonTest", "http://example.org/myJSON" [{:value {"some" {"json" 42}}, :type :json, :idx ["myJSON"]}]}
Note in the example that the first example has a :value of "@json", and the second one has a :value of :json. These should in all cases be consistently be the string "@json" so it is consistent with all other datatypes.
Note in the example that the first example has a
:valueof"@json", and the second one has a:valueof:json. These should in all cases be consistently be the string"@json"so it is consistent with all other datatypes.