Documentation

JsonLdException extends RuntimeException
in package

Exception class thrown when an error occurs during parsing.

Tags
author

Markus Lanthaler mail@markus-lanthaler.com

Table of Contents

Constants

COLLIDING_KEYWORDS  = "colliding keywords"
Two properties which expand to the same keyword have been detected.
COMPACTION_TO_LIST_OF_LISTS  = "compaction to list of lists"
The compacted document contains a list of lists as multiple lists have been compacted to the same term.
CONFLICTING_INDEXES  = "conflicting indexes"
Multiple conflicting indexes have been found for the same node.
CYCLIC_IRI_MAPPING  = "cyclic IRI mapping"
IRI mapping A cycle in IRI mappings has been detected.
INVALID_BASE_IRI  = "invalid base IRI"
An invalid base IRI has been detected, i.e., it is neither an absolute IRI nor null.
INVALID_CONTAINER_MAPPING  = "invalid container mapping"
An @container member was encountered whose value was not one of the following strings: @list, @set, or @index.
INVALID_DEFAULT_LANGUAGE  = "invalid default language"
The value of the default language is not a string or null and thus invalid.
INVALID_ID_VALUE  = "invalid @id value"
An @id member was encountered whose value was not a string.
INVALID_INDEX_VALUE  = "invalid @index value"
An @index member was encountered whose value was not a string.
INVALID_IRI_MAPPING  = "invalid IRI mapping"
IRI mapping A local context contains a term that has an invalid or missing IRI mapping.
INVALID_KEYWORD_ALIAS  = "invalid keyword alias"
An invalid keyword alias definition has been encountered.
INVALID_LANGUAGE_MAP_VALUE  = "invalid language map value"
An invalid value in a language map has been detected. It has to be a string or an array of strings.
INVALID_LANGUAGE_MAPPING  = "invalid language mapping"
An @language member in a term definition was encountered whose value was neither a string nor null and thus invalid.
INVALID_LANGUAGE_TAGGED_STRING  = "invalid language-tagged string"
A language-tagged string with an invalid language value was detected.
INVALID_LANGUAGE_TAGGED_VALUE  = "invalid language-tagged value"
A number, true, or false with an associated language tag was detected.
INVALID_LOCAL_CONTEXT  = "invalid local context"
In invalid local context was detected.
INVALID_REMOTE_CONTEXT  = "invalid remote context"
No valid context document has been found for a referenced, remote context.
INVALID_REVERSE_PROPERTY  = "invalid reverse property"
An invalid reverse property definition has been detected.
INVALID_REVERSE_PROPERTY_MAP  = "invalid reverse property map"
An invalid reverse property map has been detected. No keywords apart from @context are allowed in reverse property maps.
INVALID_REVERSE_PROPERTY_VALUE  = "invalid reverse property value"
An invalid value for a reverse property has been detected. The value of an inverse property must be a node object.
INVALID_REVERSE_VALUE  = "invalid @reverse value"
An invalid value for an @reverse member has been detected, i.e., the value was not a JSON object.
INVALID_SET_OR_LIST_OBJECT  = "invalid set or list object"
A set object or list object with disallowed members has been detected.
INVALID_TERM_DEFINITION  = "invalid term definition"
An invalid term definition has been detected.
INVALID_TYPE_MAPPING  = "invalid type mapping"
An @type member in a term definition was encountered whose value could not be expanded to an absolute IRI.
INVALID_TYPE_VALUE  = "invalid type value"
An invalid value for an @type member has been detected, i.e., the value was neither a string nor an array of strings.
INVALID_TYPED_VALUE  = "invalid typed value"
A typed value with an invalid type was detected.
INVALID_VALUE_OBJECT  = "invalid value object"
A value object with disallowed members has been detected.
INVALID_VALUE_OBJECT_VALUE  = "invalid value object value"
An invalid value for the @value member of a value object has been detected, i.e., it is neither a scalar nor null.
INVALID_VOCAB_MAPPING  = "invalid vocab mapping"
An invalid vocabulary mapping has been detected, i.e., it is neither an absolute IRI nor null.
KEYWORD_REDEFINITION  = "keyword redefinition"
A keyword redefinition has been detected.
LIST_OF_LISTS  = "list of lists"
A list of lists was detected. List of lists are not supported in this version of JSON-LD due to the algorithmic complexity.
LOADING_DOCUMENT_FAILED  = "loading document failed"
The document could not be loaded or parsed as JSON.
LOADING_REMOTE_CONTEXT_FAILED  = "loading remote context failed"
There was a problem encountered loading a remote context.
MULTIPLE_CONTEXT_LINK_HEADERS  = "multiple context link headers"
Multiple HTTP Link Headers [RFC5988] using th http://www.w3.org/ns/json-ld#context link relation have been detected.
RECURSIVE_CONTEXT_INCLUSION  = "recursive context inclusion"
A cycle in remote context inclusions has been detected.
UNSPECIFIED  = 'unknown'
An unspecified error code (none was standardized yet)

