An example of JSON-LD expansion

This example is available at the JSON-LD Playground.

When the JSON data…

{
  "nc:PersonAgeMeasure": {
    "nc:MeasureIntegerValue": 14,
    "nc:TimeUnitCode": "ANN"
  },
  "j:PersonHairColorCode": "BRO",
  "nc:PersonName": {
    "nc:PersonGivenName": "Mortimer",
    "nc:PersonSurName": "Smith",
    "nc:PersonNameSuffixText": "Sr",
    "nc:PersonPreferredName": "Morty"
  }
}

…is processed using the JSON-LD expansion algorithm, against the following JSON context…

{
  "nc": "http://release.niem.gov/niem/niem-core/4.0/#",
  "j": "http://release.niem.gov/niem/domains/jxdm/6.0/#"
}

…it yields the expanded JSON data…

[
  {
    "http://release.niem.gov/niem/domains/jxdm/6.0/#PersonHairColorCode": [
      {
        "@value": "BRO"
      }
    ],
    "http://release.niem.gov/niem/niem-core/4.0/#PersonAgeMeasure": [
      {
        "http://release.niem.gov/niem/niem-core/4.0/#MeasureIntegerValue": [
          {
            "@value": 14
          }
        ],
        "http://release.niem.gov/niem/niem-core/4.0/#TimeUnitCode": [
          {
            "@value": "ANN"
          }
        ]
      }
    ],
    "http://release.niem.gov/niem/niem-core/4.0/#PersonName": [
      {
        "http://release.niem.gov/niem/niem-core/4.0/#PersonGivenName": [
          {
            "@value": "Mortimer"
          }
        ],
        "http://release.niem.gov/niem/niem-core/4.0/#PersonNameSuffixText": [
          {
            "@value": "Sr"
          }
        ],
        "http://release.niem.gov/niem/niem-core/4.0/#PersonPreferredName": [
          {
            "@value": "Morty"
          }
        ],
        "http://release.niem.gov/niem/niem-core/4.0/#PersonSurName": [
          {
            "@value": "Smith"
          }
        ]
      }
    ]
  }
]