JSON-LD Playground

Play around with JSON-LD markup by typing out some JSON below and seeing what gets generated from it at the bottom of the page. Pick any of the examples below to get started.

NOTES:

Loading the Playground...

Gist
Key Autocomplete
all of the @ keywords
available keys in @context
{
  "@context": {
    "hasMedication": {
      "@id": "http://smartplatforms.org/terms#hasMedication",
      "@type": "@id"
    },
    "hasDrugCode": {
      "@id": "http://smartplatforms.org/terms#hasDrugCode",
      "@type": "@id"
    }
  },
  "@graph": [
    {
      "@id": "medication_lists/1",
      "@type": "MedicationList",
      "hasMedication": [
        "medications/1",
        "medications/2",
        "medications/3"
      ]
    },
    {
      "@id": "medications/1",
      "@type": "Medication",
      "hasDrugCode": {
        "@id": "http://purl.bioontology.org/ontology/RXNORM/213271",
        "@type": "DrugCode",
        "title": "sildenafil 100 MG Oral Tablet [Viagra]",
        "identifier": "213271"
      }
    },
    {
      "@id": "medications/2",
      "@type": "Medication",
      "hasDrugCode": {
        "@id": "http://purl.bioontology.org/ontology/RXNORM/153843",
        "@type": "DrugCode",
        "title": "glimepiride 1 MG Oral Tablet [Amaryl]",
        "identifier": "153843"
      }
    },
    {
      "@id": "medications/3",
      "@type": "Medication",
      "hasDrugCode": {
        "@id": "http://purl.bioontology.org/ontology/RXNORM/153843"
      }
    }
  ]
}
 
{
  "@context": {
    "hasMedication": {
      "@id": "http://smartplatforms.org/terms#hasMedication",
      "@type": "@id"
    },
    "hasDrugCode": {
      "@id": "http://smartplatforms.org/terms#hasDrugCode",
      "@type": "@id"
    }
  },
  "@type": "MedicationList"
}
 
Processing error: (See console for details.)
jsonld.SyntaxError: Invalid JSON-LD syntax; invalid @type in frame.
Processing error: (See console for details.)
jsonld.SyntaxError: Invalid JSON-LD syntax; invalid @type in frame.
Processing error: (See console for details.)
jsonld.SyntaxError: Invalid JSON-LD syntax; invalid @type in frame.
 
 
 
 
 
 
{
  "@graph": [
    {
      "@id": "http://purl.bioontology.org/ontology/RXNORM/153843",
      "@type": "DrugCode"
    },
    {
      "@id": "http://purl.bioontology.org/ontology/RXNORM/213271",
      "@type": "DrugCode"
    },
    {
      "@id": "medication_lists/1",
      "@type": "MedicationList",
      "http://smartplatforms.org/terms#hasMedication": [
        {
          "@id": "medications/1",
          "@type": "Medication",
          "http://smartplatforms.org/terms#hasDrugCode": {
            "@id": "http://purl.bioontology.org/ontology/RXNORM/213271",
            "@type": "DrugCode"
          }
        },
        {
          "@id": "medications/2",
          "@type": "Medication",
          "http://smartplatforms.org/terms#hasDrugCode": {
            "@id": "http://purl.bioontology.org/ontology/RXNORM/153843",
            "@type": "DrugCode"
          }
        },
        {
          "@id": "medications/3",
          "@type": "Medication",
          "http://smartplatforms.org/terms#hasDrugCode": {
            "@id": "http://purl.bioontology.org/ontology/RXNORM/153843"
          }
        }
      ]
    },
    {
      "@id": "medications/1",
      "@type": "Medication",
      "http://smartplatforms.org/terms#hasDrugCode": {
        "@id": "http://purl.bioontology.org/ontology/RXNORM/213271",
        "@type": "DrugCode"
      }
    },
    {
      "@id": "medications/2",
      "@type": "Medication",
      "http://smartplatforms.org/terms#hasDrugCode": {
        "@id": "http://purl.bioontology.org/ontology/RXNORM/153843",
        "@type": "DrugCode"
      }
    },
    {
      "@id": "medications/3",
      "@type": "Medication",
      "http://smartplatforms.org/terms#hasDrugCode": {
        "@id": "http://purl.bioontology.org/ontology/RXNORM/153843",
        "@type": "DrugCode"
      }
    }
  ]
}
 
 
 
 
 
Subject Predicate Object Language Datatype Graph
NOTE: As of 2022-08-25, the demos of RSA and Bitcoin signatures are temporarily unavailable. For a demo involving JSON-LD signatures and other related technology, please see the Verifiable Credentials Playground.