Properties

$document  : null|string
The document that triggered the error
$rawMessage  : string
The raw error message (containing place-holders)
$snippet  : null|string
The JSON-LD snippet that triggered the error

Methods

__construct()  : mixed
Constructor.
getParsedFile()  : null|string
Gets the document that triggered the error
getSnippet()  : null|string
Gets the snippet of code near the error.
updateMessage()  : mixed
Updates the exception message by including the file name if available.

Constants

COLLIDING_KEYWORDS

Two properties which expand to the same keyword have been detected.

public mixed COLLIDING_KEYWORDS = "colliding keywords"

This might occur if a keyword and an alias thereof are used at the same time.

COMPACTION_TO_LIST_OF_LISTS

The compacted document contains a list of lists as multiple lists have been compacted to the same term.

public mixed COMPACTION_TO_LIST_OF_LISTS = "compaction to list of lists"

CONFLICTING_INDEXES

Multiple conflicting indexes have been found for the same node.

public mixed CONFLICTING_INDEXES = "conflicting indexes"

CYCLIC_IRI_MAPPING

IRI mapping A cycle in IRI mappings has been detected.

public mixed CYCLIC_IRI_MAPPING = "cyclic IRI mapping"

INVALID_BASE_IRI

An invalid base IRI has been detected, i.e., it is neither an absolute IRI nor null.

public mixed INVALID_BASE_IRI = "invalid base IRI"

INVALID_CONTAINER_MAPPING

An @container member was encountered whose value was not one of the following strings: @list, @set, or @index.

public mixed INVALID_CONTAINER_MAPPING = "invalid container mapping"

INVALID_DEFAULT_LANGUAGE

The value of the default language is not a string or null and thus invalid.

public mixed INVALID_DEFAULT_LANGUAGE = "invalid default language"

INVALID_ID_VALUE

An @id member was encountered whose value was not a string.

public mixed INVALID_ID_VALUE = "invalid @id value"

INVALID_INDEX_VALUE

An @index member was encountered whose value was not a string.

public mixed INVALID_INDEX_VALUE = "invalid @index value"

INVALID_IRI_MAPPING

IRI mapping A local context contains a term that has an invalid or missing IRI mapping.

public mixed INVALID_IRI_MAPPING = "invalid IRI mapping"

INVALID_KEYWORD_ALIAS

An invalid keyword alias definition has been encountered.

public mixed INVALID_KEYWORD_ALIAS = "invalid keyword alias"

INVALID_LANGUAGE_MAP_VALUE

An invalid value in a language map has been detected. It has to be a string or an array of strings.

public mixed INVALID_LANGUAGE_MAP_VALUE = "invalid language map value"

INVALID_LANGUAGE_MAPPING

An @language member in a term definition was encountered whose value was neither a string nor null and thus invalid.

public mixed INVALID_LANGUAGE_MAPPING = "invalid language mapping"

INVALID_LANGUAGE_TAGGED_STRING

A language-tagged string with an invalid language value was detected.

public mixed INVALID_LANGUAGE_TAGGED_STRING = "invalid language-tagged string"

INVALID_LANGUAGE_TAGGED_VALUE

A number, true, or false with an associated language tag was detected.

public mixed INVALID_LANGUAGE_TAGGED_VALUE = "invalid language-tagged value"

INVALID_LOCAL_CONTEXT

In invalid local context was detected.

public mixed INVALID_LOCAL_CONTEXT = "invalid local context"

INVALID_REMOTE_CONTEXT

No valid context document has been found for a referenced, remote context.

public mixed INVALID_REMOTE_CONTEXT = "invalid remote context"

INVALID_REVERSE_PROPERTY

An invalid reverse property definition has been detected.

public mixed INVALID_REVERSE_PROPERTY = "invalid reverse property"

