RE: Clarification of @set and expansion

Hello,

I think I overlooked something when I first asked how expansion is supposed
to work now. I think expansion should always return an array at the top
level and not sometimes an object and sometimes an array. This is line with
our previous decision to convert every single value into an array and would
generate a very predictable structure which makes it quite easy to work
with. So, looking again at my last example:

{
  "@id": "id1",
  "@type": "t1",
  "term1": "v1",
  "term2": { "@value": "v2", "@type": "t2" },
  "term3": { "@value": "v3", "@language": "en" },
  "term4": 4,
  "term5": [ 50, 51 ],
}
 
 
I would argue that the result of expansion should be (plus IRI expansion):

[
  {
    "@id": "id1",
    "@type": [ "t1" ],
    "term1": [ "v1" ],
    "term2": [ { "@value": "v2", "@type": "t2" } ],
    "term3": [ { "@value": "v3", "@language": "en" } ],
    "term4": [ 4 ],
    "term5": [ 50, 51 ]
  }
]



--
Markus Lanthaler
@markuslanthaler

Received on Wednesday, 21 March 2012 11:04:43 UTC