Representing string maps in RDF
Currently, maps of dynamic string keys can only be represented by an rdf:JSON literal this works for translating JSON-LD to Linked Data Dataset and vice versa but it makes the data unstructured (as it is just a literal).
{ "@id": "http://example.org/with-map", "http://example.org/map": { "a": "b" } }
Will be translated to
<http://example.org/with-map> <http://example.org/map> "{ \"a\": \"b\" }"^^rdf:JSON .
But what if instead they would be parsed to RDF data:
<http://example.org/with-map> <http://example.org/map> _:map .
_:map rdf:type rdf:Map .
_:map rdf:_1 _:entry1 .
_:entry1 rdf:key "a" .
_:entry1 rdf:value "b" .
My suggestion is based on an answer gave me in Stackoverflow
You might want to move this over to https://github.com/w3c/json-ld-bp if you think this belongs as a JSON-LD Best Practice.
But, note that JSON-LD does support indexing on property values, language or many other things natively, but this is outside of RDF Schema.
Something like schema:Property may also be a useful structure.
I’d like to suggest it as part of the JSON-LD representation in the linked data model. When parsing JSON-LD into a dataset, there should be a way to represent dynamic key maps like you can represent lists