INVALID_REVERSE_PROPERTY_MAP

An invalid reverse property map has been detected. No keywords apart from @context are allowed in reverse property maps.

public mixed INVALID_REVERSE_PROPERTY_MAP = "invalid reverse property map"

INVALID_REVERSE_PROPERTY_VALUE

An invalid value for a reverse property has been detected. The value of an inverse property must be a node object.

public mixed INVALID_REVERSE_PROPERTY_VALUE = "invalid reverse property value"

INVALID_REVERSE_VALUE

An invalid value for an @reverse member has been detected, i.e., the value was not a JSON object.

public mixed INVALID_REVERSE_VALUE = "invalid @reverse value"

INVALID_SET_OR_LIST_OBJECT

A set object or list object with disallowed members has been detected.

public mixed INVALID_SET_OR_LIST_OBJECT = "invalid set or list object"

INVALID_TERM_DEFINITION

An invalid term definition has been detected.

public mixed INVALID_TERM_DEFINITION = "invalid term definition"

INVALID_TYPE_MAPPING

An @type member in a term definition was encountered whose value could not be expanded to an absolute IRI.

public mixed INVALID_TYPE_MAPPING = "invalid type mapping"

INVALID_TYPE_VALUE

An invalid value for an @type member has been detected, i.e., the value was neither a string nor an array of strings.

public mixed INVALID_TYPE_VALUE = "invalid type value"

INVALID_TYPED_VALUE

A typed value with an invalid type was detected.

public mixed INVALID_TYPED_VALUE = "invalid typed value"

INVALID_VALUE_OBJECT

A value object with disallowed members has been detected.

public mixed INVALID_VALUE_OBJECT = "invalid value object"

INVALID_VALUE_OBJECT_VALUE

An invalid value for the @value member of a value object has been detected, i.e., it is neither a scalar nor null.

public mixed INVALID_VALUE_OBJECT_VALUE = "invalid value object value"

INVALID_VOCAB_MAPPING

An invalid vocabulary mapping has been detected, i.e., it is neither an absolute IRI nor null.

public mixed INVALID_VOCAB_MAPPING = "invalid vocab mapping"

KEYWORD_REDEFINITION

A keyword redefinition has been detected.

public mixed KEYWORD_REDEFINITION = "keyword redefinition"

LIST_OF_LISTS

A list of lists was detected. List of lists are not supported in this version of JSON-LD due to the algorithmic complexity.

public mixed LIST_OF_LISTS = "list of lists"

LOADING_DOCUMENT_FAILED

The document could not be loaded or parsed as JSON.

public mixed LOADING_DOCUMENT_FAILED = "loading document failed"

LOADING_REMOTE_CONTEXT_FAILED

There was a problem encountered loading a remote context.

public mixed LOADING_REMOTE_CONTEXT_FAILED = "loading remote context failed"

Multiple HTTP Link Headers [RFC5988] using th http://www.w3.org/ns/json-ld#context link relation have been detected.

public mixed MULTIPLE_CONTEXT_LINK_HEADERS = "multiple context link headers"

RECURSIVE_CONTEXT_INCLUSION

A cycle in remote context inclusions has been detected.

public mixed RECURSIVE_CONTEXT_INCLUSION = "recursive context inclusion"

UNSPECIFIED

An unspecified error code (none was standardized yet)

public mixed UNSPECIFIED = 'unknown'

Properties

$document

The document that triggered the error

private null|string $document

$rawMessage

The raw error message (containing place-holders)

private string $rawMessage

$snippet

The JSON-LD snippet that triggered the error

private null|string $snippet

Methods

__construct()

Constructor.

public __construct(string $code[, null|string $message = null ][, null|mixed $snippet = null ][, null|string $document = null ][, null|Exception $previous = null ]) : mixed
Parameters
$code : string

The error code

$message : null|string = null

The error message

$snippet : null|mixed = null

The code snippet

$document : null|string = null

The document that triggered the error

$previous : null|Exception = null

The previous exception

getParsedFile()

Gets the document that triggered the error

public getParsedFile() : null|string
Return values
null|string

The document that triggered the error

getSnippet()

Gets the snippet of code near the error.

public getSnippet() : null|string
Return values
null|string

The snippet of code

updateMessage()

Updates the exception message by including the file name if available.

private updateMessage() : mixed

        
On this page

Search results