Re: Compaciting @list with single element

Hello!

The playground is correct. In order for the term using @list container to
match, the value to be compacted must be an ordered list (a.k.a. an RDF
collection or rdf:List). In expanded form, this is expressed as {"@list":
[...]}. So in your case, the input needs to be:

    {
      "@id": "http://example.com/Person",
      "http://xmlns.com/foaf/0.1/topic_interest": {"@list": ["RDF"]}
    }

(To see the explicit underlying difference, look at the N-Quads tab for
your two cases.)

Cheers,
Niklas

On Sun, Dec 7, 2014 at 1:00 PM, <tomasz@t-code.pl> wrote:

> Hi
>
> Sorry about the incomplete email.
>
> The specs [1] say that when a property is defined in @context as
> @container @list or @set it will always be represented as an array, even if
> there's only one value.
>
> However in the playground it works for @set [2] but not for @list [3].
>
> Is that a bug or did I misunderstand the specs?
>
> [1]: http://www.w3.org/TR/json-ld/#sets-and-lists
> [2]: http://tinyurl.com/o6nhftk
> [3]: http://tinyurl.com/nd8rkkn
>
>
>

Received on Sunday, 7 December 2014 13:24:54 UTC