Re: Representing an object of objects in json-ld

Hi, Ashley

JSON-LD is all about connecting property keys and values back to what they
are representing. What do the integer keys refer to in this case, and is
there a limited number of possibilities? Will you be able to build a set of
URLs to host term definitions for each possible key, or do they all have
essentially the same definition?

If you don't know what integers will be used, but they all have the same
definition, you could use the "@vocab" JSON-LD property to make any key in
your document expand to a base IRI of your choosing. Like "
http://defn.org/ints/12" and "http://defn.org/ints/27". This would apply to
any key in the document, not just integer keys (in case someone didn't
follow the rules for building the doc).

Nate Otto, Developer
concentricsky.com

On Mon, Jan 5, 2015, 7:56 AM Ashley Davison-White <adw999@gmail.com> wrote:

> Hi all
>
> I'm in need of some advice for this structure of json as below. How can
> this be represented in json-ld? It's an object of objects.
>
> ...... id / context / name etc
> "values": {
> "12": {
> "46": 0.17
> },
> "13": {
> "0": 0,
> "30": 0
> }
> }
> ....
>
> Where the key is always an integer but the value could be an integer or
> string.
>
> Thanks,
> - Ashley
>

Received on Monday, 5 January 2015 16:37:09 UTC