Skip to content

Basic: What are relative URLs resolved against? #2

@msporny

Description

@msporny

How is the base URL for properties and values determined in JSON-LD Basic?

The base URL for properties is determined in this order:

  1. @vocab if it exists
  2. the @context URL if one exists
  3. the document URL if it exists
  4. the JSON-LD namespace: http://purl.org/json-ld/terms#

The base URL for relative IRIs in values is determined in this order:

  1. @base if it exists
  2. the document URL if it exists
  3. the JSON-LD namespace: http://purl.org/json-ld/items#

The document URL would have to be provided by the application utilizing the JSON-LD processor.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions