when is it ok to replace a single value with an array?

Hi,


I’m reading the spec and it seems like a value can always either be a single item/object or an array. For example:

http://www.w3.org/TR/json-ld/#sets-and-lists <http://www.w3.org/TR/json-ld/#sets-and-lists>

EXAMPLE 43: Using an expanded form to set multiple values
{
  "@id": "http://example.org/articles/8",
  "dc:title": 
  [
    {
      "@value": "Das Kapital",
      "@language": "de"
    },
    {
      "@value": "Capital",
      "@language": "en"
    }
  ]
}
and it’s also valid to use a single value:

{
  "@id": "http://example.org/articles/8",
  "dc:title": “Capital”;
}
So a client should always handle both cases? And also from the server’s perspective, when is it ok to replace a single item with an array? 

regards,
Milan

Received on Saturday, 27 June 2015 05:19:58 UTC