Skip to content

File formats

sparqld selects a parser from a file's extension. Every loaded source is loaded into its own named graph and participates in the same watching and error-reporting behavior. Dataset formats load their declared named graphs; see Named graphs.

  • JSON-LD


    .json, .jsonld

    Linked data in JSON. Declare any terms and keyword aliases in the document's @context.

  • YAML-LD


    .yamlld

    JSON-LD authored as YAML 1.2.

  • Markdown-LD


    .md

    YAML-LD front matter. Any YAML front matter is treated as linked data; the Markdown body is ignored, and Markdown without YAML front matter is ignored entirely.

  • Notation3


    .n3

    Compact RDF graph syntax with additional Notation3 features.

  • N-Quads


    .nq

    Line-oriented RDF dataset syntax.

  • N-Triples


    .nt, .txt

    Line-oriented RDF graph syntax.

  • RDF/XML


    .rdf, .xml

    XML serialization of an RDF graph.

  • TriG


    .trig

    Turtle syntax for RDF datasets.

  • Turtle


    .ttl

    Compact RDF graph syntax.

Contexts

JSON-LD, YAML-LD, and Markdown-LD use the contexts their documents declare. See Contexts for the supported dollar-keyword context and local context files.