using object keys in JSON-LD

Hi,

I would like to try clarifying together possible constraints on using
object keys in JSON-LD

My observation comes out of two comparisons
1. Actions in ActivityStreams2.0 (previous draft) and Schema.org
2. Url(Iri)Templates in ActivityStreams2.0 and Hydra

In first case ActivityStreams2.0 draft already adjusted to follow same
pattern as in Schema.org. Still those two links show previous difference

*
https://www.w3.org/wiki/Socialwg/Vocabulary_Comparison#summary_of_differences
* https://github.com/jasnell/w3c-socialwg-activitystreams/issues/17
(playground still has the old version)

In second case Hydra defines IriTemplate and IriTemplateMapping in
http://www.hydra-cg.com/spec/latest/core/#templated-links

where we can see that hydra:mapping takes *an array*

ActivityStreams defines (unless it recently changed) UrlTemplate and
ParametersObject in
https://github.com/jasnell/w3c-socialwg-activitystreams/blob/54deeb6d6aa742ffe4e1d6c6e09cb84cdf3123b4/activitystreams2-actions.html#L1035

where we can see that as:parameters takes *an object* (not sure about an
array of objects here...)

I can't yet clearly explain possible issues with using object keys this
way. To my understanding in JSON-LD object keys always map to
*predicates* which limits them to IRIs (no blank nodes or literal values
unless serializing Generalized RDF) which can make difference here.

Maybe someone feels confident in writing more explanation about it? I
think it could come handy in JSON-LD Best Practices note (If we decide
to write it one day)

Thanks!

Received on Saturday, 4 October 2014 11:52:11 UTC