diff --git a/.gitignore b/.gitignore
index a88c4920c..118ec0bdd 100644
--- a/.gitignore
+++ b/.gitignore
@@ -18,3 +18,4 @@ test_reports/*latest.ttl
# PyCharm
.idea/
prepare_changelog.sh
+.venv/
diff --git a/README.md b/README.md
index f6e8c3abd..cc200b6e3 100644
--- a/README.md
+++ b/README.md
@@ -138,8 +138,7 @@ See also [./examples](./examples)
## Features
The library contains parsers and serializers for RDF/XML, N3,
-NTriples, N-Quads, Turtle, TriX, RDFa and Microdata. JSON-LD parsing/serializing can be achieved using the
-[JSON-LD plugin](https://github.com/RDFLib/rdflib-jsonld).
+NTriples, N-Quads, Turtle, TriX, JSON-LD, RDFa and Microdata.
The library presents a Graph interface which can be backed by
any one of a number of Store implementations.
diff --git a/docs/index.rst b/docs/index.rst
index 94f972182..b79c75a19 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -8,8 +8,8 @@ RDFLib is a pure Python package for working with `RDF `_
* **Parsers & Serializers**
- * for RDF/XML, N3, NTriples, N-Quads, Turtle, TriX, RDFa and Microdata
- * and JSON-LD, via a plugin module
+ * for RDF/XML, N3, NTriples, N-Quads, Turtle, TriX, JSON-LD, RDFa and Microdata
+
* **Store implementations**
@@ -130,4 +130,4 @@ Here are a few RDF and Python terms referred to in this documentation. They are
The Resource Description Framework (RDF) is a framework for representing information in the Web. RDF data is
stored in graphs that are sets of subject-predicate-object triples, where the elements may be IRIs, blank nodes,
or datatyped literals. See the `OWL 2 Web Ontology Language
- Document Overview `_ for more info.
\ No newline at end of file
+ Document Overview `_ for more info.
diff --git a/docs/upgrade5to6.rst b/docs/upgrade5to6.rst
index ecaf3631a..7ffa7e68b 100644
--- a/docs/upgrade5to6.rst
+++ b/docs/upgrade5to6.rst
@@ -16,6 +16,23 @@ compatible with. If you need very long-term backwards-compatibility or Python 2
Major Changes
-------------
+The most notable changes in RDFLib 6.0.0 are:
+
+Python 3.7+
+^^^^^^^^^^^
+* The oldest version of python you can use to run RDFLib is now 3.7.
+* This is a big jump from RDFLib 5.0.0 that worked on python 2.7 and 3.5.
+* This change is to allow the library maintainers to adopt more modern development tools,
+ newer language features, and avoid the need to support EOL versions of python in he future
+
+JSON-LD integration and JSON-LD 1.1
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+* The json-ld serializer/parser plugin was by far the most commonly used RDFLib addon.
+* Last year we brought it under the RDFLib org in Github
+* Now for 6.0.0 release the JSON-LD serializer and parser are integrated into RDFLib core
+* This includes the experimental support for the JSON-LD v1.1 spec
+* You no longer need to install the json-ld dependency separately.
+
All Changes
-----------
@@ -56,3 +73,7 @@ Documentation Fixes:
^^^^^^^^^^^^^^^^^^^^
* Fix a doc string in the query module
`PR #976 `_
+
+Integrade JSON-LD into RDFLib:
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+`PR #1354 `_
diff --git a/rdflib/plugin.py b/rdflib/plugin.py
index 878125046..2b1ed4efd 100644
--- a/rdflib/plugin.py
+++ b/rdflib/plugin.py
@@ -168,6 +168,10 @@ def plugins(name=None, kind=None):
register("ntriples", Serializer, "rdflib.plugins.serializers.nt", "NTSerializer")
register("nt", Serializer, "rdflib.plugins.serializers.nt", "NTSerializer")
register("nt11", Serializer, "rdflib.plugins.serializers.nt", "NT11Serializer")
+register("json-ld", Serializer, "rdflib.plugins.serializers.jsonld", "JsonLDSerializer")
+register(
+ "application/ld+json", Serializer, "rdflib.plugins.serializers.jsonld", "JsonLDSerializer"
+)
# Register Quad Serializers
register(
@@ -198,6 +202,9 @@ def plugins(name=None, kind=None):
register("ntriples", Parser, "rdflib.plugins.parsers.ntriples", "NTParser")
register("nt", Parser, "rdflib.plugins.parsers.ntriples", "NTParser")
register("nt11", Parser, "rdflib.plugins.parsers.ntriples", "NTParser")
+register("application/json+ld", Parser, "rdflib.plugins.parsers.jsonld", "JsonLDParser")
+register("json-ld", Parser, "rdflib.plugins.parsers.jsonld", "JsonLDParser")
+
# Register Quad Parsers
register("application/n-quads", Parser, "rdflib.plugins.parsers.nquads", "NQuadsParser")
diff --git a/rdflib/plugins/parsers/jsonld.py b/rdflib/plugins/parsers/jsonld.py
new file mode 100644
index 000000000..dcb5eca3e
--- /dev/null
+++ b/rdflib/plugins/parsers/jsonld.py
@@ -0,0 +1,546 @@
+# -*- coding: utf-8 -*-
+"""
+This parser will interpret a JSON-LD document as an RDF Graph. See:
+
+ http://json-ld.org/
+
+Example usage::
+
+ >>> from rdflib import Graph, URIRef, Literal
+ >>> test_json = '''
+ ... {
+ ... "@context": {
+ ... "dc": "http://purl.org/dc/terms/",
+ ... "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
+ ... "rdfs": "http://www.w3.org/2000/01/rdf-schema#"
+ ... },
+ ... "@id": "http://example.org/about",
+ ... "dc:title": {
+ ... "@language": "en",
+ ... "@value": "Someone's Homepage"
+ ... }
+ ... }
+ ... '''
+ >>> g = Graph().parse(data=test_json, format='json-ld')
+ >>> list(g) == [(URIRef('http://example.org/about'),
+ ... URIRef('http://purl.org/dc/terms/title'),
+ ... Literal("Someone's Homepage", lang='en'))]
+ True
+
+"""
+# From: https://github.com/RDFLib/rdflib-jsonld/blob/feature/json-ld-1.1/rdflib_jsonld/parser.py
+
+# NOTE: This code reads the entire JSON object into memory before parsing, but
+# we should consider streaming the input to deal with arbitrarily large graphs.
+
+import warnings
+from rdflib.graph import ConjunctiveGraph
+from rdflib.parser import Parser, URLInputSource
+from rdflib.namespace import RDF, XSD
+from rdflib.term import URIRef, BNode, Literal
+
+from ..shared.jsonld.context import Context, Term, UNDEF
+from ..shared.jsonld.util import (
+ json,
+ source_to_json,
+ VOCAB_DELIMS,
+ context_from_urlinputsource,
+)
+from ..shared.jsonld.keys import (
+ CONTEXT,
+ GRAPH,
+ ID,
+ INCLUDED,
+ INDEX,
+ JSON,
+ LANG,
+ LIST,
+ NEST,
+ NONE,
+ REV,
+ SET,
+ TYPE,
+ VALUE,
+ VOCAB,
+)
+
+
+__all__ = ["JsonLDParser", "to_rdf"]
+
+
+# Add jsonld suffix so RDFLib can guess format from file name
+try:
+ from rdflib.util import SUFFIX_FORMAT_MAP
+
+ if "jsonld" not in SUFFIX_FORMAT_MAP:
+ SUFFIX_FORMAT_MAP["jsonld"] = "application/ld+json"
+except ImportError:
+ pass
+
+
+TYPE_TERM = Term(str(RDF.type), TYPE, VOCAB)
+
+ALLOW_LISTS_OF_LISTS = True # NOTE: Not allowed in JSON-LD 1.0
+
+
+class JsonLDParser(Parser):
+ def __init__(self):
+ super(JsonLDParser, self).__init__()
+
+ def parse(self, source, sink, **kwargs):
+ # TODO: docstring w. args and return value
+ encoding = kwargs.get("encoding") or "utf-8"
+ if encoding not in ("utf-8", "utf-16"):
+ warnings.warn(
+ "JSON should be encoded as unicode. "
+ + "Given encoding was: %s" % encoding
+ )
+
+ base = kwargs.get("base") or sink.absolutize(
+ source.getPublicId() or source.getSystemId() or ""
+ )
+
+ context_data = kwargs.get("context")
+ if not context_data and isinstance(source, URLInputSource):
+ context_data = context_from_urlinputsource(source)
+
+ try:
+ version = float(kwargs.get("version", "1.0"))
+ except ValueError:
+ version = None
+
+ generalized_rdf = kwargs.get("generalized_rdf", False)
+
+ data = source_to_json(source)
+
+ # NOTE: A ConjunctiveGraph parses into a Graph sink, so no sink will be
+ # context_aware. Keeping this check in case RDFLib is changed, or
+ # someone passes something context_aware to this parser directly.
+ if not sink.context_aware:
+ conj_sink = ConjunctiveGraph(store=sink.store, identifier=sink.identifier)
+ else:
+ conj_sink = sink
+
+ to_rdf(data, conj_sink, base, context_data, version, generalized_rdf)
+
+
+def to_rdf(
+ data,
+ dataset,
+ base=None,
+ context_data=None,
+ version=None,
+ generalized_rdf=False,
+ allow_lists_of_lists=None,
+):
+ # TODO: docstring w. args and return value
+ context = Context(base=base, version=version)
+ if context_data:
+ context.load(context_data)
+ parser = Parser(
+ generalized_rdf=generalized_rdf, allow_lists_of_lists=allow_lists_of_lists
+ )
+ return parser.parse(data, context, dataset)
+
+
+class Parser(object):
+ def __init__(self, generalized_rdf=False, allow_lists_of_lists=None):
+ self.generalized_rdf = generalized_rdf
+ self.allow_lists_of_lists = (
+ allow_lists_of_lists
+ if allow_lists_of_lists is not None
+ else ALLOW_LISTS_OF_LISTS
+ )
+
+ def parse(self, data, context, dataset):
+ topcontext = False
+
+ if isinstance(data, list):
+ resources = data
+ elif isinstance(data, dict):
+ local_context = data.get(CONTEXT)
+ if local_context:
+ context.load(local_context, context.base)
+ topcontext = True
+ resources = data
+ if not isinstance(resources, list):
+ resources = [resources]
+
+ if context.vocab:
+ dataset.bind(None, context.vocab)
+ for name, term in context.terms.items():
+ if term.id and term.id.endswith(VOCAB_DELIMS):
+ dataset.bind(name, term.id)
+
+ graph = dataset.default_context if dataset.context_aware else dataset
+
+ for node in resources:
+ self._add_to_graph(dataset, graph, context, node, topcontext)
+
+ return graph
+
+ def _add_to_graph(self, dataset, graph, context, node, topcontext=False):
+ if not isinstance(node, dict) or context.get_value(node):
+ return
+
+ if CONTEXT in node and not topcontext:
+ local_context = node[CONTEXT]
+ if local_context:
+ context = context.subcontext(local_context)
+ else:
+ context = Context(base=context.doc_base)
+
+ context = context.get_context_for_type(node)
+
+ id_val = context.get_id(node)
+
+ if id_val is None:
+ id_val = self._get_nested_id(context, node)
+
+ if isinstance(id_val, str):
+ subj = self._to_rdf_id(context, id_val)
+ else:
+ subj = BNode()
+
+ if subj is None:
+ return None
+
+ # NOTE: crude way to signify that this node might represent a named graph
+ no_id = id_val is None
+
+ for key, obj in node.items():
+ if key == CONTEXT or key in context.get_keys(ID):
+ continue
+
+ if key == REV or key in context.get_keys(REV):
+ for rkey, robj in obj.items():
+ self._key_to_graph(
+ dataset,
+ graph,
+ context,
+ subj,
+ rkey,
+ robj,
+ reverse=True,
+ no_id=no_id,
+ )
+ else:
+ self._key_to_graph(dataset, graph, context, subj, key, obj, no_id=no_id)
+
+ return subj
+
+ def _get_nested_id(self, context, node):
+ for key, obj in node.items():
+ if context.version >= 1.1 and key in context.get_keys(NEST):
+ term = context.terms.get(key)
+ if term and term.id is None:
+ continue
+ objs = obj if isinstance(obj, list) else [obj]
+ for obj in objs:
+ if not isinstance(obj, dict):
+ continue
+ id_val = context.get_id(obj)
+ if not id_val:
+ subcontext = context.get_context_for_term(
+ context.terms.get(key)
+ )
+ id_val = self._get_nested_id(subcontext, obj)
+ if isinstance(id_val, str):
+ return id_val
+
+ def _key_to_graph(
+ self, dataset, graph, context, subj, key, obj, reverse=False, no_id=False
+ ):
+
+ if isinstance(obj, list):
+ obj_nodes = obj
+ else:
+ obj_nodes = [obj]
+
+ term = context.terms.get(key)
+ if term:
+ term_id = term.id
+ if term.type == JSON:
+ obj_nodes = [self._to_typed_json_value(obj)]
+ elif LIST in term.container:
+ obj_nodes = [{LIST: obj_nodes}]
+ elif isinstance(obj, dict):
+ obj_nodes = self._parse_container(context, term, obj)
+ else:
+ term_id = None
+
+ if TYPE in (key, term_id):
+ term = TYPE_TERM
+
+ if GRAPH in (key, term_id):
+ if dataset.context_aware and not no_id:
+ subgraph = dataset.get_context(subj)
+ else:
+ subgraph = graph
+ for onode in obj_nodes:
+ self._add_to_graph(dataset, subgraph, context, onode)
+ return
+
+ if SET in (key, term_id):
+ for onode in obj_nodes:
+ self._add_to_graph(dataset, graph, context, onode)
+ return
+
+ if INCLUDED in (key, term_id):
+ for onode in obj_nodes:
+ self._add_to_graph(dataset, graph, context, onode)
+ return
+
+ if context.version >= 1.1 and key in context.get_keys(NEST):
+ term = context.terms.get(key)
+ if term and term.id is None:
+ return
+ objs = obj if isinstance(obj, list) else [obj]
+ for obj in objs:
+ if not isinstance(obj, dict):
+ continue
+ for nkey, nobj in obj.items():
+ # NOTE: we've already captured subject
+ if nkey in context.get_keys(ID):
+ continue
+ subcontext = context.get_context_for_type(obj)
+ self._key_to_graph(dataset, graph, subcontext, subj, nkey, nobj)
+ return
+
+ pred_uri = term.id if term else context.expand(key)
+
+ context = context.get_context_for_term(term)
+
+ flattened = []
+ for obj in obj_nodes:
+ if isinstance(obj, dict):
+ objs = context.get_set(obj)
+ if objs is not None:
+ obj = objs
+ if isinstance(obj, list):
+ flattened += obj
+ continue
+ flattened.append(obj)
+ obj_nodes = flattened
+
+ if not pred_uri:
+ return
+
+ if term and term.reverse:
+ reverse = not reverse
+
+ bid = self._get_bnodeid(pred_uri)
+ if bid:
+ if not self.generalized_rdf:
+ return
+ pred = BNode(bid)
+ else:
+ pred = URIRef(pred_uri)
+
+ for obj_node in obj_nodes:
+ obj = self._to_object(dataset, graph, context, term, obj_node)
+ if obj is None:
+ continue
+ if reverse:
+ graph.add((obj, pred, subj))
+ else:
+ graph.add((subj, pred, obj))
+
+ def _parse_container(self, context, term, obj):
+ if LANG in term.container:
+ obj_nodes = []
+ for lang, values in obj.items():
+ if not isinstance(values, list):
+ values = [values]
+ if lang in context.get_keys(NONE):
+ obj_nodes += values
+ else:
+ for v in values:
+ obj_nodes.append((v, lang))
+ return obj_nodes
+
+ v11 = context.version >= 1.1
+
+ if v11 and GRAPH in term.container and ID in term.container:
+ return [
+ dict({GRAPH: o})
+ if k in context.get_keys(NONE)
+ else dict({ID: k, GRAPH: o})
+ if isinstance(o, dict)
+ else o
+ for k, o in obj.items()
+ ]
+
+ elif v11 and GRAPH in term.container and INDEX in term.container:
+ return [dict({GRAPH: o}) for k, o in obj.items()]
+
+ elif v11 and GRAPH in term.container:
+ return [dict({GRAPH: obj})]
+
+ elif v11 and ID in term.container:
+ return [
+ dict({ID: k}, **o)
+ if isinstance(o, dict) and k not in context.get_keys(NONE)
+ else o
+ for k, o in obj.items()
+ ]
+
+ elif v11 and TYPE in term.container:
+ return [
+ self._add_type(
+ context,
+ {ID: context.expand(o) if term.type == VOCAB else o}
+ if isinstance(o, str)
+ else o,
+ k,
+ )
+ if isinstance(o, (dict, str)) and k not in context.get_keys(NONE)
+ else o
+ for k, o in obj.items()
+ ]
+
+ elif INDEX in term.container:
+ obj_nodes = []
+ for key, nodes in obj.items():
+ if not isinstance(nodes, list):
+ nodes = [nodes]
+ for node in nodes:
+ if v11 and term.index and key not in context.get_keys(NONE):
+ if not isinstance(node, dict):
+ node = {ID: node}
+ values = node.get(term.index, [])
+ if not isinstance(values, list):
+ values = [values]
+ values.append(key)
+ node[term.index] = values
+ obj_nodes.append(node)
+ return obj_nodes
+
+ return [obj]
+
+ @staticmethod
+ def _add_type(context, o, k):
+ otype = context.get_type(o) or []
+ if otype and not isinstance(otype, list):
+ otype = [otype]
+ otype.append(k)
+ o[TYPE] = otype
+ return o
+
+ def _to_object(self, dataset, graph, context, term, node, inlist=False):
+ if isinstance(node, tuple):
+ value, lang = node
+ if value is None:
+ return
+ if lang and " " in lang:
+ return
+ return Literal(value, lang=lang)
+
+ if isinstance(node, dict):
+ node_list = context.get_list(node)
+ if node_list is not None:
+ if inlist and not self.allow_lists_of_lists:
+ return
+ listref = self._add_list(dataset, graph, context, term, node_list)
+ if listref:
+ return listref
+
+ else: # expand compacted value
+ if term and term.type:
+ if term.type == JSON:
+ node = self._to_typed_json_value(node)
+ elif node is None:
+ return
+ elif term.type == ID and isinstance(node, str):
+ node = {ID: context.resolve(node)}
+ elif term.type == VOCAB and isinstance(node, str):
+ node = {ID: context.expand(node) or context.resolve_iri(node)}
+ else:
+ node = {TYPE: term.type, VALUE: node}
+ else:
+ if node is None:
+ return
+ if isinstance(node, float):
+ return Literal(node, datatype=XSD.double)
+
+ if term and term.language is not UNDEF:
+ lang = term.language
+ else:
+ lang = context.language
+ return Literal(node, lang=lang)
+
+ lang = context.get_language(node)
+ datatype = not lang and context.get_type(node) or None
+ value = context.get_value(node)
+ if datatype in context.get_keys(JSON):
+ node = self._to_typed_json_value(value)
+ datatype = context.get_type(node)
+ value = context.get_value(node)
+
+ if lang or context.get_key(VALUE) in node or VALUE in node:
+ if value is None:
+ return None
+ if lang:
+ if " " in lang:
+ return
+ return Literal(value, lang=lang)
+ elif datatype:
+ return Literal(value, datatype=context.expand(datatype))
+ else:
+ return Literal(value)
+ else:
+ return self._add_to_graph(dataset, graph, context, node)
+
+ def _to_rdf_id(self, context, id_val):
+ bid = self._get_bnodeid(id_val)
+ if bid:
+ return BNode(bid)
+ else:
+ uri = context.resolve(id_val)
+ if not self.generalized_rdf and ":" not in uri:
+ return None
+ return URIRef(uri)
+
+ def _get_bnodeid(self, ref):
+ if not ref.startswith("_:"):
+ return
+ bid = ref.split("_:", 1)[-1]
+ return bid or None
+
+ def _add_list(self, dataset, graph, context, term, node_list):
+ if not isinstance(node_list, list):
+ node_list = [node_list]
+
+ first_subj = BNode()
+ subj, rest = first_subj, None
+
+ for node in node_list:
+ if node is None:
+ continue
+
+ if rest:
+ graph.add((subj, RDF.rest, rest))
+ subj = rest
+
+ obj = self._to_object(dataset, graph, context, term, node, inlist=True)
+
+ if obj is None:
+ continue
+
+ graph.add((subj, RDF.first, obj))
+ rest = BNode()
+
+ if rest:
+ graph.add((subj, RDF.rest, RDF.nil))
+ return first_subj
+ else:
+ return RDF.nil
+
+ @staticmethod
+ def _to_typed_json_value(value):
+ return {
+ TYPE: URIRef("%sJSON" % str(RDF)),
+ VALUE: json.dumps(
+ value, separators=(",", ":"), sort_keys=True, ensure_ascii=False
+ ),
+ }
diff --git a/rdflib/plugins/serializers/jsonld.py b/rdflib/plugins/serializers/jsonld.py
new file mode 100644
index 000000000..67f3b8623
--- /dev/null
+++ b/rdflib/plugins/serializers/jsonld.py
@@ -0,0 +1,382 @@
+# -*- coding: utf-8 -*-
+"""
+This serialiser will output an RDF Graph as a JSON-LD formatted document. See:
+
+ http://json-ld.org/
+
+Example usage::
+
+ >>> from rdflib import Graph
+ >>> testrdf = '''
+ ... @prefix dc: .
+ ...
+ ... dc:title "Someone's Homepage"@en .
+ ... '''
+
+ >>> g = Graph().parse(data=testrdf, format='n3')
+
+ >>> print(g.serialize(format='json-ld', indent=4))
+ [
+ {
+ "@id": "http://example.org/about",
+ "http://purl.org/dc/terms/title": [
+ {
+ "@language": "en",
+ "@value": "Someone's Homepage"
+ }
+ ]
+ }
+ ]
+
+"""
+# From: https://github.com/RDFLib/rdflib-jsonld/blob/feature/json-ld-1.1/rdflib_jsonld/serializer.py
+
+# NOTE: This code writes the entire JSON object into memory before serialising,
+# but we should consider streaming the output to deal with arbitrarily large
+# graphs.
+
+import warnings
+
+from rdflib.serializer import Serializer
+from rdflib.graph import Graph
+from rdflib.term import URIRef, Literal, BNode
+from rdflib.namespace import RDF, XSD
+
+from ..shared.jsonld.context import Context, UNDEF
+from ..shared.jsonld.util import json
+from ..shared.jsonld.keys import CONTEXT, GRAPH, ID, VOCAB, LIST, SET, LANG
+
+__all__ = ["JsonLDSerializer", "from_rdf"]
+
+
+PLAIN_LITERAL_TYPES = {XSD.boolean, XSD.integer, XSD.double, XSD.string}
+
+
+class JsonLDSerializer(Serializer):
+ def __init__(self, store):
+ super(JsonLDSerializer, self).__init__(store)
+
+ def serialize(self, stream, base=None, encoding=None, **kwargs):
+ # TODO: docstring w. args and return value
+ encoding = encoding or "utf-8"
+ if encoding not in ("utf-8", "utf-16"):
+ warnings.warn(
+ "JSON should be encoded as unicode. "
+ + "Given encoding was: %s" % encoding
+ )
+
+ context_data = kwargs.get("context")
+ use_native_types = (kwargs.get("use_native_types", False),)
+ use_rdf_type = kwargs.get("use_rdf_type", False)
+ auto_compact = kwargs.get("auto_compact", False)
+
+ indent = kwargs.get("indent", 2)
+ separators = kwargs.get("separators", (",", ": "))
+ sort_keys = kwargs.get("sort_keys", True)
+ ensure_ascii = kwargs.get("ensure_ascii", False)
+
+ obj = from_rdf(
+ self.store,
+ context_data,
+ base,
+ use_native_types,
+ use_rdf_type,
+ auto_compact=auto_compact,
+ )
+
+ data = json.dumps(
+ obj,
+ indent=indent,
+ separators=separators,
+ sort_keys=sort_keys,
+ ensure_ascii=ensure_ascii,
+ )
+
+ stream.write(data.encode(encoding, "replace"))
+
+
+def from_rdf(
+ graph,
+ context_data=None,
+ base=None,
+ use_native_types=False,
+ use_rdf_type=False,
+ auto_compact=False,
+ startnode=None,
+ index=False,
+):
+ # TODO: docstring w. args and return value
+ # TODO: support for index and startnode
+
+ if not context_data and auto_compact:
+ context_data = dict(
+ (pfx, str(ns))
+ for (pfx, ns) in graph.namespaces()
+ if pfx and str(ns) != "http://www.w3.org/XML/1998/namespace"
+ )
+
+ if isinstance(context_data, Context):
+ context = context_data
+ context_data = context.to_dict()
+ else:
+ context = Context(context_data, base=base)
+
+ converter = Converter(context, use_native_types, use_rdf_type)
+ result = converter.convert(graph)
+
+ if converter.context.active:
+ if isinstance(result, list):
+ result = {context.get_key(GRAPH): result}
+ result[CONTEXT] = context_data
+
+ return result
+
+
+class Converter(object):
+ def __init__(self, context, use_native_types, use_rdf_type):
+ self.context = context
+ self.use_native_types = context.active or use_native_types
+ self.use_rdf_type = use_rdf_type
+
+ def convert(self, graph):
+ # TODO: bug in rdflib dataset parsing (nquads et al):
+ # plain triples end up in separate unnamed graphs (rdflib issue #436)
+ if graph.context_aware:
+ default_graph = Graph()
+ graphs = [default_graph]
+ for g in graph.contexts():
+ if isinstance(g.identifier, URIRef):
+ graphs.append(g)
+ else:
+ default_graph += g
+ else:
+ graphs = [graph]
+
+ context = self.context
+
+ objs = []
+ for g in graphs:
+ obj = {}
+ graphname = None
+
+ if isinstance(g.identifier, URIRef):
+ graphname = context.shrink_iri(g.identifier)
+ obj[context.id_key] = graphname
+
+ nodes = self.from_graph(g)
+
+ if not graphname and len(nodes) == 1:
+ obj.update(nodes[0])
+ else:
+ if not nodes:
+ continue
+ obj[context.graph_key] = nodes
+
+ if objs and objs[0].get(context.get_key(ID)) == graphname:
+ objs[0].update(obj)
+ else:
+ objs.append(obj)
+
+ if len(graphs) == 1 and len(objs) == 1 and not self.context.active:
+ default = objs[0]
+ items = default.get(context.graph_key)
+ if len(default) == 1 and items:
+ objs = items
+ elif len(objs) == 1 and self.context.active:
+ objs = objs[0]
+
+ return objs
+
+ def from_graph(self, graph):
+ nodemap = {}
+
+ for s in set(graph.subjects()):
+ ## only iri:s and unreferenced (rest will be promoted to top if needed)
+ if isinstance(s, URIRef) or (
+ isinstance(s, BNode) and not any(graph.subjects(None, s))
+ ):
+ self.process_subject(graph, s, nodemap)
+
+ return list(nodemap.values())
+
+ def process_subject(self, graph, s, nodemap):
+ if isinstance(s, URIRef):
+ node_id = self.context.shrink_iri(s)
+ elif isinstance(s, BNode):
+ node_id = s.n3()
+ else:
+ node_id = None
+
+ # used_as_object = any(graph.subjects(None, s))
+ if node_id in nodemap:
+ return None
+
+ node = {}
+ node[self.context.id_key] = node_id
+ nodemap[node_id] = node
+
+ for p, o in graph.predicate_objects(s):
+ self.add_to_node(graph, s, p, o, node, nodemap)
+
+ return node
+
+ def add_to_node(self, graph, s, p, o, s_node, nodemap):
+ context = self.context
+
+ if isinstance(o, Literal):
+ datatype = str(o.datatype) if o.datatype else None
+ language = o.language
+ term = context.find_term(str(p), datatype, language=language)
+ else:
+ containers = [LIST, None] if graph.value(o, RDF.first) else [None]
+ for container in containers:
+ for coercion in (ID, VOCAB, UNDEF):
+ term = context.find_term(str(p), coercion, container)
+ if term:
+ break
+ if term:
+ break
+
+ node = None
+ use_set = not context.active
+
+ if term:
+ p_key = term.name
+
+ if term.type:
+ node = self.type_coerce(o, term.type)
+ elif term.language and o.language == term.language:
+ node = str(o)
+ elif context.language and (term.language is None and o.language is None):
+ node = str(o)
+
+ if LIST in term.container:
+ node = [
+ self.type_coerce(v, term.type)
+ or self.to_raw_value(graph, s, v, nodemap)
+ for v in self.to_collection(graph, o)
+ ]
+ elif LANG in term.container and language:
+ value = s_node.setdefault(p_key, {})
+ values = value.get(language)
+ node = str(o)
+ if values or SET in term.container:
+ if not isinstance(values, list):
+ value[language] = values = [values]
+ values.append(node)
+ else:
+ value[language] = node
+ return
+ elif SET in term.container:
+ use_set = True
+
+ else:
+ p_key = context.to_symbol(p)
+ # TODO: for coercing curies - quite clumsy; unify to_symbol and find_term?
+ key_term = context.terms.get(p_key)
+ if key_term and (key_term.type or key_term.container):
+ p_key = p
+ if not term and p == RDF.type and not self.use_rdf_type:
+ if isinstance(o, URIRef):
+ node = context.to_symbol(o)
+ p_key = context.type_key
+
+ if node is None:
+ node = self.to_raw_value(graph, s, o, nodemap)
+
+ value = s_node.get(p_key)
+ if value:
+ if not isinstance(value, list):
+ value = [value]
+ value.append(node)
+ elif use_set:
+ value = [node]
+ else:
+ value = node
+ s_node[p_key] = value
+
+ def type_coerce(self, o, coerce_type):
+ if coerce_type == ID:
+ if isinstance(o, URIRef):
+ return self.context.shrink_iri(o)
+ elif isinstance(o, BNode):
+ return o.n3()
+ else:
+ return o
+ elif coerce_type == VOCAB and isinstance(o, URIRef):
+ return self.context.to_symbol(o)
+ elif isinstance(o, Literal) and str(o.datatype) == coerce_type:
+ return o
+ else:
+ return None
+
+ def to_raw_value(self, graph, s, o, nodemap):
+ context = self.context
+ coll = self.to_collection(graph, o)
+ if coll is not None:
+ coll = [
+ self.to_raw_value(graph, s, lo, nodemap)
+ for lo in self.to_collection(graph, o)
+ ]
+ return {context.list_key: coll}
+ elif isinstance(o, BNode):
+ embed = (
+ False # TODO: self.context.active or using startnode and only one ref
+ )
+ onode = self.process_subject(graph, o, nodemap)
+ if onode:
+ if embed and not any(s2 for s2 in graph.subjects(None, o) if s2 != s):
+ return onode
+ else:
+ nodemap[onode[context.id_key]] = onode
+ return {context.id_key: o.n3()}
+ elif isinstance(o, URIRef):
+ # TODO: embed if o != startnode (else reverse)
+ return {context.id_key: context.shrink_iri(o)}
+ elif isinstance(o, Literal):
+ # TODO: if compact
+ native = self.use_native_types and o.datatype in PLAIN_LITERAL_TYPES
+ if native:
+ v = o.toPython()
+ else:
+ v = str(o)
+ if o.datatype:
+ if native:
+ if self.context.active:
+ return v
+ else:
+ return {context.value_key: v}
+ return {
+ context.type_key: context.to_symbol(o.datatype),
+ context.value_key: v,
+ }
+ elif o.language and o.language != context.language:
+ return {context.lang_key: o.language, context.value_key: v}
+ elif not context.active or context.language and not o.language:
+ return {context.value_key: v}
+ else:
+ return v
+
+ def to_collection(self, graph, l):
+ if l != RDF.nil and not graph.value(l, RDF.first):
+ return None
+ list_nodes = []
+ chain = set([l])
+ while l:
+ if l == RDF.nil:
+ return list_nodes
+ if isinstance(l, URIRef):
+ return None
+ first, rest = None, None
+ for p, o in graph.predicate_objects(l):
+ if not first and p == RDF.first:
+ first = o
+ elif not rest and p == RDF.rest:
+ rest = o
+ elif p != RDF.type or o != RDF.List:
+ return None
+ list_nodes.append(first)
+ l = rest
+ if l in chain:
+ return None
+ chain.add(l)
diff --git a/rdflib/plugins/shared/__init__.py b/rdflib/plugins/shared/__init__.py
new file mode 100644
index 000000000..e69de29bb
diff --git a/rdflib/plugins/shared/jsonld/context.py b/rdflib/plugins/shared/jsonld/context.py
new file mode 100644
index 000000000..09982062e
--- /dev/null
+++ b/rdflib/plugins/shared/jsonld/context.py
@@ -0,0 +1,547 @@
+# -*- coding: utf-8 -*-
+"""
+Implementation of the JSON-LD Context structure. See:
+
+ http://json-ld.org/
+
+"""
+# https://github.com/RDFLib/rdflib-jsonld/blob/feature/json-ld-1.1/rdflib_jsonld/context.py
+
+from collections import namedtuple
+from rdflib.namespace import RDF
+
+from .keys import (
+ BASE,
+ CONTAINER,
+ CONTEXT,
+ GRAPH,
+ ID,
+ IMPORT,
+ INCLUDED,
+ INDEX,
+ JSON,
+ LANG,
+ LIST,
+ NEST,
+ NONE,
+ PREFIX,
+ PROPAGATE,
+ PROTECTED,
+ REV,
+ SET,
+ TYPE,
+ VALUE,
+ VERSION,
+ VOCAB,
+)
+from . import errors
+from .util import source_to_json, urljoin, urlsplit, split_iri, norm_url
+
+
+NODE_KEYS = {GRAPH, ID, INCLUDED, JSON, LIST, NEST, NONE, REV, SET, TYPE, VALUE, LANG}
+
+
+class Defined(int):
+ pass
+
+
+UNDEF = Defined(0)
+
+# From
+URI_GEN_DELIMS = (":", "/", "?", "#", "[", "]", "@")
+
+
+class Context(object):
+ def __init__(self, source=None, base=None, version=None):
+ self.version = version or 1.0
+ self.language = None
+ self.vocab = None
+ self.base = base
+ self.doc_base = base
+ self.terms = {}
+ # _alias maps NODE_KEY to list of aliases
+ self._alias = {}
+ self._lookup = {}
+ self._prefixes = {}
+ self.active = False
+ self.parent = None
+ self.propagate = True
+ self._context_cache = {}
+ if source:
+ self.load(source)
+
+ @property
+ def base(self):
+ return self._base
+
+ @base.setter
+ def base(self, base):
+ if base:
+ hash_index = base.find("#")
+ if hash_index > -1:
+ base = base[0:hash_index]
+ self._base = (
+ self.resolve_iri(base)
+ if (hasattr(self, "_base") and base is not None)
+ else base
+ )
+ self._basedomain = "%s://%s" % urlsplit(base)[0:2] if base else None
+
+ def subcontext(self, source, propagate=True):
+ # IMPROVE: to optimize, implement SubContext with parent fallback support
+ parent = self.parent if self.propagate is False else self
+ return parent._subcontext(source, propagate)
+
+ def _subcontext(self, source, propagate):
+ ctx = Context(version=self.version)
+ ctx.propagate = propagate
+ ctx.parent = self
+ ctx.language = self.language
+ ctx.vocab = self.vocab
+ ctx.base = self.base
+ ctx.doc_base = self.doc_base
+ ctx._alias = {k: l[:] for k, l in self._alias.items()}
+ ctx.terms = self.terms.copy()
+ ctx._lookup = self._lookup.copy()
+ ctx._prefixes = self._prefixes.copy()
+ ctx._context_cache = self._context_cache
+ ctx.load(source)
+ return ctx
+
+ def _clear(self):
+ self.language = None
+ self.vocab = None
+ self.terms = {}
+ self._alias = {}
+ self._lookup = {}
+ self._prefixes = {}
+ self.active = False
+ self.propagate = True
+
+ def get_context_for_term(self, term):
+ if term and term.context is not UNDEF:
+ return self._subcontext(term.context, propagate=True)
+ return self
+
+ def get_context_for_type(self, node):
+ if self.version >= 1.1:
+ rtype = self.get_type(node) if isinstance(node, dict) else None
+ if not isinstance(rtype, list):
+ rtype = [rtype] if rtype else []
+
+ for rt in rtype:
+ typeterm = self.terms.get(rt)
+ if typeterm:
+ break
+ else:
+ typeterm = None
+
+ if typeterm and typeterm.context:
+ subcontext = self.subcontext(typeterm.context, propagate=False)
+ if subcontext:
+ return subcontext
+
+ return self.parent if self.propagate is False else self
+
+ def get_id(self, obj):
+ return self._get(obj, ID)
+
+ def get_type(self, obj):
+ return self._get(obj, TYPE)
+
+ def get_language(self, obj):
+ return self._get(obj, LANG)
+
+ def get_value(self, obj):
+ return self._get(obj, VALUE)
+
+ def get_graph(self, obj):
+ return self._get(obj, GRAPH)
+
+ def get_list(self, obj):
+ return self._get(obj, LIST)
+
+ def get_set(self, obj):
+ return self._get(obj, SET)
+
+ def get_rev(self, obj):
+ return self._get(obj, REV)
+
+ def _get(self, obj, key):
+ for alias in self._alias.get(key, []):
+ if alias in obj:
+ return obj.get(alias)
+ return obj.get(key)
+
+ def get_key(self, key):
+ for alias in self.get_keys(key):
+ return alias
+
+ def get_keys(self, key):
+ if key in self._alias:
+ for alias in self._alias[key]:
+ yield alias
+ yield key
+
+ lang_key = property(lambda self: self.get_key(LANG))
+ id_key = property(lambda self: self.get_key(ID))
+ type_key = property(lambda self: self.get_key(TYPE))
+ value_key = property(lambda self: self.get_key(VALUE))
+ list_key = property(lambda self: self.get_key(LIST))
+ rev_key = property(lambda self: self.get_key(REV))
+ graph_key = property(lambda self: self.get_key(GRAPH))
+
+ def add_term(
+ self,
+ name,
+ idref,
+ coercion=UNDEF,
+ container=UNDEF,
+ index=None,
+ language=UNDEF,
+ reverse=False,
+ context=UNDEF,
+ prefix=None,
+ protected=False,
+ ):
+ if self.version < 1.1 or prefix is None:
+ prefix = isinstance(idref, str) and idref.endswith(URI_GEN_DELIMS)
+
+ if not self._accept_term(name):
+ return
+
+ if self.version >= 1.1:
+ existing = self.terms.get(name)
+ if existing and existing.protected:
+ return
+
+ if isinstance(container, (list, set, tuple)):
+ container = set(container)
+ else:
+ container = set([container])
+
+ term = Term(
+ idref,
+ name,
+ coercion,
+ container,
+ index,
+ language,
+ reverse,
+ context,
+ prefix,
+ protected,
+ )
+
+ self.terms[name] = term
+
+ for container_key in (LIST, LANG, SET): # , INDEX, ID, GRAPH):
+ if container_key in container:
+ break
+ else:
+ container_key = UNDEF
+
+ self._lookup[(idref, coercion or language, container_key, reverse)] = term
+
+ if term.prefix is True:
+ self._prefixes[idref] = name
+
+ def find_term(
+ self, idref, coercion=None, container=UNDEF, language=None, reverse=False
+ ):
+ lu = self._lookup
+
+ if coercion is None:
+ coercion = language
+
+ if coercion is not UNDEF and container:
+ found = lu.get((idref, coercion, container, reverse))
+ if found:
+ return found
+
+ if coercion is not UNDEF:
+ found = lu.get((idref, coercion, UNDEF, reverse))
+ if found:
+ return found
+
+ if container:
+ found = lu.get((idref, coercion, container, reverse))
+ if found:
+ return found
+ elif language:
+ found = lu.get((idref, UNDEF, LANG, reverse))
+ if found:
+ return found
+ else:
+ found = lu.get((idref, coercion or UNDEF, SET, reverse))
+ if found:
+ return found
+
+ return lu.get((idref, UNDEF, UNDEF, reverse))
+
+ def resolve(self, curie_or_iri):
+ iri = self.expand(curie_or_iri, False)
+ if self.isblank(iri):
+ return iri
+ if " " in iri:
+ return ""
+ return self.resolve_iri(iri)
+
+ def resolve_iri(self, iri):
+ return norm_url(self._base, iri)
+
+ def isblank(self, ref):
+ return ref.startswith("_:")
+
+ def expand(self, term_curie_or_iri, use_vocab=True):
+ if not isinstance(term_curie_or_iri, str):
+ return term_curie_or_iri
+
+ if not self._accept_term(term_curie_or_iri):
+ return ""
+
+ if use_vocab:
+ term = self.terms.get(term_curie_or_iri)
+ if term:
+ return term.id
+
+ is_term, pfx, local = self._prep_expand(term_curie_or_iri)
+ if pfx == "_":
+ return term_curie_or_iri
+
+ if pfx is not None:
+ ns = self.terms.get(pfx)
+ if ns and ns.prefix and ns.id:
+ return ns.id + local
+ elif is_term and use_vocab:
+ if self.vocab:
+ return self.vocab + term_curie_or_iri
+ return None
+
+ return self.resolve_iri(term_curie_or_iri)
+
+ def shrink_iri(self, iri):
+ ns, name = split_iri(str(iri))
+ pfx = self._prefixes.get(ns)
+ if pfx:
+ return ":".join((pfx, name))
+ elif self._base:
+ if str(iri) == self._base:
+ return ""
+ elif iri.startswith(self._basedomain):
+ return iri[len(self._basedomain) :]
+ return iri
+
+ def to_symbol(self, iri):
+ iri = str(iri)
+ term = self.find_term(iri)
+ if term:
+ return term.name
+ ns, name = split_iri(iri)
+ if ns == self.vocab:
+ return name
+ pfx = self._prefixes.get(ns)
+ if pfx:
+ return ":".join((pfx, name))
+ return iri
+
+ def load(self, source, base=None, referenced_contexts=None):
+ self.active = True
+ sources = []
+ source = source if isinstance(source, list) else [source]
+ referenced_contexts = referenced_contexts or set()
+ self._prep_sources(base, source, sources, referenced_contexts)
+ for source_url, source in sources:
+ if source is None:
+ self._clear()
+ else:
+ self._read_source(source, source_url, referenced_contexts)
+
+ def _accept_term(self, key):
+ if self.version < 1.1:
+ return True
+ if key and len(key) > 1 and key[0] == "@" and key[1].isalnum():
+ return key in NODE_KEYS
+ else:
+ return True
+
+ def _prep_sources(
+ self, base, inputs, sources, referenced_contexts, in_source_url=None
+ ):
+
+ for source in inputs:
+ source_url = in_source_url
+ if isinstance(source, str):
+ source_url = source
+ source_doc_base = base or self.doc_base
+ new_ctx = self._fetch_context(
+ source, source_doc_base, referenced_contexts
+ )
+ if new_ctx is None:
+ continue
+ else:
+ if base:
+ base = urljoin(source_doc_base, source_url)
+ source = new_ctx
+
+ if isinstance(source, dict):
+ if CONTEXT in source:
+ source = source[CONTEXT]
+ source = source if isinstance(source, list) else [source]
+
+ if isinstance(source, list):
+ self._prep_sources(
+ base, source, sources, referenced_contexts, source_url
+ )
+ else:
+ sources.append((source_url, source))
+
+ def _fetch_context(self, source, base, referenced_contexts):
+ source_url = urljoin(base, source)
+
+ if source_url in referenced_contexts:
+ raise errors.RECURSIVE_CONTEXT_INCLUSION
+ referenced_contexts.add(source_url)
+
+ if source_url in self._context_cache:
+ return self._context_cache[source_url]
+
+ source = source_to_json(source_url)
+ if source and CONTEXT not in source:
+ raise errors.INVALID_REMOTE_CONTEXT
+ self._context_cache[source_url] = source
+
+ return source
+
+ def _read_source(self, source, source_url=None, referenced_contexts=None):
+ imports = source.get(IMPORT)
+ if imports:
+ if not isinstance(imports, str):
+ raise errors.INVALID_CONTEXT_ENTRY
+
+ imported = self._fetch_context(
+ imports, self.base, referenced_contexts or set()
+ )
+ if not isinstance(imported, dict):
+ raise errors.INVALID_CONTEXT_ENTRY
+
+ imported = imported[CONTEXT]
+ imported.update(source)
+ source = imported
+
+ self.vocab = source.get(VOCAB, self.vocab)
+ self.version = source.get(VERSION, self.version)
+ protected = source.get(PROTECTED, False)
+
+ for key, value in source.items():
+ if key in {VOCAB, VERSION, IMPORT, PROTECTED}:
+ continue
+ elif key == PROPAGATE and isinstance(value, bool):
+ self.propagate = value
+ elif key == LANG:
+ self.language = value
+ elif key == BASE:
+ if not source_url and not imports:
+ self.base = value
+ else:
+ self._read_term(source, key, value, protected)
+
+ def _read_term(self, source, name, dfn, protected=False):
+ idref = None
+ if isinstance(dfn, dict):
+ # term = self._create_term(source, key, value)
+ rev = dfn.get(REV)
+ protected = dfn.get(PROTECTED, protected)
+
+ coercion = dfn.get(TYPE, UNDEF)
+ if coercion and coercion not in (ID, TYPE, VOCAB):
+ coercion = self._rec_expand(source, coercion)
+
+ idref = rev or dfn.get(ID, UNDEF)
+ if idref == TYPE:
+ idref = str(RDF.type)
+ coercion = VOCAB
+ elif idref is not UNDEF:
+ idref = self._rec_expand(source, idref)
+ elif ":" in name:
+ idref = self._rec_expand(source, name)
+ elif self.vocab:
+ idref = self.vocab + name
+
+ context = dfn.get(CONTEXT, UNDEF)
+
+ self.add_term(
+ name,
+ idref,
+ coercion,
+ dfn.get(CONTAINER, UNDEF),
+ dfn.get(INDEX, UNDEF),
+ dfn.get(LANG, UNDEF),
+ bool(rev),
+ context,
+ dfn.get(PREFIX),
+ protected=protected,
+ )
+ else:
+ if isinstance(dfn, str):
+ if not self._accept_term(dfn):
+ return
+ idref = self._rec_expand(source, dfn)
+
+ self.add_term(name, idref, protected=protected)
+
+ if idref in NODE_KEYS:
+ self._alias.setdefault(idref, []).append(name)
+
+ def _rec_expand(self, source, expr, prev=None):
+ if expr == prev or expr in NODE_KEYS:
+ return expr
+
+ is_term, pfx, nxt = self._prep_expand(expr)
+ if pfx:
+ iri = self._get_source_id(source, pfx)
+ if iri is None:
+ if pfx + ":" == self.vocab:
+ return expr
+ else:
+ term = self.terms.get(pfx)
+ if term:
+ iri = term.id
+
+ if iri is None:
+ nxt = expr
+ else:
+ nxt = iri + nxt
+ else:
+ nxt = self._get_source_id(source, nxt) or nxt
+ if ":" not in nxt and self.vocab:
+ return self.vocab + nxt
+
+ return self._rec_expand(source, nxt, expr)
+
+ def _prep_expand(self, expr):
+ if ":" not in expr:
+ return True, None, expr
+ pfx, local = expr.split(":", 1)
+ if not local.startswith("//"):
+ return False, pfx, local
+ else:
+ return False, None, expr
+
+ def _get_source_id(self, source, key):
+ # .. from source dict or if already defined
+ term = source.get(key)
+ if term is None:
+ dfn = self.terms.get(key)
+ if dfn:
+ term = dfn.id
+ elif isinstance(term, dict):
+ term = term.get(ID)
+ return term
+
+
+Term = namedtuple(
+ "Term",
+ "id, name, type, container, index, language, reverse, context," "prefix, protected",
+)
+Term.__new__.__defaults__ = (UNDEF, UNDEF, UNDEF, UNDEF, False, UNDEF, False, False)
diff --git a/rdflib/plugins/shared/jsonld/errors.py b/rdflib/plugins/shared/jsonld/errors.py
new file mode 100644
index 000000000..977d2d6fc
--- /dev/null
+++ b/rdflib/plugins/shared/jsonld/errors.py
@@ -0,0 +1,9 @@
+# -*- coding: utf-8 -*-
+# https://github.com/RDFLib/rdflib-jsonld/blob/feature/json-ld-1.1/rdflib_jsonld/errors.py
+class JSONLDException(ValueError):
+ pass
+
+
+# http://www.w3.org/TR/json-ld-api/#idl-def-JsonLdErrorCode.{code-message}
+RECURSIVE_CONTEXT_INCLUSION = JSONLDException("recursive context inclusion")
+INVALID_REMOTE_CONTEXT = JSONLDException("invalid remote context")
diff --git a/rdflib/plugins/shared/jsonld/keys.py b/rdflib/plugins/shared/jsonld/keys.py
new file mode 100644
index 000000000..8e2ad4082
--- /dev/null
+++ b/rdflib/plugins/shared/jsonld/keys.py
@@ -0,0 +1,25 @@
+# -*- coding: utf-8 -*-
+# https://github.com/RDFLib/rdflib-jsonld/blob/feature/json-ld-1.1/rdflib_jsonld/keys.py
+BASE = "@base"
+CONTAINER = "@container"
+CONTEXT = "@context"
+# DIRECTION = u'@direction'
+GRAPH = "@graph"
+ID = "@id"
+IMPORT = "@import"
+INCLUDED = "@included"
+INDEX = "@index"
+JSON = "@json"
+LANG = LANGUAGE = "@language"
+LIST = "@list"
+NEST = "@nest"
+NONE = "@none"
+PREFIX = "@prefix"
+PROPAGATE = "@propagate"
+PROTECTED = "@protected"
+REV = REVERSE = "@reverse"
+SET = "@set"
+TYPE = "@type"
+VALUE = "@value"
+VERSION = "@version"
+VOCAB = "@vocab"
diff --git a/rdflib/plugins/shared/jsonld/util.py b/rdflib/plugins/shared/jsonld/util.py
new file mode 100644
index 000000000..50b34b54b
--- /dev/null
+++ b/rdflib/plugins/shared/jsonld/util.py
@@ -0,0 +1,81 @@
+# -*- coding: utf-8 -*-
+# https://github.com/RDFLib/rdflib-jsonld/blob/feature/json-ld-1.1/rdflib_jsonld/util.py
+
+try:
+ import json
+
+ assert json # workaround for pyflakes issue #13
+except ImportError:
+ import simplejson as json
+
+from os import sep
+from os.path import normpath
+
+from urllib.parse import urljoin, urlsplit, urlunsplit
+
+from rdflib.parser import create_input_source
+
+from io import StringIO
+
+
+def source_to_json(source):
+ # TODO: conneg for JSON (fix support in rdflib's URLInputSource!)
+ source = create_input_source(source, format="json-ld")
+
+ stream = source.getByteStream()
+ try:
+ return json.load(StringIO(stream.read().decode("utf-8")))
+ finally:
+ stream.close()
+
+
+VOCAB_DELIMS = ("#", "/", ":")
+
+
+def split_iri(iri):
+ for delim in VOCAB_DELIMS:
+ at = iri.rfind(delim)
+ if at > -1:
+ return iri[: at + 1], iri[at + 1 :]
+ return iri, None
+
+
+def norm_url(base, url):
+ """
+ >>> norm_url('http://example.org/', '/one')
+ 'http://example.org/one'
+ >>> norm_url('http://example.org/', '/one#')
+ 'http://example.org/one#'
+ >>> norm_url('http://example.org/one', 'two')
+ 'http://example.org/two'
+ >>> norm_url('http://example.org/one/', 'two')
+ 'http://example.org/one/two'
+ >>> norm_url('http://example.org/', 'http://example.net/one')
+ 'http://example.net/one'
+ >>> norm_url('http://example.org/', 'http://example.org//one')
+ 'http://example.org//one'
+ """
+ parts = urlsplit(urljoin(base, url))
+ path = normpath(parts[2])
+ if sep != "/":
+ path = "/".join(path.split(sep))
+ if parts[2].endswith("/") and not path.endswith("/"):
+ path += "/"
+ result = urlunsplit(parts[0:2] + (path,) + parts[3:])
+ if url.endswith("#") and not result.endswith("#"):
+ result += "#"
+ return result
+
+
+def context_from_urlinputsource(source):
+ if source.content_type == "application/json":
+ # response_info was added to InputSource in rdflib 4.2
+ try:
+ links = source.response_info.getallmatchingheaders("Link")
+ except AttributeError:
+ return
+ for link in links:
+ if ' rel="http://www.w3.org/ns/json-ld#context"' in link:
+ i, j = link.index("<"), link.index(">")
+ if i > -1 and j > -1:
+ return urljoin(source.url, link[i + 1 : j])
diff --git a/setup.py b/setup.py
index 8f5efe1ba..9a23410a8 100644
--- a/setup.py
+++ b/setup.py
@@ -70,9 +70,9 @@ def find_version(filename):
RDF, a simple yet powerful language for representing information.
The library contains parsers and serializers for RDF/XML, N3,
-NTriples, Turtle, TriX, RDFa and Microdata . The library presents
-a Graph interface which can be backed by any one of a number of
-Store implementations. The core rdflib includes store
+NTriples, Turtle, TriX, JSON-LD, RDFa and Microdata . The library
+presents a Graph interface which can be backed by any one of a
+number of Store implementations. The core rdflib includes store
implementations for in memory storage, persistent storage on top
of the Berkeley DB, and a wrapper for remote SPARQL endpoints.
@@ -99,5 +99,5 @@ def find_version(filename):
"rdfgraphisomorphism = rdflib.tools.graphisomorphism:main",
],
},
- **kwargs
+ **kwargs,
)
diff --git a/test/jsonld/1.1/compact-manifest.jsonld b/test/jsonld/1.1/compact-manifest.jsonld
new file mode 100644
index 000000000..6dc7cb478
--- /dev/null
+++ b/test/jsonld/1.1/compact-manifest.jsonld
@@ -0,0 +1,2134 @@
+{
+ "@context": ["context.jsonld", {"@base": "compact-manifest"}],
+ "@id": "",
+ "@type": "mf:Manifest",
+ "name": "Compaction",
+ "description": "These tests implement the requirements for the JSON-LD [Compaction Algorithm](https://www.w3.org/TR/json-ld11-api/#compaction-algorithm).",
+ "baseIri": "https://w3c.github.io/json-ld-api/tests/",
+ "sequence": [
+ {
+ "@id": "#t0001",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "drop free-floating nodes",
+ "purpose": "Unreferenced nodes not containing properties are dropped",
+ "input": "compact/0001-in.jsonld",
+ "context": "compact/0001-context.jsonld",
+ "expect": "compact/0001-out.jsonld"
+ }, {
+ "@id": "#t0002",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "basic",
+ "purpose": "Basic term and value compaction",
+ "input": "compact/0002-in.jsonld",
+ "context": "compact/0002-context.jsonld",
+ "expect": "compact/0002-out.jsonld"
+ }, {
+ "@id": "#t0003",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "drop null and unmapped properties",
+ "purpose": "Properties mapped to null or which are never mapped are dropped",
+ "input": "compact/0003-in.jsonld",
+ "context": "compact/0003-context.jsonld",
+ "expect": "compact/0003-out.jsonld"
+ }, {
+ "@id": "#t0004",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "optimize @set, keep empty arrays",
+ "purpose": "Containers mapped to @set keep empty arrays",
+ "input": "compact/0004-in.jsonld",
+ "context": "compact/0004-context.jsonld",
+ "expect": "compact/0004-out.jsonld"
+ }, {
+ "@id": "#t0005",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "@type and prefix compaction",
+ "purpose": "Compact uses prefixes in @type",
+ "input": "compact/0005-in.jsonld",
+ "context": "compact/0005-context.jsonld",
+ "expect": "compact/0005-out.jsonld"
+ }, {
+ "@id": "#t0006",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "keep expanded object format if @type doesn't match",
+ "purpose": "Values not matching a coerced @type remain in expanded form",
+ "input": "compact/0006-in.jsonld",
+ "context": "compact/0006-context.jsonld",
+ "expect": "compact/0006-out.jsonld"
+ }, {
+ "@id": "#t0007",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "add context",
+ "purpose": "External context is added to the compacted document",
+ "input": "compact/0007-in.jsonld",
+ "context": "compact/0007-context.jsonld",
+ "expect": "compact/0007-out.jsonld"
+ }, {
+ "@id": "#t0008",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "alias keywords",
+ "purpose": "Aliases for keywords are used in compacted document",
+ "input": "compact/0008-in.jsonld",
+ "context": "compact/0008-context.jsonld",
+ "expect": "compact/0008-out.jsonld"
+ }, {
+ "@id": "#t0009",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "compact @id",
+ "purpose": "Value with @id is compacted to string if property cast to @id",
+ "input": "compact/0009-in.jsonld",
+ "context": "compact/0009-context.jsonld",
+ "expect": "compact/0009-out.jsonld"
+ }, {
+ "@id": "#t0010",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "array to @graph",
+ "purpose": "An array of objects is serialized with @graph",
+ "input": "compact/0010-in.jsonld",
+ "context": "compact/0010-context.jsonld",
+ "expect": "compact/0010-out.jsonld"
+ }, {
+ "@id": "#t0011",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "compact date",
+ "purpose": "Expanded value with type xsd:dateTime is represented as string with type coercion",
+ "input": "compact/0011-in.jsonld",
+ "context": "compact/0011-context.jsonld",
+ "expect": "compact/0011-out.jsonld"
+ }, {
+ "@id": "#t0012",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "native types",
+ "purpose": "Native values are unmodified during compaction",
+ "input": "compact/0012-in.jsonld",
+ "context": "compact/0012-context.jsonld",
+ "expect": "compact/0012-out.jsonld"
+ }, {
+ "@id": "#t0013",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "@value with @language",
+ "purpose": "Values with @language remain in expanded form by default",
+ "input": "compact/0013-in.jsonld",
+ "context": "compact/0013-context.jsonld",
+ "expect": "compact/0013-out.jsonld"
+ }, {
+ "@id": "#t0014",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "array to aliased @graph",
+ "purpose": "Aliasing @graph uses alias in compacted document",
+ "input": "compact/0014-in.jsonld",
+ "context": "compact/0014-context.jsonld",
+ "expect": "compact/0014-out.jsonld"
+ }, {
+ "@id": "#t0015",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "best match compaction",
+ "purpose": "Property with values of different types use most appropriate term when compacting",
+ "input": "compact/0015-in.jsonld",
+ "context": "compact/0015-context.jsonld",
+ "expect": "compact/0015-out.jsonld"
+ }, {
+ "@id": "#t0016",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "recursive named graphs",
+ "purpose": "Compacting a document with multiple embedded uses of @graph",
+ "input": "compact/0016-in.jsonld",
+ "context": "compact/0016-context.jsonld",
+ "expect": "compact/0016-out.jsonld"
+ }, {
+ "@id": "#t0017",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "A term mapping to null removes the mapping",
+ "purpose": "Mapping a term to null causes the property and its values to be removed from the compacted document",
+ "input": "compact/0017-in.jsonld",
+ "context": "compact/0017-context.jsonld",
+ "expect": "compact/0017-out.jsonld"
+ }, {
+ "@id": "#t0018",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "best matching term for lists",
+ "purpose": "Lists with values of different types use best term in compacted document",
+ "input": "compact/0018-in.jsonld",
+ "context": "compact/0018-context.jsonld",
+ "expect": "compact/0018-out.jsonld"
+ }, {
+ "@id": "#t0019",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "Keep duplicate values in @list and @set",
+ "purpose": "Duplicate values in @list or @set are retained in compacted document",
+ "input": "compact/0019-in.jsonld",
+ "context": "compact/0019-context.jsonld",
+ "expect": "compact/0019-out.jsonld"
+ }, {
+ "@id": "#t0020",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "Compact @id that is a property IRI when @container is @list",
+ "purpose": "A term with @container: @list is also used as the value of an @id, if appropriate",
+ "input": "compact/0020-in.jsonld",
+ "context": "compact/0020-context.jsonld",
+ "expect": "compact/0020-out.jsonld"
+ }, {
+ "@id": "#t0021",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "Compact properties and types using @vocab",
+ "purpose": "@vocab is used to create relative properties and types if no other term matches",
+ "input": "compact/0021-in.jsonld",
+ "context": "compact/0021-context.jsonld",
+ "expect": "compact/0021-out.jsonld"
+ }, {
+ "@id": "#t0022",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "@list compaction of nested properties",
+ "purpose": "Compact nested properties using @list containers",
+ "input": "compact/0022-in.jsonld",
+ "context": "compact/0022-context.jsonld",
+ "expect": "compact/0022-out.jsonld"
+ }, {
+ "@id": "#t0023",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "prefer @vocab over compacted IRIs",
+ "purpose": "@vocab takes precedence over prefixes - even if the result is longer",
+ "input": "compact/0023-in.jsonld",
+ "context": "compact/0023-context.jsonld",
+ "expect": "compact/0023-out.jsonld"
+ }, {
+ "@id": "#t0024",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "most specific term matching in @list.",
+ "purpose": "The most specific term that matches all of the elements in the list, taking into account the default language, must be selected.",
+ "input": "compact/0024-in.jsonld",
+ "context": "compact/0024-context.jsonld",
+ "expect": "compact/0024-out.jsonld"
+ }, {
+ "@id": "#t0025",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "Language maps",
+ "purpose": "Multiple values with different languages use language maps if property has @container: @language",
+ "input": "compact/0025-in.jsonld",
+ "context": "compact/0025-context.jsonld",
+ "expect": "compact/0025-out.jsonld"
+ }, {
+ "@id": "#t0026",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "Language map term selection with complications",
+ "purpose": "Test appropriate property use given language maps with @vocab, a default language, and a competing term",
+ "input": "compact/0026-in.jsonld",
+ "context": "compact/0026-context.jsonld",
+ "expect": "compact/0026-out.jsonld"
+ }, {
+ "@id": "#t0027",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "@container: @set with multiple values",
+ "purpose": "Fall back to term with @set container if term with language map is defined",
+ "input": "compact/0027-in.jsonld",
+ "context": "compact/0027-context.jsonld",
+ "expect": "compact/0027-out.jsonld"
+ }, {
+ "@id": "#t0028",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "Alias keywords and use @vocab",
+ "purpose": "Combination of keyword aliases and @vocab",
+ "input": "compact/0028-in.jsonld",
+ "context": "compact/0028-context.jsonld",
+ "expect": "compact/0028-out.jsonld"
+ }, {
+ "@id": "#t0029",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "Simple @index map",
+ "purpose": "Output uses index mapping if term is defined with @container: @index",
+ "input": "compact/0029-in.jsonld",
+ "context": "compact/0029-context.jsonld",
+ "expect": "compact/0029-out.jsonld"
+ }, {
+ "@id": "#t0030",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "non-matching @container: @index",
+ "purpose": "Preserve @index tags if not compacted to an index map",
+ "input": "compact/0030-in.jsonld",
+ "context": "compact/0030-context.jsonld",
+ "expect": "compact/0030-out.jsonld"
+ }, {
+ "@id": "#t0031",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "Compact @reverse",
+ "purpose": "Compact traverses through @reverse",
+ "input": "compact/0031-in.jsonld",
+ "context": "compact/0031-context.jsonld",
+ "expect": "compact/0031-out.jsonld"
+ }, {
+ "@id": "#t0032",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "Compact keys in reverse-maps",
+ "purpose": "Compact traverses through @reverse",
+ "input": "compact/0032-in.jsonld",
+ "context": "compact/0032-context.jsonld",
+ "expect": "compact/0032-out.jsonld"
+ }, {
+ "@id": "#t0033",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "Compact reverse-map to reverse property",
+ "purpose": "A reverse map is replaced with a matching property defined with @reverse",
+ "input": "compact/0033-in.jsonld",
+ "context": "compact/0033-context.jsonld",
+ "expect": "compact/0033-out.jsonld"
+ }, {
+ "@id": "#t0034",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "Skip property with @reverse if no match",
+ "purpose": "Do not use reverse property if no other property matches as normal property",
+ "input": "compact/0034-in.jsonld",
+ "context": "compact/0034-context.jsonld",
+ "expect": "compact/0034-out.jsonld"
+ }, {
+ "@id": "#t0035",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "Compact @reverse node references using strings",
+ "purpose": "Compact node references to strings for reverse properties using @type: @id",
+ "input": "compact/0035-in.jsonld",
+ "context": "compact/0035-context.jsonld",
+ "expect": "compact/0035-out.jsonld"
+ }, {
+ "@id": "#t0036",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "Compact reverse properties using index containers",
+ "purpose": "Compact using both reverse properties and index containers",
+ "input": "compact/0036-in.jsonld",
+ "context": "compact/0036-context.jsonld",
+ "expect": "compact/0036-out.jsonld"
+ }, {
+ "@id": "#t0037",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "Compact keys in @reverse using @vocab",
+ "purpose": "Compact keys in @reverse using @vocab",
+ "input": "compact/0037-in.jsonld",
+ "context": "compact/0037-context.jsonld",
+ "expect": "compact/0037-out.jsonld"
+ }, {
+ "@id": "#t0038",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "Index map round-tripping",
+ "purpose": "Complex round-tripping use case from Drupal",
+ "option": {"specVersion": "json-ld-1.0"},
+ "input": "compact/0038-in.jsonld",
+ "context": "compact/0038-context.jsonld",
+ "expect": "compact/0038-out.jsonld"
+ }, {
+ "@id": "#ta038",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "Index map round-tripping",
+ "purpose": "Complex round-tripping use case from Drupal",
+ "option": {"specVersion": "json-ld-1.1"},
+ "input": "compact/0038-in.jsonld",
+ "context": "compact/0038-context.jsonld",
+ "expect": "compact/0038a-out.jsonld"
+ }, {
+ "@id": "#t0039",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "@graph is array",
+ "purpose": "Value of @graph is always an array",
+ "input": "compact/0039-in.jsonld",
+ "context": "compact/0039-context.jsonld",
+ "expect": "compact/0039-out.jsonld"
+ }, {
+ "@id": "#t0040",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "@list is array",
+ "purpose": "Ensure that value of @list is always an array",
+ "input": "compact/0040-in.jsonld",
+ "context": "compact/0040-context.jsonld",
+ "expect": "compact/0040-out.jsonld"
+ }, {
+ "@id": "#t0041",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "index rejects term having @list",
+ "purpose": "If an index is present, a term having an @list container is not selected",
+ "input": "compact/0041-in.jsonld",
+ "context": "compact/0041-context.jsonld",
+ "expect": "compact/0041-out.jsonld"
+ }, {
+ "@id": "#t0042",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "@list keyword aliasing",
+ "purpose": "Make sure keyword aliasing works if a list can't be compacted",
+ "input": "compact/0042-in.jsonld",
+ "context": "compact/0042-context.jsonld",
+ "expect": "compact/0042-out.jsonld"
+ }, {
+ "@id": "#t0043",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "select term over @vocab",
+ "purpose": "Ensure that @vocab compaction isn't used if the result collides with a term",
+ "input": "compact/0043-in.jsonld",
+ "context": "compact/0043-context.jsonld",
+ "expect": "compact/0043-out.jsonld"
+ }, {
+ "@id": "#t0044",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "@type: @vocab in reverse-map",
+ "purpose": "Prefer properties with @type: @vocab in reverse-maps if the value can be compacted to a term",
+ "input": "compact/0044-in.jsonld",
+ "context": "compact/0044-context.jsonld",
+ "expect": "compact/0044-out.jsonld"
+ }, {
+ "@id": "#t0045",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "@id value uses relative IRI, not term",
+ "purpose": "Values of @id are transformed to relative IRIs, terms are ignored",
+ "input": "compact/0045-in.jsonld",
+ "context": "compact/0045-context.jsonld",
+ "expect": "compact/0045-out.jsonld"
+ }, {
+ "@id": "#t0046",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "multiple objects without @context use @graph",
+ "purpose": "Wrap top-level array into @graph even if no context is passed",
+ "input": "compact/0046-in.jsonld",
+ "context": "compact/0046-context.jsonld",
+ "expect": "compact/0046-out.jsonld"
+ }, {
+ "@id": "#t0047",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "Round-trip relative URLs",
+ "purpose": "Relative URLs remain relative after compaction",
+ "input": "compact/0047-in.jsonld",
+ "context": "compact/0047-context.jsonld",
+ "expect": "compact/0047-out.jsonld"
+ }, {
+ "@id": "#t0048",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "term with @language: null",
+ "purpose": "Prefer terms with a language mapping set to null over terms without language-mapping for non-strings",
+ "input": "compact/0048-in.jsonld",
+ "context": "compact/0048-context.jsonld",
+ "expect": "compact/0048-out.jsonld"
+ }, {
+ "@id": "#t0049",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "Round tripping of lists that contain just IRIs",
+ "purpose": "List compaction without @container: @list still uses strings if @type: @id",
+ "input": "compact/0049-in.jsonld",
+ "context": "compact/0049-context.jsonld",
+ "expect": "compact/0049-out.jsonld"
+ }, {
+ "@id": "#t0050",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "Reverse properties require @type: @id to use string values",
+ "purpose": "Node references in reverse properties are not compacted to strings without explicit type-coercion",
+ "input": "compact/0050-in.jsonld",
+ "context": "compact/0050-context.jsonld",
+ "expect": "compact/0050-out.jsonld"
+ }, {
+ "@id": "#t0051",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "Round tripping @list with scalar",
+ "purpose": "Native values survive round-tripping with @list",
+ "input": "compact/0051-in.jsonld",
+ "context": "compact/0051-context.jsonld",
+ "expect": "compact/0051-out.jsonld"
+ }, {
+ "@id": "#t0052",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "Round tripping @list with scalar and @graph alias",
+ "purpose": "Native values survive round-tripping with @list and @graph alias",
+ "input": "compact/0052-in.jsonld",
+ "context": "compact/0052-context.jsonld",
+ "expect": "compact/0052-out.jsonld"
+ }, {
+ "@id": "#t0053",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "Use @type: @vocab if no @type: @id",
+ "purpose": "Compact to @type: @vocab when no @type: @id term available",
+ "input": "compact/0053-in.jsonld",
+ "context": "compact/0053-context.jsonld",
+ "expect": "compact/0053-out.jsonld"
+ }, {
+ "@id": "#t0054",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "Compact to @type: @vocab and compact @id to term",
+ "purpose": "Compact to @type: @vocab and compact @id to term",
+ "input": "compact/0054-in.jsonld",
+ "context": "compact/0054-context.jsonld",
+ "expect": "compact/0054-out.jsonld"
+ }, {
+ "@id": "#t0055",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "Round tripping @type: @vocab",
+ "purpose": "Compacting IRI value of property with @type: @vocab can use term",
+ "input": "compact/0055-in.jsonld",
+ "context": "compact/0055-context.jsonld",
+ "expect": "compact/0055-out.jsonld"
+ }, {
+ "@id": "#t0056",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "Prefer @type: @vocab over @type: @id for terms",
+ "purpose": "Compacting IRI value of property with @type: @vocab can use term",
+ "input": "compact/0056-in.jsonld",
+ "context": "compact/0056-context.jsonld",
+ "expect": "compact/0056-out.jsonld"
+ }, {
+ "@id": "#t0057",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "Complex round tripping @type: @vocab and @type: @id",
+ "purpose": "Compacting IRI value of property with @type: @vocab can use term; more complex",
+ "input": "compact/0057-in.jsonld",
+ "context": "compact/0057-context.jsonld",
+ "expect": "compact/0057-out.jsonld"
+ }, {
+ "@id": "#t0058",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "Prefer @type: @id over @type: @vocab for non-terms",
+ "purpose": "Choose a term having @type: @id over @type: @value if value is not a term",
+ "input": "compact/0058-in.jsonld",
+ "context": "compact/0058-context.jsonld",
+ "expect": "compact/0058-out.jsonld"
+ }, {
+ "@id": "#t0059",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "Term with @type: @vocab if no @type: @id",
+ "purpose": "If there's no term with @type: @id, use terms with @type: @vocab for IRIs not mapped to terms",
+ "input": "compact/0059-in.jsonld",
+ "context": "compact/0059-context.jsonld",
+ "expect": "compact/0059-out.jsonld"
+ }, {
+ "@id": "#t0060",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "Term with @type: @id if no @type: @vocab and term value",
+ "purpose": "If there's no term with @type: @vocab, use terms with @type: @id for IRIs mapped to terms",
+ "input": "compact/0060-in.jsonld",
+ "context": "compact/0060-context.jsonld",
+ "expect": "compact/0060-out.jsonld"
+ }, {
+ "@id": "#t0061",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "@type: @vocab/@id with values matching either",
+ "purpose": "Separate IRIs for the same property to use term with more specific @type (@id vs. @vocab)",
+ "input": "compact/0061-in.jsonld",
+ "context": "compact/0061-context.jsonld",
+ "expect": "compact/0061-out.jsonld"
+ }, {
+ "@id": "#t0062",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "@type: @vocab and relative IRIs",
+ "purpose": "Relative IRIs don't round-trip with @type: @vocab",
+ "input": "compact/0062-in.jsonld",
+ "context": "compact/0062-context.jsonld",
+ "expect": "compact/0062-out.jsonld"
+ }, {
+ "@id": "#t0063",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "Compact IRI round-tripping with @type: @vocab",
+ "purpose": "Term with @type: @vocab will use compact IRIs",
+ "input": "compact/0063-in.jsonld",
+ "context": "compact/0063-context.jsonld",
+ "expect": "compact/0063-out.jsonld"
+ }, {
+ "@id": "#t0064",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "Compact language-tagged and indexed strings to index-map",
+ "purpose": "Given values with both @index and @language and term index-map term, use index map",
+ "input": "compact/0064-in.jsonld",
+ "context": "compact/0064-context.jsonld",
+ "expect": "compact/0064-out.jsonld"
+ }, {
+ "@id": "#t0065",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "Language-tagged and indexed strings with language-map",
+ "purpose": "Language-tagged and indexed strings don't compact to language-map",
+ "input": "compact/0065-in.jsonld",
+ "context": "compact/0065-context.jsonld",
+ "expect": "compact/0065-out.jsonld"
+ }, {
+ "@id": "#t0066",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "Relative IRIs",
+ "purpose": "Complex use cases for relative IRI compaction",
+ "input": "compact/0066-in.jsonld",
+ "context": "compact/0066-context.jsonld",
+ "expect": "compact/0066-out.jsonld"
+ }, {
+ "@id": "#t0067",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "Reverse properties with blank nodes",
+ "purpose": "Compact reverse property whose values are unlabeled blank nodes",
+ "input": "compact/0067-in.jsonld",
+ "context": "compact/0067-context.jsonld",
+ "expect": "compact/0067-out.jsonld"
+ }, {
+ "@id": "#t0068",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "Single value reverse properties",
+ "purpose": "Single values of reverse properties are compacted as values of ordinary properties",
+ "input": "compact/0068-in.jsonld",
+ "context": "compact/0068-context.jsonld",
+ "expect": "compact/0068-out.jsonld"
+ }, {
+ "@id": "#t0069",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "Single value reverse properties with @set",
+ "purpose": "Single values are kept in array form for reverse properties if the container is to @set",
+ "input": "compact/0069-in.jsonld",
+ "context": "compact/0069-context.jsonld",
+ "expect": "compact/0069-out.jsonld"
+ }, {
+ "@id": "#t0070",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "compactArrays option",
+ "purpose": "Setting compactArrays to false causes single element arrays to be retained",
+ "option": {
+ "compactArrays": false
+ },
+ "input": "compact/0070-in.jsonld",
+ "context": "compact/0070-context.jsonld",
+ "expect": "compact/0070-out.jsonld"
+ }, {
+ "@id": "#t0071",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "Input has multiple @contexts, output has one",
+ "purpose": "Expanding input with multiple @contexts and compacting with just one doesn't output undefined properties",
+ "input": "compact/0071-in.jsonld",
+ "context": "compact/0071-context.jsonld",
+ "expect": "compact/0071-out.jsonld"
+ }, {
+ "@id": "#t0072",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "Default language and unmapped properties",
+ "purpose": "Ensure that the default language is handled correctly for unmapped properties",
+ "input": "compact/0072-in.jsonld",
+ "context": "compact/0072-context.jsonld",
+ "expect": "compact/0072-out.jsonld"
+ }, {
+ "@id": "#t0073",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "Mapped @id and @type",
+ "purpose": "Ensure that compaction works with mapped @id and @type",
+ "input": "compact/0073-in.jsonld",
+ "context": "compact/0073-context.jsonld",
+ "expect": "compact/0073-out.jsonld"
+ }, {
+ "@id": "#t0074",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "Container as a list with type of @id",
+ "purpose": "Ensure that compaction works for empty list when property has container declared as @list and type as @id",
+ "input": "compact/0074-in.jsonld",
+ "context": "compact/0074-context.jsonld",
+ "expect": "compact/0074-out.jsonld"
+ }, {
+ "@id": "#t0075",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "Compact using relative fragment identifier",
+ "purpose": "Compacting a relative round-trips",
+ "option": {"processingMode": "json-ld-1.0", "base": "http://example.org/"},
+ "input": "compact/0075-in.jsonld",
+ "context": "compact/0075-context.jsonld",
+ "expect": "compact/0075-out.jsonld"
+ }, {
+ "@id": "#t0076",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "Compacting IRI equivalent to base",
+ "purpose": "Compacting IRI equivalent to base, uses last path segment of base ending in '/'",
+ "input": "compact/0076-in.jsonld",
+ "context": "compact/0076-context.jsonld",
+ "expect": "compact/0076-out.jsonld"
+ }, {
+ "@id": "#t0077",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "Compact a @graph container",
+ "purpose": "Compact a @graph container",
+ "input": "compact/0077-in.jsonld",
+ "context": "compact/0077-context.jsonld",
+ "expect": "compact/0077-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#t0078",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "Compact a [@graph, @set] container",
+ "purpose": "Compact with [@graph, @set]",
+ "input": "compact/0078-in.jsonld",
+ "context": "compact/0078-context.jsonld",
+ "expect": "compact/0078-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#t0079",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "Compact a @graph container having @index",
+ "purpose": "Verify that having both @graph and @index allows @graph container compaction",
+ "input": "compact/0079-in.jsonld",
+ "context": "compact/0079-context.jsonld",
+ "expect": "compact/0079-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#t0080",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "Do not compact a graph having @id with a term having an @graph container",
+ "purpose": "Graph compaction works only on simple graphs",
+ "input": "compact/0080-in.jsonld",
+ "context": "compact/0080-context.jsonld",
+ "expect": "compact/0080-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#t0081",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "Compact a [@graph, @index] container",
+ "purpose": "Compact a @graph container with @index",
+ "input": "compact/0081-in.jsonld",
+ "context": "compact/0081-context.jsonld",
+ "expect": "compact/0081-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#t0082",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "Compact a [@graph, @index, @set] container",
+ "purpose": "Compact a @graph container with @index and @set",
+ "input": "compact/0082-in.jsonld",
+ "context": "compact/0082-context.jsonld",
+ "expect": "compact/0082-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#t0083",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "[@graph, @index] does not compact graph with @id",
+ "purpose": "Graph compaction with @graph and @index works only on simple graphs",
+ "input": "compact/0083-in.jsonld",
+ "context": "compact/0083-context.jsonld",
+ "expect": "compact/0083-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#t0084",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "Compact a simple graph with a [@graph, @id] container",
+ "purpose": "Compact a simple graph using a @graph container with @id",
+ "input": "compact/0084-in.jsonld",
+ "context": "compact/0084-context.jsonld",
+ "expect": "compact/0084-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#t0085",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "Compact a named graph with a [@graph, @id] container",
+ "purpose": "Compact a named graph using a @graph container with @id",
+ "input": "compact/0085-in.jsonld",
+ "context": "compact/0085-context.jsonld",
+ "expect": "compact/0085-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#t0086",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "Compact a simple graph with a [@graph, @id, @set] container",
+ "purpose": "Compact a simple graph using a @graph container with @id and @set",
+ "input": "compact/0086-in.jsonld",
+ "context": "compact/0086-context.jsonld",
+ "expect": "compact/0086-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#t0087",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "Compact a named graph with a [@graph, @id, @set] container",
+ "purpose": "Compact a named graph using a @graph container with @id and @set",
+ "input": "compact/0087-in.jsonld",
+ "context": "compact/0087-context.jsonld",
+ "expect": "compact/0087-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#t0088",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "Compact a graph with @index using a [@graph, @id] container",
+ "purpose": "Compact a @graph container with @id and @set, discarding an @index value",
+ "input": "compact/0088-in.jsonld",
+ "context": "compact/0088-context.jsonld",
+ "expect": "compact/0088-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#t0089",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "Language map term selection with complications",
+ "purpose": "Test appropriate property use given language maps with @vocab, a default language, no language, and competing terms",
+ "input": "compact/0089-in.jsonld",
+ "context": "compact/0089-context.jsonld",
+ "expect": "compact/0089-out.jsonld"
+ }, {
+ "@id": "#t0090",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "Compact input with @graph container to output without @graph container",
+ "purpose": "Ensure @graph appears properly in output",
+ "input": "compact/0090-in.jsonld",
+ "context": "compact/0090-context.jsonld",
+ "expect": "compact/0090-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#t0091",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "Compact input with @graph container to output without @graph container with compactArrays unset",
+ "purpose": "Ensure @graph appears properly in output with compactArrays unset",
+ "input": "compact/0091-in.jsonld",
+ "context": "compact/0091-context.jsonld",
+ "expect": "compact/0091-out.jsonld",
+ "option": {"compactArrays": false, "specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#t0092",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "Compact input with [@graph, @set] container to output without [@graph, @set] container",
+ "purpose": "Ensure @graph appears properly in output",
+ "input": "compact/0092-in.jsonld",
+ "context": "compact/0092-context.jsonld",
+ "expect": "compact/0092-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#t0093",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "Compact input with [@graph, @set] container to output without [@graph, @set] container with compactArrays unset",
+ "purpose": "Ensure @graph appears properly in output with compactArrays unset",
+ "input": "compact/0093-in.jsonld",
+ "context": "compact/0093-context.jsonld",
+ "expect": "compact/0093-out.jsonld",
+ "option": {"compactArrays": false, "specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#t0094",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "Compact input with [@graph, @set] container to output without [@graph, @set] container",
+ "purpose": "Ensure @graph appears properly in output",
+ "input": "compact/0094-in.jsonld",
+ "context": "compact/0094-context.jsonld",
+ "expect": "compact/0094-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#t0095",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "Relative propererty IRIs with @vocab: ''",
+ "purpose": "Complex use cases for relative IRI compaction or properties",
+ "input": "compact/0095-in.jsonld",
+ "context": "compact/0095-context.jsonld",
+ "expect": "compact/0095-out.jsonld"
+ }, {
+ "@id": "#t0096",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "Compact @graph container (multiple graphs)",
+ "purpose": "Ensure @graph appears properly in output",
+ "input": "compact/0096-in.jsonld",
+ "context": "compact/0096-context.jsonld",
+ "expect": "compact/0096-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#t0097",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "Compact [@graph, @set] container (multiple graphs)",
+ "purpose": "Ensure @graph appears properly in output",
+ "input": "compact/0097-in.jsonld",
+ "context": "compact/0097-context.jsonld",
+ "expect": "compact/0097-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#t0098",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "Compact [@graph, @index] container (multiple indexed objects)",
+ "purpose": "Ensure @graph appears properly in output",
+ "input": "compact/0098-in.jsonld",
+ "context": "compact/0098-context.jsonld",
+ "expect": "compact/0098-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#t0099",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "Compact [@graph, @index, @set] container (multiple indexed objects)",
+ "purpose": "Ensure @graph appears properly in output",
+ "input": "compact/0099-in.jsonld",
+ "context": "compact/0099-context.jsonld",
+ "expect": "compact/0099-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#t0100",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "Compact [@graph, @id] container (multiple indexed objects)",
+ "purpose": "Ensure @graph appears properly in output",
+ "input": "compact/0100-in.jsonld",
+ "context": "compact/0100-context.jsonld",
+ "expect": "compact/0100-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#t0101",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "Compact [@graph, @id, @set] container (multiple indexed objects)",
+ "purpose": "Ensure @graph appears properly in output",
+ "input": "compact/0101-in.jsonld",
+ "context": "compact/0101-context.jsonld",
+ "expect": "compact/0101-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#t0102",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "Compact [@graph, @index] container (multiple indexes and objects)",
+ "purpose": "Ensure @graph appears properly in output",
+ "input": "compact/0102-in.jsonld",
+ "context": "compact/0102-context.jsonld",
+ "expect": "compact/0102-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#t0103",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "Compact [@graph, @id] container (multiple ids and objects)",
+ "purpose": "Ensure @graph appears properly in output",
+ "input": "compact/0103-in.jsonld",
+ "context": "compact/0103-context.jsonld",
+ "expect": "compact/0103-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#t0104",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "Compact @type with @container: @set",
+ "purpose": "Ensures that a single @type value is represented as an array",
+ "input": "compact/0104-in.jsonld",
+ "context": "compact/0104-context.jsonld",
+ "expect": "compact/0104-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#t0105",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "Compact @type with @container: @set using an alias of @type",
+ "purpose": "Ensures that a single @type value is represented as an array",
+ "input": "compact/0105-in.jsonld",
+ "context": "compact/0105-context.jsonld",
+ "expect": "compact/0105-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#t0106",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "Do not compact @type with @container: @set to an array using an alias of @type",
+ "purpose": "Ensures that a single @type value is not represented as an array in 1.0",
+ "input": "compact/0106-in.jsonld",
+ "context": "compact/0106-context.jsonld",
+ "expect": "compact/0106-out.jsonld",
+ "option": {"processingMode": "json-ld-1.0", "specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#t0107",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "Relative propererty IRIs with @vocab: ''",
+ "purpose": "Complex use cases for relative IRI compaction or properties",
+ "input": "compact/0107-in.jsonld",
+ "context": "compact/0107-context.jsonld",
+ "expect": "compact/0107-out.jsonld"
+ }, {
+ "@id": "#t0108",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "Relative propererty IRIs with @vocab: ''",
+ "purpose": "Complex use cases for relative IRI compaction or properties",
+ "name": "context with JavaScript Object property names",
+ "purpose": "Compact with context including JavaScript Object property names",
+ "input": "compact/0108-in.jsonld",
+ "context": "compact/0108-context.jsonld",
+ "expect": "compact/0108-out.jsonld"
+ }, {
+ "@id": "#t0109",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "Compact @graph container (multiple objects)",
+ "purpose": "Multiple objects in a simple graph with a graph container need to use @included",
+ "input": "compact/0109-in.jsonld",
+ "context": "compact/0109-context.jsonld",
+ "expect": "compact/0109-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#t0110",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "Compact [@graph, @set] container (multiple objects)",
+ "purpose": "Multiple objects in a simple graph with a graph container need to use @included",
+ "input": "compact/0110-in.jsonld",
+ "context": "compact/0110-context.jsonld",
+ "expect": "compact/0110-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#t0111",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "Keyword-like relative IRIs",
+ "purpose": "Relative IRIs must not have the form a of keyword",
+ "input": "compact/0111-in.jsonld",
+ "context": "compact/0111-context.jsonld",
+ "expect": "compact/0111-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#t0113",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "Compact property index using Absolute IRI index",
+ "purpose": "With @container: @index and @index an absolute IRI, ensure round-tripping of compacted representation",
+ "input": "compact/0113-in.jsonld",
+ "context": "compact/0113-context.jsonld",
+ "expect": "compact/0113-out.jsonld"
+ }, {
+ "@id": "#t0112",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "Compact property index using Compact IRI index",
+ "purpose": "With @container: @index and @index a compact IRI, ensure round-tripping of compacted representation",
+ "input": "compact/0112-in.jsonld",
+ "context": "compact/0112-context.jsonld",
+ "expect": "compact/0112-out.jsonld"
+ }, {
+ "@id": "#tc001",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "adding new term",
+ "purpose": "Compaction using a scoped context uses term scope for selecting proper term",
+ "input": "compact/c001-in.jsonld",
+ "context": "compact/c001-context.jsonld",
+ "expect": "compact/c001-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tc002",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "overriding a term",
+ "purpose": "Compaction using a scoped context uses term scope for selecting proper term",
+ "input": "compact/c002-in.jsonld",
+ "context": "compact/c002-context.jsonld",
+ "expect": "compact/c002-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tc003",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "property and value with different terms mapping to the same expanded property",
+ "purpose": "Compaction using a scoped context uses term scope for selecting proper term",
+ "input": "compact/c003-in.jsonld",
+ "context": "compact/c003-context.jsonld",
+ "expect": "compact/c003-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tc004",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "deep @context affects nested nodes",
+ "purpose": "Compaction using a scoped context uses term scope for selecting proper term",
+ "input": "compact/c004-in.jsonld",
+ "context": "compact/c004-context.jsonld",
+ "expect": "compact/c004-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tc005",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "scoped context layers on intemediate contexts",
+ "purpose": "Compaction using a scoped context uses term scope for selecting proper term",
+ "input": "compact/c005-in.jsonld",
+ "context": "compact/c005-context.jsonld",
+ "expect": "compact/c005-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tc006",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "adding new term",
+ "purpose": "scoped context on @type",
+ "input": "compact/c006-in.jsonld",
+ "context": "compact/c006-context.jsonld",
+ "expect": "compact/c006-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tc007",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "overriding a term",
+ "purpose": "scoped context on @type",
+ "input": "compact/c007-in.jsonld",
+ "context": "compact/c007-context.jsonld",
+ "expect": "compact/c007-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tc008",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "alias of @type",
+ "purpose": "scoped context on @type",
+ "input": "compact/c008-in.jsonld",
+ "context": "compact/c008-context.jsonld",
+ "expect": "compact/c008-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tc009",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "deep @type-scoped @context does NOT affect nested nodes",
+ "purpose": "scoped context on @type",
+ "input": "compact/c009-in.jsonld",
+ "context": "compact/c009-context.jsonld",
+ "expect": "compact/c009-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tc010",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "scoped context layers on intemediate contexts",
+ "purpose": "scoped context on @type",
+ "input": "compact/c010-in.jsonld",
+ "context": "compact/c010-context.jsonld",
+ "expect": "compact/c010-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tc011",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "applies context for all values",
+ "purpose": "scoped context on @type",
+ "input": "compact/c011-in.jsonld",
+ "context": "compact/c011-context.jsonld",
+ "expect": "compact/c011-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tc012",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "orders @type terms when applying scoped contexts",
+ "purpose": "scoped context on @type",
+ "input": "compact/c012-in.jsonld",
+ "context": "compact/c012-context.jsonld",
+ "expect": "compact/c012-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tc013",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "deep property-term scoped @context in @type-scoped @context affects nested nodes",
+ "purpose": "scoped context on @type",
+ "input": "compact/c013-in.jsonld",
+ "context": "compact/c013-context.jsonld",
+ "expect": "compact/c013-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tc014",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "type-scoped context nullification",
+ "purpose": "Nullifying a type-scoped context continues to use the previous context when compacting @type.",
+ "input": "compact/c014-in.jsonld",
+ "context": "compact/c014-context.jsonld",
+ "expect": "compact/c014-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tc015",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "type-scoped base",
+ "purpose": "type-scoped base",
+ "input": "compact/c015-in.jsonld",
+ "context": "compact/c015-context.jsonld",
+ "expect": "compact/c015-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tc016",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "type-scoped vocab",
+ "purpose": "type-scoped vocab",
+ "input": "compact/c016-in.jsonld",
+ "context": "compact/c016-context.jsonld",
+ "expect": "compact/c016-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tc017",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "multiple type-scoped contexts are properly reverted",
+ "purpose": "multiple type-scoped contexts are property reverted",
+ "input": "compact/c017-in.jsonld",
+ "context": "compact/c017-context.jsonld",
+ "expect": "compact/c017-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tc018",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "multiple type-scoped types resolved against previous context",
+ "purpose": "multiple type-scoped types resolved against previous context",
+ "input": "compact/c018-in.jsonld",
+ "context": "compact/c018-context.jsonld",
+ "expect": "compact/c018-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tc019",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "type-scoped context with multiple property scoped terms",
+ "purpose": "type-scoped context with multiple property scoped terms",
+ "input": "compact/c019-in.jsonld",
+ "context": "compact/c019-context.jsonld",
+ "expect": "compact/c019-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tc020",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "type-scoped value",
+ "purpose": "type-scoped value",
+ "input": "compact/c020-in.jsonld",
+ "context": "compact/c020-context.jsonld",
+ "expect": "compact/c020-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tc021",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "type-scoped value mix",
+ "purpose": "type-scoped value mix",
+ "input": "compact/c021-in.jsonld",
+ "context": "compact/c021-context.jsonld",
+ "expect": "compact/c021-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tc022",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "type-scoped property-scoped contexts including @type:@vocab",
+ "purpose": "type-scoped property-scoped contexts including @type:@vocab",
+ "input": "compact/c022-in.jsonld",
+ "context": "compact/c022-context.jsonld",
+ "expect": "compact/c022-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tc023",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "composed type-scoped property-scoped contexts including @type:@vocab",
+ "purpose": "composed type-scoped property-scoped contexts including @type:@vocab",
+ "input": "compact/c023-in.jsonld",
+ "context": "compact/c023-context.jsonld",
+ "expect": "compact/c023-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tc024",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "type-scoped + property-scoped + values evaluates against previous context",
+ "purpose": "type-scoped + property-scoped + values evaluates against previous context",
+ "input": "compact/c024-in.jsonld",
+ "context": "compact/c024-context.jsonld",
+ "expect": "compact/c024-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tc025",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "type-scoped + graph container",
+ "purpose": "type-scoped + graph container",
+ "input": "compact/c025-in.jsonld",
+ "context": "compact/c025-context.jsonld",
+ "expect": "compact/c025-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tc026",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "@propagate: true on type-scoped context",
+ "purpose": "type-scoped context with @propagate: true survive node-objects",
+ "input": "compact/c026-in.jsonld",
+ "context": "compact/c026-context.jsonld",
+ "expect": "compact/c026-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tc027",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "@propagate: false on property-scoped context",
+ "purpose": "property-scoped context with @propagate: false do not survive node-objects",
+ "input": "compact/c027-in.jsonld",
+ "context": "compact/c027-context.jsonld",
+ "expect": "compact/c027-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tc028",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "Empty-property scoped context does not affect term selection.",
+ "purpose": "Adding a minimal/empty property-scoped context should not affect the using terms defined in outer context.",
+ "input": "compact/c028-in.jsonld",
+ "context": "compact/c028-context.jsonld",
+ "expect": "compact/c028-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tdi01",
+ "@type": [ "jld:PositiveEvaluationTest", "jld:CompactTest" ],
+ "name": "term direction null",
+ "purpose": "Uses term with null direction when two terms conflict on direction.",
+ "option": {"specVersion": "json-ld-1.1"},
+ "input": "compact/di01-in.jsonld",
+ "context": "compact/di01-context.jsonld",
+ "expect": "compact/di01-out.jsonld"
+ }, {
+ "@id": "#tdi02",
+ "@type": [ "jld:PositiveEvaluationTest", "jld:CompactTest" ],
+ "name": "use alias of @direction",
+ "purpose": "Use alias of @direction.",
+ "option": {"specVersion": "json-ld-1.1"},
+ "input": "compact/di02-in.jsonld",
+ "context": "compact/di02-context.jsonld",
+ "expect": "compact/di02-out.jsonld"
+ }, {
+ "@id": "#tdi03",
+ "@type": [ "jld:PositiveEvaluationTest", "jld:CompactTest" ],
+ "name": "term selection with lists and direction",
+ "purpose": "Term selection includes values of @list.",
+ "option": {"specVersion": "json-ld-1.1"},
+ "input": "compact/di03-in.jsonld",
+ "context": "compact/di03-context.jsonld",
+ "expect": "compact/di03-out.jsonld"
+ }, {
+ "@id": "#tdi04",
+ "@type": [ "jld:PositiveEvaluationTest", "jld:CompactTest" ],
+ "name": "simple language map with term direction",
+ "purpose": "Term selection with language maps and @direction.",
+ "option": {"specVersion": "json-ld-1.1"},
+ "input": "compact/di04-in.jsonld",
+ "context": "compact/di04-context.jsonld",
+ "expect": "compact/di04-out.jsonld"
+ }, {
+ "@id": "#tdi05",
+ "@type": [ "jld:PositiveEvaluationTest", "jld:CompactTest" ],
+ "name": "simple language map with overriding term direction",
+ "purpose": "Term selection with language maps and @direction.",
+ "option": {"specVersion": "json-ld-1.1"},
+ "input": "compact/di05-in.jsonld",
+ "context": "compact/di05-context.jsonld",
+ "expect": "compact/di05-out.jsonld"
+ }, {
+ "@id": "#tdi06",
+ "@type": [ "jld:PositiveEvaluationTest", "jld:CompactTest" ],
+ "name": "simple language map with overriding null direction",
+ "purpose": "Term selection with language maps and @direction.",
+ "option": {"specVersion": "json-ld-1.1"},
+ "input": "compact/di06-in.jsonld",
+ "context": "compact/di06-context.jsonld",
+ "expect": "compact/di06-out.jsonld"
+ }, {
+ "@id": "#tdi07",
+ "@type": [ "jld:PositiveEvaluationTest", "jld:CompactTest" ],
+ "name": "simple language map with mismatching term direction",
+ "purpose": "Term selection with language maps and @direction.",
+ "option": {"specVersion": "json-ld-1.1"},
+ "input": "compact/di07-in.jsonld",
+ "context": "compact/di07-context.jsonld",
+ "expect": "compact/di07-out.jsonld"
+ }, {
+ "@id": "#te001",
+ "@type": [ "jld:NegativeEvaluationTest", "jld:CompactTest" ],
+ "name": "Compaction to list of lists",
+ "purpose": "Verifies that an exception is raised in Compaction when attempting to compact a list of lists",
+ "option": {"specVersion": "json-ld-1.0"},
+ "input": "compact/e001-in.jsonld",
+ "context": "compact/e001-context.jsonld",
+ "expectErrorCode": "compaction to list of lists"
+ }, {
+ "@id": "#te002",
+ "@type": [ "jld:NegativeEvaluationTest", "jld:CompactTest" ],
+ "name": "Absolute IRI confused with Compact IRI",
+ "purpose": "Verifies that IRI compaction detects when the result is an absolute IRI with a scheme matching a term.",
+ "option": {"specVersion": "json-ld-1.1"},
+ "input": "compact/e002-in.jsonld",
+ "context": "compact/e002-context.jsonld",
+ "expectErrorCode": "IRI confused with prefix"
+ }, {
+ "@id": "#ten01",
+ "@type": [ "jld:NegativeEvaluationTest", "jld:CompactTest" ],
+ "name": "Nest term not defined",
+ "purpose": "Transparent Nesting",
+ "input": "compact/en01-in.jsonld",
+ "context": "compact/en01-context.jsonld",
+ "expectErrorCode": "invalid @nest value",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tep05",
+ "@type": ["jld:NegativeEvaluationTest", "jld:CompactTest"],
+ "name": "processingMode json-ld-1.0 conflicts with @version: 1.1",
+ "purpose": "If processingMode is explicitly json-ld-1.0, it will conflict with 1.1 features.",
+ "input": "compact/ep05-in.jsonld",
+ "context": "compact/ep05-context.jsonld",
+ "expectErrorCode": "processing mode conflict",
+ "option": {"processingMode": "json-ld-1.0", "specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tep06",
+ "@type": ["jld:NegativeEvaluationTest", "jld:CompactTest"],
+ "name": "@version must be 1.1",
+ "purpose": "If @version is specified, it must be 1.1",
+ "option": {"specVersion": "json-ld-1.1"},
+ "input": "compact/ep06-in.jsonld",
+ "context": "compact/ep06-context.jsonld",
+ "expectErrorCode": "invalid @version value"
+ }, {
+ "@id": "#tep07",
+ "@type": ["jld:NegativeEvaluationTest", "jld:CompactTest"],
+ "name": "@prefix is not allowed in 1.0",
+ "purpose": "@prefix is not allowed in a term definition 1.0",
+ "option": {"processingMode": "json-ld-1.0", "specVersion": "json-ld-1.1"},
+ "input": "compact/ep07-in.jsonld",
+ "context": "compact/ep07-context.jsonld",
+ "expectErrorCode": "invalid term definition"
+ }, {
+ "@id": "#tep08",
+ "@type": ["jld:NegativeEvaluationTest", "jld:CompactTest"],
+ "name": "@prefix must be a boolean",
+ "purpose": "@prefix must be a boolean in a term definition in 1.1",
+ "option": {"specVersion": "json-ld-1.1"},
+ "input": "compact/ep08-in.jsonld",
+ "context": "compact/ep08-context.jsonld",
+ "expectErrorCode": "invalid @prefix value"
+ }, {
+ "@id": "#tep09",
+ "@type": ["jld:NegativeEvaluationTest", "jld:CompactTest"],
+ "name": "@prefix not allowed on compact IRI term",
+ "purpose": "If processingMode is json-ld-1.0, or if term contains a colon (:), an invalid term definition has been detected and processing is aborted.",
+ "option": {"specVersion": "json-ld-1.1"},
+ "input": "compact/ep09-in.jsonld",
+ "context": "compact/ep09-context.jsonld",
+ "expectErrorCode": "invalid term definition"
+ }, {
+ "@id": "#tep10",
+ "@type": ["jld:NegativeEvaluationTest", "jld:CompactTest"],
+ "name": "@nest is not allowed in 1.0",
+ "purpose": "@nest is not allowed in a term definitionin 1.0",
+ "option": {"processingMode": "json-ld-1.0", "specVersion": "json-ld-1.1"},
+ "input": "compact/ep10-in.jsonld",
+ "context": "compact/ep10-context.jsonld",
+ "expectErrorCode": "invalid term definition"
+ }, {
+ "@id": "#tep11",
+ "@type": ["jld:NegativeEvaluationTest", "jld:CompactTest"],
+ "name": "@context is not allowed in 1.0",
+ "purpose": "@context is not allowed in a term definitionin 1.0",
+ "option": {"processingMode": "json-ld-1.0", "specVersion": "json-ld-1.1"},
+ "input": "compact/ep11-in.jsonld",
+ "context": "compact/ep11-context.jsonld",
+ "expectErrorCode": "invalid term definition"
+ }, {
+ "@id": "#tep12",
+ "@type": ["jld:NegativeEvaluationTest", "jld:CompactTest"],
+ "name": "@container may not be an array in 1.0",
+ "purpose": "validate appropriate values of @container",
+ "option": {"processingMode": "json-ld-1.0", "specVersion": "json-ld-1.1"},
+ "input": "compact/ep12-in.jsonld",
+ "context": "compact/ep12-context.jsonld",
+ "expectErrorCode": "invalid container mapping"
+ }, {
+ "@id": "#tep13",
+ "@type": ["jld:NegativeEvaluationTest", "jld:CompactTest"],
+ "name": "@container may not be @id in 1.0",
+ "purpose": "validate appropriate values of @container",
+ "option": {"processingMode": "json-ld-1.0", "specVersion": "json-ld-1.1"},
+ "input": "compact/ep13-in.jsonld",
+ "context": "compact/ep13-context.jsonld",
+ "expectErrorCode": "invalid container mapping"
+ }, {
+ "@id": "#tep14",
+ "@type": ["jld:NegativeEvaluationTest", "jld:CompactTest"],
+ "name": "@container may not be @type in 1.0",
+ "purpose": "validate appropriate values of @container",
+ "option": {"processingMode": "json-ld-1.0", "specVersion": "json-ld-1.1"},
+ "input": "compact/ep14-in.jsonld",
+ "context": "compact/ep14-context.jsonld",
+ "expectErrorCode": "invalid container mapping"
+ }, {
+ "@id": "#tep15",
+ "@type": ["jld:NegativeEvaluationTest", "jld:CompactTest"],
+ "name": "@container may not be @graph in 1.0",
+ "purpose": "validate appropriate values of @container",
+ "option": {"processingMode": "json-ld-1.0", "specVersion": "json-ld-1.1"},
+ "input": "compact/ep15-in.jsonld",
+ "context": "compact/ep15-context.jsonld",
+ "expectErrorCode": "invalid container mapping"
+ }, {
+ "@id": "#tin01",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "Basic Included array",
+ "purpose": "Tests included blocks.",
+ "input": "compact/in01-in.jsonld",
+ "context": "compact/in01-context.jsonld",
+ "expect": "compact/in01-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tin02",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "Basic Included object",
+ "purpose": "Tests included blocks.",
+ "input": "compact/in02-in.jsonld",
+ "context": "compact/in02-context.jsonld",
+ "expect": "compact/in02-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tin03",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "Multiple properties mapping to @included are folded together",
+ "purpose": "Tests included blocks.",
+ "input": "compact/in03-in.jsonld",
+ "context": "compact/in03-context.jsonld",
+ "expect": "compact/in03-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tin04",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "Included containing @included",
+ "purpose": "Tests included blocks.",
+ "input": "compact/in04-in.jsonld",
+ "context": "compact/in04-context.jsonld",
+ "expect": "compact/in04-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tin05",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "Property value with @included",
+ "purpose": "Tests included blocks.",
+ "input": "compact/in05-in.jsonld",
+ "context": "compact/in05-context.jsonld",
+ "expect": "compact/in05-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tjs01",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "Compact JSON literal (boolean true)",
+ "purpose": "Tests compacting property with @type @json to a JSON literal (boolean true).",
+ "input": "compact/js01-in.jsonld",
+ "context": "compact/js01-context.jsonld",
+ "expect": "compact/js01-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tjs02",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "Compact JSON literal (boolean false)",
+ "purpose": "Tests compacting property with @type @json to a JSON literal (boolean false).",
+ "input": "compact/js02-in.jsonld",
+ "context": "compact/js02-context.jsonld",
+ "expect": "compact/js02-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tjs03",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "Compact JSON literal (double)",
+ "purpose": "Tests compacting property with @type @json to a JSON literal (double).",
+ "input": "compact/js03-in.jsonld",
+ "context": "compact/js03-context.jsonld",
+ "expect": "compact/js03-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tjs04",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "Compact JSON literal (double-zero)",
+ "purpose": "Tests compacting property with @type @json to a JSON literal (double-zero).",
+ "input": "compact/js04-in.jsonld",
+ "context": "compact/js04-context.jsonld",
+ "expect": "compact/js04-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tjs05",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "Compact JSON literal (integer)",
+ "purpose": "Tests compacting property with @type @json to a JSON literal (integer).",
+ "input": "compact/js05-in.jsonld",
+ "context": "compact/js05-context.jsonld",
+ "expect": "compact/js05-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tjs06",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "Compact JSON literal (object)",
+ "purpose": "Tests compacting property with @type @json to a JSON literal (object).",
+ "input": "compact/js06-in.jsonld",
+ "context": "compact/js06-context.jsonld",
+ "expect": "compact/js06-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tjs07",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "Compact JSON literal (array)",
+ "purpose": "Tests compacting property with @type @json to a JSON literal (array).",
+ "input": "compact/js07-in.jsonld",
+ "context": "compact/js07-context.jsonld",
+ "expect": "compact/js07-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tjs08",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "Compact already expanded JSON literal",
+ "purpose": "Tests compacting JSON literal does not expand terms inside json.",
+ "input": "compact/js08-in.jsonld",
+ "context": "compact/js08-context.jsonld",
+ "expect": "compact/js08-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tjs09",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "Compact already expanded JSON literal with aliased keys",
+ "purpose": "Tests compacting JSON literal in expanded form.",
+ "input": "compact/js09-in.jsonld",
+ "context": "compact/js09-context.jsonld",
+ "expect": "compact/js09-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tjs10",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "Compact JSON literal (string)",
+ "purpose": "Tests compacting property with @type @json to a JSON literal (string).",
+ "input": "compact/js10-in.jsonld",
+ "context": "compact/js10-context.jsonld",
+ "expect": "compact/js10-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tjs11",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "Compact JSON literal (null)",
+ "purpose": "Tests compacting property with @type @json to a JSON literal (null).",
+ "input": "compact/js11-in.jsonld",
+ "context": "compact/js11-context.jsonld",
+ "expect": "compact/js11-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tla01",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "most specific term matching in @list.",
+ "purpose": "The most specific term that matches all of the elements in the list, taking into account the default language, must be selected, without considering case of language.",
+ "input": "compact/la01-in.jsonld",
+ "context": "compact/la01-context.jsonld",
+ "expect": "compact/la01-out.jsonld"
+ }, {
+ "@id": "#tli01",
+ "@type": [ "jld:PositiveEvaluationTest", "jld:CompactTest" ],
+ "name": "coerced @list containing an empty list",
+ "purpose": "Lists of Lists",
+ "input": "compact/li01-in.jsonld",
+ "context": "compact/li01-context.jsonld",
+ "expect": "compact/li01-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tli02",
+ "@type": [ "jld:PositiveEvaluationTest", "jld:CompactTest" ],
+ "name": "coerced @list containing a list",
+ "purpose": "Lists of Lists",
+ "input": "compact/li02-in.jsonld",
+ "context": "compact/li02-context.jsonld",
+ "expect": "compact/li02-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tli03",
+ "@type": [ "jld:PositiveEvaluationTest", "jld:CompactTest" ],
+ "name": "coerced @list containing an deep list",
+ "purpose": "Lists of Lists",
+ "input": "compact/li03-in.jsonld",
+ "context": "compact/li03-context.jsonld",
+ "expect": "compact/li03-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tli04",
+ "@type": [ "jld:PositiveEvaluationTest", "jld:CompactTest" ],
+ "name": "coerced @list containing multiple lists",
+ "purpose": "Lists of Lists",
+ "input": "compact/li04-in.jsonld",
+ "context": "compact/li04-context.jsonld",
+ "expect": "compact/li04-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tli05",
+ "@type": [ "jld:PositiveEvaluationTest", "jld:CompactTest" ],
+ "name": "coerced @list containing mixed list values",
+ "purpose": "Lists of Lists",
+ "input": "compact/li05-in.jsonld",
+ "context": "compact/li05-context.jsonld",
+ "expect": "compact/li05-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tm001",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "Indexes to object not having an @id",
+ "purpose": "Compaction using @container: @id",
+ "input": "compact/m001-in.jsonld",
+ "context": "compact/m001-context.jsonld",
+ "expect": "compact/m001-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tm002",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "Indexes to object already having an @id",
+ "purpose": "Compaction using @container: @id",
+ "input": "compact/m002-in.jsonld",
+ "context": "compact/m002-context.jsonld",
+ "expect": "compact/m002-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tm003",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "Indexes to object not having an @type",
+ "purpose": "Compaction using @container: @type",
+ "input": "compact/m003-in.jsonld",
+ "context": "compact/m003-context.jsonld",
+ "expect": "compact/m003-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tm004",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "Indexes to object already having an @type",
+ "purpose": "Compaction using @container: @type",
+ "input": "compact/m004-in.jsonld",
+ "context": "compact/m004-context.jsonld",
+ "expect": "compact/m004-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tm005",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "Indexes to object using compact IRI @id",
+ "purpose": "Compaction using @container: @id",
+ "input": "compact/m005-in.jsonld",
+ "context": "compact/m005-context.jsonld",
+ "expect": "compact/m005-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tm006",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "Indexes using compacted @type",
+ "purpose": "Compaction using @container: @type",
+ "input": "compact/m006-in.jsonld",
+ "context": "compact/m006-context.jsonld",
+ "expect": "compact/m006-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tm007",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "When type is in a type map",
+ "purpose": "scoped context on @type",
+ "input": "compact/m007-in.jsonld",
+ "context": "compact/m007-context.jsonld",
+ "expect": "compact/m007-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tm008",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "@index map with @none node definition",
+ "purpose": "index on @index",
+ "input": "compact/m008-in.jsonld",
+ "context": "compact/m008-context.jsonld",
+ "expect": "compact/m008-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tm009",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "@index map with @none value",
+ "purpose": "index on @index",
+ "input": "compact/m009-in.jsonld",
+ "context": "compact/m009-context.jsonld",
+ "expect": "compact/m009-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tm010",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "@index map with @none value using alias of @none",
+ "purpose": "index on @index",
+ "input": "compact/m010-in.jsonld",
+ "context": "compact/m010-context.jsonld",
+ "expect": "compact/m010-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tm011",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "@language map with no @language",
+ "purpose": "index on @language",
+ "input": "compact/m011-in.jsonld",
+ "context": "compact/m011-context.jsonld",
+ "expect": "compact/m011-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tm012",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "language map with no @language using alias of @none",
+ "purpose": "index on @language",
+ "input": "compact/m012-in.jsonld",
+ "context": "compact/m012-context.jsonld",
+ "expect": "compact/m012-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tm013",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "id map using @none",
+ "purpose": "index on @id",
+ "input": "compact/m013-in.jsonld",
+ "context": "compact/m013-context.jsonld",
+ "expect": "compact/m013-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tm014",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "id map using @none with alias",
+ "purpose": "index on @id",
+ "input": "compact/m014-in.jsonld",
+ "context": "compact/m014-context.jsonld",
+ "expect": "compact/m014-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tm015",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "type map using @none with alias",
+ "purpose": "index on @type",
+ "input": "compact/m015-in.jsonld",
+ "context": "compact/m015-context.jsonld",
+ "expect": "compact/m015-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tm016",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "type map using @none with alias",
+ "purpose": "index on @type",
+ "input": "compact/m016-in.jsonld",
+ "context": "compact/m016-context.jsonld",
+ "expect": "compact/m016-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tm017",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "graph index map using @none",
+ "purpose": "index on @graph and @index",
+ "input": "compact/m017-in.jsonld",
+ "context": "compact/m017-context.jsonld",
+ "expect": "compact/m017-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tm018",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "graph id map using @none",
+ "purpose": "index on @graph and @id",
+ "input": "compact/m018-in.jsonld",
+ "context": "compact/m018-context.jsonld",
+ "expect": "compact/m018-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tm019",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "graph id map using alias of @none",
+ "purpose": "index on @graph and @id",
+ "input": "compact/m019-in.jsonld",
+ "context": "compact/m019-context.jsonld",
+ "expect": "compact/m019-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tm020",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "node reference compacts to string value of type map",
+ "purpose": "index on @type",
+ "input": "compact/m020-in.jsonld",
+ "context": "compact/m020-context.jsonld",
+ "expect": "compact/m020-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tm021",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "node reference compacts to string value of type map with @type: @id",
+ "purpose": "index on @type",
+ "input": "compact/m021-in.jsonld",
+ "context": "compact/m021-context.jsonld",
+ "expect": "compact/m021-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tm022",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "node reference compacts to string value of type map with @type: @vocab",
+ "purpose": "index on @type",
+ "input": "compact/m022-in.jsonld",
+ "context": "compact/m022-context.jsonld",
+ "expect": "compact/m022-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tn001",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "Indexes to @nest for property with @nest",
+ "purpose": "Compaction using @nest",
+ "input": "compact/n001-in.jsonld",
+ "context": "compact/n001-context.jsonld",
+ "expect": "compact/n001-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tn002",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "Indexes to @nest for all properties with @nest",
+ "purpose": "Compaction using @nest",
+ "input": "compact/n002-in.jsonld",
+ "context": "compact/n002-context.jsonld",
+ "expect": "compact/n002-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tn003",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "Nests using alias of @nest",
+ "purpose": "Compaction using @nest",
+ "input": "compact/n003-in.jsonld",
+ "context": "compact/n003-context.jsonld",
+ "expect": "compact/n003-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tn004",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "Arrays of nested values",
+ "purpose": "Compaction using @nest",
+ "input": "compact/n004-in.jsonld",
+ "context": "compact/n004-context.jsonld",
+ "expect": "compact/n004-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tn005",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "Nested @container: @list",
+ "purpose": "Compaction using @nest",
+ "input": "compact/n005-in.jsonld",
+ "context": "compact/n005-context.jsonld",
+ "expect": "compact/n005-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tn006",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "Nested @container: @index",
+ "purpose": "Compaction using @nest",
+ "input": "compact/n006-in.jsonld",
+ "context": "compact/n006-context.jsonld",
+ "expect": "compact/n006-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tn007",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "Nested @container: @language",
+ "purpose": "Compaction using @nest",
+ "input": "compact/n007-in.jsonld",
+ "context": "compact/n007-context.jsonld",
+ "expect": "compact/n007-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tn008",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "Nested @container: @type",
+ "purpose": "Compaction using @nest",
+ "input": "compact/n008-in.jsonld",
+ "context": "compact/n008-context.jsonld",
+ "expect": "compact/n008-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tn009",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "Nested @container: @id",
+ "purpose": "Compaction using @nest",
+ "input": "compact/n009-in.jsonld",
+ "context": "compact/n009-context.jsonld",
+ "expect": "compact/n009-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tn010",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "Multiple nest aliases",
+ "purpose": "Compaction using @nest",
+ "input": "compact/n010-in.jsonld",
+ "context": "compact/n010-context.jsonld",
+ "expect": "compact/n010-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tn011",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "Nests using alias of @nest (defined with @id)",
+ "purpose": "Compaction using @nest",
+ "input": "compact/n011-in.jsonld",
+ "context": "compact/n011-context.jsonld",
+ "expect": "compact/n011-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tp001",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "Compact IRI will not use an expanded term definition in 1.0",
+ "purpose": "Terms with an expanded term definition are not used for creating compact IRIs",
+ "option": {"processingMode": "json-ld-1.0", "specVersion": "json-ld-1.1"},
+ "input": "compact/p001-in.jsonld",
+ "context": "compact/p001-context.jsonld",
+ "expect": "compact/p001-out.jsonld"
+ }, {
+ "@id": "#tp002",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "Compact IRI does not use expanded term definition in 1.1",
+ "purpose": "Terms with an expanded term definition are not used for creating compact IRIs",
+ "option": {"specVersion": "json-ld-1.1"},
+ "input": "compact/p002-in.jsonld",
+ "context": "compact/p002-context.jsonld",
+ "expect": "compact/p002-out.jsonld"
+ }, {
+ "@id": "#tp003",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "Compact IRI does not use simple term that does not end with a gen-delim",
+ "purpose": "Terms not ending with a gen-delim are not used for creating compact IRIs",
+ "option": {"specVersion": "json-ld-1.1"},
+ "input": "compact/p003-in.jsonld",
+ "context": "compact/p003-context.jsonld",
+ "expect": "compact/p003-out.jsonld"
+ }, {
+ "@id": "#tp004",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "Compact IRIs using simple terms ending with gen-delim",
+ "purpose": "All simple terms ending with gen-delim are suitable for compaction",
+ "option": {"specVersion": "json-ld-1.1"},
+ "input": "compact/p004-in.jsonld",
+ "context": "compact/p004-context.jsonld",
+ "expect": "compact/p004-out.jsonld"
+ }, {
+ "@id": "#tp005",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "Compact IRI uses term with definition including @prefix: true",
+ "purpose": "Expanded term definition may set prefix explicitly in 1.1",
+ "option": {"specVersion": "json-ld-1.1"},
+ "input": "compact/p005-in.jsonld",
+ "context": "compact/p005-context.jsonld",
+ "expect": "compact/p005-out.jsonld"
+ }, {
+ "@id": "#tp006",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "Compact IRI uses term with definition including @prefix: true",
+ "purpose": "Expanded term definition may set prefix explicitly in 1.1",
+ "option": {"specVersion": "json-ld-1.1"},
+ "input": "compact/p006-in.jsonld",
+ "context": "compact/p006-context.jsonld",
+ "expect": "compact/p006-out.jsonld"
+ }, {
+ "@id": "#tp007",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "Compact IRI not used as prefix",
+ "purpose": "Terms including a colon are excluded from being used as a prefix",
+ "option": {"specVersion": "json-ld-1.1"},
+ "input": "compact/p007-in.jsonld",
+ "context": "compact/p007-context.jsonld",
+ "expect": "compact/p007-out.jsonld"
+ }, {
+ "@id": "#tp008",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "Compact IRI does not use term with definition including @prefix: false",
+ "purpose": "Expanded term definition may set prefix explicitly in 1.1",
+ "option": {"specVersion": "json-ld-1.1"},
+ "input": "compact/p008-in.jsonld",
+ "context": "compact/p008-context.jsonld",
+ "expect": "compact/p008-out.jsonld"
+ }, {
+ "@id": "#tpi01",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "property-valued index indexes property value, instead of property (value)",
+ "purpose": "Compacting property-valued indexes.",
+ "option": {"specVersion": "json-ld-1.1"},
+ "input": "compact/pi01-in.jsonld",
+ "context": "compact/pi01-context.jsonld",
+ "expect": "compact/pi01-out.jsonld"
+ }, {
+ "@id": "#tpi02",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "property-valued index indexes property value, instead of property (multiple values)",
+ "purpose": "Compacting property-valued indexes.",
+ "option": {"specVersion": "json-ld-1.1"},
+ "input": "compact/pi02-in.jsonld",
+ "context": "compact/pi02-context.jsonld",
+ "expect": "compact/pi02-out.jsonld"
+ }, {
+ "@id": "#tpi03",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "property-valued index indexes property value, instead of property (node)",
+ "purpose": "Compacting property-valued indexes.",
+ "option": {"specVersion": "json-ld-1.1"},
+ "input": "compact/pi03-in.jsonld",
+ "context": "compact/pi03-context.jsonld",
+ "expect": "compact/pi03-out.jsonld"
+ }, {
+ "@id": "#tpi04",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "property-valued index indexes property value, instead of property (multiple nodes)",
+ "purpose": "Compacting property-valued indexes.",
+ "option": {"specVersion": "json-ld-1.1"},
+ "input": "compact/pi04-in.jsonld",
+ "context": "compact/pi04-context.jsonld",
+ "expect": "compact/pi04-out.jsonld"
+ }, {
+ "@id": "#tpi05",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "property-valued index indexes using @none if no property value exists",
+ "purpose": "Compacting property-valued indexes.",
+ "option": {"specVersion": "json-ld-1.1"},
+ "input": "compact/pi05-in.jsonld",
+ "context": "compact/pi05-context.jsonld",
+ "expect": "compact/pi05-out.jsonld"
+ }, {
+ "@id": "#tpi06",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "property-valued index indexes using @none if no property value does not compact to string",
+ "purpose": "Compacting property-valued indexes.",
+ "option": {"specVersion": "json-ld-1.1"},
+ "input": "compact/pi06-in.jsonld",
+ "context": "compact/pi06-context.jsonld",
+ "expect": "compact/pi06-out.jsonld"
+ }, {
+ "@id": "#tpr01",
+ "@type": ["jld:NegativeEvaluationTest", "jld:CompactTest"],
+ "name": "Check illegal clearing of context with protected terms",
+ "purpose": "Check error when clearing a context with protected terms.",
+ "option": {"specVersion": "json-ld-1.1"},
+ "input": "compact/pr01-in.jsonld",
+ "context": "compact/pr01-context.jsonld",
+ "expectErrorCode": "invalid context nullification"
+ }, {
+ "@id": "#tpr02",
+ "@type": ["jld:NegativeEvaluationTest", "jld:CompactTest"],
+ "name": "Check illegal overriding of protected term",
+ "purpose": "Check error when overriding a protected term.",
+ "option": {"specVersion": "json-ld-1.1"},
+ "input": "compact/pr02-in.jsonld",
+ "context": "compact/pr02-context.jsonld",
+ "expectErrorCode": "protected term redefinition"
+ }, {
+ "@id": "#tpr03",
+ "@type": ["jld:NegativeEvaluationTest", "jld:CompactTest"],
+ "name": "Check illegal overriding of protected term from type-scoped context",
+ "purpose": "Check error when overriding a protected term from type-scoped context.",
+ "option": {"specVersion": "json-ld-1.1"},
+ "input": "compact/pr03-in.jsonld",
+ "context": "compact/pr03-context.jsonld",
+ "expectErrorCode": "protected term redefinition"
+ }, {
+ "@id": "#tpr04",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "Check legal overriding of protected term from property-scoped context",
+ "purpose": "Check overriding a protected term from property-scoped context.",
+ "option": {"specVersion": "json-ld-1.1"},
+ "input": "compact/pr04-in.jsonld",
+ "context": "compact/pr04-context.jsonld",
+ "expect": "compact/pr04-out.jsonld"
+ }, {
+ "@id": "#tpr05",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "Check legal overriding of type-scoped protected term from nested node",
+ "purpose": "Check legal overriding of type-scoped protected term from nested node.",
+ "option": {"specVersion": "json-ld-1.1"},
+ "input": "compact/pr05-in.jsonld",
+ "context": "compact/pr05-context.jsonld",
+ "expect": "compact/pr05-out.jsonld"
+ }, {
+ "@id": "#tr001",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "Expands and compacts to document base by default",
+ "purpose": "Compact IRI attempts to compact document-relative IRIs",
+ "input": "compact/r001-in.jsonld",
+ "context": "compact/r001-context.jsonld",
+ "expect": "compact/r001-out.jsonld",
+ "option": {"base": "http://example.org/", "specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tr002",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "Expands and does not compact to document base with compactToRelative false",
+ "purpose": "With compactToRelative option set to false, IRIs which could be made relative to the document base are not made relative.",
+ "input": "compact/r002-in.jsonld",
+ "context": "compact/r002-context.jsonld",
+ "expect": "compact/r002-out.jsonld",
+ "option": {
+ "specVersion": "json-ld-1.1",
+ "compactToRelative": false
+ }
+ }, {
+ "@id": "#ts001",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "@context with single array values",
+ "purpose": "@context values may be in an array",
+ "input": "compact/s001-in.jsonld",
+ "context": "compact/s001-context.jsonld",
+ "expect": "compact/s001-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#ts002",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "@context with array including @set uses array values",
+ "purpose": "@context values may include @set along with another compatible value",
+ "input": "compact/s002-in.jsonld",
+ "context": "compact/s002-context.jsonld",
+ "expect": "compact/s002-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#ttn01",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "@type: @none does not compact values",
+ "purpose": "@type: @none does not compact values.",
+ "option": {"specVersion": "json-ld-1.1"},
+ "context": "compact/tn01-context.jsonld",
+ "input": "compact/tn01-in.jsonld",
+ "expect": "compact/tn01-out.jsonld"
+ }, {
+ "@id": "#ttn02",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "@type: @none does not use arrays by default",
+ "purpose": "@type: @none honors @container.",
+ "option": {"specVersion": "json-ld-1.1"},
+ "context": "compact/tn02-context.jsonld",
+ "input": "compact/tn02-in.jsonld",
+ "expect": "compact/tn02-out.jsonld"
+ }, {
+ "@id": "#ttn03",
+ "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+ "name": "@type: @none uses arrays with @container: @set",
+ "purpose": "@type: @none honors @container.",
+ "option": {"specVersion": "json-ld-1.1"},
+ "context": "compact/tn03-context.jsonld",
+ "input": "compact/tn03-in.jsonld",
+ "expect": "compact/tn03-out.jsonld"
+ }
+ ]
+}
diff --git a/test/jsonld/1.1/compact/0001-context.jsonld b/test/jsonld/1.1/compact/0001-context.jsonld
new file mode 100644
index 000000000..998900ca4
--- /dev/null
+++ b/test/jsonld/1.1/compact/0001-context.jsonld
@@ -0,0 +1,3 @@
+{
+ "@context": {}
+}
diff --git a/test/jsonld/1.1/compact/0001-in.jsonld b/test/jsonld/1.1/compact/0001-in.jsonld
new file mode 100644
index 000000000..0bfd26f07
--- /dev/null
+++ b/test/jsonld/1.1/compact/0001-in.jsonld
@@ -0,0 +1 @@
+{"@id": "http://example.org/test#example"}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/0001-out.jsonld b/test/jsonld/1.1/compact/0001-out.jsonld
new file mode 100644
index 000000000..9e26dfeeb
--- /dev/null
+++ b/test/jsonld/1.1/compact/0001-out.jsonld
@@ -0,0 +1 @@
+{}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/0002-context.jsonld b/test/jsonld/1.1/compact/0002-context.jsonld
new file mode 100644
index 000000000..79129cb20
--- /dev/null
+++ b/test/jsonld/1.1/compact/0002-context.jsonld
@@ -0,0 +1,11 @@
+{
+ "@context": {
+ "t1": "http://example.com/t1",
+ "t2": "http://example.com/t2",
+ "term1": "http://example.com/term1",
+ "term2": "http://example.com/term2",
+ "term3": "http://example.com/term3",
+ "term4": "http://example.com/term4",
+ "term5": "http://example.com/term5"
+ }
+}
diff --git a/test/jsonld/1.1/compact/0002-in.jsonld b/test/jsonld/1.1/compact/0002-in.jsonld
new file mode 100644
index 000000000..7795576fe
--- /dev/null
+++ b/test/jsonld/1.1/compact/0002-in.jsonld
@@ -0,0 +1,9 @@
+[{
+ "@id": "http://example.com/id1",
+ "@type": ["http://example.com/t1"],
+ "http://example.com/term1": ["v1"],
+ "http://example.com/term2": [{"@value": "v2", "@type": "http://example.com/t2"}],
+ "http://example.com/term3": [{"@value": "v3", "@language": "en"}],
+ "http://example.com/term4": [4],
+ "http://example.com/term5": [50, 51]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/0002-out.jsonld b/test/jsonld/1.1/compact/0002-out.jsonld
new file mode 100644
index 000000000..e4598e552
--- /dev/null
+++ b/test/jsonld/1.1/compact/0002-out.jsonld
@@ -0,0 +1,18 @@
+{
+ "@context": {
+ "t1": "http://example.com/t1",
+ "t2": "http://example.com/t2",
+ "term1": "http://example.com/term1",
+ "term2": "http://example.com/term2",
+ "term3": "http://example.com/term3",
+ "term4": "http://example.com/term4",
+ "term5": "http://example.com/term5"
+ },
+ "@id": "http://example.com/id1",
+ "@type": "t1",
+ "term1": "v1",
+ "term2": {"@value": "v2", "@type": "t2"},
+ "term3": {"@value": "v3", "@language": "en"},
+ "term4": 4,
+ "term5": [50, 51]
+}
diff --git a/test/jsonld/1.1/compact/0003-context.jsonld b/test/jsonld/1.1/compact/0003-context.jsonld
new file mode 100644
index 000000000..998900ca4
--- /dev/null
+++ b/test/jsonld/1.1/compact/0003-context.jsonld
@@ -0,0 +1,3 @@
+{
+ "@context": {}
+}
diff --git a/test/jsonld/1.1/compact/0003-in.jsonld b/test/jsonld/1.1/compact/0003-in.jsonld
new file mode 100644
index 000000000..2007f363d
--- /dev/null
+++ b/test/jsonld/1.1/compact/0003-in.jsonld
@@ -0,0 +1,12 @@
+{
+ "@id": "http://example.org/id",
+ "http://example.org/property": null,
+ "regularJson": {
+ "nonJsonLd": "property",
+ "deep": [{
+ "foo": "bar"
+ }, {
+ "bar": "foo"
+ }]
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/0003-out.jsonld b/test/jsonld/1.1/compact/0003-out.jsonld
new file mode 100644
index 000000000..9e26dfeeb
--- /dev/null
+++ b/test/jsonld/1.1/compact/0003-out.jsonld
@@ -0,0 +1 @@
+{}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/0004-context.jsonld b/test/jsonld/1.1/compact/0004-context.jsonld
new file mode 100644
index 000000000..14eac0999
--- /dev/null
+++ b/test/jsonld/1.1/compact/0004-context.jsonld
@@ -0,0 +1,7 @@
+{
+ "@context": {
+ "mylist1": {"@id": "http://example.com/mylist1", "@container": "@list"},
+ "myset2": {"@id": "http://example.com/myset2", "@container": "@set"},
+ "myset3": {"@id": "http://example.com/myset3", "@container": "@set"}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/0004-in.jsonld b/test/jsonld/1.1/compact/0004-in.jsonld
new file mode 100644
index 000000000..4b8438f78
--- /dev/null
+++ b/test/jsonld/1.1/compact/0004-in.jsonld
@@ -0,0 +1,12 @@
+{
+ "@id": "http://example.org/id",
+ "http://example.com/mylist1": {"@list": []},
+ "http://example.com/myset2": {"@set": []},
+ "http://example.com/myset3": "v1",
+ "http://example.org/list1": {"@list": []},
+ "http://example.org/list2": {"@list": [null]},
+ "http://example.org/set1": {"@set": []},
+ "http://example.org/set2": {"@set": [null]},
+ "http://example.org/set3": [],
+ "http://example.org/set4": [null]
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/0004-out.jsonld b/test/jsonld/1.1/compact/0004-out.jsonld
new file mode 100644
index 000000000..dd8299b6d
--- /dev/null
+++ b/test/jsonld/1.1/compact/0004-out.jsonld
@@ -0,0 +1,17 @@
+{
+ "@context": {
+ "mylist1": {"@id": "http://example.com/mylist1", "@container": "@list"},
+ "myset2": {"@id": "http://example.com/myset2", "@container": "@set"},
+ "myset3": {"@id": "http://example.com/myset3", "@container": "@set"}
+ },
+ "@id": "http://example.org/id",
+ "mylist1": [],
+ "myset2": [],
+ "myset3": ["v1"],
+ "http://example.org/list1": {"@list": []},
+ "http://example.org/list2": {"@list": []},
+ "http://example.org/set1": [],
+ "http://example.org/set2": [],
+ "http://example.org/set3": [],
+ "http://example.org/set4": []
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/0005-context.jsonld b/test/jsonld/1.1/compact/0005-context.jsonld
new file mode 100644
index 000000000..bf190ded2
--- /dev/null
+++ b/test/jsonld/1.1/compact/0005-context.jsonld
@@ -0,0 +1,7 @@
+{
+ "@context": {
+ "ex": "http://example.org/",
+ "term1": {"@id": "ex:term1", "@type": "ex:datatype"},
+ "term2": {"@id": "ex:term2", "@type": "@id"}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/0005-in.jsonld b/test/jsonld/1.1/compact/0005-in.jsonld
new file mode 100644
index 000000000..b74125f33
--- /dev/null
+++ b/test/jsonld/1.1/compact/0005-in.jsonld
@@ -0,0 +1,6 @@
+{
+ "@id": "http://example.org/id1",
+ "@type": ["http://example.org/Type1", "http://example.org/Type2"],
+ "http://example.org/term1": {"@value": "v1", "@type": "http://example.org/datatype"},
+ "http://example.org/term2": {"@id": "http://example.org/id2"}
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/0005-out.jsonld b/test/jsonld/1.1/compact/0005-out.jsonld
new file mode 100644
index 000000000..bfb7b2362
--- /dev/null
+++ b/test/jsonld/1.1/compact/0005-out.jsonld
@@ -0,0 +1,11 @@
+{
+ "@context": {
+ "ex": "http://example.org/",
+ "term1": {"@id": "ex:term1", "@type": "ex:datatype"},
+ "term2": {"@id": "ex:term2", "@type": "@id"}
+ },
+ "@id": "ex:id1",
+ "@type": ["ex:Type1", "ex:Type2"],
+ "term1": "v1",
+ "term2": "ex:id2"
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/0006-context.jsonld b/test/jsonld/1.1/compact/0006-context.jsonld
new file mode 100644
index 000000000..f9917d22f
--- /dev/null
+++ b/test/jsonld/1.1/compact/0006-context.jsonld
@@ -0,0 +1,7 @@
+{
+ "@context": {
+ "ex": "http://example.org/",
+ "term1": { "@id": "ex:term1", "@type": "ex:datatype" },
+ "term2": "ex:term2"
+ }
+}
diff --git a/test/jsonld/1.1/compact/0006-in.jsonld b/test/jsonld/1.1/compact/0006-in.jsonld
new file mode 100644
index 000000000..1ed730859
--- /dev/null
+++ b/test/jsonld/1.1/compact/0006-in.jsonld
@@ -0,0 +1,6 @@
+{
+ "@id": "http://example.org/id1",
+ "@type": ["http://example.org/Type1", "http://example.org/Type2"],
+ "http://example.org/term1": {"@value": "v1", "@type": "http://example.org/different-datatype"},
+ "http://example.org/term2": {"@id": "http://example.org/id2"}
+}
diff --git a/test/jsonld/1.1/compact/0006-out.jsonld b/test/jsonld/1.1/compact/0006-out.jsonld
new file mode 100644
index 000000000..df187e927
--- /dev/null
+++ b/test/jsonld/1.1/compact/0006-out.jsonld
@@ -0,0 +1,14 @@
+{
+ "@context": {
+ "ex": "http://example.org/",
+ "term1": {
+ "@id": "ex:term1",
+ "@type": "ex:datatype"
+ },
+ "term2": "ex:term2"
+ },
+ "@id": "ex:id1",
+ "@type": ["ex:Type1", "ex:Type2"],
+ "ex:term1": {"@value": "v1", "@type": "ex:different-datatype"},
+ "term2": {"@id": "ex:id2"}
+}
diff --git a/test/jsonld/1.1/compact/0007-context.jsonld b/test/jsonld/1.1/compact/0007-context.jsonld
new file mode 100644
index 000000000..5b4273542
--- /dev/null
+++ b/test/jsonld/1.1/compact/0007-context.jsonld
@@ -0,0 +1,9 @@
+{
+ "@context": {
+ "dc11": "http://purl.org/dc/elements/1.1/",
+ "ex": "http://example.org/vocab#",
+ "ex:authored": {"@type": "@id"},
+ "ex:contains": {"@type": "@id"},
+ "foaf": "http://xmlns.com/foaf/0.1/"
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/0007-in.jsonld b/test/jsonld/1.1/compact/0007-in.jsonld
new file mode 100644
index 000000000..6eef84f8d
--- /dev/null
+++ b/test/jsonld/1.1/compact/0007-in.jsonld
@@ -0,0 +1,27 @@
+{
+ "@graph": [
+ {
+ "@id": "http://example.org/test#chapter",
+ "http://purl.org/dc/elements/1.1/description": ["Fun"],
+ "http://purl.org/dc/elements/1.1/title": ["Chapter One"]
+ },
+ {
+ "@id": "http://example.org/test#jane",
+ "http://example.org/vocab#authored": [{"@id": "http://example.org/test#chapter"}],
+ "http://xmlns.com/foaf/0.1/name": ["Jane"]
+ },
+ {
+ "@id": "http://example.org/test#john",
+ "http://xmlns.com/foaf/0.1/name": ["John"]
+ },
+ {
+ "@id": "http://example.org/test#library",
+ "http://example.org/vocab#contains": [{
+ "@id": "http://example.org/test#book",
+ "http://example.org/vocab#contains": [ "this-is-not-an-IRI" ],
+ "http://purl.org/dc/elements/1.1/contributor": ["Writer"],
+ "http://purl.org/dc/elements/1.1/title": ["My Book"]
+ }]
+ }
+ ]
+}
diff --git a/test/jsonld/1.1/compact/0007-out.jsonld b/test/jsonld/1.1/compact/0007-out.jsonld
new file mode 100644
index 000000000..785ba46b3
--- /dev/null
+++ b/test/jsonld/1.1/compact/0007-out.jsonld
@@ -0,0 +1,34 @@
+{
+ "@context": {
+ "dc11": "http://purl.org/dc/elements/1.1/",
+ "ex": "http://example.org/vocab#",
+ "ex:authored": {"@type": "@id"},
+ "ex:contains": {"@type": "@id"},
+ "foaf": "http://xmlns.com/foaf/0.1/"
+ },
+ "@graph": [
+ {
+ "@id": "http://example.org/test#chapter",
+ "dc11:description": "Fun",
+ "dc11:title": "Chapter One"
+ },
+ {
+ "@id": "http://example.org/test#jane",
+ "ex:authored": "http://example.org/test#chapter",
+ "foaf:name": "Jane"
+ },
+ {
+ "@id": "http://example.org/test#john",
+ "foaf:name": "John"
+ },
+ {
+ "@id": "http://example.org/test#library",
+ "ex:contains": {
+ "@id": "http://example.org/test#book",
+ "dc11:contributor": "Writer",
+ "dc11:title": "My Book",
+ "http://example.org/vocab#contains": "this-is-not-an-IRI"
+ }
+ }
+ ]
+}
diff --git a/test/jsonld/1.1/compact/0008-context.jsonld b/test/jsonld/1.1/compact/0008-context.jsonld
new file mode 100644
index 000000000..770e2ce10
--- /dev/null
+++ b/test/jsonld/1.1/compact/0008-context.jsonld
@@ -0,0 +1,8 @@
+{
+ "@context": {
+ "http://example.org/test#property1": {"@type": "@id"},
+ "http://example.org/test#property2": {"@type": "@id"},
+ "http://example.org/test#property3": {"@type": "@id"},
+ "uri": "@id"
+ }
+}
diff --git a/test/jsonld/1.1/compact/0008-in.jsonld b/test/jsonld/1.1/compact/0008-in.jsonld
new file mode 100644
index 000000000..50bbf4d78
--- /dev/null
+++ b/test/jsonld/1.1/compact/0008-in.jsonld
@@ -0,0 +1,13 @@
+[{
+ "@id": "http://example.org/test#example1",
+ "http://example.org/test#property1": [{
+ "@id": "http://example.org/test#example2",
+ "http://example.org/test#property4": ["foo"]
+ }],
+ "http://example.org/test#property2": [{
+ "@id": "http://example.org/test#example3"
+ }],
+ "http://example.org/test#property3": [{
+ "@id": "http://example.org/test#example4"
+ }]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/0008-out.jsonld b/test/jsonld/1.1/compact/0008-out.jsonld
new file mode 100644
index 000000000..742987ca6
--- /dev/null
+++ b/test/jsonld/1.1/compact/0008-out.jsonld
@@ -0,0 +1,15 @@
+{
+ "@context": {
+ "http://example.org/test#property1": {"@type": "@id"},
+ "http://example.org/test#property2": {"@type": "@id"},
+ "http://example.org/test#property3": {"@type": "@id"},
+ "uri": "@id"
+ },
+ "http://example.org/test#property1": {
+ "http://example.org/test#property4": "foo",
+ "uri": "http://example.org/test#example2"
+ },
+ "http://example.org/test#property2": "http://example.org/test#example3",
+ "http://example.org/test#property3": "http://example.org/test#example4",
+ "uri": "http://example.org/test#example1"
+}
diff --git a/test/jsonld/1.1/compact/0009-context.jsonld b/test/jsonld/1.1/compact/0009-context.jsonld
new file mode 100644
index 000000000..b199a5e46
--- /dev/null
+++ b/test/jsonld/1.1/compact/0009-context.jsonld
@@ -0,0 +1,7 @@
+{
+ "@context": {
+ "dc11": "http://purl.org/dc/elements/1.1/",
+ "ex": "http://example.org/vocab#",
+ "ex:contains": {"@type": "@id"}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/0009-in.jsonld b/test/jsonld/1.1/compact/0009-in.jsonld
new file mode 100644
index 000000000..9b70fbab5
--- /dev/null
+++ b/test/jsonld/1.1/compact/0009-in.jsonld
@@ -0,0 +1,7 @@
+{
+ "@id": "http://example.org/test#book",
+ "http://example.org/vocab#contains": {
+ "@id": "http://example.org/test#chapter"
+ },
+ "http://purl.org/dc/elements/1.1/title": "Title"
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/0009-out.jsonld b/test/jsonld/1.1/compact/0009-out.jsonld
new file mode 100644
index 000000000..d721d32e7
--- /dev/null
+++ b/test/jsonld/1.1/compact/0009-out.jsonld
@@ -0,0 +1,10 @@
+{
+ "@context": {
+ "dc11": "http://purl.org/dc/elements/1.1/",
+ "ex": "http://example.org/vocab#",
+ "ex:contains": {"@type": "@id"}
+ },
+ "@id": "http://example.org/test#book",
+ "dc11:title": "Title",
+ "ex:contains": "http://example.org/test#chapter"
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/0010-context.jsonld b/test/jsonld/1.1/compact/0010-context.jsonld
new file mode 100644
index 000000000..9f020bd7b
--- /dev/null
+++ b/test/jsonld/1.1/compact/0010-context.jsonld
@@ -0,0 +1,6 @@
+{
+ "@context": {
+ "homepage": {"@id": "http://xmlns.com/foaf/0.1/homepage", "@type": "@id"},
+ "name": "http://xmlns.com/foaf/0.1/name"
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/0010-in.jsonld b/test/jsonld/1.1/compact/0010-in.jsonld
new file mode 100644
index 000000000..831f1ca9b
--- /dev/null
+++ b/test/jsonld/1.1/compact/0010-in.jsonld
@@ -0,0 +1,13 @@
+[
+ {
+ "@id": "http://example.com/john",
+ "http://xmlns.com/foaf/0.1/homepage": {
+ "@id": "http://john.doe.org/"
+ },
+ "http://xmlns.com/foaf/0.1/name": "John Doe"
+ },
+ {
+ "@id": "http://example.com/jane",
+ "http://xmlns.com/foaf/0.1/name": "Jane Doe"
+ }
+]
diff --git a/test/jsonld/1.1/compact/0010-out.jsonld b/test/jsonld/1.1/compact/0010-out.jsonld
new file mode 100644
index 000000000..43b3d1d5b
--- /dev/null
+++ b/test/jsonld/1.1/compact/0010-out.jsonld
@@ -0,0 +1,20 @@
+{
+ "@context": {
+ "homepage": {
+ "@id": "http://xmlns.com/foaf/0.1/homepage",
+ "@type": "@id"
+ },
+ "name": "http://xmlns.com/foaf/0.1/name"
+ },
+ "@graph": [
+ {
+ "@id": "http://example.com/john",
+ "homepage": "http://john.doe.org/",
+ "name": "John Doe"
+ },
+ {
+ "@id": "http://example.com/jane",
+ "name": "Jane Doe"
+ }
+ ]
+}
diff --git a/test/jsonld/1.1/compact/0011-context.jsonld b/test/jsonld/1.1/compact/0011-context.jsonld
new file mode 100644
index 000000000..9221cc668
--- /dev/null
+++ b/test/jsonld/1.1/compact/0011-context.jsonld
@@ -0,0 +1,8 @@
+{
+ "@context": {
+ "ex": "http://example.org/vocab#",
+ "ex:date": {"@type": "xsd:dateTime"},
+ "ex:parent": {"@type": "@id"},
+ "xsd": "http://www.w3.org/2001/XMLSchema#"
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/0011-in.jsonld b/test/jsonld/1.1/compact/0011-in.jsonld
new file mode 100644
index 000000000..c67c75317
--- /dev/null
+++ b/test/jsonld/1.1/compact/0011-in.jsonld
@@ -0,0 +1,13 @@
+{
+ "@id": "http://example.org/test#example1",
+ "http://example.org/vocab#date": {
+ "@value": "2011-01-25T00:00:00Z",
+ "@type": "http://www.w3.org/2001/XMLSchema#dateTime"
+ },
+ "http://example.org/vocab#embed": {
+ "@id": "http://example.org/test#example2",
+ "http://example.org/vocab#parent": {
+ "@id": "http://example.org/test#example1"
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/0011-out.jsonld b/test/jsonld/1.1/compact/0011-out.jsonld
new file mode 100644
index 000000000..6bba2326d
--- /dev/null
+++ b/test/jsonld/1.1/compact/0011-out.jsonld
@@ -0,0 +1,14 @@
+{
+ "@context": {
+ "ex": "http://example.org/vocab#",
+ "ex:date": {"@type": "xsd:dateTime"},
+ "ex:parent": {"@type": "@id"},
+ "xsd": "http://www.w3.org/2001/XMLSchema#"
+ },
+ "@id": "http://example.org/test#example1",
+ "ex:date": "2011-01-25T00:00:00Z",
+ "ex:embed": {
+ "@id": "http://example.org/test#example2",
+ "ex:parent": "http://example.org/test#example1"
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/0012-context.jsonld b/test/jsonld/1.1/compact/0012-context.jsonld
new file mode 100644
index 000000000..3f53478de
--- /dev/null
+++ b/test/jsonld/1.1/compact/0012-context.jsonld
@@ -0,0 +1,5 @@
+{
+ "@context": {
+ "ex": "http://example.org/vocab#"
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/0012-in.jsonld b/test/jsonld/1.1/compact/0012-in.jsonld
new file mode 100644
index 000000000..69ddcf319
--- /dev/null
+++ b/test/jsonld/1.1/compact/0012-in.jsonld
@@ -0,0 +1,5 @@
+{
+ "@id": "http://example.org/test",
+ "http://example.org/vocab#bool": true,
+ "http://example.org/vocab#int": 123
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/0012-out.jsonld b/test/jsonld/1.1/compact/0012-out.jsonld
new file mode 100644
index 000000000..059c99d3d
--- /dev/null
+++ b/test/jsonld/1.1/compact/0012-out.jsonld
@@ -0,0 +1,8 @@
+{
+ "@context": {
+ "ex": "http://example.org/vocab#"
+ },
+ "@id": "http://example.org/test",
+ "ex:bool": true,
+ "ex:int": 123
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/0013-context.jsonld b/test/jsonld/1.1/compact/0013-context.jsonld
new file mode 100644
index 000000000..3f53478de
--- /dev/null
+++ b/test/jsonld/1.1/compact/0013-context.jsonld
@@ -0,0 +1,5 @@
+{
+ "@context": {
+ "ex": "http://example.org/vocab#"
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/0013-in.jsonld b/test/jsonld/1.1/compact/0013-in.jsonld
new file mode 100644
index 000000000..7b2016a5e
--- /dev/null
+++ b/test/jsonld/1.1/compact/0013-in.jsonld
@@ -0,0 +1,4 @@
+{
+ "@id": "http://example.org/test",
+ "http://example.org/vocab#test": {"@value": "test", "@language": "en"}
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/0013-out.jsonld b/test/jsonld/1.1/compact/0013-out.jsonld
new file mode 100644
index 000000000..4ce4f5928
--- /dev/null
+++ b/test/jsonld/1.1/compact/0013-out.jsonld
@@ -0,0 +1,7 @@
+{
+ "@context": {
+ "ex": "http://example.org/vocab#"
+ },
+ "@id": "http://example.org/test",
+ "ex:test": {"@value": "test", "@language": "en"}
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/0014-context.jsonld b/test/jsonld/1.1/compact/0014-context.jsonld
new file mode 100644
index 000000000..c2dc50921
--- /dev/null
+++ b/test/jsonld/1.1/compact/0014-context.jsonld
@@ -0,0 +1,7 @@
+{
+ "@context": {
+ "homepage": {"@id": "http://xmlns.com/foaf/0.1/homepage", "@type": "@id"},
+ "name": "http://xmlns.com/foaf/0.1/name",
+ "data": "@graph"
+ }
+}
diff --git a/test/jsonld/1.1/compact/0014-in.jsonld b/test/jsonld/1.1/compact/0014-in.jsonld
new file mode 100644
index 000000000..831f1ca9b
--- /dev/null
+++ b/test/jsonld/1.1/compact/0014-in.jsonld
@@ -0,0 +1,13 @@
+[
+ {
+ "@id": "http://example.com/john",
+ "http://xmlns.com/foaf/0.1/homepage": {
+ "@id": "http://john.doe.org/"
+ },
+ "http://xmlns.com/foaf/0.1/name": "John Doe"
+ },
+ {
+ "@id": "http://example.com/jane",
+ "http://xmlns.com/foaf/0.1/name": "Jane Doe"
+ }
+]
diff --git a/test/jsonld/1.1/compact/0014-out.jsonld b/test/jsonld/1.1/compact/0014-out.jsonld
new file mode 100644
index 000000000..2bce180a2
--- /dev/null
+++ b/test/jsonld/1.1/compact/0014-out.jsonld
@@ -0,0 +1,21 @@
+{
+ "@context": {
+ "homepage": {
+ "@id": "http://xmlns.com/foaf/0.1/homepage",
+ "@type": "@id"
+ },
+ "name": "http://xmlns.com/foaf/0.1/name",
+ "data": "@graph"
+ },
+ "data": [
+ {
+ "@id": "http://example.com/john",
+ "homepage": "http://john.doe.org/",
+ "name": "John Doe"
+ },
+ {
+ "@id": "http://example.com/jane",
+ "name": "Jane Doe"
+ }
+ ]
+}
diff --git a/test/jsonld/1.1/compact/0015-context.jsonld b/test/jsonld/1.1/compact/0015-context.jsonld
new file mode 100644
index 000000000..95b5b8b84
--- /dev/null
+++ b/test/jsonld/1.1/compact/0015-context.jsonld
@@ -0,0 +1,12 @@
+{
+ "@context": {
+ "t1": "http://example.com/t1",
+ "t2": "http://example.com/t2",
+ "term1": "http://example.com/term",
+ "term2": {"@id": "http://example.com/term", "@type": "t2"},
+ "term3": {"@id": "http://example.com/term", "@language": "en"},
+ "term4": {"@id": "http://example.com/term", "@container": "@list"},
+ "term5": {"@id": "http://example.com/term", "@language": null},
+ "@language": "de"
+ }
+}
diff --git a/test/jsonld/1.1/compact/0015-in.jsonld b/test/jsonld/1.1/compact/0015-in.jsonld
new file mode 100644
index 000000000..b0b2b27d9
--- /dev/null
+++ b/test/jsonld/1.1/compact/0015-in.jsonld
@@ -0,0 +1,12 @@
+[{
+ "@id": "http://example.com/id1",
+ "@type": ["http://example.com/t1"],
+ "http://example.com/term": [
+ {"@value": "v1", "@language": "de"},
+ {"@value": "v2", "@type": "http://example.com/t2"},
+ {"@value": "v3", "@language": "en"},
+ {"@list": [1, 2]},
+ "v5",
+ {"@value": "plain literal"}
+ ]
+}]
diff --git a/test/jsonld/1.1/compact/0015-out.jsonld b/test/jsonld/1.1/compact/0015-out.jsonld
new file mode 100644
index 000000000..808b8b679
--- /dev/null
+++ b/test/jsonld/1.1/compact/0015-out.jsonld
@@ -0,0 +1,19 @@
+{
+ "@context": {
+ "t1": "http://example.com/t1",
+ "t2": "http://example.com/t2",
+ "term1": "http://example.com/term",
+ "term2": {"@id": "http://example.com/term", "@type": "t2"},
+ "term3": {"@id": "http://example.com/term", "@language": "en"},
+ "term4": {"@id": "http://example.com/term", "@container": "@list"},
+ "term5": {"@id": "http://example.com/term", "@language": null},
+ "@language": "de"
+ },
+ "@id": "http://example.com/id1",
+ "@type": "t1",
+ "term1": "v1",
+ "term2": "v2",
+ "term3": "v3",
+ "term4": [ 1, 2 ],
+ "term5": [ "v5", "plain literal" ]
+}
diff --git a/test/jsonld/1.1/compact/0016-context.jsonld b/test/jsonld/1.1/compact/0016-context.jsonld
new file mode 100644
index 000000000..beb845dee
--- /dev/null
+++ b/test/jsonld/1.1/compact/0016-context.jsonld
@@ -0,0 +1,7 @@
+{
+ "@context": {
+ "wd": "http://data.wikipedia.org/vocab#",
+ "ws": "http://data.wikipedia.org/snaks/",
+ "wp": "http://en.wikipedia.org/wiki/"
+ }
+}
diff --git a/test/jsonld/1.1/compact/0016-in.jsonld b/test/jsonld/1.1/compact/0016-in.jsonld
new file mode 100644
index 000000000..f7154b91e
--- /dev/null
+++ b/test/jsonld/1.1/compact/0016-in.jsonld
@@ -0,0 +1,22 @@
+[
+ {
+ "@id": "http://data.wikipedia.org/snaks/Assertions",
+ "@type": "http://data.wikipedia.org/vocab#SnakSet",
+ "http://data.wikipedia.org/vocab#assertedBy": [
+ { "@value": "Gregg Kellogg" }
+ ],
+ "@graph": [
+ {
+ "@id": "http://data.wikipedia.org/snaks/BerlinFact",
+ "@type": [ "http://data.wikipedia.org/vocab#Snak" ],
+ "http://data.wikipedia.org/vocab#assertedBy": [ { "@value": "Statistik Berlin/Brandenburg" } ],
+ "@graph": [
+ {
+ "@id": "http://en.wikipedia.org/wiki/Berlin",
+ "http://data.wikipedia.org/vocab#population": [ 3499879 ]
+ }
+ ]
+ }
+ ]
+ }
+]
diff --git a/test/jsonld/1.1/compact/0016-out.jsonld b/test/jsonld/1.1/compact/0016-out.jsonld
new file mode 100644
index 000000000..d40aec5ad
--- /dev/null
+++ b/test/jsonld/1.1/compact/0016-out.jsonld
@@ -0,0 +1,23 @@
+{
+ "@context": {
+ "wd": "http://data.wikipedia.org/vocab#",
+ "ws": "http://data.wikipedia.org/snaks/",
+ "wp": "http://en.wikipedia.org/wiki/"
+ },
+ "@id": "ws:Assertions",
+ "@type": "wd:SnakSet",
+ "@graph": [
+ {
+ "@id": "ws:BerlinFact",
+ "@type": "wd:Snak",
+ "@graph": [
+ {
+ "@id": "wp:Berlin",
+ "wd:population": 3499879
+ }
+ ],
+ "wd:assertedBy": "Statistik Berlin/Brandenburg"
+ }
+ ],
+ "wd:assertedBy": "Gregg Kellogg"
+}
diff --git a/test/jsonld/1.1/compact/0017-context.jsonld b/test/jsonld/1.1/compact/0017-context.jsonld
new file mode 100644
index 000000000..abfee308f
--- /dev/null
+++ b/test/jsonld/1.1/compact/0017-context.jsonld
@@ -0,0 +1,11 @@
+{
+ "@context": [
+ {
+ "comment": { "@id": "http://www.w3.org/2000/01/rdf-schema#comment", "@language": "en" }
+ },
+ {
+ "comment": null,
+ "comment_en": { "@id": "http://www.w3.org/2000/01/rdf-schema#comment", "@language": "en" }
+ }
+ ]
+}
diff --git a/test/jsonld/1.1/compact/0017-in.jsonld b/test/jsonld/1.1/compact/0017-in.jsonld
new file mode 100644
index 000000000..599027461
--- /dev/null
+++ b/test/jsonld/1.1/compact/0017-in.jsonld
@@ -0,0 +1,6 @@
+{
+ "http://www.w3.org/2000/01/rdf-schema#comment": [
+ { "@value": "Kommentar auf Deutsch.", "@language": "de" },
+ { "@value": "Comment in English.", "@language": "en" }
+ ]
+}
diff --git a/test/jsonld/1.1/compact/0017-out.jsonld b/test/jsonld/1.1/compact/0017-out.jsonld
new file mode 100644
index 000000000..8126875cc
--- /dev/null
+++ b/test/jsonld/1.1/compact/0017-out.jsonld
@@ -0,0 +1,13 @@
+{
+ "@context": [
+ {
+ "comment": { "@id": "http://www.w3.org/2000/01/rdf-schema#comment", "@language": "en" }
+ },
+ {
+ "comment": null,
+ "comment_en": { "@id": "http://www.w3.org/2000/01/rdf-schema#comment", "@language": "en" }
+ }
+ ],
+ "comment_en": "Comment in English.",
+ "http://www.w3.org/2000/01/rdf-schema#comment": { "@value": "Kommentar auf Deutsch.", "@language": "de" }
+}
diff --git a/test/jsonld/1.1/compact/0018-context.jsonld b/test/jsonld/1.1/compact/0018-context.jsonld
new file mode 100644
index 000000000..442fcd16b
--- /dev/null
+++ b/test/jsonld/1.1/compact/0018-context.jsonld
@@ -0,0 +1,13 @@
+{
+ "@context": {
+ "type1": "http://example.com/t1",
+ "type2": "http://example.com/t2",
+ "@language": "de",
+ "term": { "@id": "http://example.com/term" },
+ "term1": { "@id": "http://example.com/term", "@container": "@list" },
+ "term2": { "@id": "http://example.com/term", "@container": "@list", "@language": "en" },
+ "term3": { "@id": "http://example.com/term", "@container": "@list", "@language": null },
+ "term4": { "@id": "http://example.com/term", "@container": "@list", "@type": "type1" },
+ "term5": { "@id": "http://example.com/term", "@container": "@list", "@type": "type2" }
+ }
+}
diff --git a/test/jsonld/1.1/compact/0018-in.jsonld b/test/jsonld/1.1/compact/0018-in.jsonld
new file mode 100644
index 000000000..3aab7d0ac
--- /dev/null
+++ b/test/jsonld/1.1/compact/0018-in.jsonld
@@ -0,0 +1,69 @@
+{
+ "@context": {
+ "type1": "http://example.com/t1",
+ "type2": "http://example.com/t2"
+ },
+ "@id": "http://example.com/id1",
+ "http://example.com/term": [
+ {
+ "@set": [
+ { "@value": "v0.1", "@language": "de" },
+ { "@value": "v0.2", "@language": "en" },
+ "v0.3",
+ 4,
+ true,
+ false
+ ]
+ },
+ {
+ "@list": [
+ { "@value": "v1.1", "@language": "de" },
+ { "@value": "v1.2", "@language": "en" },
+ "v1.3",
+ 14,
+ true,
+ false
+ ]
+ },
+ {
+ "@list": [
+ { "@value": "v2.1", "@language": "en" },
+ { "@value": "v2.2", "@language": "en" },
+ { "@value": "v2.3", "@language": "en" },
+ { "@value": "v2.4", "@language": "en" },
+ { "@value": "v2.5", "@language": "en" },
+ { "@value": "v2.6", "@language": "en" }
+ ]
+ },
+ {
+ "@list": [
+ "v3.1",
+ "v3.2",
+ "v3.3",
+ "v3.4",
+ "v3.5",
+ "v3.6"
+ ]
+ },
+ {
+ "@list": [
+ { "@value": "v4.1", "@type": "type1" },
+ { "@value": "v4.2", "@type": "type1" },
+ { "@value": "v4.3", "@type": "type1" },
+ { "@value": "v4.4", "@type": "type1" },
+ { "@value": "v4.5", "@type": "type1" },
+ { "@value": "v4.6", "@type": "type1" }
+ ]
+ },
+ {
+ "@list": [
+ { "@value": "v5.1", "@type": "type2" },
+ { "@value": "v5.2", "@type": "type2" },
+ { "@value": "v5.3", "@type": "type2" },
+ { "@value": "v5.4", "@type": "type2" },
+ { "@value": "v5.5", "@type": "type2" },
+ { "@value": "v5.6", "@type": "type2" }
+ ]
+ }
+ ]
+}
diff --git a/test/jsonld/1.1/compact/0018-out.jsonld b/test/jsonld/1.1/compact/0018-out.jsonld
new file mode 100644
index 000000000..0c6d65677
--- /dev/null
+++ b/test/jsonld/1.1/compact/0018-out.jsonld
@@ -0,0 +1,62 @@
+{
+ "@context": {
+ "type1": "http://example.com/t1",
+ "type2": "http://example.com/t2",
+ "@language": "de",
+ "term": { "@id": "http://example.com/term" },
+ "term1": { "@id": "http://example.com/term", "@container": "@list" },
+ "term2": { "@id": "http://example.com/term", "@container": "@list", "@language": "en" },
+ "term3": { "@id": "http://example.com/term", "@container": "@list", "@language": null },
+ "term4": { "@id": "http://example.com/term", "@container": "@list", "@type": "type1" },
+ "term5": { "@id": "http://example.com/term", "@container": "@list", "@type": "type2" }
+ },
+ "@id": "http://example.com/id1",
+ "term": [
+ "v0.1",
+ { "@value": "v0.2", "@language": "en" },
+ { "@value": "v0.3" },
+ 4,
+ true,
+ false
+ ],
+ "term1": [
+ "v1.1",
+ { "@value": "v1.2", "@language": "en" },
+ { "@value": "v1.3" },
+ 14,
+ true,
+ false
+ ],
+ "term2": [
+ "v2.1",
+ "v2.2",
+ "v2.3",
+ "v2.4",
+ "v2.5",
+ "v2.6"
+ ],
+ "term3": [
+ "v3.1",
+ "v3.2",
+ "v3.3",
+ "v3.4",
+ "v3.5",
+ "v3.6"
+ ],
+ "term4": [
+ "v4.1",
+ "v4.2",
+ "v4.3",
+ "v4.4",
+ "v4.5",
+ "v4.6"
+ ],
+ "term5": [
+ "v5.1",
+ "v5.2",
+ "v5.3",
+ "v5.4",
+ "v5.5",
+ "v5.6"
+ ]
+}
diff --git a/test/jsonld/1.1/compact/0019-context.jsonld b/test/jsonld/1.1/compact/0019-context.jsonld
new file mode 100644
index 000000000..ac6fa08f3
--- /dev/null
+++ b/test/jsonld/1.1/compact/0019-context.jsonld
@@ -0,0 +1,6 @@
+{
+ "@context": {
+ "mylist": {"@id": "http://example.com/mylist", "@container": "@list"},
+ "myset": {"@id": "http://example.com/myset", "@container": "@set"}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/0019-in.jsonld b/test/jsonld/1.1/compact/0019-in.jsonld
new file mode 100644
index 000000000..15efa2e39
--- /dev/null
+++ b/test/jsonld/1.1/compact/0019-in.jsonld
@@ -0,0 +1,17 @@
+[{
+ "@id": "http://example.org/id",
+ "http://example.com/mylist": [{
+ "@list": [
+ {"@value": 1},
+ {"@value": 2},
+ {"@value": 2},
+ {"@value": 3}
+ ]
+ }],
+ "http://example.com/myset": [
+ {"@value": 1},
+ {"@value": 2},
+ {"@value": 2},
+ {"@value": 3}
+ ]
+}]
diff --git a/test/jsonld/1.1/compact/0019-out.jsonld b/test/jsonld/1.1/compact/0019-out.jsonld
new file mode 100644
index 000000000..6c47cfb75
--- /dev/null
+++ b/test/jsonld/1.1/compact/0019-out.jsonld
@@ -0,0 +1,9 @@
+{
+ "@context": {
+ "mylist": {"@id": "http://example.com/mylist", "@container": "@list"},
+ "myset": {"@id": "http://example.com/myset", "@container": "@set"}
+ },
+ "@id": "http://example.org/id",
+ "mylist": [1, 2, 2, 3],
+ "myset": [1, 2, 2, 3]
+}
diff --git a/test/jsonld/1.1/compact/0020-context.jsonld b/test/jsonld/1.1/compact/0020-context.jsonld
new file mode 100644
index 000000000..6a3482e21
--- /dev/null
+++ b/test/jsonld/1.1/compact/0020-context.jsonld
@@ -0,0 +1,6 @@
+{
+ "@context": {
+ "ex": "http://example.org/ns#",
+ "ex:property": {"@container": "@list"}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/0020-in.jsonld b/test/jsonld/1.1/compact/0020-in.jsonld
new file mode 100644
index 000000000..f89e06425
--- /dev/null
+++ b/test/jsonld/1.1/compact/0020-in.jsonld
@@ -0,0 +1,9 @@
+{
+ "@context": {
+ "ex": "http://example.org/ns#"
+ },
+ "@id": "ex:property",
+ "ex:property": {
+ "@list": [1, 2]
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/0020-out.jsonld b/test/jsonld/1.1/compact/0020-out.jsonld
new file mode 100644
index 000000000..5836103e4
--- /dev/null
+++ b/test/jsonld/1.1/compact/0020-out.jsonld
@@ -0,0 +1,10 @@
+{
+ "@context": {
+ "ex": "http://example.org/ns#",
+ "ex:property": {
+ "@container": "@list"
+ }
+ },
+ "@id": "ex:property",
+ "ex:property": [1, 2]
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/0021-context.jsonld b/test/jsonld/1.1/compact/0021-context.jsonld
new file mode 100644
index 000000000..c5d301c4d
--- /dev/null
+++ b/test/jsonld/1.1/compact/0021-context.jsonld
@@ -0,0 +1,6 @@
+{
+ "@context": {
+ "@vocab": "http://example.com/subdir/",
+ "vocab/date": { "@type": "vocab/types/dateTime" }
+ }
+}
diff --git a/test/jsonld/1.1/compact/0021-in.jsonld b/test/jsonld/1.1/compact/0021-in.jsonld
new file mode 100644
index 000000000..a7e716f8a
--- /dev/null
+++ b/test/jsonld/1.1/compact/0021-in.jsonld
@@ -0,0 +1,23 @@
+[
+ {
+ "@id": "http://example.com/subdir/id/1",
+ "@type": [ "http://example.com/subdir/vocab/types/Test" ],
+ "http://example.com/subdir/vocab/date": [
+ {
+ "@value": "2011-01-25T00:00:00Z",
+ "@type": "http://example.com/subdir/vocab/types/dateTime"
+ }
+ ],
+ "http://example.com/subdir/vocab/embed": [
+ {
+ "@id": "http://example.com/subdir/id/2",
+ "http://example.com/subdir/vocab/expandedDate": [
+ {
+ "@value": "2012-08-01T00:00:00Z",
+ "@type": "http://example.com/subdir/vocab/types/dateTime"
+ }
+ ]
+ }
+ ]
+ }
+]
diff --git a/test/jsonld/1.1/compact/0021-out.jsonld b/test/jsonld/1.1/compact/0021-out.jsonld
new file mode 100644
index 000000000..2705521be
--- /dev/null
+++ b/test/jsonld/1.1/compact/0021-out.jsonld
@@ -0,0 +1,16 @@
+{
+ "@context": {
+ "@vocab": "http://example.com/subdir/",
+ "vocab/date": { "@type": "vocab/types/dateTime" }
+ },
+ "@id": "http://example.com/subdir/id/1",
+ "@type": "vocab/types/Test",
+ "vocab/date": "2011-01-25T00:00:00Z",
+ "vocab/embed": {
+ "@id": "http://example.com/subdir/id/2",
+ "vocab/expandedDate": {
+ "@value": "2012-08-01T00:00:00Z",
+ "@type": "vocab/types/dateTime"
+ }
+ }
+}
diff --git a/test/jsonld/1.1/compact/0022-context.jsonld b/test/jsonld/1.1/compact/0022-context.jsonld
new file mode 100644
index 000000000..5f77de7e6
--- /dev/null
+++ b/test/jsonld/1.1/compact/0022-context.jsonld
@@ -0,0 +1,10 @@
+{
+ "@context": {
+ "owl": "http://www.w3.org/2002/07/owl#",
+ "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
+ "ex": "https://example.org/ns#",
+ "id": "@id",
+ "type": "@type",
+ "ex:properties": { "@container": "@list" }
+ }
+}
diff --git a/test/jsonld/1.1/compact/0022-in.jsonld b/test/jsonld/1.1/compact/0022-in.jsonld
new file mode 100644
index 000000000..180db8404
--- /dev/null
+++ b/test/jsonld/1.1/compact/0022-in.jsonld
@@ -0,0 +1,39 @@
+[
+ {
+ "@id": "https://example.org/ns#Game",
+ "@type": [
+ "http://www.w3.org/2002/07/owl#Class"
+ ],
+ "https://example.org/ns#properties": [
+ {
+ "@list": [
+ {
+ "@id": "https://example.org/ns#title"
+ },
+ {
+ "@id": "https://example.org/ns#slug"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "@id": "https://example.org/ns#properties",
+ "@type": [
+ "http://www.w3.org/1999/02/22-rdf-syntax-ns#Property"
+ ]
+ },
+ {
+ "@id": "https://example.org/ns#slug",
+ "@type": [
+ "http://www.w3.org/2002/07/owl#DataProperty",
+ "http://www.w3.org/2002/07/owl#FunctionalProperty"
+ ]
+ },
+ {
+ "@id": "https://example.org/ns#title",
+ "@type": [
+ "http://www.w3.org/2002/07/owl#DataProperty"
+ ]
+ }
+]
diff --git a/test/jsonld/1.1/compact/0022-out.jsonld b/test/jsonld/1.1/compact/0022-out.jsonld
new file mode 100644
index 000000000..0f256d330
--- /dev/null
+++ b/test/jsonld/1.1/compact/0022-out.jsonld
@@ -0,0 +1,34 @@
+{
+ "@context": {
+ "owl": "http://www.w3.org/2002/07/owl#",
+ "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
+ "ex": "https://example.org/ns#",
+ "id": "@id",
+ "type": "@type",
+ "ex:properties": {
+ "@container": "@list"
+ }
+ },
+ "@graph": [
+ {
+ "id": "ex:Game",
+ "type": "owl:Class",
+ "ex:properties": [
+ { "id": "ex:title" },
+ { "id": "ex:slug" }
+ ]
+ },
+ {
+ "id": "ex:properties",
+ "type": "rdf:Property"
+ },
+ {
+ "id": "ex:slug",
+ "type": [ "owl:DataProperty", "owl:FunctionalProperty" ]
+ },
+ {
+ "id": "ex:title",
+ "type": "owl:DataProperty"
+ }
+ ]
+}
diff --git a/test/jsonld/1.1/compact/0023-context.jsonld b/test/jsonld/1.1/compact/0023-context.jsonld
new file mode 100644
index 000000000..ec9872683
--- /dev/null
+++ b/test/jsonld/1.1/compact/0023-context.jsonld
@@ -0,0 +1,7 @@
+{
+ "@context": {
+ "@vocab": "http://example.com/",
+ "ex": "http://example.com/subdir/",
+ "ex:vocab/date": { "@type": "ex:vocab/types/dateTime" }
+ }
+}
diff --git a/test/jsonld/1.1/compact/0023-in.jsonld b/test/jsonld/1.1/compact/0023-in.jsonld
new file mode 100644
index 000000000..a7e716f8a
--- /dev/null
+++ b/test/jsonld/1.1/compact/0023-in.jsonld
@@ -0,0 +1,23 @@
+[
+ {
+ "@id": "http://example.com/subdir/id/1",
+ "@type": [ "http://example.com/subdir/vocab/types/Test" ],
+ "http://example.com/subdir/vocab/date": [
+ {
+ "@value": "2011-01-25T00:00:00Z",
+ "@type": "http://example.com/subdir/vocab/types/dateTime"
+ }
+ ],
+ "http://example.com/subdir/vocab/embed": [
+ {
+ "@id": "http://example.com/subdir/id/2",
+ "http://example.com/subdir/vocab/expandedDate": [
+ {
+ "@value": "2012-08-01T00:00:00Z",
+ "@type": "http://example.com/subdir/vocab/types/dateTime"
+ }
+ ]
+ }
+ ]
+ }
+]
diff --git a/test/jsonld/1.1/compact/0023-out.jsonld b/test/jsonld/1.1/compact/0023-out.jsonld
new file mode 100644
index 000000000..747ec943d
--- /dev/null
+++ b/test/jsonld/1.1/compact/0023-out.jsonld
@@ -0,0 +1,17 @@
+{
+ "@context": {
+ "@vocab": "http://example.com/",
+ "ex": "http://example.com/subdir/",
+ "ex:vocab/date": { "@type": "ex:vocab/types/dateTime" }
+ },
+ "@id": "ex:id/1",
+ "@type": "subdir/vocab/types/Test",
+ "ex:vocab/date": "2011-01-25T00:00:00Z",
+ "subdir/vocab/embed": {
+ "@id": "ex:id/2",
+ "subdir/vocab/expandedDate": {
+ "@value": "2012-08-01T00:00:00Z",
+ "@type": "subdir/vocab/types/dateTime"
+ }
+ }
+}
diff --git a/test/jsonld/1.1/compact/0024-context.jsonld b/test/jsonld/1.1/compact/0024-context.jsonld
new file mode 100644
index 000000000..26fc17a7d
--- /dev/null
+++ b/test/jsonld/1.1/compact/0024-context.jsonld
@@ -0,0 +1,15 @@
+{
+ "@context": {
+ "type1": "http://example.com/t1",
+ "type2": "http://example.com/t2",
+ "@language": "de",
+ "termL": { "@id": "http://example.com/termLanguage" },
+ "termLL0": { "@id": "http://example.com/termLanguage", "@container": "@list" },
+ "termLL1": { "@id": "http://example.com/termLanguage", "@container": "@list", "@language": "en" },
+ "termLL2": { "@id": "http://example.com/termLanguage", "@container": "@list", "@language": null },
+ "termT": { "@id": "http://example.com/termType" },
+ "termTL0": { "@id": "http://example.com/termType", "@container": "@list" },
+ "termTL1": { "@id": "http://example.com/termType", "@container": "@list", "@type": "type1" },
+ "termTL2": { "@id": "http://example.com/termType", "@container": "@list", "@type": "type2" }
+ }
+}
diff --git a/test/jsonld/1.1/compact/0024-in.jsonld b/test/jsonld/1.1/compact/0024-in.jsonld
new file mode 100644
index 000000000..e25e21f40
--- /dev/null
+++ b/test/jsonld/1.1/compact/0024-in.jsonld
@@ -0,0 +1,48 @@
+{
+
+ "@context": {
+ "type1": "http://example.com/t1",
+ "type2": "http://example.com/t2"
+ },
+ "@id": "http://example.com/id1",
+ "http://example.com/termLanguage": [
+ {
+ "@list": [
+ { "@value": "termLL0.1", "@language": "de" },
+ { "@value": "termLL0.2", "@language": "de" }
+ ]
+ },
+ {
+ "@list": [
+ { "@value": "termLL1.1", "@language": "en" },
+ { "@value": "termLL1.2", "@language": "en" }
+ ]
+ },
+ {
+ "@list": [
+ "termLL2.1",
+ "termLL2.2"
+ ]
+ }
+ ],
+ "http://example.com/termType": [
+ {
+ "@list": [
+ { "@value": "termTL0.1", "@type": "type1" },
+ { "@value": "termTL0.2", "@type": "type2" }
+ ]
+ },
+ {
+ "@list": [
+ { "@value": "termTL1.1", "@type": "type1" },
+ { "@value": "termTL1.2", "@type": "type1" }
+ ]
+ },
+ {
+ "@list": [
+ { "@value": "termTL2.1", "@type": "type2" },
+ { "@value": "termTL2.2", "@type": "type2" }
+ ]
+ }
+ ]
+}
diff --git a/test/jsonld/1.1/compact/0024-out.jsonld b/test/jsonld/1.1/compact/0024-out.jsonld
new file mode 100644
index 000000000..d9c276f0f
--- /dev/null
+++ b/test/jsonld/1.1/compact/0024-out.jsonld
@@ -0,0 +1,46 @@
+{
+ "@context": {
+ "type1": "http://example.com/t1",
+ "type2": "http://example.com/t2",
+ "@language": "de",
+ "termL": { "@id": "http://example.com/termLanguage" },
+ "termLL0": { "@id": "http://example.com/termLanguage", "@container": "@list" },
+ "termLL1": { "@id": "http://example.com/termLanguage", "@container": "@list", "@language": "en" },
+ "termLL2": { "@id": "http://example.com/termLanguage", "@container": "@list", "@language": null },
+ "termT": { "@id": "http://example.com/termType" },
+ "termTL0": { "@id": "http://example.com/termType", "@container": "@list" },
+ "termTL1": { "@id": "http://example.com/termType", "@container": "@list", "@type": "type1" },
+ "termTL2": { "@id": "http://example.com/termType", "@container": "@list", "@type": "type2" }
+ },
+ "@id": "http://example.com/id1",
+ "termLL0": [
+ "termLL0.1",
+ "termLL0.2"
+ ],
+ "termLL1": [
+ "termLL1.1",
+ "termLL1.2"
+ ],
+ "termLL2": [
+ "termLL2.1",
+ "termLL2.2"
+ ],
+ "termTL0": [
+ {
+ "@type": "type1",
+ "@value": "termTL0.1"
+ },
+ {
+ "@type": "type2",
+ "@value": "termTL0.2"
+ }
+ ],
+ "termTL1": [
+ "termTL1.1",
+ "termTL1.2"
+ ],
+ "termTL2": [
+ "termTL2.1",
+ "termTL2.2"
+ ]
+}
diff --git a/test/jsonld/1.1/compact/0025-context.jsonld b/test/jsonld/1.1/compact/0025-context.jsonld
new file mode 100644
index 000000000..4e1cf64ac
--- /dev/null
+++ b/test/jsonld/1.1/compact/0025-context.jsonld
@@ -0,0 +1,9 @@
+{
+ "@context": {
+ "vocab": "http://example.com/vocab/",
+ "label": {
+ "@id": "vocab:label",
+ "@container": "@language"
+ }
+ }
+}
diff --git a/test/jsonld/1.1/compact/0025-in.jsonld b/test/jsonld/1.1/compact/0025-in.jsonld
new file mode 100644
index 000000000..8859b7afe
--- /dev/null
+++ b/test/jsonld/1.1/compact/0025-in.jsonld
@@ -0,0 +1,18 @@
+[
+ {
+ "@id": "http://example.com/queen",
+ "http://example.com/vocab/label":
+ [
+ {
+ "@value": "The Queen",
+ "@language": "en"
+ }, {
+ "@value": "Die Königin",
+ "@language": "de"
+ }, {
+ "@value": "Ihre Majestät",
+ "@language": "de"
+ }
+ ]
+ }
+]
diff --git a/test/jsonld/1.1/compact/0025-out.jsonld b/test/jsonld/1.1/compact/0025-out.jsonld
new file mode 100644
index 000000000..ca7116733
--- /dev/null
+++ b/test/jsonld/1.1/compact/0025-out.jsonld
@@ -0,0 +1,14 @@
+{
+ "@context": {
+ "vocab": "http://example.com/vocab/",
+ "label": {
+ "@id": "vocab:label",
+ "@container": "@language"
+ }
+ },
+ "@id": "http://example.com/queen",
+ "label": {
+ "en": "The Queen",
+ "de": [ "Die Königin", "Ihre Majestät" ]
+ }
+}
diff --git a/test/jsonld/1.1/compact/0026-context.jsonld b/test/jsonld/1.1/compact/0026-context.jsonld
new file mode 100644
index 000000000..eb75e98eb
--- /dev/null
+++ b/test/jsonld/1.1/compact/0026-context.jsonld
@@ -0,0 +1,10 @@
+{
+ "@context": {
+ "@vocab": "http://example.com/vocab/",
+ "@language": "it",
+ "s": { "@id": "label", "@language": "en" },
+ "label": {
+ "@container": "@language"
+ }
+ }
+}
diff --git a/test/jsonld/1.1/compact/0026-in.jsonld b/test/jsonld/1.1/compact/0026-in.jsonld
new file mode 100644
index 000000000..bf691f95c
--- /dev/null
+++ b/test/jsonld/1.1/compact/0026-in.jsonld
@@ -0,0 +1,21 @@
+[{
+ "@id": "http://example.com/queen",
+ "http://example.com/vocab/label": [
+ {
+ "@value": "Il re",
+ "@language": "it"
+ }, {
+ "@value": "The king",
+ "@language": "en"
+ }, {
+ "@value": "The Queen",
+ "@language": "en"
+ }, {
+ "@value": "Die Königin",
+ "@language": "de"
+ }, {
+ "@value": "Ihre Majestät",
+ "@language": "de"
+ }
+ ]
+}]
diff --git a/test/jsonld/1.1/compact/0026-out.jsonld b/test/jsonld/1.1/compact/0026-out.jsonld
new file mode 100644
index 000000000..26e39fcf6
--- /dev/null
+++ b/test/jsonld/1.1/compact/0026-out.jsonld
@@ -0,0 +1,16 @@
+{
+ "@context": {
+ "@vocab": "http://example.com/vocab/",
+ "@language": "it",
+ "s": { "@id": "label", "@language": "en" },
+ "label": {
+ "@container": "@language"
+ }
+ },
+ "@id": "http://example.com/queen",
+ "label": {
+ "it": "Il re",
+ "en": [ "The king", "The Queen" ],
+ "de": [ "Die Königin", "Ihre Majestät" ]
+ }
+}
diff --git a/test/jsonld/1.1/compact/0027-context.jsonld b/test/jsonld/1.1/compact/0027-context.jsonld
new file mode 100644
index 000000000..6f9d41f34
--- /dev/null
+++ b/test/jsonld/1.1/compact/0027-context.jsonld
@@ -0,0 +1,6 @@
+{
+ "@context": {
+ "label": "http://example.com/vocab/label",
+ "container": { "@id": "label", "@container": "@set" }
+ }
+}
diff --git a/test/jsonld/1.1/compact/0027-in.jsonld b/test/jsonld/1.1/compact/0027-in.jsonld
new file mode 100644
index 000000000..bf691f95c
--- /dev/null
+++ b/test/jsonld/1.1/compact/0027-in.jsonld
@@ -0,0 +1,21 @@
+[{
+ "@id": "http://example.com/queen",
+ "http://example.com/vocab/label": [
+ {
+ "@value": "Il re",
+ "@language": "it"
+ }, {
+ "@value": "The king",
+ "@language": "en"
+ }, {
+ "@value": "The Queen",
+ "@language": "en"
+ }, {
+ "@value": "Die Königin",
+ "@language": "de"
+ }, {
+ "@value": "Ihre Majestät",
+ "@language": "de"
+ }
+ ]
+}]
diff --git a/test/jsonld/1.1/compact/0027-out.jsonld b/test/jsonld/1.1/compact/0027-out.jsonld
new file mode 100644
index 000000000..42c9bea91
--- /dev/null
+++ b/test/jsonld/1.1/compact/0027-out.jsonld
@@ -0,0 +1,25 @@
+{
+ "@context": {
+ "label": "http://example.com/vocab/label",
+ "container": { "@id": "label", "@container": "@set" }
+ },
+ "@id": "http://example.com/queen",
+ "container": [
+ {
+ "@value": "Il re",
+ "@language": "it"
+ }, {
+ "@value": "The king",
+ "@language": "en"
+ }, {
+ "@value": "The Queen",
+ "@language": "en"
+ }, {
+ "@value": "Die Königin",
+ "@language": "de"
+ }, {
+ "@value": "Ihre Majestät",
+ "@language": "de"
+ }
+ ]
+}
diff --git a/test/jsonld/1.1/compact/0028-context.jsonld b/test/jsonld/1.1/compact/0028-context.jsonld
new file mode 100644
index 000000000..0c1c45648
--- /dev/null
+++ b/test/jsonld/1.1/compact/0028-context.jsonld
@@ -0,0 +1,9 @@
+{
+ "@context": {
+ "@vocab": "http://xmlns.com/foaf/0.1/",
+ "homepage": {
+ "@type": "@id"
+ },
+ "uri": "@id"
+ }
+}
diff --git a/test/jsonld/1.1/compact/0028-in.jsonld b/test/jsonld/1.1/compact/0028-in.jsonld
new file mode 100644
index 000000000..36961fb0b
--- /dev/null
+++ b/test/jsonld/1.1/compact/0028-in.jsonld
@@ -0,0 +1,12 @@
+{
+ "@context": {
+ "@vocab": "http://xmlns.com/foaf/0.1/",
+ "homepage": {
+ "@type": "@id"
+ },
+ "uri": "@id"
+ },
+ "uri": "http://me.markus-lanthaler.com/",
+ "name": "Markus Lanthaler",
+ "homepage": "http://www.markus-lanthaler.com/"
+}
diff --git a/test/jsonld/1.1/compact/0028-out.jsonld b/test/jsonld/1.1/compact/0028-out.jsonld
new file mode 100644
index 000000000..36961fb0b
--- /dev/null
+++ b/test/jsonld/1.1/compact/0028-out.jsonld
@@ -0,0 +1,12 @@
+{
+ "@context": {
+ "@vocab": "http://xmlns.com/foaf/0.1/",
+ "homepage": {
+ "@type": "@id"
+ },
+ "uri": "@id"
+ },
+ "uri": "http://me.markus-lanthaler.com/",
+ "name": "Markus Lanthaler",
+ "homepage": "http://www.markus-lanthaler.com/"
+}
diff --git a/test/jsonld/1.1/compact/0029-context.jsonld b/test/jsonld/1.1/compact/0029-context.jsonld
new file mode 100644
index 000000000..fb52cf107
--- /dev/null
+++ b/test/jsonld/1.1/compact/0029-context.jsonld
@@ -0,0 +1,5 @@
+{
+ "@context": {
+ "author": {"@id": "http://example.com/vocab/author", "@container": "@index" }
+ }
+}
diff --git a/test/jsonld/1.1/compact/0029-in.jsonld b/test/jsonld/1.1/compact/0029-in.jsonld
new file mode 100644
index 000000000..c63f933bd
--- /dev/null
+++ b/test/jsonld/1.1/compact/0029-in.jsonld
@@ -0,0 +1,10 @@
+[{
+ "@id": "http://example.com/article",
+ "http://example.com/vocab/author": [{
+ "@id": "http://example.org/person/1",
+ "@index": "regular"
+ }, {
+ "@id": "http://example.org/guest/cd24f329aa",
+ "@index": "guest"
+ }]
+}]
diff --git a/test/jsonld/1.1/compact/0029-out.jsonld b/test/jsonld/1.1/compact/0029-out.jsonld
new file mode 100644
index 000000000..554004850
--- /dev/null
+++ b/test/jsonld/1.1/compact/0029-out.jsonld
@@ -0,0 +1,17 @@
+{
+ "@context": {
+ "author": {
+ "@id": "http://example.com/vocab/author",
+ "@container": "@index"
+ }
+ },
+ "@id": "http://example.com/article",
+ "author": {
+ "regular": {
+ "@id": "http://example.org/person/1"
+ },
+ "guest": {
+ "@id": "http://example.org/guest/cd24f329aa"
+ }
+ }
+}
diff --git a/test/jsonld/1.1/compact/0030-context.jsonld b/test/jsonld/1.1/compact/0030-context.jsonld
new file mode 100644
index 000000000..422e5cf7b
--- /dev/null
+++ b/test/jsonld/1.1/compact/0030-context.jsonld
@@ -0,0 +1,6 @@
+{
+ "@context": {
+ "property": "http://example.com/property",
+ "indexContainer": { "@id": "http://example.com/container", "@container": "@index" }
+ }
+}
diff --git a/test/jsonld/1.1/compact/0030-in.jsonld b/test/jsonld/1.1/compact/0030-in.jsonld
new file mode 100644
index 000000000..4552a8000
--- /dev/null
+++ b/test/jsonld/1.1/compact/0030-in.jsonld
@@ -0,0 +1,117 @@
+[
+ {
+ "@id": "http://example.org/indexTest",
+ "http://example.com/container": [
+ {
+ "@id": "http://example.org/nodeWithoutIndexA",
+ "@index": "A"
+ },
+ {
+ "@id": "http://example.org/nodeWithIndexA",
+ "@index": "this overrides the 'A' index from the container"
+ },
+ {
+ "@value": 1,
+ "@index": "A"
+ },
+ {
+ "@value": true,
+ "@index": "A"
+ },
+ {
+ "@value": false,
+ "@index": "A"
+ },
+ {
+ "@value": "simple string A",
+ "@index": "A"
+ },
+ {
+ "@value": "typed literal A",
+ "@type": "http://example.org/type",
+ "@index": "A"
+ },
+ {
+ "@value": "language-tagged string A",
+ "@language": "en",
+ "@index": "A"
+ },
+ {
+ "@value": "simple string B",
+ "@index": "B"
+ },
+ {
+ "@id": "http://example.org/nodeWithoutIndexC",
+ "@index": "C"
+ },
+ {
+ "@id": "http://example.org/nodeWithIndexC",
+ "@index": "this overrides the 'C' index from the container"
+ },
+ {
+ "@value": 3,
+ "@index": "C"
+ },
+ {
+ "@value": true,
+ "@index": "C"
+ },
+ {
+ "@value": false,
+ "@index": "C"
+ },
+ {
+ "@value": "simple string C",
+ "@index": "C"
+ },
+ {
+ "@value": "typed literal C",
+ "@type": "http://example.org/type",
+ "@index": "C"
+ },
+ {
+ "@value": "language-tagged string C",
+ "@language": "en",
+ "@index": "C"
+ }
+ ],
+ "http://example.com/property": [
+ {
+ "@id": "http://example.org/nodeWithoutIndexProp"
+ },
+ {
+ "@id": "http://example.org/nodeWithIndexProp",
+ "@index": "prop"
+ },
+ {
+ "@value": 3,
+ "@index": "prop"
+ },
+ {
+ "@value": true,
+ "@index": "prop"
+ },
+ {
+ "@value": false,
+ "@index": "prop"
+ },
+ {
+ "@value": "simple string no index"
+ },
+ {
+ "@value": "typed literal Prop",
+ "@type": "http://example.org/type",
+ "@index": "prop"
+ },
+ {
+ "@value": "language-tagged string Prop",
+ "@language": "en",
+ "@index": "prop"
+ },
+ {
+ "@value": "index using an array with just one element (automatic recovery)",
+ "@index": "prop"
+ }
+ ]
+ }
+]
diff --git a/test/jsonld/1.1/compact/0030-out.jsonld b/test/jsonld/1.1/compact/0030-out.jsonld
new file mode 100644
index 000000000..76b5f4d07
--- /dev/null
+++ b/test/jsonld/1.1/compact/0030-out.jsonld
@@ -0,0 +1,86 @@
+{
+ "@context": {
+ "property": "http://example.com/property",
+ "indexContainer": { "@id": "http://example.com/container", "@container": "@index" }
+ },
+ "@id": "http://example.org/indexTest",
+ "indexContainer": {
+ "A": [
+ {
+ "@id": "http://example.org/nodeWithoutIndexA"
+ },
+ 1,
+ true,
+ false,
+ "simple string A",
+ {
+ "@value": "typed literal A",
+ "@type": "http://example.org/type"
+ },
+ {
+ "@value": "language-tagged string A",
+ "@language": "en"
+ }
+ ],
+ "this overrides the 'A' index from the container": {
+ "@id": "http://example.org/nodeWithIndexA"
+ },
+ "B": "simple string B",
+ "C": [
+ {
+ "@id": "http://example.org/nodeWithoutIndexC"
+ },
+ 3,
+ true,
+ false,
+ "simple string C",
+ {
+ "@value": "typed literal C",
+ "@type": "http://example.org/type"
+ },
+ {
+ "@value": "language-tagged string C",
+ "@language": "en"
+ }
+ ],
+ "this overrides the 'C' index from the container": {
+ "@id": "http://example.org/nodeWithIndexC"
+ }
+ },
+ "property": [
+ {
+ "@id": "http://example.org/nodeWithoutIndexProp"
+ },
+ {
+ "@id": "http://example.org/nodeWithIndexProp",
+ "@index": "prop"
+ },
+ {
+ "@value": 3,
+ "@index": "prop"
+ },
+ {
+ "@value": true,
+ "@index": "prop"
+ },
+ {
+ "@value": false,
+ "@index": "prop"
+ },
+ "simple string no index",
+ {
+ "@value": "typed literal Prop",
+ "@type": "http://example.org/type",
+ "@index": "prop"
+ },
+ {
+ "@value": "language-tagged string Prop",
+ "@language": "en",
+ "@index": "prop"
+ },
+ {
+ "@value": "index using an array with just one element (automatic recovery)",
+ "@index": "prop"
+ }
+ ]
+}
diff --git a/test/jsonld/1.1/compact/0031-context.jsonld b/test/jsonld/1.1/compact/0031-context.jsonld
new file mode 100644
index 000000000..8e2148479
--- /dev/null
+++ b/test/jsonld/1.1/compact/0031-context.jsonld
@@ -0,0 +1,5 @@
+{
+ "@context": {
+ "name": "http://xmlns.com/foaf/0.1/name"
+ }
+}
diff --git a/test/jsonld/1.1/compact/0031-in.jsonld b/test/jsonld/1.1/compact/0031-in.jsonld
new file mode 100644
index 000000000..c03623ef2
--- /dev/null
+++ b/test/jsonld/1.1/compact/0031-in.jsonld
@@ -0,0 +1,14 @@
+[
+ {
+ "@id": "http://example.com/people/markus",
+ "@reverse": {
+ "http://xmlns.com/foaf/0.1/knows": [
+ {
+ "@id": "http://example.com/people/dave",
+ "http://xmlns.com/foaf/0.1/name": [ { "@value": "Dave Longley" } ]
+ }
+ ]
+ },
+ "http://xmlns.com/foaf/0.1/name": [ { "@value": "Markus Lanthaler" } ]
+ }
+]
diff --git a/test/jsonld/1.1/compact/0031-out.jsonld b/test/jsonld/1.1/compact/0031-out.jsonld
new file mode 100644
index 000000000..7e65af4a5
--- /dev/null
+++ b/test/jsonld/1.1/compact/0031-out.jsonld
@@ -0,0 +1,13 @@
+{
+ "@context": {
+ "name": "http://xmlns.com/foaf/0.1/name"
+ },
+ "@id": "http://example.com/people/markus",
+ "name": "Markus Lanthaler",
+ "@reverse": {
+ "http://xmlns.com/foaf/0.1/knows": {
+ "@id": "http://example.com/people/dave",
+ "name": "Dave Longley"
+ }
+ }
+}
diff --git a/test/jsonld/1.1/compact/0032-context.jsonld b/test/jsonld/1.1/compact/0032-context.jsonld
new file mode 100644
index 000000000..df67a7d4c
--- /dev/null
+++ b/test/jsonld/1.1/compact/0032-context.jsonld
@@ -0,0 +1,6 @@
+{
+ "@context": {
+ "name": "http://xmlns.com/foaf/0.1/name",
+ "knows": "http://xmlns.com/foaf/0.1/knows"
+ }
+}
diff --git a/test/jsonld/1.1/compact/0032-in.jsonld b/test/jsonld/1.1/compact/0032-in.jsonld
new file mode 100644
index 000000000..c03623ef2
--- /dev/null
+++ b/test/jsonld/1.1/compact/0032-in.jsonld
@@ -0,0 +1,14 @@
+[
+ {
+ "@id": "http://example.com/people/markus",
+ "@reverse": {
+ "http://xmlns.com/foaf/0.1/knows": [
+ {
+ "@id": "http://example.com/people/dave",
+ "http://xmlns.com/foaf/0.1/name": [ { "@value": "Dave Longley" } ]
+ }
+ ]
+ },
+ "http://xmlns.com/foaf/0.1/name": [ { "@value": "Markus Lanthaler" } ]
+ }
+]
diff --git a/test/jsonld/1.1/compact/0032-out.jsonld b/test/jsonld/1.1/compact/0032-out.jsonld
new file mode 100644
index 000000000..7c3549ee3
--- /dev/null
+++ b/test/jsonld/1.1/compact/0032-out.jsonld
@@ -0,0 +1,14 @@
+{
+ "@context": {
+ "name": "http://xmlns.com/foaf/0.1/name",
+ "knows": "http://xmlns.com/foaf/0.1/knows"
+ },
+ "@id": "http://example.com/people/markus",
+ "name": "Markus Lanthaler",
+ "@reverse": {
+ "knows": {
+ "@id": "http://example.com/people/dave",
+ "name": "Dave Longley"
+ }
+ }
+}
diff --git a/test/jsonld/1.1/compact/0033-context.jsonld b/test/jsonld/1.1/compact/0033-context.jsonld
new file mode 100644
index 000000000..5ae4350a3
--- /dev/null
+++ b/test/jsonld/1.1/compact/0033-context.jsonld
@@ -0,0 +1,6 @@
+{
+ "@context": {
+ "name": "http://xmlns.com/foaf/0.1/name",
+ "isKnownBy": { "@reverse": "http://xmlns.com/foaf/0.1/knows" }
+ }
+}
diff --git a/test/jsonld/1.1/compact/0033-in.jsonld b/test/jsonld/1.1/compact/0033-in.jsonld
new file mode 100644
index 000000000..c03623ef2
--- /dev/null
+++ b/test/jsonld/1.1/compact/0033-in.jsonld
@@ -0,0 +1,14 @@
+[
+ {
+ "@id": "http://example.com/people/markus",
+ "@reverse": {
+ "http://xmlns.com/foaf/0.1/knows": [
+ {
+ "@id": "http://example.com/people/dave",
+ "http://xmlns.com/foaf/0.1/name": [ { "@value": "Dave Longley" } ]
+ }
+ ]
+ },
+ "http://xmlns.com/foaf/0.1/name": [ { "@value": "Markus Lanthaler" } ]
+ }
+]
diff --git a/test/jsonld/1.1/compact/0033-out.jsonld b/test/jsonld/1.1/compact/0033-out.jsonld
new file mode 100644
index 000000000..60cf9ac2c
--- /dev/null
+++ b/test/jsonld/1.1/compact/0033-out.jsonld
@@ -0,0 +1,12 @@
+{
+ "@context": {
+ "name": "http://xmlns.com/foaf/0.1/name",
+ "isKnownBy": { "@reverse": "http://xmlns.com/foaf/0.1/knows" }
+ },
+ "@id": "http://example.com/people/markus",
+ "name": "Markus Lanthaler",
+ "isKnownBy": {
+ "@id": "http://example.com/people/dave",
+ "name": "Dave Longley"
+ }
+}
diff --git a/test/jsonld/1.1/compact/0034-context.jsonld b/test/jsonld/1.1/compact/0034-context.jsonld
new file mode 100644
index 000000000..5ae4350a3
--- /dev/null
+++ b/test/jsonld/1.1/compact/0034-context.jsonld
@@ -0,0 +1,6 @@
+{
+ "@context": {
+ "name": "http://xmlns.com/foaf/0.1/name",
+ "isKnownBy": { "@reverse": "http://xmlns.com/foaf/0.1/knows" }
+ }
+}
diff --git a/test/jsonld/1.1/compact/0034-in.jsonld b/test/jsonld/1.1/compact/0034-in.jsonld
new file mode 100644
index 000000000..d6d2ab38d
--- /dev/null
+++ b/test/jsonld/1.1/compact/0034-in.jsonld
@@ -0,0 +1,16 @@
+[
+ {
+ "@id": "http://example.com/people/markus",
+ "http://xmlns.com/foaf/0.1/knows": [
+ {
+ "@id": "http://example.com/people/dave",
+ "http://xmlns.com/foaf/0.1/name": [ { "@value": "Dave Longley" } ]
+ },
+ {
+ "@id": "http://example.com/people/gregg",
+ "http://xmlns.com/foaf/0.1/name": [ { "@value": "Gregg Kellogg" } ]
+ }
+ ],
+ "http://xmlns.com/foaf/0.1/name": [ { "@value": "Markus Lanthaler" } ]
+ }
+]
diff --git a/test/jsonld/1.1/compact/0034-out.jsonld b/test/jsonld/1.1/compact/0034-out.jsonld
new file mode 100644
index 000000000..8ef243702
--- /dev/null
+++ b/test/jsonld/1.1/compact/0034-out.jsonld
@@ -0,0 +1,18 @@
+{
+ "@context": {
+ "name": "http://xmlns.com/foaf/0.1/name",
+ "isKnownBy": { "@reverse": "http://xmlns.com/foaf/0.1/knows" }
+ },
+ "@id": "http://example.com/people/markus",
+ "name": "Markus Lanthaler",
+ "http://xmlns.com/foaf/0.1/knows": [
+ {
+ "@id": "http://example.com/people/dave",
+ "name": "Dave Longley"
+ },
+ {
+ "@id": "http://example.com/people/gregg",
+ "name": "Gregg Kellogg"
+ }
+ ]
+}
diff --git a/test/jsonld/1.1/compact/0035-context.jsonld b/test/jsonld/1.1/compact/0035-context.jsonld
new file mode 100644
index 000000000..b61dab00e
--- /dev/null
+++ b/test/jsonld/1.1/compact/0035-context.jsonld
@@ -0,0 +1,6 @@
+{
+ "@context": {
+ "name": "http://xmlns.com/foaf/0.1/name",
+ "isKnownBy": { "@reverse": "http://xmlns.com/foaf/0.1/knows", "@type": "@id" }
+ }
+}
diff --git a/test/jsonld/1.1/compact/0035-in.jsonld b/test/jsonld/1.1/compact/0035-in.jsonld
new file mode 100644
index 000000000..f63e141a9
--- /dev/null
+++ b/test/jsonld/1.1/compact/0035-in.jsonld
@@ -0,0 +1,16 @@
+[
+ {
+ "@id": "http://example.com/people/markus",
+ "@reverse": {
+ "http://xmlns.com/foaf/0.1/knows": [
+ {
+ "@id": "http://example.com/people/dave"
+ },
+ {
+ "@id": "http://example.com/people/gregg"
+ }
+ ]
+ },
+ "http://xmlns.com/foaf/0.1/name": [ { "@value": "Markus Lanthaler" } ]
+ }
+]
diff --git a/test/jsonld/1.1/compact/0035-out.jsonld b/test/jsonld/1.1/compact/0035-out.jsonld
new file mode 100644
index 000000000..3f10e016f
--- /dev/null
+++ b/test/jsonld/1.1/compact/0035-out.jsonld
@@ -0,0 +1,12 @@
+{
+ "@context": {
+ "name": "http://xmlns.com/foaf/0.1/name",
+ "isKnownBy": { "@reverse": "http://xmlns.com/foaf/0.1/knows", "@type": "@id" }
+ },
+ "@id": "http://example.com/people/markus",
+ "name": "Markus Lanthaler",
+ "isKnownBy": [
+ "http://example.com/people/dave",
+ "http://example.com/people/gregg"
+ ]
+}
diff --git a/test/jsonld/1.1/compact/0036-context.jsonld b/test/jsonld/1.1/compact/0036-context.jsonld
new file mode 100644
index 000000000..a4b35c519
--- /dev/null
+++ b/test/jsonld/1.1/compact/0036-context.jsonld
@@ -0,0 +1,6 @@
+{
+ "@context": {
+ "name": "http://xmlns.com/foaf/0.1/name",
+ "isKnownBy": { "@reverse": "http://xmlns.com/foaf/0.1/knows", "@container": "@index" }
+ }
+}
diff --git a/test/jsonld/1.1/compact/0036-in.jsonld b/test/jsonld/1.1/compact/0036-in.jsonld
new file mode 100644
index 000000000..ffa49d965
--- /dev/null
+++ b/test/jsonld/1.1/compact/0036-in.jsonld
@@ -0,0 +1,20 @@
+[
+ {
+ "@id": "http://example.com/people/markus",
+ "@reverse": {
+ "http://xmlns.com/foaf/0.1/knows": [
+ {
+ "@id": "http://example.com/people/dave",
+ "@index": "Dave",
+ "http://xmlns.com/foaf/0.1/name": [ { "@value": "Dave Longley" } ]
+ },
+ {
+ "@id": "http://example.com/people/gregg",
+ "@index": "Gregg",
+ "http://xmlns.com/foaf/0.1/name": [ { "@value": "Gregg Kellogg" } ]
+ }
+ ]
+ },
+ "http://xmlns.com/foaf/0.1/name": [ { "@value": "Markus Lanthaler" } ]
+ }
+]
diff --git a/test/jsonld/1.1/compact/0036-out.jsonld b/test/jsonld/1.1/compact/0036-out.jsonld
new file mode 100644
index 000000000..a9a83b0c7
--- /dev/null
+++ b/test/jsonld/1.1/compact/0036-out.jsonld
@@ -0,0 +1,18 @@
+{
+ "@context": {
+ "name": "http://xmlns.com/foaf/0.1/name",
+ "isKnownBy": { "@reverse": "http://xmlns.com/foaf/0.1/knows", "@container": "@index" }
+ },
+ "@id": "http://example.com/people/markus",
+ "name": "Markus Lanthaler",
+ "isKnownBy": {
+ "Dave": {
+ "@id": "http://example.com/people/dave",
+ "name": "Dave Longley"
+ },
+ "Gregg": {
+ "@id": "http://example.com/people/gregg",
+ "name": "Gregg Kellogg"
+ }
+ }
+}
diff --git a/test/jsonld/1.1/compact/0037-context.jsonld b/test/jsonld/1.1/compact/0037-context.jsonld
new file mode 100644
index 000000000..42f8b2d7c
--- /dev/null
+++ b/test/jsonld/1.1/compact/0037-context.jsonld
@@ -0,0 +1,7 @@
+{
+ "@context": {
+ "name": "http://xmlns.com/foaf/0.1/name",
+ "knows": "http://xmlns.com/foaf/0.1/knows",
+ "@vocab": "http://example.com/vocab/"
+ }
+}
diff --git a/test/jsonld/1.1/compact/0037-in.jsonld b/test/jsonld/1.1/compact/0037-in.jsonld
new file mode 100644
index 000000000..992fb6aa2
--- /dev/null
+++ b/test/jsonld/1.1/compact/0037-in.jsonld
@@ -0,0 +1,20 @@
+[
+ {
+ "@id": "http://example.com/people/markus",
+ "@reverse": {
+ "http://xmlns.com/foaf/0.1/knows": [
+ {
+ "@id": "http://example.com/people/dave",
+ "http://xmlns.com/foaf/0.1/name": [ { "@value": "Dave Longley" } ]
+ }
+ ],
+ "http://example.com/vocab/noTerm": [
+ {
+ "@id": "https://w3c.github.io/json-ld-api/tests/compact/relative-node",
+ "http://xmlns.com/foaf/0.1/name": [ { "@value": "Compact keys using @vocab" } ]
+ }
+ ]
+ },
+ "http://xmlns.com/foaf/0.1/name": [ { "@value": "Markus Lanthaler" } ]
+ }
+]
diff --git a/test/jsonld/1.1/compact/0037-out.jsonld b/test/jsonld/1.1/compact/0037-out.jsonld
new file mode 100644
index 000000000..b3a9bd80f
--- /dev/null
+++ b/test/jsonld/1.1/compact/0037-out.jsonld
@@ -0,0 +1,19 @@
+{
+ "@context": {
+ "name": "http://xmlns.com/foaf/0.1/name",
+ "knows": "http://xmlns.com/foaf/0.1/knows",
+ "@vocab": "http://example.com/vocab/"
+ },
+ "@id": "http://example.com/people/markus",
+ "name": "Markus Lanthaler",
+ "@reverse": {
+ "knows": {
+ "@id": "http://example.com/people/dave",
+ "name": "Dave Longley"
+ },
+ "noTerm": {
+ "@id": "relative-node",
+ "name": "Compact keys using @vocab"
+ }
+ }
+}
diff --git a/test/jsonld/1.1/compact/0038-context.jsonld b/test/jsonld/1.1/compact/0038-context.jsonld
new file mode 100644
index 000000000..2db116e3f
--- /dev/null
+++ b/test/jsonld/1.1/compact/0038-context.jsonld
@@ -0,0 +1,18 @@
+{
+ "@context": {
+ "site": "http://example.com/",
+ "site-cd": "site:site-schema/content-deployment/",
+ "title": {
+ "@id": "site-cd:node/article/title",
+ "@container": "@index"
+ },
+ "body": {
+ "@id": "site-cd:node/article/body",
+ "@container": "@index"
+ },
+ "field_tags": {
+ "@id": "site-cd:node/article/field_tags",
+ "@container": "@index"
+ }
+ }
+}
diff --git a/test/jsonld/1.1/compact/0038-in.jsonld b/test/jsonld/1.1/compact/0038-in.jsonld
new file mode 100644
index 000000000..28b8f32b2
--- /dev/null
+++ b/test/jsonld/1.1/compact/0038-in.jsonld
@@ -0,0 +1,85 @@
+{
+ "@context": {
+ "site": "http://example.com/",
+ "site-cd": "site:site-schema/content-deployment/",
+ "title": {
+ "@id": "site-cd:node/article/title",
+ "@container": "@index"
+ },
+ "body": {
+ "@id": "site-cd:node/article/body",
+ "@container": "@index"
+ },
+ "field_tags": {
+ "@id": "site-cd:node/article/field_tags",
+ "@container": "@index"
+ }
+ },
+ "@id": "site:node/1",
+ "@type": "site-cd:node/article",
+ "title": {
+ "en": [
+ {
+ "@context": {
+ "value": "site-cd:node/article/title/value"
+ },
+ "@type": "site-cd:field-types/title_field",
+ "value": "This is the English title"
+ }
+ ],
+ "es": [
+ {
+ "@context": {
+ "value": "site-cd:node/article/title/value"
+ },
+ "@type": "site-cd:field-types/title_field",
+ "value": "Este es el t’tulo espa–ol"
+ }
+ ]
+ },
+ "body": {
+ "en": [
+ {
+ "@context": {
+ "value": "site-cd:node/article/body/value",
+ "summary": "site-cd:node/article/body/summary",
+ "format": "site-cd:node/article/body/format"
+ },
+ "@type": "site-cd:field-types/text_with_summary",
+ "value": "This is the English body. There is no Spanish body, so this will be displayed for both the English and Spanish versions.",
+ "summary": "This is the teaser for the body.",
+ "format": "full_html"
+ }
+ ]
+ },
+ "field_tags": {
+ "en": [
+ {
+ "@context": {
+ "uuid": "site-cd:taxonomy/term/uuid"
+ },
+ "@type": "site-cd:taxonomy/term",
+ "@id": "site:taxonomy/term/1",
+ "uuid": "e34b982c-98ac-4862-9b00-fa771a388010"
+ }
+ ],
+ "es": [
+ {
+ "@context": {
+ "uuid": "site-cd:taxonomy/term/uuid"
+ },
+ "@type": "site-cd:taxonomy/term",
+ "@id": "site:taxonomy/term/1",
+ "uuid": "e34b982c-98ac-4862-9b00-fa771a388010"
+ },
+ {
+ "@context": {
+ "uuid": "site-cd:taxonomy/term/uuid"
+ },
+ "@type": "site-cd:taxonomy/term",
+ "@id": "site:taxonomy/term/2",
+ "uuid": "a55b982c-58ac-4862-9b00-aa221a388010"
+ }
+ ]
+ }
+}
diff --git a/test/jsonld/1.1/compact/0038-out.jsonld b/test/jsonld/1.1/compact/0038-out.jsonld
new file mode 100644
index 000000000..78369d193
--- /dev/null
+++ b/test/jsonld/1.1/compact/0038-out.jsonld
@@ -0,0 +1,57 @@
+{
+ "@context": {
+ "site": "http://example.com/",
+ "site-cd": "site:site-schema/content-deployment/",
+ "title": {
+ "@id": "site-cd:node/article/title",
+ "@container": "@index"
+ },
+ "body": {
+ "@id": "site-cd:node/article/body",
+ "@container": "@index"
+ },
+ "field_tags": {
+ "@id": "site-cd:node/article/field_tags",
+ "@container": "@index"
+ }
+ },
+ "@id": "site:node/1",
+ "@type": "site-cd:node/article",
+ "title": {
+ "en": {
+ "@type": "site-cd:field-types/title_field",
+ "title:/value": "This is the English title"
+ },
+ "es": {
+ "@type": "site-cd:field-types/title_field",
+ "title:/value": "Este es el t’tulo espa–ol"
+ }
+ },
+ "body": {
+ "en": {
+ "@type": "site-cd:field-types/text_with_summary",
+ "body:/value": "This is the English body. There is no Spanish body, so this will be displayed for both the English and Spanish versions.",
+ "body:/summary": "This is the teaser for the body.",
+ "body:/format": "full_html"
+ }
+ },
+ "field_tags": {
+ "en": {
+ "@type": "site-cd:taxonomy/term",
+ "@id": "site:taxonomy/term/1",
+ "site-cd:taxonomy/term/uuid": "e34b982c-98ac-4862-9b00-fa771a388010"
+ },
+ "es": [
+ {
+ "@type": "site-cd:taxonomy/term",
+ "@id": "site:taxonomy/term/1",
+ "site-cd:taxonomy/term/uuid": "e34b982c-98ac-4862-9b00-fa771a388010"
+ },
+ {
+ "@type": "site-cd:taxonomy/term",
+ "@id": "site:taxonomy/term/2",
+ "site-cd:taxonomy/term/uuid": "a55b982c-58ac-4862-9b00-aa221a388010"
+ }
+ ]
+ }
+}
diff --git a/test/jsonld/1.1/compact/0038a-out.jsonld b/test/jsonld/1.1/compact/0038a-out.jsonld
new file mode 100644
index 000000000..a8f965894
--- /dev/null
+++ b/test/jsonld/1.1/compact/0038a-out.jsonld
@@ -0,0 +1,57 @@
+{
+ "@context": {
+ "site": "http://example.com/",
+ "site-cd": "site:site-schema/content-deployment/",
+ "title": {
+ "@id": "site-cd:node/article/title",
+ "@container": "@index"
+ },
+ "body": {
+ "@id": "site-cd:node/article/body",
+ "@container": "@index"
+ },
+ "field_tags": {
+ "@id": "site-cd:node/article/field_tags",
+ "@container": "@index"
+ }
+ },
+ "@id": "site:node/1",
+ "@type": "site-cd:node/article",
+ "title": {
+ "en": {
+ "@type": "site-cd:field-types/title_field",
+ "site-cd:node/article/title/value": "This is the English title"
+ },
+ "es": {
+ "@type": "site-cd:field-types/title_field",
+ "site-cd:node/article/title/value": "Este es el t’tulo espa–ol"
+ }
+ },
+ "body": {
+ "en": {
+ "@type": "site-cd:field-types/text_with_summary",
+ "site-cd:node/article/body/value": "This is the English body. There is no Spanish body, so this will be displayed for both the English and Spanish versions.",
+ "site-cd:node/article/body/summary": "This is the teaser for the body.",
+ "site-cd:node/article/body/format": "full_html"
+ }
+ },
+ "field_tags": {
+ "en": {
+ "@type": "site-cd:taxonomy/term",
+ "@id": "site:taxonomy/term/1",
+ "site-cd:taxonomy/term/uuid": "e34b982c-98ac-4862-9b00-fa771a388010"
+ },
+ "es": [
+ {
+ "@type": "site-cd:taxonomy/term",
+ "@id": "site:taxonomy/term/1",
+ "site-cd:taxonomy/term/uuid": "e34b982c-98ac-4862-9b00-fa771a388010"
+ },
+ {
+ "@type": "site-cd:taxonomy/term",
+ "@id": "site:taxonomy/term/2",
+ "site-cd:taxonomy/term/uuid": "a55b982c-58ac-4862-9b00-aa221a388010"
+ }
+ ]
+ }
+}
diff --git a/test/jsonld/1.1/compact/0039-context.jsonld b/test/jsonld/1.1/compact/0039-context.jsonld
new file mode 100644
index 000000000..998900ca4
--- /dev/null
+++ b/test/jsonld/1.1/compact/0039-context.jsonld
@@ -0,0 +1,3 @@
+{
+ "@context": {}
+}
diff --git a/test/jsonld/1.1/compact/0039-in.jsonld b/test/jsonld/1.1/compact/0039-in.jsonld
new file mode 100644
index 000000000..0e1bfa709
--- /dev/null
+++ b/test/jsonld/1.1/compact/0039-in.jsonld
@@ -0,0 +1,11 @@
+[
+ {
+ "@id": "http://example.com/graph/1",
+ "@graph": [
+ {
+ "@id": "http://example.com/node/1",
+ "http://example.com/property": [ { "@value": "property" } ]
+ }
+ ]
+ }
+]
diff --git a/test/jsonld/1.1/compact/0039-out.jsonld b/test/jsonld/1.1/compact/0039-out.jsonld
new file mode 100644
index 000000000..cfd1e6f74
--- /dev/null
+++ b/test/jsonld/1.1/compact/0039-out.jsonld
@@ -0,0 +1,9 @@
+{
+ "@id": "http://example.com/graph/1",
+ "@graph": [
+ {
+ "@id": "http://example.com/node/1",
+ "http://example.com/property": "property"
+ }
+ ]
+}
diff --git a/test/jsonld/1.1/compact/0040-context.jsonld b/test/jsonld/1.1/compact/0040-context.jsonld
new file mode 100644
index 000000000..998900ca4
--- /dev/null
+++ b/test/jsonld/1.1/compact/0040-context.jsonld
@@ -0,0 +1,3 @@
+{
+ "@context": {}
+}
diff --git a/test/jsonld/1.1/compact/0040-in.jsonld b/test/jsonld/1.1/compact/0040-in.jsonld
new file mode 100644
index 000000000..268fdca3e
--- /dev/null
+++ b/test/jsonld/1.1/compact/0040-in.jsonld
@@ -0,0 +1,10 @@
+[
+ {
+ "@id": "http://me.markus-lanthaler.com/",
+ "http://example.com/list": {
+ "@list": [
+ "one item"
+ ]
+ }
+ }
+]
diff --git a/test/jsonld/1.1/compact/0040-out.jsonld b/test/jsonld/1.1/compact/0040-out.jsonld
new file mode 100644
index 000000000..efc0abf01
--- /dev/null
+++ b/test/jsonld/1.1/compact/0040-out.jsonld
@@ -0,0 +1,8 @@
+{
+ "@id": "http://me.markus-lanthaler.com/",
+ "http://example.com/list": {
+ "@list": [
+ "one item"
+ ]
+ }
+}
diff --git a/test/jsonld/1.1/compact/0041-context.jsonld b/test/jsonld/1.1/compact/0041-context.jsonld
new file mode 100644
index 000000000..91515d6b1
--- /dev/null
+++ b/test/jsonld/1.1/compact/0041-context.jsonld
@@ -0,0 +1,5 @@
+{
+ "@context": {
+ "name": { "@id": "http://example.com/property", "@container": "@list" }
+ }
+}
diff --git a/test/jsonld/1.1/compact/0041-in.jsonld b/test/jsonld/1.1/compact/0041-in.jsonld
new file mode 100644
index 000000000..7110b9879
--- /dev/null
+++ b/test/jsonld/1.1/compact/0041-in.jsonld
@@ -0,0 +1,15 @@
+[
+ {
+ "@id": "http://example.com/node",
+ "http://example.com/property": [
+ {
+ "@index": "an index",
+ "@list": [
+ {
+ "@value": "one item"
+ }
+ ]
+ }
+ ]
+ }
+]
diff --git a/test/jsonld/1.1/compact/0041-out.jsonld b/test/jsonld/1.1/compact/0041-out.jsonld
new file mode 100644
index 000000000..7881a11d2
--- /dev/null
+++ b/test/jsonld/1.1/compact/0041-out.jsonld
@@ -0,0 +1,12 @@
+{
+ "@context": {
+ "name": { "@id": "http://example.com/property", "@container": "@list" }
+ },
+ "@id": "http://example.com/node",
+ "http://example.com/property": {
+ "@list": [
+ "one item"
+ ],
+ "@index": "an index"
+ }
+}
diff --git a/test/jsonld/1.1/compact/0042-context.jsonld b/test/jsonld/1.1/compact/0042-context.jsonld
new file mode 100644
index 000000000..68bb529e0
--- /dev/null
+++ b/test/jsonld/1.1/compact/0042-context.jsonld
@@ -0,0 +1,6 @@
+{
+ "@context": {
+ "listAlias": "@list",
+ "indexAlias": "@index"
+ }
+}
diff --git a/test/jsonld/1.1/compact/0042-in.jsonld b/test/jsonld/1.1/compact/0042-in.jsonld
new file mode 100644
index 000000000..9ac7b73b5
--- /dev/null
+++ b/test/jsonld/1.1/compact/0042-in.jsonld
@@ -0,0 +1,15 @@
+[
+ {
+ "@id": "http://example.com/node",
+ "http://example.com/property": [
+ {
+ "@list": [
+ {
+ "@value": "one item"
+ }
+ ],
+ "@index": "an index"
+ }
+ ]
+ }
+]
diff --git a/test/jsonld/1.1/compact/0042-out.jsonld b/test/jsonld/1.1/compact/0042-out.jsonld
new file mode 100644
index 000000000..b7af449b5
--- /dev/null
+++ b/test/jsonld/1.1/compact/0042-out.jsonld
@@ -0,0 +1,13 @@
+{
+ "@context": {
+ "listAlias": "@list",
+ "indexAlias": "@index"
+ },
+ "@id": "http://example.com/node",
+ "http://example.com/property": {
+ "listAlias": [
+ "one item"
+ ],
+ "indexAlias": "an index"
+ }
+}
diff --git a/test/jsonld/1.1/compact/0043-context.jsonld b/test/jsonld/1.1/compact/0043-context.jsonld
new file mode 100644
index 000000000..6ad117d60
--- /dev/null
+++ b/test/jsonld/1.1/compact/0043-context.jsonld
@@ -0,0 +1,6 @@
+{
+ "@context": {
+ "@vocab": "http://example.com/",
+ "name": "http://xmlns.com/foaf/0.1/name"
+ }
+}
diff --git a/test/jsonld/1.1/compact/0043-in.jsonld b/test/jsonld/1.1/compact/0043-in.jsonld
new file mode 100644
index 000000000..2f1d82726
--- /dev/null
+++ b/test/jsonld/1.1/compact/0043-in.jsonld
@@ -0,0 +1,8 @@
+[
+ {
+ "@id": "http://example.com/node",
+ "http://example.com/name": [
+ { "@value": "Markus Lanthaler" }
+ ]
+ }
+]
diff --git a/test/jsonld/1.1/compact/0043-out.jsonld b/test/jsonld/1.1/compact/0043-out.jsonld
new file mode 100644
index 000000000..bbba74798
--- /dev/null
+++ b/test/jsonld/1.1/compact/0043-out.jsonld
@@ -0,0 +1,8 @@
+{
+ "@context": {
+ "@vocab": "http://example.com/",
+ "name": "http://xmlns.com/foaf/0.1/name"
+ },
+ "@id": "http://example.com/node",
+ "http://example.com/name": "Markus Lanthaler"
+}
diff --git a/test/jsonld/1.1/compact/0044-context.jsonld b/test/jsonld/1.1/compact/0044-context.jsonld
new file mode 100644
index 000000000..27fbdfffa
--- /dev/null
+++ b/test/jsonld/1.1/compact/0044-context.jsonld
@@ -0,0 +1,8 @@
+{
+ "@context": {
+ "name": "http://xmlns.com/foaf/0.1/name",
+ "knows": { "@id": "http://xmlns.com/foaf/0.1/knows", "@type": "@id" },
+ "knowsVocab": { "@id": "http://xmlns.com/foaf/0.1/knows", "@type": "@vocab" },
+ "DefinedTerm": "http://example.com/people/DefinedTerm"
+ }
+}
diff --git a/test/jsonld/1.1/compact/0044-in.jsonld b/test/jsonld/1.1/compact/0044-in.jsonld
new file mode 100644
index 000000000..d6e842c96
--- /dev/null
+++ b/test/jsonld/1.1/compact/0044-in.jsonld
@@ -0,0 +1,16 @@
+[
+ {
+ "@id": "http://example.com/people/markus",
+ "@reverse": {
+ "http://xmlns.com/foaf/0.1/knows": [
+ {
+ "@id": "http://example.com/people/dave"
+ },
+ {
+ "@id": "http://example.com/people/DefinedTerm"
+ }
+ ]
+ },
+ "http://xmlns.com/foaf/0.1/name": [ { "@value": "Markus Lanthaler" } ]
+ }
+]
diff --git a/test/jsonld/1.1/compact/0044-out.jsonld b/test/jsonld/1.1/compact/0044-out.jsonld
new file mode 100644
index 000000000..3a13df696
--- /dev/null
+++ b/test/jsonld/1.1/compact/0044-out.jsonld
@@ -0,0 +1,14 @@
+{
+ "@context": {
+ "name": "http://xmlns.com/foaf/0.1/name",
+ "knows": { "@id": "http://xmlns.com/foaf/0.1/knows", "@type": "@id" },
+ "knowsVocab": { "@id": "http://xmlns.com/foaf/0.1/knows", "@type": "@vocab" },
+ "DefinedTerm": "http://example.com/people/DefinedTerm"
+ },
+ "@id": "http://example.com/people/markus",
+ "name": "Markus Lanthaler",
+ "@reverse": {
+ "knows": "http://example.com/people/dave",
+ "knowsVocab": "DefinedTerm"
+ }
+}
diff --git a/test/jsonld/1.1/compact/0045-context.jsonld b/test/jsonld/1.1/compact/0045-context.jsonld
new file mode 100644
index 000000000..5854b8a04
--- /dev/null
+++ b/test/jsonld/1.1/compact/0045-context.jsonld
@@ -0,0 +1,19 @@
+{
+ "@context": {
+ "term": "http://example.com/terms-are-not-considered-in-id",
+ "compact-iris": "http://example.com/compact-iris#",
+ "property": "http://example.com/property",
+ "@vocab": "http://example.org/vocab-is-not-considered-for-id"
+ },
+ "@id": "term",
+ "property": [
+ {
+ "@id": "compact-iris:are-considered",
+ "property": "@id supports the following values: relative, absolute, and compact IRIs"
+ },
+ {
+ "@id": "../parent-node",
+ "property": "relative IRIs get resolved against the document's base IRI"
+ }
+ ]
+}
diff --git a/test/jsonld/1.1/compact/0045-in.jsonld b/test/jsonld/1.1/compact/0045-in.jsonld
new file mode 100644
index 000000000..5f974bd4b
--- /dev/null
+++ b/test/jsonld/1.1/compact/0045-in.jsonld
@@ -0,0 +1,19 @@
+[
+ {
+ "@id": "https://w3c.github.io/json-ld-api/tests/compact/term",
+ "http://example.com/property": [
+ {
+ "@id": "http://example.com/compact-iris#are-considered",
+ "http://example.com/property": [
+ { "@value": "@id supports the following values: relative, absolute, and compact IRIs" }
+ ]
+ },
+ {
+ "@id": "https://w3c.github.io/json-ld-api/tests/parent-node",
+ "http://example.com/property": [
+ { "@value": "relative IRIs get resolved against the document's base IRI" }
+ ]
+ }
+ ]
+ }
+]
diff --git a/test/jsonld/1.1/compact/0045-out.jsonld b/test/jsonld/1.1/compact/0045-out.jsonld
new file mode 100644
index 000000000..5854b8a04
--- /dev/null
+++ b/test/jsonld/1.1/compact/0045-out.jsonld
@@ -0,0 +1,19 @@
+{
+ "@context": {
+ "term": "http://example.com/terms-are-not-considered-in-id",
+ "compact-iris": "http://example.com/compact-iris#",
+ "property": "http://example.com/property",
+ "@vocab": "http://example.org/vocab-is-not-considered-for-id"
+ },
+ "@id": "term",
+ "property": [
+ {
+ "@id": "compact-iris:are-considered",
+ "property": "@id supports the following values: relative, absolute, and compact IRIs"
+ },
+ {
+ "@id": "../parent-node",
+ "property": "relative IRIs get resolved against the document's base IRI"
+ }
+ ]
+}
diff --git a/test/jsonld/1.1/compact/0046-context.jsonld b/test/jsonld/1.1/compact/0046-context.jsonld
new file mode 100644
index 000000000..998900ca4
--- /dev/null
+++ b/test/jsonld/1.1/compact/0046-context.jsonld
@@ -0,0 +1,3 @@
+{
+ "@context": {}
+}
diff --git a/test/jsonld/1.1/compact/0046-in.jsonld b/test/jsonld/1.1/compact/0046-in.jsonld
new file mode 100644
index 000000000..7bd3ee0e5
--- /dev/null
+++ b/test/jsonld/1.1/compact/0046-in.jsonld
@@ -0,0 +1,10 @@
+[
+ {
+ "@id": "http://me.markus-lanthaler.com/",
+ "http://xmlns.com/foaf/0.1/name": "Markus Lanthaler"
+ },
+ {
+ "@id": "http://greggkellogg.net/foaf#me",
+ "http://xmlns.com/foaf/0.1/name": "Gregg Kellogg"
+ }
+]
diff --git a/test/jsonld/1.1/compact/0046-out.jsonld b/test/jsonld/1.1/compact/0046-out.jsonld
new file mode 100644
index 000000000..32bffd4dc
--- /dev/null
+++ b/test/jsonld/1.1/compact/0046-out.jsonld
@@ -0,0 +1,12 @@
+{
+ "@graph": [
+ {
+ "@id": "http://me.markus-lanthaler.com/",
+ "http://xmlns.com/foaf/0.1/name": "Markus Lanthaler"
+ },
+ {
+ "@id": "http://greggkellogg.net/foaf#me",
+ "http://xmlns.com/foaf/0.1/name": "Gregg Kellogg"
+ }
+ ]
+}
diff --git a/test/jsonld/1.1/compact/0047-context.jsonld b/test/jsonld/1.1/compact/0047-context.jsonld
new file mode 100644
index 000000000..850aa0dd8
--- /dev/null
+++ b/test/jsonld/1.1/compact/0047-context.jsonld
@@ -0,0 +1,6 @@
+{
+ "@context": {
+ "@base": "http://example.com/",
+ "link": { "@id": "http://example.com/link", "@type": "@id" }
+ }
+}
diff --git a/test/jsonld/1.1/compact/0047-in.jsonld b/test/jsonld/1.1/compact/0047-in.jsonld
new file mode 100644
index 000000000..51eda26a1
--- /dev/null
+++ b/test/jsonld/1.1/compact/0047-in.jsonld
@@ -0,0 +1,7 @@
+{
+ "@context": {
+ "@base": "http://example.com/",
+ "link": { "@id": "http://example.com/link", "@type": "@id" }
+ },
+ "link": "relative-url"
+}
diff --git a/test/jsonld/1.1/compact/0047-out.jsonld b/test/jsonld/1.1/compact/0047-out.jsonld
new file mode 100644
index 000000000..51eda26a1
--- /dev/null
+++ b/test/jsonld/1.1/compact/0047-out.jsonld
@@ -0,0 +1,7 @@
+{
+ "@context": {
+ "@base": "http://example.com/",
+ "link": { "@id": "http://example.com/link", "@type": "@id" }
+ },
+ "link": "relative-url"
+}
diff --git a/test/jsonld/1.1/compact/0048-context.jsonld b/test/jsonld/1.1/compact/0048-context.jsonld
new file mode 100644
index 000000000..9dd70c2d3
--- /dev/null
+++ b/test/jsonld/1.1/compact/0048-context.jsonld
@@ -0,0 +1,11 @@
+{
+ "@context": {
+ "@language": "de",
+ "propertyLanguageNull": {
+ "@id": "http://example.com/propertyA",
+ "@language": null
+ },
+ "propertyNoLang": "http://example.com/propertyA",
+ "propertyB": "http://example.com/propertyB"
+ }
+}
diff --git a/test/jsonld/1.1/compact/0048-in.jsonld b/test/jsonld/1.1/compact/0048-in.jsonld
new file mode 100644
index 000000000..f25f71a37
--- /dev/null
+++ b/test/jsonld/1.1/compact/0048-in.jsonld
@@ -0,0 +1,4 @@
+{
+ "http://example.com/propertyA": 5,
+ "http://example.com/propertyB": 5
+}
diff --git a/test/jsonld/1.1/compact/0048-out.jsonld b/test/jsonld/1.1/compact/0048-out.jsonld
new file mode 100644
index 000000000..a14bac088
--- /dev/null
+++ b/test/jsonld/1.1/compact/0048-out.jsonld
@@ -0,0 +1,13 @@
+{
+ "@context": {
+ "@language": "de",
+ "propertyLanguageNull": {
+ "@id": "http://example.com/propertyA",
+ "@language": null
+ },
+ "propertyNoLang": "http://example.com/propertyA",
+ "propertyB": "http://example.com/propertyB"
+ },
+ "propertyLanguageNull": 5,
+ "propertyB": 5
+}
diff --git a/test/jsonld/1.1/compact/0049-context.jsonld b/test/jsonld/1.1/compact/0049-context.jsonld
new file mode 100644
index 000000000..559cb5359
--- /dev/null
+++ b/test/jsonld/1.1/compact/0049-context.jsonld
@@ -0,0 +1,5 @@
+{
+ "@context": {
+ "property": { "@id": "http://example.org", "@type": "@id" }
+ }
+}
diff --git a/test/jsonld/1.1/compact/0049-in.jsonld b/test/jsonld/1.1/compact/0049-in.jsonld
new file mode 100644
index 000000000..992588125
--- /dev/null
+++ b/test/jsonld/1.1/compact/0049-in.jsonld
@@ -0,0 +1,6 @@
+{
+ "@context": {
+ "property": { "@id": "http://example.org", "@type": "@id" }
+ },
+ "property": { "@list": [ "http://example.com/node/a", "http://example.com/node/b", "http://example.com/node/c" ] }
+}
diff --git a/test/jsonld/1.1/compact/0049-out.jsonld b/test/jsonld/1.1/compact/0049-out.jsonld
new file mode 100644
index 000000000..992588125
--- /dev/null
+++ b/test/jsonld/1.1/compact/0049-out.jsonld
@@ -0,0 +1,6 @@
+{
+ "@context": {
+ "property": { "@id": "http://example.org", "@type": "@id" }
+ },
+ "property": { "@list": [ "http://example.com/node/a", "http://example.com/node/b", "http://example.com/node/c" ] }
+}
diff --git a/test/jsonld/1.1/compact/0050-context.jsonld b/test/jsonld/1.1/compact/0050-context.jsonld
new file mode 100644
index 000000000..5ae4350a3
--- /dev/null
+++ b/test/jsonld/1.1/compact/0050-context.jsonld
@@ -0,0 +1,6 @@
+{
+ "@context": {
+ "name": "http://xmlns.com/foaf/0.1/name",
+ "isKnownBy": { "@reverse": "http://xmlns.com/foaf/0.1/knows" }
+ }
+}
diff --git a/test/jsonld/1.1/compact/0050-in.jsonld b/test/jsonld/1.1/compact/0050-in.jsonld
new file mode 100644
index 000000000..f63e141a9
--- /dev/null
+++ b/test/jsonld/1.1/compact/0050-in.jsonld
@@ -0,0 +1,16 @@
+[
+ {
+ "@id": "http://example.com/people/markus",
+ "@reverse": {
+ "http://xmlns.com/foaf/0.1/knows": [
+ {
+ "@id": "http://example.com/people/dave"
+ },
+ {
+ "@id": "http://example.com/people/gregg"
+ }
+ ]
+ },
+ "http://xmlns.com/foaf/0.1/name": [ { "@value": "Markus Lanthaler" } ]
+ }
+]
diff --git a/test/jsonld/1.1/compact/0050-out.jsonld b/test/jsonld/1.1/compact/0050-out.jsonld
new file mode 100644
index 000000000..438ecb5c6
--- /dev/null
+++ b/test/jsonld/1.1/compact/0050-out.jsonld
@@ -0,0 +1,12 @@
+{
+ "@context": {
+ "name": "http://xmlns.com/foaf/0.1/name",
+ "isKnownBy": { "@reverse": "http://xmlns.com/foaf/0.1/knows" }
+ },
+ "@id": "http://example.com/people/markus",
+ "name": "Markus Lanthaler",
+ "isKnownBy": [
+ { "@id": "http://example.com/people/dave" },
+ { "@id": "http://example.com/people/gregg" }
+ ]
+}
diff --git a/test/jsonld/1.1/compact/0051-context.jsonld b/test/jsonld/1.1/compact/0051-context.jsonld
new file mode 100644
index 000000000..998900ca4
--- /dev/null
+++ b/test/jsonld/1.1/compact/0051-context.jsonld
@@ -0,0 +1,3 @@
+{
+ "@context": {}
+}
diff --git a/test/jsonld/1.1/compact/0051-in.jsonld b/test/jsonld/1.1/compact/0051-in.jsonld
new file mode 100644
index 000000000..7d086fa7e
--- /dev/null
+++ b/test/jsonld/1.1/compact/0051-in.jsonld
@@ -0,0 +1,5 @@
+{
+ "http://example.org/term": {
+ "@list": [1]
+ }
+}
diff --git a/test/jsonld/1.1/compact/0051-out.jsonld b/test/jsonld/1.1/compact/0051-out.jsonld
new file mode 100644
index 000000000..7d086fa7e
--- /dev/null
+++ b/test/jsonld/1.1/compact/0051-out.jsonld
@@ -0,0 +1,5 @@
+{
+ "http://example.org/term": {
+ "@list": [1]
+ }
+}
diff --git a/test/jsonld/1.1/compact/0052-context.jsonld b/test/jsonld/1.1/compact/0052-context.jsonld
new file mode 100644
index 000000000..224828040
--- /dev/null
+++ b/test/jsonld/1.1/compact/0052-context.jsonld
@@ -0,0 +1,6 @@
+{
+ "@context": {
+ "graph": "@graph",
+ "term": "http://example.org/term"
+ }
+}
diff --git a/test/jsonld/1.1/compact/0052-in.jsonld b/test/jsonld/1.1/compact/0052-in.jsonld
new file mode 100644
index 000000000..0780a0eab
--- /dev/null
+++ b/test/jsonld/1.1/compact/0052-in.jsonld
@@ -0,0 +1,18 @@
+{
+ "@context": {
+ "graph": "@graph",
+ "term": "http://example.org/term"
+ },
+ "graph": [
+ {
+ "term": {
+ "@list": [1]
+ }
+ },
+ {
+ "term": {
+ "@list": [2]
+ }
+ }
+ ]
+}
diff --git a/test/jsonld/1.1/compact/0052-out.jsonld b/test/jsonld/1.1/compact/0052-out.jsonld
new file mode 100644
index 000000000..0780a0eab
--- /dev/null
+++ b/test/jsonld/1.1/compact/0052-out.jsonld
@@ -0,0 +1,18 @@
+{
+ "@context": {
+ "graph": "@graph",
+ "term": "http://example.org/term"
+ },
+ "graph": [
+ {
+ "term": {
+ "@list": [1]
+ }
+ },
+ {
+ "term": {
+ "@list": [2]
+ }
+ }
+ ]
+}
diff --git a/test/jsonld/1.1/compact/0053-context.jsonld b/test/jsonld/1.1/compact/0053-context.jsonld
new file mode 100644
index 000000000..490c4cdf4
--- /dev/null
+++ b/test/jsonld/1.1/compact/0053-context.jsonld
@@ -0,0 +1,5 @@
+{
+ "@context": {
+ "term": {"@id": "http://example.org/term", "@type": "@vocab"}
+ }
+}
diff --git a/test/jsonld/1.1/compact/0053-in.jsonld b/test/jsonld/1.1/compact/0053-in.jsonld
new file mode 100644
index 000000000..7be3023c0
--- /dev/null
+++ b/test/jsonld/1.1/compact/0053-in.jsonld
@@ -0,0 +1,3 @@
+[{
+ "http://example.org/term": [{"@id": "http://example.org/enum"}]
+}]
diff --git a/test/jsonld/1.1/compact/0053-out.jsonld b/test/jsonld/1.1/compact/0053-out.jsonld
new file mode 100644
index 000000000..3ac3ea981
--- /dev/null
+++ b/test/jsonld/1.1/compact/0053-out.jsonld
@@ -0,0 +1,6 @@
+{
+ "@context": {
+ "term": {"@id": "http://example.org/term", "@type": "@vocab"}
+ },
+ "term": "http://example.org/enum"
+}
diff --git a/test/jsonld/1.1/compact/0054-context.jsonld b/test/jsonld/1.1/compact/0054-context.jsonld
new file mode 100644
index 000000000..6bc8522af
--- /dev/null
+++ b/test/jsonld/1.1/compact/0054-context.jsonld
@@ -0,0 +1,6 @@
+{
+ "@context": {
+ "term": {"@id": "http://example.org/term", "@type": "@vocab"},
+ "enum": {"@id": "http://example.org/enum"}
+ }
+}
diff --git a/test/jsonld/1.1/compact/0054-in.jsonld b/test/jsonld/1.1/compact/0054-in.jsonld
new file mode 100644
index 000000000..7be3023c0
--- /dev/null
+++ b/test/jsonld/1.1/compact/0054-in.jsonld
@@ -0,0 +1,3 @@
+[{
+ "http://example.org/term": [{"@id": "http://example.org/enum"}]
+}]
diff --git a/test/jsonld/1.1/compact/0054-out.jsonld b/test/jsonld/1.1/compact/0054-out.jsonld
new file mode 100644
index 000000000..680afbf0d
--- /dev/null
+++ b/test/jsonld/1.1/compact/0054-out.jsonld
@@ -0,0 +1,7 @@
+{
+ "@context": {
+ "term": {"@id": "http://example.org/term", "@type": "@vocab"},
+ "enum": {"@id": "http://example.org/enum"}
+ },
+ "term": "enum"
+}
diff --git a/test/jsonld/1.1/compact/0055-context.jsonld b/test/jsonld/1.1/compact/0055-context.jsonld
new file mode 100644
index 000000000..6bc8522af
--- /dev/null
+++ b/test/jsonld/1.1/compact/0055-context.jsonld
@@ -0,0 +1,6 @@
+{
+ "@context": {
+ "term": {"@id": "http://example.org/term", "@type": "@vocab"},
+ "enum": {"@id": "http://example.org/enum"}
+ }
+}
diff --git a/test/jsonld/1.1/compact/0055-in.jsonld b/test/jsonld/1.1/compact/0055-in.jsonld
new file mode 100644
index 000000000..680afbf0d
--- /dev/null
+++ b/test/jsonld/1.1/compact/0055-in.jsonld
@@ -0,0 +1,7 @@
+{
+ "@context": {
+ "term": {"@id": "http://example.org/term", "@type": "@vocab"},
+ "enum": {"@id": "http://example.org/enum"}
+ },
+ "term": "enum"
+}
diff --git a/test/jsonld/1.1/compact/0055-out.jsonld b/test/jsonld/1.1/compact/0055-out.jsonld
new file mode 100644
index 000000000..680afbf0d
--- /dev/null
+++ b/test/jsonld/1.1/compact/0055-out.jsonld
@@ -0,0 +1,7 @@
+{
+ "@context": {
+ "term": {"@id": "http://example.org/term", "@type": "@vocab"},
+ "enum": {"@id": "http://example.org/enum"}
+ },
+ "term": "enum"
+}
diff --git a/test/jsonld/1.1/compact/0056-context.jsonld b/test/jsonld/1.1/compact/0056-context.jsonld
new file mode 100644
index 000000000..6b167d611
--- /dev/null
+++ b/test/jsonld/1.1/compact/0056-context.jsonld
@@ -0,0 +1,7 @@
+{
+ "@context": {
+ "term": {"@id": "http://example.org/term", "@type": "@vocab"},
+ "doNotSelect": {"@id": "http://example.org/term"},
+ "enum": {"@id": "http://example.org/enum"}
+ }
+}
diff --git a/test/jsonld/1.1/compact/0056-in.jsonld b/test/jsonld/1.1/compact/0056-in.jsonld
new file mode 100644
index 000000000..7be3023c0
--- /dev/null
+++ b/test/jsonld/1.1/compact/0056-in.jsonld
@@ -0,0 +1,3 @@
+[{
+ "http://example.org/term": [{"@id": "http://example.org/enum"}]
+}]
diff --git a/test/jsonld/1.1/compact/0056-out.jsonld b/test/jsonld/1.1/compact/0056-out.jsonld
new file mode 100644
index 000000000..b9e3dc458
--- /dev/null
+++ b/test/jsonld/1.1/compact/0056-out.jsonld
@@ -0,0 +1,8 @@
+{
+ "@context": {
+ "term": {"@id": "http://example.org/term", "@type": "@vocab"},
+ "doNotSelect": {"@id": "http://example.org/term"},
+ "enum": {"@id": "http://example.org/enum"}
+ },
+ "term": "enum"
+}
diff --git a/test/jsonld/1.1/compact/0057-context.jsonld b/test/jsonld/1.1/compact/0057-context.jsonld
new file mode 100644
index 000000000..dd554d963
--- /dev/null
+++ b/test/jsonld/1.1/compact/0057-context.jsonld
@@ -0,0 +1,11 @@
+{
+ "@context": {
+ "name": "http://xmlns.com/foaf/0.1/name",
+ "homepageID": { "@id": "http://xmlns.com/foaf/0.1/homepage", "@type": "@id" },
+ "homepageV": { "@id": "http://xmlns.com/foaf/0.1/homepage", "@type": "@vocab" },
+ "linkID": { "@id": "http://example.com/link", "@type": "@id" },
+ "linkV": { "@id": "http://example.com/link", "@type": "@vocab" },
+ "MarkusHomepage": "http://www.markus-lanthaler.com/",
+ "relative-iri": "http://example.com/error-if-this-is-used-for-link"
+ }
+}
diff --git a/test/jsonld/1.1/compact/0057-in.jsonld b/test/jsonld/1.1/compact/0057-in.jsonld
new file mode 100644
index 000000000..47a307515
--- /dev/null
+++ b/test/jsonld/1.1/compact/0057-in.jsonld
@@ -0,0 +1,15 @@
+{
+ "@context": {
+ "name": "http://xmlns.com/foaf/0.1/name",
+ "homepageID": { "@id": "http://xmlns.com/foaf/0.1/homepage", "@type": "@id" },
+ "homepageV": { "@id": "http://xmlns.com/foaf/0.1/homepage", "@type": "@vocab" },
+ "linkID": { "@id": "http://example.com/link", "@type": "@id" },
+ "linkV": { "@id": "http://example.com/link", "@type": "@vocab" },
+ "MarkusHomepage": "http://www.markus-lanthaler.com/",
+ "relative-iri": "http://example.com/error-if-this-is-used-for-link"
+ },
+ "@id": "http://me.markus-lanthaler.com/",
+ "name": "Markus Lanthaler",
+ "homepageV": "MarkusHomepage",
+ "linkID": "relative-iri"
+}
diff --git a/test/jsonld/1.1/compact/0057-out.jsonld b/test/jsonld/1.1/compact/0057-out.jsonld
new file mode 100644
index 000000000..47a307515
--- /dev/null
+++ b/test/jsonld/1.1/compact/0057-out.jsonld
@@ -0,0 +1,15 @@
+{
+ "@context": {
+ "name": "http://xmlns.com/foaf/0.1/name",
+ "homepageID": { "@id": "http://xmlns.com/foaf/0.1/homepage", "@type": "@id" },
+ "homepageV": { "@id": "http://xmlns.com/foaf/0.1/homepage", "@type": "@vocab" },
+ "linkID": { "@id": "http://example.com/link", "@type": "@id" },
+ "linkV": { "@id": "http://example.com/link", "@type": "@vocab" },
+ "MarkusHomepage": "http://www.markus-lanthaler.com/",
+ "relative-iri": "http://example.com/error-if-this-is-used-for-link"
+ },
+ "@id": "http://me.markus-lanthaler.com/",
+ "name": "Markus Lanthaler",
+ "homepageV": "MarkusHomepage",
+ "linkID": "relative-iri"
+}
diff --git a/test/jsonld/1.1/compact/0058-context.jsonld b/test/jsonld/1.1/compact/0058-context.jsonld
new file mode 100644
index 000000000..15958db68
--- /dev/null
+++ b/test/jsonld/1.1/compact/0058-context.jsonld
@@ -0,0 +1,6 @@
+{
+ "@context": {
+ "notChosen": {"@id": "http://example.org/term", "@type": "@vocab"},
+ "chosen": {"@id": "http://example.org/term", "@type": "@id"}
+ }
+}
diff --git a/test/jsonld/1.1/compact/0058-in.jsonld b/test/jsonld/1.1/compact/0058-in.jsonld
new file mode 100644
index 000000000..7be3023c0
--- /dev/null
+++ b/test/jsonld/1.1/compact/0058-in.jsonld
@@ -0,0 +1,3 @@
+[{
+ "http://example.org/term": [{"@id": "http://example.org/enum"}]
+}]
diff --git a/test/jsonld/1.1/compact/0058-out.jsonld b/test/jsonld/1.1/compact/0058-out.jsonld
new file mode 100644
index 000000000..83ffd5210
--- /dev/null
+++ b/test/jsonld/1.1/compact/0058-out.jsonld
@@ -0,0 +1,7 @@
+{
+ "@context": {
+ "notChosen": {"@id": "http://example.org/term", "@type": "@vocab"},
+ "chosen": {"@id": "http://example.org/term", "@type": "@id"}
+ },
+ "chosen": "http://example.org/enum"
+}
diff --git a/test/jsonld/1.1/compact/0059-context.jsonld b/test/jsonld/1.1/compact/0059-context.jsonld
new file mode 100644
index 000000000..af661cf93
--- /dev/null
+++ b/test/jsonld/1.1/compact/0059-context.jsonld
@@ -0,0 +1,9 @@
+{
+ "@context": {
+ "Bar": "http://example.com/vocab#Bar",
+ "foo": {
+ "@id": "http://example.com/vocab#foo",
+ "@type": "@vocab"
+ }
+ }
+}
diff --git a/test/jsonld/1.1/compact/0059-in.jsonld b/test/jsonld/1.1/compact/0059-in.jsonld
new file mode 100644
index 000000000..1d38d4ac8
--- /dev/null
+++ b/test/jsonld/1.1/compact/0059-in.jsonld
@@ -0,0 +1,8 @@
+[
+ {
+ "http://example.com/vocab#foo": [
+ { "@id": "http://example.com/vocab#Bar" },
+ { "@id": "http://example.com/vocab#Baz" }
+ ]
+ }
+]
diff --git a/test/jsonld/1.1/compact/0059-out.jsonld b/test/jsonld/1.1/compact/0059-out.jsonld
new file mode 100644
index 000000000..75f715600
--- /dev/null
+++ b/test/jsonld/1.1/compact/0059-out.jsonld
@@ -0,0 +1,13 @@
+{
+ "@context": {
+ "Bar": "http://example.com/vocab#Bar",
+ "foo": {
+ "@id": "http://example.com/vocab#foo",
+ "@type": "@vocab"
+ }
+ },
+ "foo": [
+ "Bar",
+ "http://example.com/vocab#Baz"
+ ]
+}
diff --git a/test/jsonld/1.1/compact/0060-context.jsonld b/test/jsonld/1.1/compact/0060-context.jsonld
new file mode 100644
index 000000000..a308b57b4
--- /dev/null
+++ b/test/jsonld/1.1/compact/0060-context.jsonld
@@ -0,0 +1,9 @@
+{
+ "@context": {
+ "Bar": "http://example.com/vocab#Bar",
+ "foo": {
+ "@id": "http://example.com/vocab#foo",
+ "@type": "@id"
+ }
+ }
+}
diff --git a/test/jsonld/1.1/compact/0060-in.jsonld b/test/jsonld/1.1/compact/0060-in.jsonld
new file mode 100644
index 000000000..1d38d4ac8
--- /dev/null
+++ b/test/jsonld/1.1/compact/0060-in.jsonld
@@ -0,0 +1,8 @@
+[
+ {
+ "http://example.com/vocab#foo": [
+ { "@id": "http://example.com/vocab#Bar" },
+ { "@id": "http://example.com/vocab#Baz" }
+ ]
+ }
+]
diff --git a/test/jsonld/1.1/compact/0060-out.jsonld b/test/jsonld/1.1/compact/0060-out.jsonld
new file mode 100644
index 000000000..c183efb0c
--- /dev/null
+++ b/test/jsonld/1.1/compact/0060-out.jsonld
@@ -0,0 +1,13 @@
+{
+ "@context": {
+ "Bar": "http://example.com/vocab#Bar",
+ "foo": {
+ "@id": "http://example.com/vocab#foo",
+ "@type": "@id"
+ }
+ },
+ "foo": [
+ "http://example.com/vocab#Bar",
+ "http://example.com/vocab#Baz"
+ ]
+}
diff --git a/test/jsonld/1.1/compact/0061-context.jsonld b/test/jsonld/1.1/compact/0061-context.jsonld
new file mode 100644
index 000000000..a8fcd8988
--- /dev/null
+++ b/test/jsonld/1.1/compact/0061-context.jsonld
@@ -0,0 +1,13 @@
+{
+ "@context": {
+ "Bar": "http://example.com/vocab#Bar",
+ "fooI": {
+ "@id": "http://example.com/vocab#foo",
+ "@type": "@id"
+ },
+ "fooV": {
+ "@id": "http://example.com/vocab#foo",
+ "@type": "@vocab"
+ }
+ }
+}
diff --git a/test/jsonld/1.1/compact/0061-in.jsonld b/test/jsonld/1.1/compact/0061-in.jsonld
new file mode 100644
index 000000000..1d38d4ac8
--- /dev/null
+++ b/test/jsonld/1.1/compact/0061-in.jsonld
@@ -0,0 +1,8 @@
+[
+ {
+ "http://example.com/vocab#foo": [
+ { "@id": "http://example.com/vocab#Bar" },
+ { "@id": "http://example.com/vocab#Baz" }
+ ]
+ }
+]
diff --git a/test/jsonld/1.1/compact/0061-out.jsonld b/test/jsonld/1.1/compact/0061-out.jsonld
new file mode 100644
index 000000000..beec5afb5
--- /dev/null
+++ b/test/jsonld/1.1/compact/0061-out.jsonld
@@ -0,0 +1,15 @@
+{
+ "@context": {
+ "Bar": "http://example.com/vocab#Bar",
+ "fooI": {
+ "@id": "http://example.com/vocab#foo",
+ "@type": "@id"
+ },
+ "fooV": {
+ "@id": "http://example.com/vocab#foo",
+ "@type": "@vocab"
+ }
+ },
+ "fooV": "Bar",
+ "fooI": "http://example.com/vocab#Baz"
+}
diff --git a/test/jsonld/1.1/compact/0062-context.jsonld b/test/jsonld/1.1/compact/0062-context.jsonld
new file mode 100644
index 000000000..82745ef2b
--- /dev/null
+++ b/test/jsonld/1.1/compact/0062-context.jsonld
@@ -0,0 +1,5 @@
+{
+ "@context": {
+ "term": { "@id": "http://example.org/term", "@type": "@vocab" }
+ }
+}
diff --git a/test/jsonld/1.1/compact/0062-in.jsonld b/test/jsonld/1.1/compact/0062-in.jsonld
new file mode 100644
index 000000000..732cc9234
--- /dev/null
+++ b/test/jsonld/1.1/compact/0062-in.jsonld
@@ -0,0 +1,6 @@
+{
+ "@context": {
+ "term": { "@id": "http://example.org/term", "@type": "@vocab" }
+ },
+ "term": "not-a-term-thus-a-relative-IRI"
+}
diff --git a/test/jsonld/1.1/compact/0062-out.jsonld b/test/jsonld/1.1/compact/0062-out.jsonld
new file mode 100644
index 000000000..7c9bfbf30
--- /dev/null
+++ b/test/jsonld/1.1/compact/0062-out.jsonld
@@ -0,0 +1,6 @@
+{
+ "@context": {
+ "term": { "@id": "http://example.org/term", "@type": "@vocab" }
+ },
+ "term": "https://w3c.github.io/json-ld-api/tests/compact/not-a-term-thus-a-relative-IRI"
+}
diff --git a/test/jsonld/1.1/compact/0063-context.jsonld b/test/jsonld/1.1/compact/0063-context.jsonld
new file mode 100644
index 000000000..e06e6dcfc
--- /dev/null
+++ b/test/jsonld/1.1/compact/0063-context.jsonld
@@ -0,0 +1,6 @@
+{
+ "@context": {
+ "term": { "@id": "http://example.org/term", "@type": "@vocab" },
+ "prefix": "http://example.com/vocab#"
+ }
+}
diff --git a/test/jsonld/1.1/compact/0063-in.jsonld b/test/jsonld/1.1/compact/0063-in.jsonld
new file mode 100644
index 000000000..68dc32497
--- /dev/null
+++ b/test/jsonld/1.1/compact/0063-in.jsonld
@@ -0,0 +1,7 @@
+{
+ "@context": {
+ "term": { "@id": "http://example.org/term", "@type": "@vocab" },
+ "prefix": "http://example.com/vocab#"
+ },
+ "term": "prefix:suffix"
+}
diff --git a/test/jsonld/1.1/compact/0063-out.jsonld b/test/jsonld/1.1/compact/0063-out.jsonld
new file mode 100644
index 000000000..68dc32497
--- /dev/null
+++ b/test/jsonld/1.1/compact/0063-out.jsonld
@@ -0,0 +1,7 @@
+{
+ "@context": {
+ "term": { "@id": "http://example.org/term", "@type": "@vocab" },
+ "prefix": "http://example.com/vocab#"
+ },
+ "term": "prefix:suffix"
+}
diff --git a/test/jsonld/1.1/compact/0064-context.jsonld b/test/jsonld/1.1/compact/0064-context.jsonld
new file mode 100644
index 000000000..99bef741e
--- /dev/null
+++ b/test/jsonld/1.1/compact/0064-context.jsonld
@@ -0,0 +1,5 @@
+{
+ "@context": {
+ "property": { "@id": "http://example.com/property", "@container": "@index" }
+ }
+}
diff --git a/test/jsonld/1.1/compact/0064-in.jsonld b/test/jsonld/1.1/compact/0064-in.jsonld
new file mode 100644
index 000000000..6a7f22678
--- /dev/null
+++ b/test/jsonld/1.1/compact/0064-in.jsonld
@@ -0,0 +1,17 @@
+[
+ {
+ "@id": "http://example.com.com/",
+ "http://example.com/property": [
+ {
+ "@value": "Deutsche Zeichenfolge in @index-map",
+ "@index": "first",
+ "@language": "de"
+ },
+ {
+ "@value": "English string in @index-map",
+ "@index": "second",
+ "@language": "en"
+ }
+ ]
+ }
+]
diff --git a/test/jsonld/1.1/compact/0064-out.jsonld b/test/jsonld/1.1/compact/0064-out.jsonld
new file mode 100644
index 000000000..5bc1ec0a6
--- /dev/null
+++ b/test/jsonld/1.1/compact/0064-out.jsonld
@@ -0,0 +1,16 @@
+{
+ "@context": {
+ "property": { "@id": "http://example.com/property", "@container": "@index" }
+ },
+ "@id": "http://example.com.com/",
+ "property": {
+ "first": {
+ "@language": "de",
+ "@value": "Deutsche Zeichenfolge in @index-map"
+ },
+ "second": {
+ "@language": "en",
+ "@value": "English string in @index-map"
+ }
+ }
+}
diff --git a/test/jsonld/1.1/compact/0065-context.jsonld b/test/jsonld/1.1/compact/0065-context.jsonld
new file mode 100644
index 000000000..17d7c1aea
--- /dev/null
+++ b/test/jsonld/1.1/compact/0065-context.jsonld
@@ -0,0 +1,5 @@
+{
+ "@context": {
+ "property": { "@id": "http://example.com/property", "@container": "@language" }
+ }
+}
diff --git a/test/jsonld/1.1/compact/0065-in.jsonld b/test/jsonld/1.1/compact/0065-in.jsonld
new file mode 100644
index 000000000..6a7f22678
--- /dev/null
+++ b/test/jsonld/1.1/compact/0065-in.jsonld
@@ -0,0 +1,17 @@
+[
+ {
+ "@id": "http://example.com.com/",
+ "http://example.com/property": [
+ {
+ "@value": "Deutsche Zeichenfolge in @index-map",
+ "@index": "first",
+ "@language": "de"
+ },
+ {
+ "@value": "English string in @index-map",
+ "@index": "second",
+ "@language": "en"
+ }
+ ]
+ }
+]
diff --git a/test/jsonld/1.1/compact/0065-out.jsonld b/test/jsonld/1.1/compact/0065-out.jsonld
new file mode 100644
index 000000000..6a7a8f20b
--- /dev/null
+++ b/test/jsonld/1.1/compact/0065-out.jsonld
@@ -0,0 +1,18 @@
+{
+ "@context": {
+ "property": { "@id": "http://example.com/property", "@container": "@language" }
+ },
+ "@id": "http://example.com.com/",
+ "http://example.com/property": [
+ {
+ "@index": "first",
+ "@language": "de",
+ "@value": "Deutsche Zeichenfolge in @index-map"
+ },
+ {
+ "@index": "second",
+ "@language": "en",
+ "@value": "English string in @index-map"
+ }
+ ]
+}
diff --git a/test/jsonld/1.1/compact/0066-context.jsonld b/test/jsonld/1.1/compact/0066-context.jsonld
new file mode 100644
index 000000000..1f8f0b469
--- /dev/null
+++ b/test/jsonld/1.1/compact/0066-context.jsonld
@@ -0,0 +1,5 @@
+{
+ "@context": {
+ "links": { "@id": "http://www.example.com/link", "@type": "@id", "@container": "@list" }
+ }
+}
diff --git a/test/jsonld/1.1/compact/0066-in.jsonld b/test/jsonld/1.1/compact/0066-in.jsonld
new file mode 100644
index 000000000..8528714ad
--- /dev/null
+++ b/test/jsonld/1.1/compact/0066-in.jsonld
@@ -0,0 +1,34 @@
+[
+ {
+ "@id": "https://w3c.github.io/json-ld-api/tests/compact/relativeIris",
+ "@type": [
+ "https://w3c.github.io/json-ld-api/tests/compact/link",
+ "https://w3c.github.io/json-ld-api/tests/compact/0066-in.jsonld#fragment-works",
+ "https://w3c.github.io/json-ld-api/tests/compact/0066-in.jsonld?query=works",
+ "https://w3c.github.io/json-ld-api/tests/",
+ "https://w3c.github.io/json-ld-api/",
+ "https://w3c.github.io/json-ld-api/parent",
+ "https://w3c.github.io/parent-parent-eq-root",
+ "https://w3c.github.io/still-root",
+ "https://w3c.github.io/too-many-dots",
+ "https://w3c.github.io/absolute",
+ "http://example.org/scheme-relative"
+ ],
+ "http://www.example.com/link": [ {
+ "@list": [
+ { "@id": "https://w3c.github.io/json-ld-api/tests/compact/link" },
+ { "@id": "https://w3c.github.io/json-ld-api/tests/compact/0066-in.jsonld#fragment-works" },
+ { "@id": "https://w3c.github.io/json-ld-api/tests/compact/0066-in.jsonld?query=works" },
+ { "@id": "https://w3c.github.io/json-ld-api/tests/" },
+ { "@id": "https://w3c.github.io/json-ld-api/" },
+ { "@id": "https://w3c.github.io/json-ld-api/parent" },
+ { "@id": "https://w3c.github.io/json-ld-api/parent#fragment" },
+ { "@id": "https://w3c.github.io/parent-parent-eq-root" },
+ { "@id": "https://w3c.github.io/still-root" },
+ { "@id": "https://w3c.github.io/too-many-dots" },
+ { "@id": "https://w3c.github.io/absolute" },
+ { "@id": "http://example.org/scheme-relative" }
+ ]
+ } ]
+ }
+]
diff --git a/test/jsonld/1.1/compact/0066-out.jsonld b/test/jsonld/1.1/compact/0066-out.jsonld
new file mode 100644
index 000000000..ae1310d96
--- /dev/null
+++ b/test/jsonld/1.1/compact/0066-out.jsonld
@@ -0,0 +1,33 @@
+{
+ "@context": {
+ "links": { "@id": "http://www.example.com/link", "@type": "@id", "@container": "@list" }
+ },
+ "@id": "relativeIris",
+ "@type": [
+ "https://w3c.github.io/json-ld-api/tests/compact/link",
+ "https://w3c.github.io/json-ld-api/tests/compact/0066-in.jsonld#fragment-works",
+ "https://w3c.github.io/json-ld-api/tests/compact/0066-in.jsonld?query=works",
+ "https://w3c.github.io/json-ld-api/tests/",
+ "https://w3c.github.io/json-ld-api/",
+ "https://w3c.github.io/json-ld-api/parent",
+ "https://w3c.github.io/parent-parent-eq-root",
+ "https://w3c.github.io/still-root",
+ "https://w3c.github.io/too-many-dots",
+ "https://w3c.github.io/absolute",
+ "http://example.org/scheme-relative"
+ ],
+ "links": [
+ "link",
+ "#fragment-works",
+ "?query=works",
+ "../",
+ "../../",
+ "../../parent",
+ "../../parent#fragment",
+ "../../../parent-parent-eq-root",
+ "../../../still-root",
+ "../../../too-many-dots",
+ "../../../absolute",
+ "http://example.org/scheme-relative"
+ ]
+}
diff --git a/test/jsonld/1.1/compact/0067-context.jsonld b/test/jsonld/1.1/compact/0067-context.jsonld
new file mode 100644
index 000000000..5ae4350a3
--- /dev/null
+++ b/test/jsonld/1.1/compact/0067-context.jsonld
@@ -0,0 +1,6 @@
+{
+ "@context": {
+ "name": "http://xmlns.com/foaf/0.1/name",
+ "isKnownBy": { "@reverse": "http://xmlns.com/foaf/0.1/knows" }
+ }
+}
diff --git a/test/jsonld/1.1/compact/0067-in.jsonld b/test/jsonld/1.1/compact/0067-in.jsonld
new file mode 100644
index 000000000..273226d2d
--- /dev/null
+++ b/test/jsonld/1.1/compact/0067-in.jsonld
@@ -0,0 +1,16 @@
+[
+ {
+ "@id": "http://example.com/people/markus",
+ "@reverse": {
+ "http://xmlns.com/foaf/0.1/knows": [
+ {
+ "http://xmlns.com/foaf/0.1/name": [ { "@value": "Dave Longley" } ]
+ },
+ {
+ "http://xmlns.com/foaf/0.1/name": [ { "@value": "Gregg Kellogg" } ]
+ }
+ ]
+ },
+ "http://xmlns.com/foaf/0.1/name": [ { "@value": "Markus Lanthaler" } ]
+ }
+]
diff --git a/test/jsonld/1.1/compact/0067-out.jsonld b/test/jsonld/1.1/compact/0067-out.jsonld
new file mode 100644
index 000000000..dc313893a
--- /dev/null
+++ b/test/jsonld/1.1/compact/0067-out.jsonld
@@ -0,0 +1,16 @@
+{
+ "@context": {
+ "name": "http://xmlns.com/foaf/0.1/name",
+ "isKnownBy": { "@reverse": "http://xmlns.com/foaf/0.1/knows" }
+ },
+ "@id": "http://example.com/people/markus",
+ "name": "Markus Lanthaler",
+ "isKnownBy": [
+ {
+ "name": "Dave Longley"
+ },
+ {
+ "name": "Gregg Kellogg"
+ }
+ ]
+}
diff --git a/test/jsonld/1.1/compact/0068-context.jsonld b/test/jsonld/1.1/compact/0068-context.jsonld
new file mode 100644
index 000000000..73fc1013c
--- /dev/null
+++ b/test/jsonld/1.1/compact/0068-context.jsonld
@@ -0,0 +1,6 @@
+{
+ "@context": {
+ "name": "http://xmlns.com/foaf/0.1/name",
+ "isKnownBy": { "@reverse": "http://xmlns.com/foaf/0.1/knows", "@container": "@set" }
+ }
+}
diff --git a/test/jsonld/1.1/compact/0068-in.jsonld b/test/jsonld/1.1/compact/0068-in.jsonld
new file mode 100644
index 000000000..6aaa37a99
--- /dev/null
+++ b/test/jsonld/1.1/compact/0068-in.jsonld
@@ -0,0 +1,13 @@
+[
+ {
+ "@id": "http://example.com/people/markus",
+ "@reverse": {
+ "http://xmlns.com/foaf/0.1/knows": [
+ {
+ "@id": "http://example.com/people/dave"
+ }
+ ]
+ },
+ "http://xmlns.com/foaf/0.1/name": [ { "@value": "Markus Lanthaler" } ]
+ }
+]
diff --git a/test/jsonld/1.1/compact/0068-out.jsonld b/test/jsonld/1.1/compact/0068-out.jsonld
new file mode 100644
index 000000000..7c1793613
--- /dev/null
+++ b/test/jsonld/1.1/compact/0068-out.jsonld
@@ -0,0 +1,11 @@
+{
+ "@context": {
+ "name": "http://xmlns.com/foaf/0.1/name",
+ "isKnownBy": { "@reverse": "http://xmlns.com/foaf/0.1/knows", "@container": "@set" }
+ },
+ "@id": "http://example.com/people/markus",
+ "name": "Markus Lanthaler",
+ "isKnownBy": [
+ { "@id": "http://example.com/people/dave" }
+ ]
+}
diff --git a/test/jsonld/1.1/compact/0069-context.jsonld b/test/jsonld/1.1/compact/0069-context.jsonld
new file mode 100644
index 000000000..73fc1013c
--- /dev/null
+++ b/test/jsonld/1.1/compact/0069-context.jsonld
@@ -0,0 +1,6 @@
+{
+ "@context": {
+ "name": "http://xmlns.com/foaf/0.1/name",
+ "isKnownBy": { "@reverse": "http://xmlns.com/foaf/0.1/knows", "@container": "@set" }
+ }
+}
diff --git a/test/jsonld/1.1/compact/0069-in.jsonld b/test/jsonld/1.1/compact/0069-in.jsonld
new file mode 100644
index 000000000..6aaa37a99
--- /dev/null
+++ b/test/jsonld/1.1/compact/0069-in.jsonld
@@ -0,0 +1,13 @@
+[
+ {
+ "@id": "http://example.com/people/markus",
+ "@reverse": {
+ "http://xmlns.com/foaf/0.1/knows": [
+ {
+ "@id": "http://example.com/people/dave"
+ }
+ ]
+ },
+ "http://xmlns.com/foaf/0.1/name": [ { "@value": "Markus Lanthaler" } ]
+ }
+]
diff --git a/test/jsonld/1.1/compact/0069-out.jsonld b/test/jsonld/1.1/compact/0069-out.jsonld
new file mode 100644
index 000000000..7c1793613
--- /dev/null
+++ b/test/jsonld/1.1/compact/0069-out.jsonld
@@ -0,0 +1,11 @@
+{
+ "@context": {
+ "name": "http://xmlns.com/foaf/0.1/name",
+ "isKnownBy": { "@reverse": "http://xmlns.com/foaf/0.1/knows", "@container": "@set" }
+ },
+ "@id": "http://example.com/people/markus",
+ "name": "Markus Lanthaler",
+ "isKnownBy": [
+ { "@id": "http://example.com/people/dave" }
+ ]
+}
diff --git a/test/jsonld/1.1/compact/0070-context.jsonld b/test/jsonld/1.1/compact/0070-context.jsonld
new file mode 100644
index 000000000..b1fde0c02
--- /dev/null
+++ b/test/jsonld/1.1/compact/0070-context.jsonld
@@ -0,0 +1,5 @@
+{
+ "@context": {
+ "term": "http://example/term"
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/0070-in.jsonld b/test/jsonld/1.1/compact/0070-in.jsonld
new file mode 100644
index 000000000..94e6d6a6f
--- /dev/null
+++ b/test/jsonld/1.1/compact/0070-in.jsonld
@@ -0,0 +1,4 @@
+[{
+ "@id": "http://example/foo",
+ "http://example/term": [{"@value": "value"}]
+}]
diff --git a/test/jsonld/1.1/compact/0070-out.jsonld b/test/jsonld/1.1/compact/0070-out.jsonld
new file mode 100644
index 000000000..136cb3a72
--- /dev/null
+++ b/test/jsonld/1.1/compact/0070-out.jsonld
@@ -0,0 +1,9 @@
+{
+ "@context": {
+ "term": "http://example/term"
+ },
+ "@graph": [{
+ "@id": "http://example/foo",
+ "term": ["value"]
+ }]
+}
diff --git a/test/jsonld/1.1/compact/0071-context.jsonld b/test/jsonld/1.1/compact/0071-context.jsonld
new file mode 100644
index 000000000..cdb3a52bf
--- /dev/null
+++ b/test/jsonld/1.1/compact/0071-context.jsonld
@@ -0,0 +1,5 @@
+{
+ "@context": {
+ "foo": "http://example.com/foo"
+ }
+}
diff --git a/test/jsonld/1.1/compact/0071-in.jsonld b/test/jsonld/1.1/compact/0071-in.jsonld
new file mode 100644
index 000000000..7122f8234
--- /dev/null
+++ b/test/jsonld/1.1/compact/0071-in.jsonld
@@ -0,0 +1,9 @@
+{
+ "@context": [{
+ "foo": "http://example.com/foo"
+ }, {
+ "bar": "http://example.com/bar"
+ }],
+ "foo": "foo-value",
+ "bar": "bar-value"
+}
diff --git a/test/jsonld/1.1/compact/0071-out.jsonld b/test/jsonld/1.1/compact/0071-out.jsonld
new file mode 100644
index 000000000..e916361ed
--- /dev/null
+++ b/test/jsonld/1.1/compact/0071-out.jsonld
@@ -0,0 +1,7 @@
+{
+ "@context": {
+ "foo": "http://example.com/foo"
+ },
+ "foo": "foo-value",
+ "http://example.com/bar": "bar-value"
+}
diff --git a/test/jsonld/1.1/compact/0072-context.jsonld b/test/jsonld/1.1/compact/0072-context.jsonld
new file mode 100644
index 000000000..0026dacf0
--- /dev/null
+++ b/test/jsonld/1.1/compact/0072-context.jsonld
@@ -0,0 +1,5 @@
+{
+ "@context": {
+ "@language": "en"
+ }
+}
diff --git a/test/jsonld/1.1/compact/0072-in.jsonld b/test/jsonld/1.1/compact/0072-in.jsonld
new file mode 100644
index 000000000..35f7cdd3e
--- /dev/null
+++ b/test/jsonld/1.1/compact/0072-in.jsonld
@@ -0,0 +1,3 @@
+{
+ "http://example.com/foo": "foo-value"
+}
diff --git a/test/jsonld/1.1/compact/0072-out.jsonld b/test/jsonld/1.1/compact/0072-out.jsonld
new file mode 100644
index 000000000..298459cf7
--- /dev/null
+++ b/test/jsonld/1.1/compact/0072-out.jsonld
@@ -0,0 +1,8 @@
+{
+ "http://example.com/foo": {
+ "@value": "foo-value"
+ },
+ "@context": {
+ "@language": "en"
+ }
+}
diff --git a/test/jsonld/1.1/compact/0073-context.jsonld b/test/jsonld/1.1/compact/0073-context.jsonld
new file mode 100644
index 000000000..6ec724ad9
--- /dev/null
+++ b/test/jsonld/1.1/compact/0073-context.jsonld
@@ -0,0 +1,6 @@
+{
+ "@context": {
+ "id": {"@type": "@id", "@id": "@id"},
+ "type": {"@type": "@id", "@id": "@type"}
+ }
+}
diff --git a/test/jsonld/1.1/compact/0073-in.jsonld b/test/jsonld/1.1/compact/0073-in.jsonld
new file mode 100644
index 000000000..6891f6608
--- /dev/null
+++ b/test/jsonld/1.1/compact/0073-in.jsonld
@@ -0,0 +1,8 @@
+{
+ "@context": {
+ "id": {"@type": "@id", "@id": "@id"},
+ "type": {"@type": "@id", "@id": "@type"}
+ },
+ "id": "http://example.org/anno9",
+ "type": "http://example.org/Annotation"
+}
diff --git a/test/jsonld/1.1/compact/0073-out.jsonld b/test/jsonld/1.1/compact/0073-out.jsonld
new file mode 100644
index 000000000..55fd24049
--- /dev/null
+++ b/test/jsonld/1.1/compact/0073-out.jsonld
@@ -0,0 +1,14 @@
+{
+ "@context": {
+ "id": {
+ "@type": "@id",
+ "@id": "@id"
+ },
+ "type": {
+ "@type": "@id",
+ "@id": "@type"
+ }
+ },
+ "id": "http://example.org/anno9",
+ "type": "http://example.org/Annotation"
+}
diff --git a/test/jsonld/1.1/compact/0074-context.jsonld b/test/jsonld/1.1/compact/0074-context.jsonld
new file mode 100644
index 000000000..9109cf99f
--- /dev/null
+++ b/test/jsonld/1.1/compact/0074-context.jsonld
@@ -0,0 +1,9 @@
+{
+ "@context": {
+ "name": {
+ "@type": "@id",
+ "@container": "@list",
+ "@id": "https://schema.org/name"
+ }
+ }
+}
diff --git a/test/jsonld/1.1/compact/0074-in.jsonld b/test/jsonld/1.1/compact/0074-in.jsonld
new file mode 100644
index 000000000..a89d800ba
--- /dev/null
+++ b/test/jsonld/1.1/compact/0074-in.jsonld
@@ -0,0 +1,10 @@
+{
+ "@context": {
+ "name": {
+ "@type": "@id",
+ "@container": "@list",
+ "@id": "https://schema.org/name"
+ }
+ },
+ "name": []
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/0074-out.jsonld b/test/jsonld/1.1/compact/0074-out.jsonld
new file mode 100644
index 000000000..a89d800ba
--- /dev/null
+++ b/test/jsonld/1.1/compact/0074-out.jsonld
@@ -0,0 +1,10 @@
+{
+ "@context": {
+ "name": {
+ "@type": "@id",
+ "@container": "@list",
+ "@id": "https://schema.org/name"
+ }
+ },
+ "name": []
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/0075-context.jsonld b/test/jsonld/1.1/compact/0075-context.jsonld
new file mode 100644
index 000000000..fa9203694
--- /dev/null
+++ b/test/jsonld/1.1/compact/0075-context.jsonld
@@ -0,0 +1,5 @@
+{
+ "@context": {
+ "ns": "http://example.com/core#"
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/0075-in.jsonld b/test/jsonld/1.1/compact/0075-in.jsonld
new file mode 100644
index 000000000..593402c52
--- /dev/null
+++ b/test/jsonld/1.1/compact/0075-in.jsonld
@@ -0,0 +1,3 @@
+{
+ "http://example.com/core#associated": { "@id": "#Light"}
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/0075-out.jsonld b/test/jsonld/1.1/compact/0075-out.jsonld
new file mode 100644
index 000000000..2a0a7b891
--- /dev/null
+++ b/test/jsonld/1.1/compact/0075-out.jsonld
@@ -0,0 +1,8 @@
+{
+ "@context": {
+ "ns": "http://example.com/core#"
+ },
+ "ns:associated": {
+ "@id": "#Light"
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/0076-context.jsonld b/test/jsonld/1.1/compact/0076-context.jsonld
new file mode 100644
index 000000000..8be5b7aa8
--- /dev/null
+++ b/test/jsonld/1.1/compact/0076-context.jsonld
@@ -0,0 +1,3 @@
+{
+ "@context": {"@base": "http://example.com/api/things/1"}
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/0076-in.jsonld b/test/jsonld/1.1/compact/0076-in.jsonld
new file mode 100644
index 000000000..38c603711
--- /dev/null
+++ b/test/jsonld/1.1/compact/0076-in.jsonld
@@ -0,0 +1,4 @@
+{
+ "@id": "http://example.com/api/things/1",
+ "http://example.com": ""
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/0076-out.jsonld b/test/jsonld/1.1/compact/0076-out.jsonld
new file mode 100644
index 000000000..039d4c484
--- /dev/null
+++ b/test/jsonld/1.1/compact/0076-out.jsonld
@@ -0,0 +1,5 @@
+{
+ "@context": {"@base": "http://example.com/api/things/1"},
+ "@id": "1",
+ "http://example.com": ""
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/0077-context.jsonld b/test/jsonld/1.1/compact/0077-context.jsonld
new file mode 100644
index 000000000..f44755919
--- /dev/null
+++ b/test/jsonld/1.1/compact/0077-context.jsonld
@@ -0,0 +1,7 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "input": {"@id": "foo:input", "@container": "@graph"},
+ "value": "foo:value"
+ }
+}
diff --git a/test/jsonld/1.1/compact/0077-in.jsonld b/test/jsonld/1.1/compact/0077-in.jsonld
new file mode 100644
index 000000000..8514ced21
--- /dev/null
+++ b/test/jsonld/1.1/compact/0077-in.jsonld
@@ -0,0 +1,10 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "input": {"@id": "foo:input", "@container": "@graph"},
+ "value": "foo:value"
+ },
+ "input": {
+ "value": "x"
+ }
+}
diff --git a/test/jsonld/1.1/compact/0077-out.jsonld b/test/jsonld/1.1/compact/0077-out.jsonld
new file mode 100644
index 000000000..3f44ffbb9
--- /dev/null
+++ b/test/jsonld/1.1/compact/0077-out.jsonld
@@ -0,0 +1,13 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "input": {
+ "@id": "foo:input",
+ "@container": "@graph"
+ },
+ "value": "foo:value"
+ },
+ "input": {
+ "value": "x"
+ }
+}
diff --git a/test/jsonld/1.1/compact/0078-context.jsonld b/test/jsonld/1.1/compact/0078-context.jsonld
new file mode 100644
index 000000000..6b66ae3ec
--- /dev/null
+++ b/test/jsonld/1.1/compact/0078-context.jsonld
@@ -0,0 +1,7 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "input": {"@id": "foo:input", "@container": ["@graph", "@set"]},
+ "value": "foo:value"
+ }
+}
diff --git a/test/jsonld/1.1/compact/0078-in.jsonld b/test/jsonld/1.1/compact/0078-in.jsonld
new file mode 100644
index 000000000..8514ced21
--- /dev/null
+++ b/test/jsonld/1.1/compact/0078-in.jsonld
@@ -0,0 +1,10 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "input": {"@id": "foo:input", "@container": "@graph"},
+ "value": "foo:value"
+ },
+ "input": {
+ "value": "x"
+ }
+}
diff --git a/test/jsonld/1.1/compact/0078-out.jsonld b/test/jsonld/1.1/compact/0078-out.jsonld
new file mode 100644
index 000000000..b283b6fee
--- /dev/null
+++ b/test/jsonld/1.1/compact/0078-out.jsonld
@@ -0,0 +1,13 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "input": {
+ "@id": "foo:input",
+ "@container": ["@graph", "@set"]
+ },
+ "value": "foo:value"
+ },
+ "input": [{
+ "value": "x"
+ }]
+}
diff --git a/test/jsonld/1.1/compact/0079-context.jsonld b/test/jsonld/1.1/compact/0079-context.jsonld
new file mode 100644
index 000000000..24bd02450
--- /dev/null
+++ b/test/jsonld/1.1/compact/0079-context.jsonld
@@ -0,0 +1,6 @@
+{
+ "@context": {
+ "@vocab": "http://example.org/",
+ "input": {"@container": "@graph"}
+ }
+}
diff --git a/test/jsonld/1.1/compact/0079-in.jsonld b/test/jsonld/1.1/compact/0079-in.jsonld
new file mode 100644
index 000000000..e34a943bf
--- /dev/null
+++ b/test/jsonld/1.1/compact/0079-in.jsonld
@@ -0,0 +1,8 @@
+[{
+ "http://example.org/input": [{
+ "@graph": [{
+ "http://example.org/value": [{"@value": "x"}]
+ }],
+ "@index": "ndx"
+ }]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/0079-out.jsonld b/test/jsonld/1.1/compact/0079-out.jsonld
new file mode 100644
index 000000000..f7c67f80f
--- /dev/null
+++ b/test/jsonld/1.1/compact/0079-out.jsonld
@@ -0,0 +1,9 @@
+{
+ "@context": {
+ "@vocab": "http://example.org/",
+ "input": {"@container": "@graph"}
+ },
+ "input": {
+ "value": "x"
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/0080-context.jsonld b/test/jsonld/1.1/compact/0080-context.jsonld
new file mode 100644
index 000000000..24bd02450
--- /dev/null
+++ b/test/jsonld/1.1/compact/0080-context.jsonld
@@ -0,0 +1,6 @@
+{
+ "@context": {
+ "@vocab": "http://example.org/",
+ "input": {"@container": "@graph"}
+ }
+}
diff --git a/test/jsonld/1.1/compact/0080-in.jsonld b/test/jsonld/1.1/compact/0080-in.jsonld
new file mode 100644
index 000000000..369917c85
--- /dev/null
+++ b/test/jsonld/1.1/compact/0080-in.jsonld
@@ -0,0 +1,8 @@
+[{
+ "http://example.org/input": [{
+ "@id": "http://example.org/gid",
+ "@graph": [{
+ "http://example.org/value": [{"@value": "x"}]
+ }]
+ }]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/0080-out.jsonld b/test/jsonld/1.1/compact/0080-out.jsonld
new file mode 100644
index 000000000..53d524d35
--- /dev/null
+++ b/test/jsonld/1.1/compact/0080-out.jsonld
@@ -0,0 +1,10 @@
+{
+ "@context": {
+ "@vocab": "http://example.org/",
+ "input": {"@container": "@graph"}
+ },
+ "input": {
+ "@id": "http://example.org/gid",
+ "@graph": {"value": "x"}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/0081-context.jsonld b/test/jsonld/1.1/compact/0081-context.jsonld
new file mode 100644
index 000000000..5db515f32
--- /dev/null
+++ b/test/jsonld/1.1/compact/0081-context.jsonld
@@ -0,0 +1,6 @@
+{
+ "@context": {
+ "@vocab": "http://example.org/",
+ "input": {"@container": ["@graph", "@index"]}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/0081-in.jsonld b/test/jsonld/1.1/compact/0081-in.jsonld
new file mode 100644
index 000000000..dfc5b0aa1
--- /dev/null
+++ b/test/jsonld/1.1/compact/0081-in.jsonld
@@ -0,0 +1,8 @@
+[{
+ "http://example.org/input": [{
+ "@index": "g1",
+ "@graph": [{
+ "http://example.org/value": [{"@value": "x"}]
+ }]
+ }]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/0081-out.jsonld b/test/jsonld/1.1/compact/0081-out.jsonld
new file mode 100644
index 000000000..83d3182ba
--- /dev/null
+++ b/test/jsonld/1.1/compact/0081-out.jsonld
@@ -0,0 +1,9 @@
+{
+ "@context": {
+ "@vocab": "http://example.org/",
+ "input": {"@container": ["@graph", "@index"]}
+ },
+ "input": {
+ "g1": {"value": "x"}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/0082-context.jsonld b/test/jsonld/1.1/compact/0082-context.jsonld
new file mode 100644
index 000000000..f12919ce1
--- /dev/null
+++ b/test/jsonld/1.1/compact/0082-context.jsonld
@@ -0,0 +1,6 @@
+{
+ "@context": {
+ "@vocab": "http://example.org/",
+ "input": {"@container": ["@graph", "@index", "@set"]}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/0082-in.jsonld b/test/jsonld/1.1/compact/0082-in.jsonld
new file mode 100644
index 000000000..dfc5b0aa1
--- /dev/null
+++ b/test/jsonld/1.1/compact/0082-in.jsonld
@@ -0,0 +1,8 @@
+[{
+ "http://example.org/input": [{
+ "@index": "g1",
+ "@graph": [{
+ "http://example.org/value": [{"@value": "x"}]
+ }]
+ }]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/0082-out.jsonld b/test/jsonld/1.1/compact/0082-out.jsonld
new file mode 100644
index 000000000..02b54e3d6
--- /dev/null
+++ b/test/jsonld/1.1/compact/0082-out.jsonld
@@ -0,0 +1,9 @@
+{
+ "@context": {
+ "@vocab": "http://example.org/",
+ "input": {"@container": ["@graph", "@index", "@set"]}
+ },
+ "input": {
+ "g1": [{"value": "x"}]
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/0083-context.jsonld b/test/jsonld/1.1/compact/0083-context.jsonld
new file mode 100644
index 000000000..5db515f32
--- /dev/null
+++ b/test/jsonld/1.1/compact/0083-context.jsonld
@@ -0,0 +1,6 @@
+{
+ "@context": {
+ "@vocab": "http://example.org/",
+ "input": {"@container": ["@graph", "@index"]}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/0083-in.jsonld b/test/jsonld/1.1/compact/0083-in.jsonld
new file mode 100644
index 000000000..d362e26ab
--- /dev/null
+++ b/test/jsonld/1.1/compact/0083-in.jsonld
@@ -0,0 +1,9 @@
+[{
+ "http://example.org/input": [{
+ "@graph": [{
+ "http://example.org/value": [{"@value": "x"}]
+ }],
+ "@index": "g1",
+ "@id": "http://example.org/id"
+ }]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/0083-out.jsonld b/test/jsonld/1.1/compact/0083-out.jsonld
new file mode 100644
index 000000000..d7d42dfb1
--- /dev/null
+++ b/test/jsonld/1.1/compact/0083-out.jsonld
@@ -0,0 +1,11 @@
+{
+ "@context": {
+ "@vocab": "http://example.org/",
+ "input": {"@container": ["@graph", "@index"]}
+ },
+ "input": {
+ "@id": "http://example.org/id",
+ "@index": "g1",
+ "@graph": {"value": "x"}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/0084-context.jsonld b/test/jsonld/1.1/compact/0084-context.jsonld
new file mode 100644
index 000000000..2de136b02
--- /dev/null
+++ b/test/jsonld/1.1/compact/0084-context.jsonld
@@ -0,0 +1,6 @@
+{
+ "@context": {
+ "@vocab": "http://example.org/",
+ "input": {"@container": ["@graph", "@id"]}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/0084-in.jsonld b/test/jsonld/1.1/compact/0084-in.jsonld
new file mode 100644
index 000000000..e01c12ee5
--- /dev/null
+++ b/test/jsonld/1.1/compact/0084-in.jsonld
@@ -0,0 +1,7 @@
+[{
+ "http://example.org/input": [{
+ "@graph": [{
+ "http://example.org/value": [{"@value": "x"}]
+ }]
+ }]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/0084-out.jsonld b/test/jsonld/1.1/compact/0084-out.jsonld
new file mode 100644
index 000000000..6594c8d68
--- /dev/null
+++ b/test/jsonld/1.1/compact/0084-out.jsonld
@@ -0,0 +1,9 @@
+{
+ "@context": {
+ "@vocab": "http://example.org/",
+ "input": {"@container": ["@graph", "@id"]}
+ },
+ "input": {
+ "@none": {"value": "x"}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/0085-context.jsonld b/test/jsonld/1.1/compact/0085-context.jsonld
new file mode 100644
index 000000000..2de136b02
--- /dev/null
+++ b/test/jsonld/1.1/compact/0085-context.jsonld
@@ -0,0 +1,6 @@
+{
+ "@context": {
+ "@vocab": "http://example.org/",
+ "input": {"@container": ["@graph", "@id"]}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/0085-in.jsonld b/test/jsonld/1.1/compact/0085-in.jsonld
new file mode 100644
index 000000000..67441b87b
--- /dev/null
+++ b/test/jsonld/1.1/compact/0085-in.jsonld
@@ -0,0 +1,8 @@
+[{
+ "http://example.org/input": [{
+ "@graph": [{
+ "http://example.org/value": [{"@value": "x"}]
+ }],
+ "@id": "http://example.org/id"
+ }]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/0085-out.jsonld b/test/jsonld/1.1/compact/0085-out.jsonld
new file mode 100644
index 000000000..274777bf4
--- /dev/null
+++ b/test/jsonld/1.1/compact/0085-out.jsonld
@@ -0,0 +1,9 @@
+{
+ "@context": {
+ "@vocab": "http://example.org/",
+ "input": {"@container": ["@graph", "@id"]}
+ },
+ "input": {
+ "http://example.org/id" : {"value": "x"}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/0086-context.jsonld b/test/jsonld/1.1/compact/0086-context.jsonld
new file mode 100644
index 000000000..5b7f15037
--- /dev/null
+++ b/test/jsonld/1.1/compact/0086-context.jsonld
@@ -0,0 +1,6 @@
+{
+ "@context": {
+ "@vocab": "http://example.org/",
+ "input": {"@container": ["@graph", "@id", "@set"]}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/0086-in.jsonld b/test/jsonld/1.1/compact/0086-in.jsonld
new file mode 100644
index 000000000..e01c12ee5
--- /dev/null
+++ b/test/jsonld/1.1/compact/0086-in.jsonld
@@ -0,0 +1,7 @@
+[{
+ "http://example.org/input": [{
+ "@graph": [{
+ "http://example.org/value": [{"@value": "x"}]
+ }]
+ }]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/0086-out.jsonld b/test/jsonld/1.1/compact/0086-out.jsonld
new file mode 100644
index 000000000..870273bd3
--- /dev/null
+++ b/test/jsonld/1.1/compact/0086-out.jsonld
@@ -0,0 +1,7 @@
+{
+ "@context": {
+ "@vocab": "http://example.org/",
+ "input": {"@container": ["@graph", "@id", "@set"]}
+ },
+ "input": {"@none": [{"value": "x"}]}
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/0087-context.jsonld b/test/jsonld/1.1/compact/0087-context.jsonld
new file mode 100644
index 000000000..5b7f15037
--- /dev/null
+++ b/test/jsonld/1.1/compact/0087-context.jsonld
@@ -0,0 +1,6 @@
+{
+ "@context": {
+ "@vocab": "http://example.org/",
+ "input": {"@container": ["@graph", "@id", "@set"]}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/0087-in.jsonld b/test/jsonld/1.1/compact/0087-in.jsonld
new file mode 100644
index 000000000..67441b87b
--- /dev/null
+++ b/test/jsonld/1.1/compact/0087-in.jsonld
@@ -0,0 +1,8 @@
+[{
+ "http://example.org/input": [{
+ "@graph": [{
+ "http://example.org/value": [{"@value": "x"}]
+ }],
+ "@id": "http://example.org/id"
+ }]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/0087-out.jsonld b/test/jsonld/1.1/compact/0087-out.jsonld
new file mode 100644
index 000000000..d8420e595
--- /dev/null
+++ b/test/jsonld/1.1/compact/0087-out.jsonld
@@ -0,0 +1,9 @@
+{
+ "@context": {
+ "@vocab": "http://example.org/",
+ "input": {"@container": ["@graph", "@id", "@set"]}
+ },
+ "input": {
+ "http://example.org/id" : [{"value": "x"}]
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/0088-context.jsonld b/test/jsonld/1.1/compact/0088-context.jsonld
new file mode 100644
index 000000000..2de136b02
--- /dev/null
+++ b/test/jsonld/1.1/compact/0088-context.jsonld
@@ -0,0 +1,6 @@
+{
+ "@context": {
+ "@vocab": "http://example.org/",
+ "input": {"@container": ["@graph", "@id"]}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/0088-in.jsonld b/test/jsonld/1.1/compact/0088-in.jsonld
new file mode 100644
index 000000000..e34a943bf
--- /dev/null
+++ b/test/jsonld/1.1/compact/0088-in.jsonld
@@ -0,0 +1,8 @@
+[{
+ "http://example.org/input": [{
+ "@graph": [{
+ "http://example.org/value": [{"@value": "x"}]
+ }],
+ "@index": "ndx"
+ }]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/0088-out.jsonld b/test/jsonld/1.1/compact/0088-out.jsonld
new file mode 100644
index 000000000..6594c8d68
--- /dev/null
+++ b/test/jsonld/1.1/compact/0088-out.jsonld
@@ -0,0 +1,9 @@
+{
+ "@context": {
+ "@vocab": "http://example.org/",
+ "input": {"@container": ["@graph", "@id"]}
+ },
+ "input": {
+ "@none": {"value": "x"}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/0089-context.jsonld b/test/jsonld/1.1/compact/0089-context.jsonld
new file mode 100644
index 000000000..c496190b5
--- /dev/null
+++ b/test/jsonld/1.1/compact/0089-context.jsonld
@@ -0,0 +1,10 @@
+{
+ "@context": {
+ "@vocab": "http://example.com/vocab/",
+ "@language": "it",
+ "s": { "@id": "label", "@language": null },
+ "label": {
+ "@container": "@language"
+ }
+ }
+}
diff --git a/test/jsonld/1.1/compact/0089-in.jsonld b/test/jsonld/1.1/compact/0089-in.jsonld
new file mode 100644
index 000000000..3224cac4c
--- /dev/null
+++ b/test/jsonld/1.1/compact/0089-in.jsonld
@@ -0,0 +1,23 @@
+[{
+ "@id": "http://example.com/queen",
+ "http://example.com/vocab/label": [
+ {
+ "@value": "Il re",
+ "@language": "it"
+ }, {
+ "@value": "The king",
+ "@language": "en"
+ }, {
+ "@value": "The Queen",
+ "@language": "en"
+ }, {
+ "@value": "Die Königin",
+ "@language": "de"
+ }, {
+ "@value": "Ihre Majestät",
+ "@language": "de"
+ }, {
+ "@value": "No Language"
+ }
+ ]
+}]
diff --git a/test/jsonld/1.1/compact/0089-out.jsonld b/test/jsonld/1.1/compact/0089-out.jsonld
new file mode 100644
index 000000000..0e0188801
--- /dev/null
+++ b/test/jsonld/1.1/compact/0089-out.jsonld
@@ -0,0 +1,17 @@
+{
+ "@context": {
+ "@vocab": "http://example.com/vocab/",
+ "@language": "it",
+ "s": { "@id": "label", "@language": null },
+ "label": {
+ "@container": "@language"
+ }
+ },
+ "@id": "http://example.com/queen",
+ "label": {
+ "it": "Il re",
+ "en": [ "The king", "The Queen" ],
+ "de": [ "Die Königin", "Ihre Majestät" ]
+ },
+ "s": "No Language"
+}
diff --git a/test/jsonld/1.1/compact/0090-context.jsonld b/test/jsonld/1.1/compact/0090-context.jsonld
new file mode 100644
index 000000000..09a8981a2
--- /dev/null
+++ b/test/jsonld/1.1/compact/0090-context.jsonld
@@ -0,0 +1,7 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "input": "foo:input",
+ "value": "foo:value"
+ }
+}
diff --git a/test/jsonld/1.1/compact/0090-in.jsonld b/test/jsonld/1.1/compact/0090-in.jsonld
new file mode 100644
index 000000000..8514ced21
--- /dev/null
+++ b/test/jsonld/1.1/compact/0090-in.jsonld
@@ -0,0 +1,10 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "input": {"@id": "foo:input", "@container": "@graph"},
+ "value": "foo:value"
+ },
+ "input": {
+ "value": "x"
+ }
+}
diff --git a/test/jsonld/1.1/compact/0090-out.jsonld b/test/jsonld/1.1/compact/0090-out.jsonld
new file mode 100644
index 000000000..42e31005b
--- /dev/null
+++ b/test/jsonld/1.1/compact/0090-out.jsonld
@@ -0,0 +1,12 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "input": "foo:input",
+ "value": "foo:value"
+ },
+ "input": {
+ "@graph": {
+ "value": "x"
+ }
+ }
+}
diff --git a/test/jsonld/1.1/compact/0091-context.jsonld b/test/jsonld/1.1/compact/0091-context.jsonld
new file mode 100644
index 000000000..d6538be3a
--- /dev/null
+++ b/test/jsonld/1.1/compact/0091-context.jsonld
@@ -0,0 +1,7 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "input": "foo:input",
+ "value": "foo:value"
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/0091-in.jsonld b/test/jsonld/1.1/compact/0091-in.jsonld
new file mode 100644
index 000000000..4d7ff5110
--- /dev/null
+++ b/test/jsonld/1.1/compact/0091-in.jsonld
@@ -0,0 +1,10 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "input": {"@id": "foo:input", "@container": "@graph"},
+ "value": "foo:value"
+ },
+ "input": {
+ "value": "x"
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/0091-out.jsonld b/test/jsonld/1.1/compact/0091-out.jsonld
new file mode 100644
index 000000000..21df3f711
--- /dev/null
+++ b/test/jsonld/1.1/compact/0091-out.jsonld
@@ -0,0 +1,14 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "input": "foo:input",
+ "value": "foo:value"
+ },
+ "@graph": [{
+ "input": [{
+ "@graph": [{
+ "value": ["x"]
+ }]
+ }]
+ }]
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/0092-context.jsonld b/test/jsonld/1.1/compact/0092-context.jsonld
new file mode 100644
index 000000000..09a8981a2
--- /dev/null
+++ b/test/jsonld/1.1/compact/0092-context.jsonld
@@ -0,0 +1,7 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "input": "foo:input",
+ "value": "foo:value"
+ }
+}
diff --git a/test/jsonld/1.1/compact/0092-in.jsonld b/test/jsonld/1.1/compact/0092-in.jsonld
new file mode 100644
index 000000000..f439807e3
--- /dev/null
+++ b/test/jsonld/1.1/compact/0092-in.jsonld
@@ -0,0 +1,12 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "input": {"@id": "foo:input", "@container": ["@graph", "@set"]},
+ "value": "foo:value"
+ },
+ "input": [{
+ "value": "x"
+ }, {
+ "value": "y"
+ }]
+}
diff --git a/test/jsonld/1.1/compact/0092-out.jsonld b/test/jsonld/1.1/compact/0092-out.jsonld
new file mode 100644
index 000000000..21c06e9cc
--- /dev/null
+++ b/test/jsonld/1.1/compact/0092-out.jsonld
@@ -0,0 +1,11 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "input": "foo:input",
+ "value": "foo:value"
+ },
+ "input": [
+ {"@graph": {"value": "x"}},
+ {"@graph": {"value": "y"}}
+ ]
+}
diff --git a/test/jsonld/1.1/compact/0093-context.jsonld b/test/jsonld/1.1/compact/0093-context.jsonld
new file mode 100644
index 000000000..09a8981a2
--- /dev/null
+++ b/test/jsonld/1.1/compact/0093-context.jsonld
@@ -0,0 +1,7 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "input": "foo:input",
+ "value": "foo:value"
+ }
+}
diff --git a/test/jsonld/1.1/compact/0093-in.jsonld b/test/jsonld/1.1/compact/0093-in.jsonld
new file mode 100644
index 000000000..f439807e3
--- /dev/null
+++ b/test/jsonld/1.1/compact/0093-in.jsonld
@@ -0,0 +1,12 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "input": {"@id": "foo:input", "@container": ["@graph", "@set"]},
+ "value": "foo:value"
+ },
+ "input": [{
+ "value": "x"
+ }, {
+ "value": "y"
+ }]
+}
diff --git a/test/jsonld/1.1/compact/0093-out.jsonld b/test/jsonld/1.1/compact/0093-out.jsonld
new file mode 100644
index 000000000..821351706
--- /dev/null
+++ b/test/jsonld/1.1/compact/0093-out.jsonld
@@ -0,0 +1,13 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "input": "foo:input",
+ "value": "foo:value"
+ },
+ "@graph": [{
+ "input": [
+ {"@graph": [{"value": ["x"]}]},
+ {"@graph": [{"value": ["y"]}]}
+ ]
+ }]
+}
diff --git a/test/jsonld/1.1/compact/0094-context.jsonld b/test/jsonld/1.1/compact/0094-context.jsonld
new file mode 100644
index 000000000..09a8981a2
--- /dev/null
+++ b/test/jsonld/1.1/compact/0094-context.jsonld
@@ -0,0 +1,7 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "input": "foo:input",
+ "value": "foo:value"
+ }
+}
diff --git a/test/jsonld/1.1/compact/0094-in.jsonld b/test/jsonld/1.1/compact/0094-in.jsonld
new file mode 100644
index 000000000..8514ced21
--- /dev/null
+++ b/test/jsonld/1.1/compact/0094-in.jsonld
@@ -0,0 +1,10 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "input": {"@id": "foo:input", "@container": "@graph"},
+ "value": "foo:value"
+ },
+ "input": {
+ "value": "x"
+ }
+}
diff --git a/test/jsonld/1.1/compact/0094-out.jsonld b/test/jsonld/1.1/compact/0094-out.jsonld
new file mode 100644
index 000000000..42e31005b
--- /dev/null
+++ b/test/jsonld/1.1/compact/0094-out.jsonld
@@ -0,0 +1,12 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "input": "foo:input",
+ "value": "foo:value"
+ },
+ "input": {
+ "@graph": {
+ "value": "x"
+ }
+ }
+}
diff --git a/test/jsonld/1.1/compact/0095-context.jsonld b/test/jsonld/1.1/compact/0095-context.jsonld
new file mode 100644
index 000000000..3eafcca09
--- /dev/null
+++ b/test/jsonld/1.1/compact/0095-context.jsonld
@@ -0,0 +1,6 @@
+{
+ "@context": {
+ "@base": "http://example.com/some/",
+ "@vocab": ""
+ }
+}
diff --git a/test/jsonld/1.1/compact/0095-in.jsonld b/test/jsonld/1.1/compact/0095-in.jsonld
new file mode 100644
index 000000000..7ebcdd709
--- /dev/null
+++ b/test/jsonld/1.1/compact/0095-in.jsonld
@@ -0,0 +1,13 @@
+[
+ {
+ "@id": "http://example.com/some/deep/directory/and/relativePropertyIris",
+ "http://example.com/absolute": [{"@value": "/absolute"}],
+ "http://example.com/some/deep/directory/": [{"@value": "deep/directory"}],
+ "http://example.com/some/deep/directory/and/": [{"@value": "deep/directory/and/"}],
+ "http://example.com/some/#fragment-works": [{"@value": "#fragment-works"}],
+ "http://example.com/some/?query=works": [{"@value": "?query=works"}],
+ "http://example.com/some/link": [{"@value": "link"}],
+ "http://example.com/some/../parent": [{"@value": "../parent"}],
+ "http://example.com/too-many-dots": [{"@value": "too-many-dots"}]
+ }
+]
diff --git a/test/jsonld/1.1/compact/0095-out.jsonld b/test/jsonld/1.1/compact/0095-out.jsonld
new file mode 100644
index 000000000..1e72be2b4
--- /dev/null
+++ b/test/jsonld/1.1/compact/0095-out.jsonld
@@ -0,0 +1,15 @@
+{
+ "@context": {
+ "@base": "http://example.com/some/",
+ "@vocab": ""
+ },
+ "#fragment-works": "#fragment-works",
+ "../parent": "../parent",
+ "?query=works": "?query=works",
+ "@id": "deep/directory/and/relativePropertyIris",
+ "deep/directory/": "deep/directory",
+ "deep/directory/and/": "deep/directory/and/",
+ "http://example.com/absolute": "/absolute",
+ "http://example.com/too-many-dots": "too-many-dots",
+ "link": "link"
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/0096-context.jsonld b/test/jsonld/1.1/compact/0096-context.jsonld
new file mode 100644
index 000000000..2af65c48d
--- /dev/null
+++ b/test/jsonld/1.1/compact/0096-context.jsonld
@@ -0,0 +1,6 @@
+{
+ "@context": {
+ "input": {"@id": "foo:input", "@container": "@graph"},
+ "value": "foo:value"
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/0096-in.jsonld b/test/jsonld/1.1/compact/0096-in.jsonld
new file mode 100644
index 000000000..5e4e5bd9a
--- /dev/null
+++ b/test/jsonld/1.1/compact/0096-in.jsonld
@@ -0,0 +1,15 @@
+[{
+ "foo:input": [{
+ "@graph": [{
+ "foo:value": [{
+ "@value": "x"
+ }]
+ }]
+ }, {
+ "@graph": [{
+ "foo:value": [{
+ "@value": "y"
+ }]
+ }]
+ }]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/0096-out.jsonld b/test/jsonld/1.1/compact/0096-out.jsonld
new file mode 100644
index 000000000..5fdb9a7a3
--- /dev/null
+++ b/test/jsonld/1.1/compact/0096-out.jsonld
@@ -0,0 +1,11 @@
+{
+ "@context": {
+ "input": {"@id": "foo:input", "@container": "@graph"},
+ "value": "foo:value"
+ },
+ "input": [{
+ "value": "x"
+ }, {
+ "value": "y"
+ }]
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/0097-context.jsonld b/test/jsonld/1.1/compact/0097-context.jsonld
new file mode 100644
index 000000000..c6cb8aa04
--- /dev/null
+++ b/test/jsonld/1.1/compact/0097-context.jsonld
@@ -0,0 +1,6 @@
+{
+ "@context": {
+ "input": {"@id": "foo:input", "@container": ["@graph", "@set"]},
+ "value": "foo:value"
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/0097-in.jsonld b/test/jsonld/1.1/compact/0097-in.jsonld
new file mode 100644
index 000000000..5e4e5bd9a
--- /dev/null
+++ b/test/jsonld/1.1/compact/0097-in.jsonld
@@ -0,0 +1,15 @@
+[{
+ "foo:input": [{
+ "@graph": [{
+ "foo:value": [{
+ "@value": "x"
+ }]
+ }]
+ }, {
+ "@graph": [{
+ "foo:value": [{
+ "@value": "y"
+ }]
+ }]
+ }]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/0097-out.jsonld b/test/jsonld/1.1/compact/0097-out.jsonld
new file mode 100644
index 000000000..148d57222
--- /dev/null
+++ b/test/jsonld/1.1/compact/0097-out.jsonld
@@ -0,0 +1,11 @@
+{
+ "@context": {
+ "input": {"@id": "foo:input", "@container": ["@graph", "@set"]},
+ "value": "foo:value"
+ },
+ "input": [{
+ "value": "x"
+ }, {
+ "value": "y"
+ }]
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/0098-context.jsonld b/test/jsonld/1.1/compact/0098-context.jsonld
new file mode 100644
index 000000000..5db515f32
--- /dev/null
+++ b/test/jsonld/1.1/compact/0098-context.jsonld
@@ -0,0 +1,6 @@
+{
+ "@context": {
+ "@vocab": "http://example.org/",
+ "input": {"@container": ["@graph", "@index"]}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/0098-in.jsonld b/test/jsonld/1.1/compact/0098-in.jsonld
new file mode 100644
index 000000000..6788bb490
--- /dev/null
+++ b/test/jsonld/1.1/compact/0098-in.jsonld
@@ -0,0 +1,13 @@
+[{
+ "http://example.org/input": [{
+ "@index": "g1",
+ "@graph": [{
+ "http://example.org/value": [{"@value": "x"}]
+ }]
+ }, {
+ "@index": "g2",
+ "@graph": [{
+ "http://example.org/value": [{"@value": "y"}]
+ }]
+ }]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/0098-out.jsonld b/test/jsonld/1.1/compact/0098-out.jsonld
new file mode 100644
index 000000000..4c7c6f452
--- /dev/null
+++ b/test/jsonld/1.1/compact/0098-out.jsonld
@@ -0,0 +1,10 @@
+{
+ "@context": {
+ "@vocab": "http://example.org/",
+ "input": {"@container": ["@graph", "@index"]}
+ },
+ "input": {
+ "g1": {"value": "x"},
+ "g2": {"value": "y"}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/0099-context.jsonld b/test/jsonld/1.1/compact/0099-context.jsonld
new file mode 100644
index 000000000..dc5b90030
--- /dev/null
+++ b/test/jsonld/1.1/compact/0099-context.jsonld
@@ -0,0 +1,10 @@
+{
+ "@context": {
+ "@vocab": "http://example.org/",
+ "input": {"@container": ["@graph", "@index", "@set"]}
+ },
+ "input": {
+ "g1": {"value": "x"},
+ "g2": {"value": "y"}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/0099-in.jsonld b/test/jsonld/1.1/compact/0099-in.jsonld
new file mode 100644
index 000000000..6788bb490
--- /dev/null
+++ b/test/jsonld/1.1/compact/0099-in.jsonld
@@ -0,0 +1,13 @@
+[{
+ "http://example.org/input": [{
+ "@index": "g1",
+ "@graph": [{
+ "http://example.org/value": [{"@value": "x"}]
+ }]
+ }, {
+ "@index": "g2",
+ "@graph": [{
+ "http://example.org/value": [{"@value": "y"}]
+ }]
+ }]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/0099-out.jsonld b/test/jsonld/1.1/compact/0099-out.jsonld
new file mode 100644
index 000000000..b7946f08c
--- /dev/null
+++ b/test/jsonld/1.1/compact/0099-out.jsonld
@@ -0,0 +1,10 @@
+{
+ "@context": {
+ "@vocab": "http://example.org/",
+ "input": {"@container": ["@graph", "@index", "@set"]}
+ },
+ "input": {
+ "g1": [{"value": "x"}],
+ "g2": [{"value": "y"}]
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/0100-context.jsonld b/test/jsonld/1.1/compact/0100-context.jsonld
new file mode 100644
index 000000000..2de136b02
--- /dev/null
+++ b/test/jsonld/1.1/compact/0100-context.jsonld
@@ -0,0 +1,6 @@
+{
+ "@context": {
+ "@vocab": "http://example.org/",
+ "input": {"@container": ["@graph", "@id"]}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/0100-in.jsonld b/test/jsonld/1.1/compact/0100-in.jsonld
new file mode 100644
index 000000000..45ce037ee
--- /dev/null
+++ b/test/jsonld/1.1/compact/0100-in.jsonld
@@ -0,0 +1,13 @@
+[{
+ "http://example.org/input": [{
+ "@id": "http://example.com/g1",
+ "@graph": [{
+ "http://example.org/value": [{"@value": "x"}]
+ }]
+ }, {
+ "@id": "http://example.com/g2",
+ "@graph": [{
+ "http://example.org/value": [{"@value": "y"}]
+ }]
+ }]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/0100-out.jsonld b/test/jsonld/1.1/compact/0100-out.jsonld
new file mode 100644
index 000000000..0010e0aa0
--- /dev/null
+++ b/test/jsonld/1.1/compact/0100-out.jsonld
@@ -0,0 +1,10 @@
+{
+ "@context": {
+ "@vocab": "http://example.org/",
+ "input": {"@container": ["@graph", "@id"]}
+ },
+ "input": {
+ "http://example.com/g1": {"value": "x"},
+ "http://example.com/g2": {"value": "y"}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/0101-context.jsonld b/test/jsonld/1.1/compact/0101-context.jsonld
new file mode 100644
index 000000000..5b7f15037
--- /dev/null
+++ b/test/jsonld/1.1/compact/0101-context.jsonld
@@ -0,0 +1,6 @@
+{
+ "@context": {
+ "@vocab": "http://example.org/",
+ "input": {"@container": ["@graph", "@id", "@set"]}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/0101-in.jsonld b/test/jsonld/1.1/compact/0101-in.jsonld
new file mode 100644
index 000000000..45ce037ee
--- /dev/null
+++ b/test/jsonld/1.1/compact/0101-in.jsonld
@@ -0,0 +1,13 @@
+[{
+ "http://example.org/input": [{
+ "@id": "http://example.com/g1",
+ "@graph": [{
+ "http://example.org/value": [{"@value": "x"}]
+ }]
+ }, {
+ "@id": "http://example.com/g2",
+ "@graph": [{
+ "http://example.org/value": [{"@value": "y"}]
+ }]
+ }]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/0101-out.jsonld b/test/jsonld/1.1/compact/0101-out.jsonld
new file mode 100644
index 000000000..c20697c38
--- /dev/null
+++ b/test/jsonld/1.1/compact/0101-out.jsonld
@@ -0,0 +1,10 @@
+{
+ "@context": {
+ "@vocab": "http://example.org/",
+ "input": {"@container": ["@graph", "@id", "@set"]}
+ },
+ "input": {
+ "http://example.com/g1": [{"value": "x"}],
+ "http://example.com/g2": [{"value": "y"}]
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/0102-context.jsonld b/test/jsonld/1.1/compact/0102-context.jsonld
new file mode 100644
index 000000000..5db515f32
--- /dev/null
+++ b/test/jsonld/1.1/compact/0102-context.jsonld
@@ -0,0 +1,6 @@
+{
+ "@context": {
+ "@vocab": "http://example.org/",
+ "input": {"@container": ["@graph", "@index"]}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/0102-in.jsonld b/test/jsonld/1.1/compact/0102-in.jsonld
new file mode 100644
index 000000000..27d2cd885
--- /dev/null
+++ b/test/jsonld/1.1/compact/0102-in.jsonld
@@ -0,0 +1,23 @@
+[{
+ "http://example.org/input": [{
+ "@index": "g1",
+ "@graph": [{
+ "http://example.org/value": [{"@value": "x"}]
+ }]
+ }, {
+ "@index": "g1",
+ "@graph": [{
+ "http://example.org/value": [{"@value": "y"}]
+ }]
+ }, {
+ "@index": "g2",
+ "@graph": [{
+ "http://example.org/value": [{"@value": "a"}]
+ }]
+ }, {
+ "@index": "g2",
+ "@graph": [{
+ "http://example.org/value": [{"@value": "b"}]
+ }]
+ }]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/0102-out.jsonld b/test/jsonld/1.1/compact/0102-out.jsonld
new file mode 100644
index 000000000..3e1c5afa7
--- /dev/null
+++ b/test/jsonld/1.1/compact/0102-out.jsonld
@@ -0,0 +1,10 @@
+{
+ "@context": {
+ "@vocab": "http://example.org/",
+ "input": {"@container": ["@graph", "@index"]}
+ },
+ "input": {
+ "g1": [{"value": "x"}, {"value": "y"}],
+ "g2": [{"value": "a"}, {"value": "b"}]
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/0103-context.jsonld b/test/jsonld/1.1/compact/0103-context.jsonld
new file mode 100644
index 000000000..2de136b02
--- /dev/null
+++ b/test/jsonld/1.1/compact/0103-context.jsonld
@@ -0,0 +1,6 @@
+{
+ "@context": {
+ "@vocab": "http://example.org/",
+ "input": {"@container": ["@graph", "@id"]}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/0103-in.jsonld b/test/jsonld/1.1/compact/0103-in.jsonld
new file mode 100644
index 000000000..a11e1d720
--- /dev/null
+++ b/test/jsonld/1.1/compact/0103-in.jsonld
@@ -0,0 +1,23 @@
+[{
+ "http://example.org/input": [{
+ "@id": "http://example.com/g1",
+ "@graph": [{
+ "http://example.org/value": [{"@value": "x"}]
+ }]
+ }, {
+ "@id": "http://example.com/g1",
+ "@graph": [{
+ "http://example.org/value": [{"@value": "y"}]
+ }]
+ }, {
+ "@id": "http://example.com/g2",
+ "@graph": [{
+ "http://example.org/value": [{"@value": "a"}]
+ }]
+ }, {
+ "@id": "http://example.com/g2",
+ "@graph": [{
+ "http://example.org/value": [{"@value": "b"}]
+ }]
+ }]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/0103-out.jsonld b/test/jsonld/1.1/compact/0103-out.jsonld
new file mode 100644
index 000000000..182c031d9
--- /dev/null
+++ b/test/jsonld/1.1/compact/0103-out.jsonld
@@ -0,0 +1,10 @@
+{
+ "@context": {
+ "@vocab": "http://example.org/",
+ "input": {"@container": ["@graph", "@id"]}
+ },
+ "input": {
+ "http://example.com/g1": [{"value": "x"}, {"value": "y"}],
+ "http://example.com/g2": [{"value": "a"}, {"value": "b"}]
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/0104-context.jsonld b/test/jsonld/1.1/compact/0104-context.jsonld
new file mode 100644
index 000000000..36d7203c4
--- /dev/null
+++ b/test/jsonld/1.1/compact/0104-context.jsonld
@@ -0,0 +1,5 @@
+{
+ "@context": {
+ "@type": {"@container": "@set"}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/0104-in.jsonld b/test/jsonld/1.1/compact/0104-in.jsonld
new file mode 100644
index 000000000..9bcd4848d
--- /dev/null
+++ b/test/jsonld/1.1/compact/0104-in.jsonld
@@ -0,0 +1,3 @@
+{
+ "@type": "http://example.org/type"
+}
diff --git a/test/jsonld/1.1/compact/0104-out.jsonld b/test/jsonld/1.1/compact/0104-out.jsonld
new file mode 100644
index 000000000..8699cfa7c
--- /dev/null
+++ b/test/jsonld/1.1/compact/0104-out.jsonld
@@ -0,0 +1,6 @@
+{
+ "@context": {
+ "@type": {"@container": "@set"}
+ },
+ "@type": ["http://example.org/type"]
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/0105-context.jsonld b/test/jsonld/1.1/compact/0105-context.jsonld
new file mode 100644
index 000000000..5031f856a
--- /dev/null
+++ b/test/jsonld/1.1/compact/0105-context.jsonld
@@ -0,0 +1,5 @@
+{
+ "@context": {
+ "type": {"@id": "@type", "@container": "@set"}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/0105-in.jsonld b/test/jsonld/1.1/compact/0105-in.jsonld
new file mode 100644
index 000000000..9bcd4848d
--- /dev/null
+++ b/test/jsonld/1.1/compact/0105-in.jsonld
@@ -0,0 +1,3 @@
+{
+ "@type": "http://example.org/type"
+}
diff --git a/test/jsonld/1.1/compact/0105-out.jsonld b/test/jsonld/1.1/compact/0105-out.jsonld
new file mode 100644
index 000000000..5595923a5
--- /dev/null
+++ b/test/jsonld/1.1/compact/0105-out.jsonld
@@ -0,0 +1,6 @@
+{
+ "@context": {
+ "type": {"@id": "@type", "@container": "@set"}
+ },
+ "type": ["http://example.org/type"]
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/0106-context.jsonld b/test/jsonld/1.1/compact/0106-context.jsonld
new file mode 100644
index 000000000..5031f856a
--- /dev/null
+++ b/test/jsonld/1.1/compact/0106-context.jsonld
@@ -0,0 +1,5 @@
+{
+ "@context": {
+ "type": {"@id": "@type", "@container": "@set"}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/0106-in.jsonld b/test/jsonld/1.1/compact/0106-in.jsonld
new file mode 100644
index 000000000..9bcd4848d
--- /dev/null
+++ b/test/jsonld/1.1/compact/0106-in.jsonld
@@ -0,0 +1,3 @@
+{
+ "@type": "http://example.org/type"
+}
diff --git a/test/jsonld/1.1/compact/0106-out.jsonld b/test/jsonld/1.1/compact/0106-out.jsonld
new file mode 100644
index 000000000..84326c5c8
--- /dev/null
+++ b/test/jsonld/1.1/compact/0106-out.jsonld
@@ -0,0 +1,6 @@
+{
+ "@context": {
+ "type": {"@id": "@type", "@container": "@set"}
+ },
+ "type": "http://example.org/type"
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/0107-context.jsonld b/test/jsonld/1.1/compact/0107-context.jsonld
new file mode 100644
index 000000000..9a7115ddd
--- /dev/null
+++ b/test/jsonld/1.1/compact/0107-context.jsonld
@@ -0,0 +1,6 @@
+{
+ "@context": {
+ "@base": "http://example.com/some/",
+ "@vocab": "other/"
+ }
+}
diff --git a/test/jsonld/1.1/compact/0107-in.jsonld b/test/jsonld/1.1/compact/0107-in.jsonld
new file mode 100644
index 000000000..13505e4b9
--- /dev/null
+++ b/test/jsonld/1.1/compact/0107-in.jsonld
@@ -0,0 +1,13 @@
+[
+ {
+ "@id": "http://example.com/some/deep/directory/and/relativePropertyIris",
+ "http://example.com/absolute": [{"@value": "/absolute"}],
+ "http://example.com/some/other/deep/directory/": [{"@value": "deep/directory"}],
+ "http://example.com/some/other/deep/directory/and/": [{"@value": "deep/directory/and/"}],
+ "http://example.com/some/other/#fragment-works": [{"@value": "#fragment-works"}],
+ "http://example.com/some/other/?query=works": [{"@value": "?query=works"}],
+ "http://example.com/some/other/link": [{"@value": "link"}],
+ "http://example.com/some/other/../parent": [{"@value": "../parent"}],
+ "http://example.com/too-many-dots": [{"@value": "too-many-dots"}]
+ }
+]
diff --git a/test/jsonld/1.1/compact/0107-out.jsonld b/test/jsonld/1.1/compact/0107-out.jsonld
new file mode 100644
index 000000000..7b9f88381
--- /dev/null
+++ b/test/jsonld/1.1/compact/0107-out.jsonld
@@ -0,0 +1,15 @@
+{
+ "@context": {
+ "@base": "http://example.com/some/",
+ "@vocab": "other/"
+ },
+ "#fragment-works": "#fragment-works",
+ "../parent": "../parent",
+ "?query=works": "?query=works",
+ "@id": "deep/directory/and/relativePropertyIris",
+ "deep/directory/": "deep/directory",
+ "deep/directory/and/": "deep/directory/and/",
+ "http://example.com/absolute": "/absolute",
+ "http://example.com/too-many-dots": "too-many-dots",
+ "link": "link"
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/0108-context.jsonld b/test/jsonld/1.1/compact/0108-context.jsonld
new file mode 100644
index 000000000..71bbb6eb7
--- /dev/null
+++ b/test/jsonld/1.1/compact/0108-context.jsonld
@@ -0,0 +1,6 @@
+{
+ "@context": {
+ "valueOf": "http://example.org/valueOf",
+ "toString": "http://example.org/toString"
+ }
+}
diff --git a/test/jsonld/1.1/compact/0108-in.jsonld b/test/jsonld/1.1/compact/0108-in.jsonld
new file mode 100644
index 000000000..0e26a9df7
--- /dev/null
+++ b/test/jsonld/1.1/compact/0108-in.jsonld
@@ -0,0 +1,8 @@
+{
+ "@context": {
+ "valueOf": "http://example.org/valueOf",
+ "toString": "http://example.org/toString"
+ },
+ "valueOf": "first",
+ "toString": "second"
+}
diff --git a/test/jsonld/1.1/compact/0108-out.jsonld b/test/jsonld/1.1/compact/0108-out.jsonld
new file mode 100644
index 000000000..0e26a9df7
--- /dev/null
+++ b/test/jsonld/1.1/compact/0108-out.jsonld
@@ -0,0 +1,8 @@
+{
+ "@context": {
+ "valueOf": "http://example.org/valueOf",
+ "toString": "http://example.org/toString"
+ },
+ "valueOf": "first",
+ "toString": "second"
+}
diff --git a/test/jsonld/1.1/compact/0109-context.jsonld b/test/jsonld/1.1/compact/0109-context.jsonld
new file mode 100644
index 000000000..2af65c48d
--- /dev/null
+++ b/test/jsonld/1.1/compact/0109-context.jsonld
@@ -0,0 +1,6 @@
+{
+ "@context": {
+ "input": {"@id": "foo:input", "@container": "@graph"},
+ "value": "foo:value"
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/0109-in.jsonld b/test/jsonld/1.1/compact/0109-in.jsonld
new file mode 100644
index 000000000..610470992
--- /dev/null
+++ b/test/jsonld/1.1/compact/0109-in.jsonld
@@ -0,0 +1,8 @@
+[{
+ "foo:input": [{
+ "@graph": [
+ {"foo:value": "x"},
+ {"foo:value": "y"}
+ ]
+ }]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/0109-out.jsonld b/test/jsonld/1.1/compact/0109-out.jsonld
new file mode 100644
index 000000000..3a322f1aa
--- /dev/null
+++ b/test/jsonld/1.1/compact/0109-out.jsonld
@@ -0,0 +1,13 @@
+{
+ "@context": {
+ "input": {"@id": "foo:input", "@container": "@graph"},
+ "value": "foo:value"
+ },
+ "input": {
+ "@included": [{
+ "value": "x"
+ }, {
+ "value": "y"
+ }]
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/0110-context.jsonld b/test/jsonld/1.1/compact/0110-context.jsonld
new file mode 100644
index 000000000..c6cb8aa04
--- /dev/null
+++ b/test/jsonld/1.1/compact/0110-context.jsonld
@@ -0,0 +1,6 @@
+{
+ "@context": {
+ "input": {"@id": "foo:input", "@container": ["@graph", "@set"]},
+ "value": "foo:value"
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/0110-in.jsonld b/test/jsonld/1.1/compact/0110-in.jsonld
new file mode 100644
index 000000000..610470992
--- /dev/null
+++ b/test/jsonld/1.1/compact/0110-in.jsonld
@@ -0,0 +1,8 @@
+[{
+ "foo:input": [{
+ "@graph": [
+ {"foo:value": "x"},
+ {"foo:value": "y"}
+ ]
+ }]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/0110-out.jsonld b/test/jsonld/1.1/compact/0110-out.jsonld
new file mode 100644
index 000000000..328f71b70
--- /dev/null
+++ b/test/jsonld/1.1/compact/0110-out.jsonld
@@ -0,0 +1,13 @@
+{
+ "@context": {
+ "input": {"@id": "foo:input", "@container": ["@graph", "@set"]},
+ "value": "foo:value"
+ },
+ "input": [{
+ "@included": [{
+ "value": "x"
+ }, {
+ "value": "y"
+ }]
+ }]
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/0111-context.jsonld b/test/jsonld/1.1/compact/0111-context.jsonld
new file mode 100644
index 000000000..a829201dd
--- /dev/null
+++ b/test/jsonld/1.1/compact/0111-context.jsonld
@@ -0,0 +1,6 @@
+{
+ "@context": {
+ "ex": "http://example.org/",
+ "@base": "http://localhost/"
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/0111-in.jsonld b/test/jsonld/1.1/compact/0111-in.jsonld
new file mode 100644
index 000000000..39ebe1ea1
--- /dev/null
+++ b/test/jsonld/1.1/compact/0111-in.jsonld
@@ -0,0 +1,5 @@
+{
+ "http://example.org/address": {
+ "@id": "http://localhost/@special"
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/0111-out.jsonld b/test/jsonld/1.1/compact/0111-out.jsonld
new file mode 100644
index 000000000..33e0207a6
--- /dev/null
+++ b/test/jsonld/1.1/compact/0111-out.jsonld
@@ -0,0 +1,9 @@
+{
+ "@context": {
+ "ex": "http://example.org/",
+ "@base": "http://localhost/"
+ },
+ "ex:address": {
+ "@id": "./@special"
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/0112-context.jsonld b/test/jsonld/1.1/compact/0112-context.jsonld
new file mode 100644
index 000000000..5e7e3a3a8
--- /dev/null
+++ b/test/jsonld/1.1/compact/0112-context.jsonld
@@ -0,0 +1,10 @@
+{
+ "@context": {
+ "ex": "http://example.org/ns/",
+ "prop": {
+ "@id": "ex:prop",
+ "@container": "@index",
+ "@index": "ex:name"
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/0112-in.jsonld b/test/jsonld/1.1/compact/0112-in.jsonld
new file mode 100644
index 000000000..6c7c0ed28
--- /dev/null
+++ b/test/jsonld/1.1/compact/0112-in.jsonld
@@ -0,0 +1,9 @@
+{
+ "http://example.org/ns/prop": [{
+ "@id": "http://example.org/ns/bar",
+ "http://example.org/ns/name": "bar"
+ }, {
+ "@id": "http://example.org/ns/foo",
+ "http://example.org/ns/name": "foo"
+ }]
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/0112-out.jsonld b/test/jsonld/1.1/compact/0112-out.jsonld
new file mode 100644
index 000000000..f62d6ed7f
--- /dev/null
+++ b/test/jsonld/1.1/compact/0112-out.jsonld
@@ -0,0 +1,14 @@
+{
+ "@context": {
+ "ex": "http://example.org/ns/",
+ "prop": {
+ "@id": "ex:prop",
+ "@container": "@index",
+ "@index": "ex:name"
+ }
+ },
+ "prop": {
+ "foo": { "@id": "ex:foo"},
+ "bar": { "@id": "ex:bar"}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/0113-context.jsonld b/test/jsonld/1.1/compact/0113-context.jsonld
new file mode 100644
index 000000000..555afce35
--- /dev/null
+++ b/test/jsonld/1.1/compact/0113-context.jsonld
@@ -0,0 +1,10 @@
+{
+ "@context": {
+ "ex": "http://example.org/ns/",
+ "prop": {
+ "@id": "ex:prop",
+ "@container": "@index",
+ "@index": "http://example.org/ns/name"
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/0113-in.jsonld b/test/jsonld/1.1/compact/0113-in.jsonld
new file mode 100644
index 000000000..6c7c0ed28
--- /dev/null
+++ b/test/jsonld/1.1/compact/0113-in.jsonld
@@ -0,0 +1,9 @@
+{
+ "http://example.org/ns/prop": [{
+ "@id": "http://example.org/ns/bar",
+ "http://example.org/ns/name": "bar"
+ }, {
+ "@id": "http://example.org/ns/foo",
+ "http://example.org/ns/name": "foo"
+ }]
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/0113-out.jsonld b/test/jsonld/1.1/compact/0113-out.jsonld
new file mode 100644
index 000000000..7ec4526a9
--- /dev/null
+++ b/test/jsonld/1.1/compact/0113-out.jsonld
@@ -0,0 +1,14 @@
+{
+ "@context": {
+ "ex": "http://example.org/ns/",
+ "prop": {
+ "@id": "ex:prop",
+ "@container": "@index",
+ "@index": "http://example.org/ns/name"
+ }
+ },
+ "prop": {
+ "foo": { "@id": "ex:foo"},
+ "bar": { "@id": "ex:bar"}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/c001-context.jsonld b/test/jsonld/1.1/compact/c001-context.jsonld
new file mode 100644
index 000000000..d46e3f8af
--- /dev/null
+++ b/test/jsonld/1.1/compact/c001-context.jsonld
@@ -0,0 +1,6 @@
+{
+ "@context": {
+ "@vocab": "http://example/",
+ "foo": {"@context": {"bar": "http://example.org/bar"}}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/c001-in.jsonld b/test/jsonld/1.1/compact/c001-in.jsonld
new file mode 100644
index 000000000..bc1e92b5d
--- /dev/null
+++ b/test/jsonld/1.1/compact/c001-in.jsonld
@@ -0,0 +1,3 @@
+[{
+ "http://example/foo": [{"http://example.org/bar": [{"@value": "baz"}]}]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/c001-out.jsonld b/test/jsonld/1.1/compact/c001-out.jsonld
new file mode 100644
index 000000000..04c512099
--- /dev/null
+++ b/test/jsonld/1.1/compact/c001-out.jsonld
@@ -0,0 +1,9 @@
+{
+ "@context": {
+ "@vocab": "http://example/",
+ "foo": {"@context": {"bar": "http://example.org/bar"}}
+ },
+ "foo": {
+ "bar": "baz"
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/c002-context.jsonld b/test/jsonld/1.1/compact/c002-context.jsonld
new file mode 100644
index 000000000..bd95c249a
--- /dev/null
+++ b/test/jsonld/1.1/compact/c002-context.jsonld
@@ -0,0 +1,7 @@
+{
+ "@context": {
+ "@vocab": "http://example/",
+ "foo": {"@context": {"bar": {"@type": "@id"}}},
+ "bar": {"@type": "http://www.w3.org/2001/XMLSchema#string"}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/c002-in.jsonld b/test/jsonld/1.1/compact/c002-in.jsonld
new file mode 100644
index 000000000..acd651e0d
--- /dev/null
+++ b/test/jsonld/1.1/compact/c002-in.jsonld
@@ -0,0 +1,5 @@
+[
+ {
+ "http://example/foo": [{"http://example/bar": [{"@id": "http://example/baz"}]}]
+ }
+]
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/c002-out.jsonld b/test/jsonld/1.1/compact/c002-out.jsonld
new file mode 100644
index 000000000..8121cf37a
--- /dev/null
+++ b/test/jsonld/1.1/compact/c002-out.jsonld
@@ -0,0 +1,10 @@
+{
+ "@context": {
+ "@vocab": "http://example/",
+ "foo": {"@context": {"bar": {"@type": "@id"}}},
+ "bar": {"@type": "http://www.w3.org/2001/XMLSchema#string"}
+ },
+ "foo": {
+ "bar": "http://example/baz"
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/c003-context.jsonld b/test/jsonld/1.1/compact/c003-context.jsonld
new file mode 100644
index 000000000..d8a30cf53
--- /dev/null
+++ b/test/jsonld/1.1/compact/c003-context.jsonld
@@ -0,0 +1,6 @@
+{
+ "@context": {
+ "@vocab": "http://example/",
+ "foo": {"@context": {"Bar": {"@id": "bar"}}}
+ }
+}
diff --git a/test/jsonld/1.1/compact/c003-in.jsonld b/test/jsonld/1.1/compact/c003-in.jsonld
new file mode 100644
index 000000000..020f7a7fe
--- /dev/null
+++ b/test/jsonld/1.1/compact/c003-in.jsonld
@@ -0,0 +1,9 @@
+[
+ {
+ "http://example/foo": [{
+ "http://example/bar": [
+ {"@value": "baz"}
+ ]}
+ ]
+ }
+]
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/c003-out.jsonld b/test/jsonld/1.1/compact/c003-out.jsonld
new file mode 100644
index 000000000..447ded335
--- /dev/null
+++ b/test/jsonld/1.1/compact/c003-out.jsonld
@@ -0,0 +1,9 @@
+{
+ "@context": {
+ "@vocab": "http://example/",
+ "foo": {"@context": {"Bar": {"@id": "bar"}}}
+ },
+ "foo": {
+ "Bar": "baz"
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/c004-context.jsonld b/test/jsonld/1.1/compact/c004-context.jsonld
new file mode 100644
index 000000000..fef925871
--- /dev/null
+++ b/test/jsonld/1.1/compact/c004-context.jsonld
@@ -0,0 +1,6 @@
+{
+ "@context": {
+ "@vocab": "http://example/",
+ "foo": {"@context": {"baz": {"@type": "@id"}}}
+ }
+}
diff --git a/test/jsonld/1.1/compact/c004-in.jsonld b/test/jsonld/1.1/compact/c004-in.jsonld
new file mode 100644
index 000000000..118a214f7
--- /dev/null
+++ b/test/jsonld/1.1/compact/c004-in.jsonld
@@ -0,0 +1,9 @@
+[
+ {
+ "http://example/foo": [{
+ "http://example/bar": [{
+ "http://example/baz": [{"@id": "buzz"}]
+ }]
+ }]
+ }
+]
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/c004-out.jsonld b/test/jsonld/1.1/compact/c004-out.jsonld
new file mode 100644
index 000000000..26dbeb551
--- /dev/null
+++ b/test/jsonld/1.1/compact/c004-out.jsonld
@@ -0,0 +1,11 @@
+{
+ "@context": {
+ "@vocab": "http://example/",
+ "foo": {"@context": {"baz": {"@type": "@id"}}}
+ },
+ "foo": {
+ "bar": {
+ "baz": "buzz"
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/c005-context.jsonld b/test/jsonld/1.1/compact/c005-context.jsonld
new file mode 100644
index 000000000..79c0921a9
--- /dev/null
+++ b/test/jsonld/1.1/compact/c005-context.jsonld
@@ -0,0 +1,6 @@
+{
+ "@context": {
+ "@vocab": "http://example/",
+ "b": {"@context": {"c": "http://example.org/c"}}
+ }
+}
diff --git a/test/jsonld/1.1/compact/c005-in.jsonld b/test/jsonld/1.1/compact/c005-in.jsonld
new file mode 100644
index 000000000..b46a9280c
--- /dev/null
+++ b/test/jsonld/1.1/compact/c005-in.jsonld
@@ -0,0 +1,10 @@
+[{
+ "http://example/a": [{
+ "http://example.com/c": [{"@value": "C in example.com"}],
+ "http://example/b": [{
+ "http://example.com/a": [{"@value": "A in example.com"}],
+ "http://example.org/c": [{"@value": "C in example.org"}]
+ }]
+ }],
+ "http://example/c": [{"@value": "C in example"}]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/c005-out.jsonld b/test/jsonld/1.1/compact/c005-out.jsonld
new file mode 100644
index 000000000..d4f642c73
--- /dev/null
+++ b/test/jsonld/1.1/compact/c005-out.jsonld
@@ -0,0 +1,14 @@
+{
+ "@context": {
+ "@vocab": "http://example/",
+ "b": {"@context": {"c": "http://example.org/c"}}
+ },
+ "a": {
+ "b": {
+ "c": "C in example.org",
+ "http://example.com/a": "A in example.com"
+ },
+ "http://example.com/c": "C in example.com"
+ },
+ "c": "C in example"
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/c006-context.jsonld b/test/jsonld/1.1/compact/c006-context.jsonld
new file mode 100644
index 000000000..6007891a7
--- /dev/null
+++ b/test/jsonld/1.1/compact/c006-context.jsonld
@@ -0,0 +1,6 @@
+{
+ "@context": {
+ "@vocab": "http://example/",
+ "Foo": {"@context": {"bar": "http://example.org/bar"}}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/c006-in.jsonld b/test/jsonld/1.1/compact/c006-in.jsonld
new file mode 100644
index 000000000..16baea770
--- /dev/null
+++ b/test/jsonld/1.1/compact/c006-in.jsonld
@@ -0,0 +1,8 @@
+[
+ {
+ "http://example/a": [{
+ "@type": ["http://example/Foo"],
+ "http://example.org/bar": [{"@value": "baz"}]
+ }]
+ }
+]
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/c006-out.jsonld b/test/jsonld/1.1/compact/c006-out.jsonld
new file mode 100644
index 000000000..757aeaa11
--- /dev/null
+++ b/test/jsonld/1.1/compact/c006-out.jsonld
@@ -0,0 +1,7 @@
+{
+ "@context": {
+ "@vocab": "http://example/",
+ "Foo": {"@context": {"bar": "http://example.org/bar"}}
+ },
+ "a": {"@type": "Foo", "bar": "baz"}
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/c007-context.jsonld b/test/jsonld/1.1/compact/c007-context.jsonld
new file mode 100644
index 000000000..dcaf0666c
--- /dev/null
+++ b/test/jsonld/1.1/compact/c007-context.jsonld
@@ -0,0 +1,7 @@
+{
+ "@context": {
+ "@vocab": "http://example/",
+ "Foo": {"@context": {"bar": {"@type": "@id"}}},
+ "bar": {"@type": "http://www.w3.org/2001/XMLSchema#string"}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/c007-in.jsonld b/test/jsonld/1.1/compact/c007-in.jsonld
new file mode 100644
index 000000000..c173b8948
--- /dev/null
+++ b/test/jsonld/1.1/compact/c007-in.jsonld
@@ -0,0 +1,8 @@
+[
+ {
+ "http://example/a": [{
+ "@type": ["http://example/Foo"],
+ "http://example/bar": [{"@id": "http://example/baz"}]
+ }]
+ }
+]
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/c007-out.jsonld b/test/jsonld/1.1/compact/c007-out.jsonld
new file mode 100644
index 000000000..05c9f1d61
--- /dev/null
+++ b/test/jsonld/1.1/compact/c007-out.jsonld
@@ -0,0 +1,8 @@
+{
+ "@context": {
+ "@vocab": "http://example/",
+ "Foo": {"@context": {"bar": {"@type": "@id"}}},
+ "bar": {"@type": "http://www.w3.org/2001/XMLSchema#string"}
+ },
+ "a": {"@type": "Foo", "bar": "http://example/baz"}
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/c008-context.jsonld b/test/jsonld/1.1/compact/c008-context.jsonld
new file mode 100644
index 000000000..99becb5a6
--- /dev/null
+++ b/test/jsonld/1.1/compact/c008-context.jsonld
@@ -0,0 +1,7 @@
+{
+ "@context": {
+ "@vocab": "http://example/",
+ "type": "@type",
+ "Foo": {"@context": {"bar": "http://example.org/bar"}}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/c008-in.jsonld b/test/jsonld/1.1/compact/c008-in.jsonld
new file mode 100644
index 000000000..16baea770
--- /dev/null
+++ b/test/jsonld/1.1/compact/c008-in.jsonld
@@ -0,0 +1,8 @@
+[
+ {
+ "http://example/a": [{
+ "@type": ["http://example/Foo"],
+ "http://example.org/bar": [{"@value": "baz"}]
+ }]
+ }
+]
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/c008-out.jsonld b/test/jsonld/1.1/compact/c008-out.jsonld
new file mode 100644
index 000000000..e0b472b16
--- /dev/null
+++ b/test/jsonld/1.1/compact/c008-out.jsonld
@@ -0,0 +1,8 @@
+{
+ "@context": {
+ "@vocab": "http://example/",
+ "type": "@type",
+ "Foo": {"@context": {"bar": "http://example.org/bar"}}
+ },
+ "a": {"type": "Foo", "bar": "baz"}
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/c009-context.jsonld b/test/jsonld/1.1/compact/c009-context.jsonld
new file mode 100644
index 000000000..cf932f7e8
--- /dev/null
+++ b/test/jsonld/1.1/compact/c009-context.jsonld
@@ -0,0 +1,6 @@
+{
+ "@context": {
+ "@vocab": "http://example/",
+ "Foo": {"@context": {"baz": {"@type": "@vocab"}}}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/c009-in.jsonld b/test/jsonld/1.1/compact/c009-in.jsonld
new file mode 100644
index 000000000..59a1fb53f
--- /dev/null
+++ b/test/jsonld/1.1/compact/c009-in.jsonld
@@ -0,0 +1,8 @@
+[
+ {
+ "@type": ["http://example/Foo"],
+ "http://example/bar": [{
+ "http://example/baz": [{"@id": "http://example/buzz"}]
+ }]
+ }
+]
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/c009-out.jsonld b/test/jsonld/1.1/compact/c009-out.jsonld
new file mode 100644
index 000000000..dbd907302
--- /dev/null
+++ b/test/jsonld/1.1/compact/c009-out.jsonld
@@ -0,0 +1,8 @@
+{
+ "@context": {
+ "@vocab": "http://example/",
+ "Foo": {"@context": {"baz": {"@type": "@vocab"}}}
+ },
+ "@type": "Foo",
+ "bar": {"baz": {"@id": "http://example/buzz"}}
+}
diff --git a/test/jsonld/1.1/compact/c010-context.jsonld b/test/jsonld/1.1/compact/c010-context.jsonld
new file mode 100644
index 000000000..38c9c4e01
--- /dev/null
+++ b/test/jsonld/1.1/compact/c010-context.jsonld
@@ -0,0 +1,6 @@
+{
+ "@context": {
+ "@vocab": "http://example/",
+ "B": {"@context": {"c": "http://example.org/c"}}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/c010-in.jsonld b/test/jsonld/1.1/compact/c010-in.jsonld
new file mode 100644
index 000000000..1057b0ad8
--- /dev/null
+++ b/test/jsonld/1.1/compact/c010-in.jsonld
@@ -0,0 +1,8 @@
+[{
+ "http://example/a": [{
+ "@type": ["http://example/B"],
+ "http://example.com/a": [{"@value": "A in example.com"}],
+ "http://example.org/c": [{"@value": "C in example.org"}]
+ }],
+ "http://example/c": [{"@value": "C in example"}]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/c010-out.jsonld b/test/jsonld/1.1/compact/c010-out.jsonld
new file mode 100644
index 000000000..b312d1a2d
--- /dev/null
+++ b/test/jsonld/1.1/compact/c010-out.jsonld
@@ -0,0 +1,12 @@
+{
+ "@context": {
+ "@vocab": "http://example/",
+ "B": {"@context": {"c": "http://example.org/c"}}
+ },
+ "a": {
+ "@type": "B",
+ "c": "C in example.org",
+ "http://example.com/a": "A in example.com"
+ },
+ "c": "C in example"
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/c011-context.jsonld b/test/jsonld/1.1/compact/c011-context.jsonld
new file mode 100644
index 000000000..ede2fd4f3
--- /dev/null
+++ b/test/jsonld/1.1/compact/c011-context.jsonld
@@ -0,0 +1,8 @@
+{
+ "@context": {
+ "@vocab": "http://example/",
+ "id": "@id",
+ "type": "@type",
+ "Foo": {"@context": {"id": null, "type": null}}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/c011-in.jsonld b/test/jsonld/1.1/compact/c011-in.jsonld
new file mode 100644
index 000000000..3798fae98
--- /dev/null
+++ b/test/jsonld/1.1/compact/c011-in.jsonld
@@ -0,0 +1,11 @@
+[
+ {
+ "@id": "http://example.org/id",
+ "@type": ["http://example/type"],
+ "http://example/a": [{
+ "@id": "http://example.org/Foo",
+ "@type": ["http://example/Foo"],
+ "http://example/bar": [{"@id": "http://example.org/baz"}]
+ }]
+ }
+]
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/c011-out.jsonld b/test/jsonld/1.1/compact/c011-out.jsonld
new file mode 100644
index 000000000..7b1902aab
--- /dev/null
+++ b/test/jsonld/1.1/compact/c011-out.jsonld
@@ -0,0 +1,15 @@
+{
+ "@context": {
+ "@vocab": "http://example/",
+ "id": "@id",
+ "type": "@type",
+ "Foo": {"@context": {"id": null, "type": null}}
+ },
+ "id": "http://example.org/id",
+ "type": "http://example/type",
+ "a": {
+ "@id": "http://example.org/Foo",
+ "@type": "Foo",
+ "bar": {"@id": "http://example.org/baz"}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/c012-context.jsonld b/test/jsonld/1.1/compact/c012-context.jsonld
new file mode 100644
index 000000000..ba4308ce6
--- /dev/null
+++ b/test/jsonld/1.1/compact/c012-context.jsonld
@@ -0,0 +1,7 @@
+{
+ "@context": {
+ "@vocab": "http://example/",
+ "t1": {"@context": {"foo": {"@id": "http://example.com/foo"}}},
+ "t2": {"@context": {"foo": {"@id": "http://example.org/foo", "@type": "@id"}}}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/c012-in.jsonld b/test/jsonld/1.1/compact/c012-in.jsonld
new file mode 100644
index 000000000..a702942ab
--- /dev/null
+++ b/test/jsonld/1.1/compact/c012-in.jsonld
@@ -0,0 +1,6 @@
+[{
+ "@type": ["http://example/t2", "http://example/t1"],
+ "http://example.org/foo": [
+ {"@id": "urn:bar"}
+ ]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/c012-out.jsonld b/test/jsonld/1.1/compact/c012-out.jsonld
new file mode 100644
index 000000000..c57c55ebf
--- /dev/null
+++ b/test/jsonld/1.1/compact/c012-out.jsonld
@@ -0,0 +1,9 @@
+{
+ "@context": {
+ "@vocab": "http://example/",
+ "t1": {"@context": {"foo": {"@id": "http://example.com/foo"}}},
+ "t2": {"@context": {"foo": {"@id": "http://example.org/foo", "@type": "@id"}}}
+ },
+ "@type": ["t2", "t1"],
+ "foo": "urn:bar"
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/c013-context.jsonld b/test/jsonld/1.1/compact/c013-context.jsonld
new file mode 100644
index 000000000..4b62d50f6
--- /dev/null
+++ b/test/jsonld/1.1/compact/c013-context.jsonld
@@ -0,0 +1,14 @@
+{
+ "@context": {
+ "@vocab": "http://example/",
+ "Foo": {
+ "@context": {
+ "bar": {
+ "@context": {
+ "baz": {"@type": "@vocab"}
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/test/jsonld/1.1/compact/c013-in.jsonld b/test/jsonld/1.1/compact/c013-in.jsonld
new file mode 100644
index 000000000..59a1fb53f
--- /dev/null
+++ b/test/jsonld/1.1/compact/c013-in.jsonld
@@ -0,0 +1,8 @@
+[
+ {
+ "@type": ["http://example/Foo"],
+ "http://example/bar": [{
+ "http://example/baz": [{"@id": "http://example/buzz"}]
+ }]
+ }
+]
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/c013-out.jsonld b/test/jsonld/1.1/compact/c013-out.jsonld
new file mode 100644
index 000000000..bba1c9bfe
--- /dev/null
+++ b/test/jsonld/1.1/compact/c013-out.jsonld
@@ -0,0 +1,16 @@
+{
+ "@context": {
+ "@vocab": "http://example/",
+ "Foo": {
+ "@context": {
+ "bar": {
+ "@context": {
+ "baz": {"@type": "@vocab"}
+ }
+ }
+ }
+ }
+ },
+ "@type": "Foo",
+ "bar": {"baz": "buzz"}
+}
diff --git a/test/jsonld/1.1/compact/c014-context.jsonld b/test/jsonld/1.1/compact/c014-context.jsonld
new file mode 100644
index 000000000..2d48593a0
--- /dev/null
+++ b/test/jsonld/1.1/compact/c014-context.jsonld
@@ -0,0 +1,11 @@
+{
+ "@context": {
+ "@vocab": "http://example/",
+ "foo": "http://example/foo",
+ "Type": {
+ "@context": [
+ null
+ ]
+ }
+ }
+}
diff --git a/test/jsonld/1.1/compact/c014-in.jsonld b/test/jsonld/1.1/compact/c014-in.jsonld
new file mode 100644
index 000000000..5a68fc26c
--- /dev/null
+++ b/test/jsonld/1.1/compact/c014-in.jsonld
@@ -0,0 +1,8 @@
+[{
+ "http://example/foo": [{
+ "@value": "will-exist"
+ }],
+ "http://example/p": [{
+ "@type": ["http://example/Type"]
+ }]
+}]
diff --git a/test/jsonld/1.1/compact/c014-out.jsonld b/test/jsonld/1.1/compact/c014-out.jsonld
new file mode 100644
index 000000000..79138aeda
--- /dev/null
+++ b/test/jsonld/1.1/compact/c014-out.jsonld
@@ -0,0 +1,15 @@
+{
+ "@context": {
+ "@vocab": "http://example/",
+ "foo": "http://example/foo",
+ "Type": {
+ "@context": [
+ null
+ ]
+ }
+ },
+ "foo": "will-exist",
+ "p": {
+ "@type": "Type"
+ }
+}
diff --git a/test/jsonld/1.1/compact/c015-context.jsonld b/test/jsonld/1.1/compact/c015-context.jsonld
new file mode 100644
index 000000000..aea866251
--- /dev/null
+++ b/test/jsonld/1.1/compact/c015-context.jsonld
@@ -0,0 +1,12 @@
+{
+ "@context": {
+ "@base": "http://example/base-base",
+ "@vocab": "http://example/",
+ "foo": "http://example/foo",
+ "Type": {
+ "@context": {
+ "@base": "http://example/typed-base"
+ }
+ }
+ }
+}
diff --git a/test/jsonld/1.1/compact/c015-in.jsonld b/test/jsonld/1.1/compact/c015-in.jsonld
new file mode 100644
index 000000000..2f3427a52
--- /dev/null
+++ b/test/jsonld/1.1/compact/c015-in.jsonld
@@ -0,0 +1,16 @@
+[{
+ "@id": "http://example/base-base#base-id",
+ "http://example/p": [{
+ "@id": "http://example/typed-base#typed-id",
+ "@type": ["http://example/Type"],
+ "http://example/subjectReference": [{
+ "@id": "http://example/typed-base#subject-reference-id"
+ }],
+ "http://example/nestedNode": [{
+ "@id": "http://example/base-base#nested-id",
+ "http://example/foo": [{
+ "@value": "bar"
+ }]
+ }]
+ }]
+}]
diff --git a/test/jsonld/1.1/compact/c015-out.jsonld b/test/jsonld/1.1/compact/c015-out.jsonld
new file mode 100644
index 000000000..83bb63d5b
--- /dev/null
+++ b/test/jsonld/1.1/compact/c015-out.jsonld
@@ -0,0 +1,24 @@
+{
+ "@context": {
+ "@base": "http://example/base-base",
+ "@vocab": "http://example/",
+ "foo": "http://example/foo",
+ "Type": {
+ "@context": {
+ "@base": "http://example/typed-base"
+ }
+ }
+ },
+ "@id": "#base-id",
+ "p": {
+ "@id": "#typed-id",
+ "@type": "Type",
+ "subjectReference": {
+ "@id": "#subject-reference-id"
+ },
+ "nestedNode": {
+ "@id": "#nested-id",
+ "foo": "bar"
+ }
+ }
+}
diff --git a/test/jsonld/1.1/compact/c016-context.jsonld b/test/jsonld/1.1/compact/c016-context.jsonld
new file mode 100644
index 000000000..45296bef8
--- /dev/null
+++ b/test/jsonld/1.1/compact/c016-context.jsonld
@@ -0,0 +1,10 @@
+{
+ "@context": {
+ "@vocab": "http://example.org/",
+ "Type": {
+ "@context": {
+ "@vocab": "http://example.com/"
+ }
+ }
+ }
+}
diff --git a/test/jsonld/1.1/compact/c016-in.jsonld b/test/jsonld/1.1/compact/c016-in.jsonld
new file mode 100644
index 000000000..37bc728ab
--- /dev/null
+++ b/test/jsonld/1.1/compact/c016-in.jsonld
@@ -0,0 +1,16 @@
+[{
+ "http://example.org/foo": [{
+ "@value": "org"
+ }],
+ "http://example.org/p": [{
+ "@type": ["http://example.org/Type"],
+ "http://example.com/foo": [{
+ "@value": "com"
+ }],
+ "http://example.com/nested": [{
+ "http://example.org/nested-prop": [{
+ "@value": "org"
+ }]
+ }]
+ }]
+}]
diff --git a/test/jsonld/1.1/compact/c016-out.jsonld b/test/jsonld/1.1/compact/c016-out.jsonld
new file mode 100644
index 000000000..2f1186ffa
--- /dev/null
+++ b/test/jsonld/1.1/compact/c016-out.jsonld
@@ -0,0 +1,18 @@
+{
+ "@context": {
+ "@vocab": "http://example.org/",
+ "Type": {
+ "@context": {
+ "@vocab": "http://example.com/"
+ }
+ }
+ },
+ "foo": "org",
+ "p": {
+ "@type": "Type",
+ "foo": "com",
+ "nested": {
+ "nested-prop": "org"
+ }
+ }
+}
diff --git a/test/jsonld/1.1/compact/c017-context.jsonld b/test/jsonld/1.1/compact/c017-context.jsonld
new file mode 100644
index 000000000..d1cca3ace
--- /dev/null
+++ b/test/jsonld/1.1/compact/c017-context.jsonld
@@ -0,0 +1,19 @@
+{
+ "@context": {
+ "@vocab": "http://example/",
+ "Bar": {
+ "@context": [
+ {
+ "prop": "http://example/bar-prop"
+ }
+ ]
+ },
+ "Foo": {
+ "@context": [
+ {
+ "prop": "http://example/foo-prop"
+ }
+ ]
+ }
+ }
+}
diff --git a/test/jsonld/1.1/compact/c017-in.jsonld b/test/jsonld/1.1/compact/c017-in.jsonld
new file mode 100644
index 000000000..7e7e49d9f
--- /dev/null
+++ b/test/jsonld/1.1/compact/c017-in.jsonld
@@ -0,0 +1,14 @@
+[{
+ "@type": [
+ "http://example/Foo",
+ "http://example/Bar"
+ ],
+ "http://example/foo-prop": [{
+ "@value": "foo"
+ }],
+ "http://example/nested": [{
+ "http://example/prop": [{
+ "@value": "vocab"
+ }]
+ }]
+}]
diff --git a/test/jsonld/1.1/compact/c017-out.jsonld b/test/jsonld/1.1/compact/c017-out.jsonld
new file mode 100644
index 000000000..be32133c4
--- /dev/null
+++ b/test/jsonld/1.1/compact/c017-out.jsonld
@@ -0,0 +1,24 @@
+{
+ "@context": {
+ "@vocab": "http://example/",
+ "Bar": {
+ "@context": [
+ {
+ "prop": "http://example/bar-prop"
+ }
+ ]
+ },
+ "Foo": {
+ "@context": [
+ {
+ "prop": "http://example/foo-prop"
+ }
+ ]
+ }
+ },
+ "@type": ["Foo", "Bar"],
+ "prop": "foo",
+ "nested": {
+ "prop": "vocab"
+ }
+}
diff --git a/test/jsonld/1.1/compact/c018-context.jsonld b/test/jsonld/1.1/compact/c018-context.jsonld
new file mode 100644
index 000000000..d0033bbe4
--- /dev/null
+++ b/test/jsonld/1.1/compact/c018-context.jsonld
@@ -0,0 +1,21 @@
+{
+ "@context": {
+ "@vocab": "http://example/",
+ "Bar": {
+ "@context": [
+ null,
+ {
+ "prop": "http://example/bar-prop"
+ }
+ ]
+ },
+ "Foo": {
+ "@context": [
+ null,
+ {
+ "prop": "http://example/foo-prop"
+ }
+ ]
+ }
+ }
+}
diff --git a/test/jsonld/1.1/compact/c018-in.jsonld b/test/jsonld/1.1/compact/c018-in.jsonld
new file mode 100644
index 000000000..ee0c79e18
--- /dev/null
+++ b/test/jsonld/1.1/compact/c018-in.jsonld
@@ -0,0 +1,11 @@
+[{
+ "@type": [
+ "http://example/Foo",
+ "http://example/Bar"
+ ],
+ "http://example/foo-prop": [
+ {
+ "@value": "foo"
+ }
+ ]
+}]
diff --git a/test/jsonld/1.1/compact/c018-out.jsonld b/test/jsonld/1.1/compact/c018-out.jsonld
new file mode 100644
index 000000000..f702f56d9
--- /dev/null
+++ b/test/jsonld/1.1/compact/c018-out.jsonld
@@ -0,0 +1,24 @@
+
+{
+ "@context": {
+ "@vocab": "http://example/",
+ "Bar": {
+ "@context": [
+ null,
+ {
+ "prop": "http://example/bar-prop"
+ }
+ ]
+ },
+ "Foo": {
+ "@context": [
+ null,
+ {
+ "prop": "http://example/foo-prop"
+ }
+ ]
+ }
+ },
+ "@type": ["Foo", "Bar"],
+ "prop": "foo"
+}
diff --git a/test/jsonld/1.1/compact/c019-context.jsonld b/test/jsonld/1.1/compact/c019-context.jsonld
new file mode 100644
index 000000000..a7b6543f7
--- /dev/null
+++ b/test/jsonld/1.1/compact/c019-context.jsonld
@@ -0,0 +1,20 @@
+{
+ "@context": {
+ "@vocab": "http://example/",
+ "prop": "http://example/base-prop",
+ "Type": {
+ "@context": {
+ "foo": {
+ "@context": {
+ "prop": "http://example/foo-prop"
+ }
+ },
+ "bar": {
+ "@context": {
+ "prop": "http://example/bar-prop"
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/test/jsonld/1.1/compact/c019-in.jsonld b/test/jsonld/1.1/compact/c019-in.jsonld
new file mode 100644
index 000000000..3d25ead3b
--- /dev/null
+++ b/test/jsonld/1.1/compact/c019-in.jsonld
@@ -0,0 +1,26 @@
+[{
+ "@type": [
+ "http://example/Type"
+ ],
+ "http://example/foo": [{
+ "http://example/foo-prop": [
+ {
+ "@value": "foo"
+ }
+ ]
+ }],
+ "http://example/bar": [{
+ "http://example/bar-prop": [
+ {
+ "@value": "bar"
+ }
+ ]
+ }],
+ "http://example/baz": [{
+ "http://example/base-prop": [
+ {
+ "@value": "baz"
+ }
+ ]
+ }]
+}]
diff --git a/test/jsonld/1.1/compact/c019-out.jsonld b/test/jsonld/1.1/compact/c019-out.jsonld
new file mode 100644
index 000000000..418c9cbee
--- /dev/null
+++ b/test/jsonld/1.1/compact/c019-out.jsonld
@@ -0,0 +1,30 @@
+{
+ "@context": {
+ "@vocab": "http://example/",
+ "prop": "http://example/base-prop",
+ "Type": {
+ "@context": {
+ "foo": {
+ "@context": {
+ "prop": "http://example/foo-prop"
+ }
+ },
+ "bar": {
+ "@context": {
+ "prop": "http://example/bar-prop"
+ }
+ }
+ }
+ }
+ },
+ "@type": "Type",
+ "foo": {
+ "prop": "foo"
+ },
+ "bar": {
+ "prop": "bar"
+ },
+ "baz": {
+ "prop": "baz"
+ }
+}
diff --git a/test/jsonld/1.1/compact/c020-context.jsonld b/test/jsonld/1.1/compact/c020-context.jsonld
new file mode 100644
index 000000000..216723fc8
--- /dev/null
+++ b/test/jsonld/1.1/compact/c020-context.jsonld
@@ -0,0 +1,11 @@
+{
+ "@context": {
+ "@vocab": "http://example/",
+ "type": "@type",
+ "Type": {
+ "@context": {
+ "value": "@value"
+ }
+ }
+ }
+}
diff --git a/test/jsonld/1.1/compact/c020-in.jsonld b/test/jsonld/1.1/compact/c020-in.jsonld
new file mode 100644
index 000000000..483b9ef0b
--- /dev/null
+++ b/test/jsonld/1.1/compact/c020-in.jsonld
@@ -0,0 +1,7 @@
+[{
+ "@type": ["http://example/Type"],
+ "http://example/v": [{
+ "@type": "http://example/value-type",
+ "@value": "value"
+ }]
+}]
diff --git a/test/jsonld/1.1/compact/c020-out.jsonld b/test/jsonld/1.1/compact/c020-out.jsonld
new file mode 100644
index 000000000..e504c397c
--- /dev/null
+++ b/test/jsonld/1.1/compact/c020-out.jsonld
@@ -0,0 +1,16 @@
+{
+ "@context": {
+ "@vocab": "http://example/",
+ "type": "@type",
+ "Type": {
+ "@context": {
+ "value": "@value"
+ }
+ }
+ },
+ "type": "Type",
+ "v": {
+ "value": "value",
+ "type": "value-type"
+ }
+}
diff --git a/test/jsonld/1.1/compact/c021-context.jsonld b/test/jsonld/1.1/compact/c021-context.jsonld
new file mode 100644
index 000000000..2826733c2
--- /dev/null
+++ b/test/jsonld/1.1/compact/c021-context.jsonld
@@ -0,0 +1,13 @@
+{
+ "@context": {
+ "@vocab": "ex:",
+ "type": "@type",
+ "prop": "ex:untyped",
+ "Type": {
+ "@context": {
+ "prop": "ex:typed",
+ "value": "@value"
+ }
+ }
+ }
+}
diff --git a/test/jsonld/1.1/compact/c021-in.jsonld b/test/jsonld/1.1/compact/c021-in.jsonld
new file mode 100644
index 000000000..c3f097e8e
--- /dev/null
+++ b/test/jsonld/1.1/compact/c021-in.jsonld
@@ -0,0 +1,19 @@
+[{
+ "ex:untyped": [{
+ "@type": ["ex:Type"],
+ "ex:typed": [{
+ "@value": "v1"
+ }, {
+ "@value": "v2"
+ }, {
+ "@value": "v3"
+ }, {
+ "ex:untyped": [{
+ "@value": "v4"
+ }, {
+ "@type": ["ex:Type"],
+ "ex:typed": [{"@value": "v5"}]
+ }]
+ }]
+ }]
+}]
diff --git a/test/jsonld/1.1/compact/c021-out.jsonld b/test/jsonld/1.1/compact/c021-out.jsonld
new file mode 100644
index 000000000..738dbfa5d
--- /dev/null
+++ b/test/jsonld/1.1/compact/c021-out.jsonld
@@ -0,0 +1,30 @@
+{
+ "@context": {
+ "@vocab": "ex:",
+ "type": "@type",
+ "prop": "ex:untyped",
+ "Type": {
+ "@context": {
+ "prop": "ex:typed",
+ "value": "@value"
+ }
+ }
+ },
+ "prop": {
+ "type": "Type",
+ "prop": [
+ "v1",
+ "v2",
+ "v3",
+ {
+ "prop": [
+ "v4",
+ {
+ "type": "Type",
+ "prop": "v5"
+ }
+ ]
+ }
+ ]
+ }
+}
diff --git a/test/jsonld/1.1/compact/c022-context.jsonld b/test/jsonld/1.1/compact/c022-context.jsonld
new file mode 100644
index 000000000..1d1fb201b
--- /dev/null
+++ b/test/jsonld/1.1/compact/c022-context.jsonld
@@ -0,0 +1,18 @@
+{
+ "@context": {
+ "@vocab": "ex:",
+ "Type": {
+ "@context": {
+ "foo": {
+ "@id": "ex:foo",
+ "@type": "@vocab",
+ "@context": {
+ "@version": 1.1,
+ "Foo": "ex:Foo",
+ "Bar": "ex:Bar"
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/test/jsonld/1.1/compact/c022-in.jsonld b/test/jsonld/1.1/compact/c022-in.jsonld
new file mode 100644
index 000000000..d77a5f5aa
--- /dev/null
+++ b/test/jsonld/1.1/compact/c022-in.jsonld
@@ -0,0 +1,4 @@
+[{
+ "@type": ["ex:Type"],
+ "ex:foo": [{"@id": "ex:Bar"}]
+}]
diff --git a/test/jsonld/1.1/compact/c022-out.jsonld b/test/jsonld/1.1/compact/c022-out.jsonld
new file mode 100644
index 000000000..c5ef4a2e3
--- /dev/null
+++ b/test/jsonld/1.1/compact/c022-out.jsonld
@@ -0,0 +1,20 @@
+{
+ "@context": {
+ "@vocab": "ex:",
+ "Type": {
+ "@context": {
+ "foo": {
+ "@id": "ex:foo",
+ "@type": "@vocab",
+ "@context": {
+ "@version": 1.1,
+ "Foo": "ex:Foo",
+ "Bar": "ex:Bar"
+ }
+ }
+ }
+ }
+ },
+ "@type": "Type",
+ "foo": "Bar"
+}
diff --git a/test/jsonld/1.1/compact/c023-context.jsonld b/test/jsonld/1.1/compact/c023-context.jsonld
new file mode 100644
index 000000000..5d69acb74
--- /dev/null
+++ b/test/jsonld/1.1/compact/c023-context.jsonld
@@ -0,0 +1,24 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "Outer": {
+ "@id": "ex:Outer",
+ "@context": {
+ "nested": "ex:nested"
+ }
+ },
+ "Inner": {
+ "@id": "ex:Inner",
+ "@context": {
+ "@version": 1.1,
+ "foo": {
+ "@id": "ex:foo",
+ "@type": "@vocab",
+ "@context": {
+ "Foo": "ex:Foo"
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/test/jsonld/1.1/compact/c023-in.jsonld b/test/jsonld/1.1/compact/c023-in.jsonld
new file mode 100644
index 000000000..3e47445a4
--- /dev/null
+++ b/test/jsonld/1.1/compact/c023-in.jsonld
@@ -0,0 +1,7 @@
+[{
+ "@type": ["ex:Outer"],
+ "ex:nested": [{
+ "@type": ["ex:Inner"],
+ "ex:foo": [{"@id": "ex:Foo"}]
+ }]
+}]
diff --git a/test/jsonld/1.1/compact/c023-out.jsonld b/test/jsonld/1.1/compact/c023-out.jsonld
new file mode 100644
index 000000000..94272f959
--- /dev/null
+++ b/test/jsonld/1.1/compact/c023-out.jsonld
@@ -0,0 +1,29 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "Outer": {
+ "@id": "ex:Outer",
+ "@context": {
+ "nested": "ex:nested"
+ }
+ },
+ "Inner": {
+ "@id": "ex:Inner",
+ "@context": {
+ "@version": 1.1,
+ "foo": {
+ "@id": "ex:foo",
+ "@type": "@vocab",
+ "@context": {
+ "Foo": "ex:Foo"
+ }
+ }
+ }
+ }
+ },
+ "@type": "Outer",
+ "nested": {
+ "@type": "Inner",
+ "foo": "Foo"
+ }
+}
diff --git a/test/jsonld/1.1/compact/c024-context.jsonld b/test/jsonld/1.1/compact/c024-context.jsonld
new file mode 100644
index 000000000..cc53f326f
--- /dev/null
+++ b/test/jsonld/1.1/compact/c024-context.jsonld
@@ -0,0 +1,33 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "Outer": {
+ "@id": "ex:Outer",
+ "@context": {
+ "nested": "ex:nested"
+ }
+ },
+ "Inner": {
+ "@id": "ex:Inner",
+ "@context": {
+ "@version": 1.1,
+ "foo": {
+ "@id": "ex:foo",
+ "@container": "@set",
+ "@type": "ex:Number",
+ "@context": {
+ "value": "@value"
+ }
+ },
+ "bar": {
+ "@id": "ex:bar",
+ "@container": "@set",
+ "@type": "@id",
+ "@context": {
+ "@base": "http://example/"
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/test/jsonld/1.1/compact/c024-in.jsonld b/test/jsonld/1.1/compact/c024-in.jsonld
new file mode 100644
index 000000000..d2b0b6691
--- /dev/null
+++ b/test/jsonld/1.1/compact/c024-in.jsonld
@@ -0,0 +1,11 @@
+[{
+ "@type": ["ex:Outer"],
+ "ex:nested": [{
+ "@type": ["ex:Inner"],
+ "ex:foo": {"@type": "ex:Number", "@value": "1"},
+ "ex:bar": [
+ {"@id": "http://example/a"},
+ {"@id": "http://example/b"}
+ ]
+ }]
+}]
diff --git a/test/jsonld/1.1/compact/c024-out.jsonld b/test/jsonld/1.1/compact/c024-out.jsonld
new file mode 100644
index 000000000..8c22c53e5
--- /dev/null
+++ b/test/jsonld/1.1/compact/c024-out.jsonld
@@ -0,0 +1,39 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "Outer": {
+ "@id": "ex:Outer",
+ "@context": {
+ "nested": "ex:nested"
+ }
+ },
+ "Inner": {
+ "@id": "ex:Inner",
+ "@context": {
+ "@version": 1.1,
+ "foo": {
+ "@id": "ex:foo",
+ "@container": "@set",
+ "@type": "ex:Number",
+ "@context": {
+ "value": "@value"
+ }
+ },
+ "bar": {
+ "@id": "ex:bar",
+ "@container": "@set",
+ "@type": "@id",
+ "@context": {
+ "@base": "http://example/"
+ }
+ }
+ }
+ }
+ },
+ "@type": "Outer",
+ "nested": {
+ "@type": "Inner",
+ "foo": ["1"],
+ "bar": ["a", "b"]
+ }
+}
diff --git a/test/jsonld/1.1/compact/c025-context.jsonld b/test/jsonld/1.1/compact/c025-context.jsonld
new file mode 100644
index 000000000..cd868d35a
--- /dev/null
+++ b/test/jsonld/1.1/compact/c025-context.jsonld
@@ -0,0 +1,22 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "type": "@type",
+ "Outer": {
+ "@id": "ex:Outer",
+ "@context": {
+ "nested": {
+ "@id": "ex:nested",
+ "@type": "@id",
+ "@container": "@graph"
+ }
+ }
+ },
+ "Inner": {
+ "@id": "ex:Inner",
+ "@context": {
+ "foo": "ex:foo"
+ }
+ }
+ }
+}
diff --git a/test/jsonld/1.1/compact/c025-in.jsonld b/test/jsonld/1.1/compact/c025-in.jsonld
new file mode 100644
index 000000000..d82464653
--- /dev/null
+++ b/test/jsonld/1.1/compact/c025-in.jsonld
@@ -0,0 +1,9 @@
+[{
+ "@type": ["ex:Outer"],
+ "ex:nested": [{
+ "@graph": [{
+ "@type": ["ex:Inner"],
+ "ex:foo": [{"@value": "bar"}]
+ }]
+ }]
+}]
diff --git a/test/jsonld/1.1/compact/c025-out.jsonld b/test/jsonld/1.1/compact/c025-out.jsonld
new file mode 100644
index 000000000..aa9b1fc7a
--- /dev/null
+++ b/test/jsonld/1.1/compact/c025-out.jsonld
@@ -0,0 +1,27 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "type": "@type",
+ "Outer": {
+ "@id": "ex:Outer",
+ "@context": {
+ "nested": {
+ "@id": "ex:nested",
+ "@type": "@id",
+ "@container": "@graph"
+ }
+ }
+ },
+ "Inner": {
+ "@id": "ex:Inner",
+ "@context": {
+ "foo": "ex:foo"
+ }
+ }
+ },
+ "type": "Outer",
+ "nested": {
+ "type": "Inner",
+ "foo": "bar"
+ }
+}
diff --git a/test/jsonld/1.1/compact/c026-context.jsonld b/test/jsonld/1.1/compact/c026-context.jsonld
new file mode 100644
index 000000000..9116af428
--- /dev/null
+++ b/test/jsonld/1.1/compact/c026-context.jsonld
@@ -0,0 +1,12 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "@vocab": "http://example/",
+ "Foo": {
+ "@context": {
+ "@propagate": true,
+ "baz": {"@type": "@vocab"}
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/c026-in.jsonld b/test/jsonld/1.1/compact/c026-in.jsonld
new file mode 100644
index 000000000..8ff196e6c
--- /dev/null
+++ b/test/jsonld/1.1/compact/c026-in.jsonld
@@ -0,0 +1,8 @@
+[
+ {
+ "@type": ["http://example/Foo"],
+ "http://example/bar": [{
+ "http://example/baz": [{"@id": "http://example/buzz"}]
+ }]
+ }
+]
diff --git a/test/jsonld/1.1/compact/c026-out.jsonld b/test/jsonld/1.1/compact/c026-out.jsonld
new file mode 100644
index 000000000..09f080304
--- /dev/null
+++ b/test/jsonld/1.1/compact/c026-out.jsonld
@@ -0,0 +1,14 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "@vocab": "http://example/",
+ "Foo": {
+ "@context": {
+ "@propagate": true,
+ "baz": {"@type": "@vocab"}
+ }
+ }
+ },
+ "@type": "Foo",
+ "bar": {"baz": "buzz"}
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/c027-context.jsonld b/test/jsonld/1.1/compact/c027-context.jsonld
new file mode 100644
index 000000000..9b1ac04c7
--- /dev/null
+++ b/test/jsonld/1.1/compact/c027-context.jsonld
@@ -0,0 +1,12 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "@vocab": "http://example/",
+ "bar": {
+ "@context": {
+ "@propagate": false,
+ "baz": {"@type": "@id"}
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/c027-in.jsonld b/test/jsonld/1.1/compact/c027-in.jsonld
new file mode 100644
index 000000000..28baae402
--- /dev/null
+++ b/test/jsonld/1.1/compact/c027-in.jsonld
@@ -0,0 +1,7 @@
+[{
+ "http://example/bar": [{
+ "http://example/baz": [{
+ "http://example/baz": [{"@value": "buzz"}]
+ }]
+ }]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/c027-out.jsonld b/test/jsonld/1.1/compact/c027-out.jsonld
new file mode 100644
index 000000000..7937a8ee8
--- /dev/null
+++ b/test/jsonld/1.1/compact/c027-out.jsonld
@@ -0,0 +1,13 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "@vocab": "http://example/",
+ "bar": {
+ "@context": {
+ "@propagate": false,
+ "baz": {"@type": "@id"}
+ }
+ }
+ },
+ "bar": {"baz": {"baz": "buzz"}}
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/c028-context.jsonld b/test/jsonld/1.1/compact/c028-context.jsonld
new file mode 100644
index 000000000..bba56d490
--- /dev/null
+++ b/test/jsonld/1.1/compact/c028-context.jsonld
@@ -0,0 +1,9 @@
+{
+ "@context": {
+ "thing": {
+ "@id": "ex:thing",
+ "@context": {}
+ },
+ "title": "ex:title"
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/c028-in.jsonld b/test/jsonld/1.1/compact/c028-in.jsonld
new file mode 100644
index 000000000..1f8e95cc7
--- /dev/null
+++ b/test/jsonld/1.1/compact/c028-in.jsonld
@@ -0,0 +1,6 @@
+{
+ "ex:title": "top",
+ "ex:thing": {
+ "ex:title": "sub"
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/c028-out.jsonld b/test/jsonld/1.1/compact/c028-out.jsonld
new file mode 100644
index 000000000..0248eef42
--- /dev/null
+++ b/test/jsonld/1.1/compact/c028-out.jsonld
@@ -0,0 +1,13 @@
+{
+ "@context": {
+ "thing": {
+ "@id": "ex:thing",
+ "@context": {}
+ },
+ "title": "ex:title"
+ },
+ "title": "top",
+ "thing": {
+ "title": "sub"
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/di01-context.jsonld b/test/jsonld/1.1/compact/di01-context.jsonld
new file mode 100644
index 000000000..49916e711
--- /dev/null
+++ b/test/jsonld/1.1/compact/di01-context.jsonld
@@ -0,0 +1,6 @@
+{
+ "@context": {
+ "term5": {"@id": "http://example.com/term", "@direction": null},
+ "@direction": "ltr"
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/di01-in.jsonld b/test/jsonld/1.1/compact/di01-in.jsonld
new file mode 100644
index 000000000..8a546bafd
--- /dev/null
+++ b/test/jsonld/1.1/compact/di01-in.jsonld
@@ -0,0 +1,6 @@
+{
+ "http://example.com/term": [
+ "v5",
+ {"@value": "plain literal"}
+ ]
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/di01-out.jsonld b/test/jsonld/1.1/compact/di01-out.jsonld
new file mode 100644
index 000000000..f0dc26fd3
--- /dev/null
+++ b/test/jsonld/1.1/compact/di01-out.jsonld
@@ -0,0 +1,7 @@
+{
+ "@context": {
+ "term5": {"@id": "http://example.com/term", "@direction": null},
+ "@direction": "ltr"
+ },
+ "term5": [ "v5", "plain literal" ]
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/di02-context.jsonld b/test/jsonld/1.1/compact/di02-context.jsonld
new file mode 100644
index 000000000..7bfb35039
--- /dev/null
+++ b/test/jsonld/1.1/compact/di02-context.jsonld
@@ -0,0 +1,3 @@
+{
+ "@context": {"direction": "@direction"}
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/di02-in.jsonld b/test/jsonld/1.1/compact/di02-in.jsonld
new file mode 100644
index 000000000..63b5d46e3
--- /dev/null
+++ b/test/jsonld/1.1/compact/di02-in.jsonld
@@ -0,0 +1,3 @@
+{
+ "http://example.org/foo": {"@value": "bar", "@direction": "ltr"}
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/di02-out.jsonld b/test/jsonld/1.1/compact/di02-out.jsonld
new file mode 100644
index 000000000..d34c0015a
--- /dev/null
+++ b/test/jsonld/1.1/compact/di02-out.jsonld
@@ -0,0 +1,4 @@
+{
+ "@context": {"direction": "@direction"},
+ "http://example.org/foo": {"@value": "bar", "direction": "ltr"}
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/di03-context.jsonld b/test/jsonld/1.1/compact/di03-context.jsonld
new file mode 100644
index 000000000..ee90c316b
--- /dev/null
+++ b/test/jsonld/1.1/compact/di03-context.jsonld
@@ -0,0 +1,8 @@
+{
+ "@context": {
+ "foo_ltr": {"@id": "http://example.com/foo", "@container": "@list", "@direction": "ltr"},
+ "foo_rtl": {"@id": "http://example.com/foo", "@container": "@list", "@direction": "rtl"}
+ },
+ "foo_ltr": ["en"],
+ "foo_rtl": ["ar"]
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/di03-in.jsonld b/test/jsonld/1.1/compact/di03-in.jsonld
new file mode 100644
index 000000000..429aa76f9
--- /dev/null
+++ b/test/jsonld/1.1/compact/di03-in.jsonld
@@ -0,0 +1,6 @@
+[{
+ "http://example.com/foo": [
+ {"@list": [{"@value": "en", "@direction": "ltr"}]},
+ {"@list": [{"@value": "ar", "@direction": "rtl"}]}
+ ]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/di03-out.jsonld b/test/jsonld/1.1/compact/di03-out.jsonld
new file mode 100644
index 000000000..ee90c316b
--- /dev/null
+++ b/test/jsonld/1.1/compact/di03-out.jsonld
@@ -0,0 +1,8 @@
+{
+ "@context": {
+ "foo_ltr": {"@id": "http://example.com/foo", "@container": "@list", "@direction": "ltr"},
+ "foo_rtl": {"@id": "http://example.com/foo", "@container": "@list", "@direction": "rtl"}
+ },
+ "foo_ltr": ["en"],
+ "foo_rtl": ["ar"]
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/di04-context.jsonld b/test/jsonld/1.1/compact/di04-context.jsonld
new file mode 100644
index 000000000..b77d1034f
--- /dev/null
+++ b/test/jsonld/1.1/compact/di04-context.jsonld
@@ -0,0 +1,11 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "vocab": "http://example.com/vocab/",
+ "label": {
+ "@id": "vocab:label",
+ "@direction": "ltr",
+ "@container": "@language"
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/di04-in.jsonld b/test/jsonld/1.1/compact/di04-in.jsonld
new file mode 100644
index 000000000..a0b9512c8
--- /dev/null
+++ b/test/jsonld/1.1/compact/di04-in.jsonld
@@ -0,0 +1,10 @@
+[
+ {
+ "@id": "http://example.com/queen",
+ "http://example.com/vocab/label": [
+ {"@value": "Die Königin", "@language": "de", "@direction": "ltr"},
+ {"@value": "Ihre Majestät", "@language": "de", "@direction": "ltr"},
+ {"@value": "The Queen", "@language": "en", "@direction": "ltr"}
+ ]
+ }
+]
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/di04-out.jsonld b/test/jsonld/1.1/compact/di04-out.jsonld
new file mode 100644
index 000000000..a61d6a939
--- /dev/null
+++ b/test/jsonld/1.1/compact/di04-out.jsonld
@@ -0,0 +1,16 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "vocab": "http://example.com/vocab/",
+ "label": {
+ "@id": "vocab:label",
+ "@direction": "ltr",
+ "@container": "@language"
+ }
+ },
+ "@id": "http://example.com/queen",
+ "label": {
+ "en": "The Queen",
+ "de": [ "Die Königin", "Ihre Majestät" ]
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/di05-context.jsonld b/test/jsonld/1.1/compact/di05-context.jsonld
new file mode 100644
index 000000000..b302024c1
--- /dev/null
+++ b/test/jsonld/1.1/compact/di05-context.jsonld
@@ -0,0 +1,12 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "@direction": "rtl",
+ "vocab": "http://example.com/vocab/",
+ "label": {
+ "@id": "vocab:label",
+ "@direction": "ltr",
+ "@container": "@language"
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/di05-in.jsonld b/test/jsonld/1.1/compact/di05-in.jsonld
new file mode 100644
index 000000000..a0b9512c8
--- /dev/null
+++ b/test/jsonld/1.1/compact/di05-in.jsonld
@@ -0,0 +1,10 @@
+[
+ {
+ "@id": "http://example.com/queen",
+ "http://example.com/vocab/label": [
+ {"@value": "Die Königin", "@language": "de", "@direction": "ltr"},
+ {"@value": "Ihre Majestät", "@language": "de", "@direction": "ltr"},
+ {"@value": "The Queen", "@language": "en", "@direction": "ltr"}
+ ]
+ }
+]
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/di05-out.jsonld b/test/jsonld/1.1/compact/di05-out.jsonld
new file mode 100644
index 000000000..33363f637
--- /dev/null
+++ b/test/jsonld/1.1/compact/di05-out.jsonld
@@ -0,0 +1,17 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "@direction": "rtl",
+ "vocab": "http://example.com/vocab/",
+ "label": {
+ "@id": "vocab:label",
+ "@direction": "ltr",
+ "@container": "@language"
+ }
+ },
+ "@id": "http://example.com/queen",
+ "label": {
+ "en": "The Queen",
+ "de": [ "Die Königin", "Ihre Majestät" ]
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/di06-context.jsonld b/test/jsonld/1.1/compact/di06-context.jsonld
new file mode 100644
index 000000000..f618d0d1c
--- /dev/null
+++ b/test/jsonld/1.1/compact/di06-context.jsonld
@@ -0,0 +1,12 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "@direction": "rtl",
+ "vocab": "http://example.com/vocab/",
+ "label": {
+ "@id": "vocab:label",
+ "@direction": null,
+ "@container": "@language"
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/di06-in.jsonld b/test/jsonld/1.1/compact/di06-in.jsonld
new file mode 100644
index 000000000..2ba565617
--- /dev/null
+++ b/test/jsonld/1.1/compact/di06-in.jsonld
@@ -0,0 +1,10 @@
+[
+ {
+ "@id": "http://example.com/queen",
+ "http://example.com/vocab/label": [
+ {"@value": "Die Königin", "@language": "de"},
+ {"@value": "Ihre Majestät", "@language": "de"},
+ {"@value": "The Queen", "@language": "en"}
+ ]
+ }
+]
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/di06-out.jsonld b/test/jsonld/1.1/compact/di06-out.jsonld
new file mode 100644
index 000000000..b9bb61e60
--- /dev/null
+++ b/test/jsonld/1.1/compact/di06-out.jsonld
@@ -0,0 +1,17 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "@direction": "rtl",
+ "vocab": "http://example.com/vocab/",
+ "label": {
+ "@id": "vocab:label",
+ "@direction": null,
+ "@container": "@language"
+ }
+ },
+ "@id": "http://example.com/queen",
+ "label": {
+ "en": "The Queen",
+ "de": [ "Die Königin", "Ihre Majestät" ]
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/di07-context.jsonld b/test/jsonld/1.1/compact/di07-context.jsonld
new file mode 100644
index 000000000..e0b7b922d
--- /dev/null
+++ b/test/jsonld/1.1/compact/di07-context.jsonld
@@ -0,0 +1,15 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "vocab": "http://example.com/vocab/",
+ "label": {
+ "@id": "vocab:label",
+ "@direction": "rtl",
+ "@container": "@language"
+ }
+ },
+ "@id": "http://example.com/queen",
+ "label": {
+ "en": "The Queen"
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/di07-in.jsonld b/test/jsonld/1.1/compact/di07-in.jsonld
new file mode 100644
index 000000000..c7df546b8
--- /dev/null
+++ b/test/jsonld/1.1/compact/di07-in.jsonld
@@ -0,0 +1,10 @@
+[
+ {
+ "@id": "http://example.com/queen",
+ "http://example.com/vocab/label": [
+ {"@value": "Die Königin", "@language": "de"},
+ {"@value": "Ihre Majestät", "@language": "de", "@direction": "ltr"},
+ {"@value": "The Queen", "@language": "en", "@direction": "rtl"}
+ ]
+ }
+]
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/di07-out.jsonld b/test/jsonld/1.1/compact/di07-out.jsonld
new file mode 100644
index 000000000..65c287f09
--- /dev/null
+++ b/test/jsonld/1.1/compact/di07-out.jsonld
@@ -0,0 +1,19 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "vocab": "http://example.com/vocab/",
+ "label": {
+ "@id": "vocab:label",
+ "@direction": "rtl",
+ "@container": "@language"
+ }
+ },
+ "@id": "http://example.com/queen",
+ "label": {
+ "en": "The Queen"
+ },
+ "vocab:label": [
+ {"@value": "Die Königin", "@language": "de"},
+ {"@value": "Ihre Majestät", "@language": "de", "@direction": "ltr"}
+ ]
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/e001-context.jsonld b/test/jsonld/1.1/compact/e001-context.jsonld
new file mode 100644
index 000000000..ee90c316b
--- /dev/null
+++ b/test/jsonld/1.1/compact/e001-context.jsonld
@@ -0,0 +1,8 @@
+{
+ "@context": {
+ "foo_ltr": {"@id": "http://example.com/foo", "@container": "@list", "@direction": "ltr"},
+ "foo_rtl": {"@id": "http://example.com/foo", "@container": "@list", "@direction": "rtl"}
+ },
+ "foo_ltr": ["en"],
+ "foo_rtl": ["ar"]
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/e001-in.jsonld b/test/jsonld/1.1/compact/e001-in.jsonld
new file mode 100644
index 000000000..344eadb2a
--- /dev/null
+++ b/test/jsonld/1.1/compact/e001-in.jsonld
@@ -0,0 +1,3 @@
+{
+ "http://example/list": {"@list": [{"@list": ["foo"]}, {"@list": ["bar"]}]}
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/e002-context.jsonld b/test/jsonld/1.1/compact/e002-context.jsonld
new file mode 100644
index 000000000..10ed9c17b
--- /dev/null
+++ b/test/jsonld/1.1/compact/e002-context.jsonld
@@ -0,0 +1,5 @@
+{
+ "@context": {
+ "tag": "http://example.org/ns/tag/"
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/e002-in.jsonld b/test/jsonld/1.1/compact/e002-in.jsonld
new file mode 100644
index 000000000..6d4b8011d
--- /dev/null
+++ b/test/jsonld/1.1/compact/e002-in.jsonld
@@ -0,0 +1,3 @@
+[{
+ "tag:champin.net,2019:prop": {"@value": "hello world"}
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/en01-context.jsonld b/test/jsonld/1.1/compact/en01-context.jsonld
new file mode 100644
index 000000000..d9cec5a10
--- /dev/null
+++ b/test/jsonld/1.1/compact/en01-context.jsonld
@@ -0,0 +1,5 @@
+{
+ "@context": {
+ "term": {"@id": "http://example/foo", "@nest": "unknown"}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/en01-in.jsonld b/test/jsonld/1.1/compact/en01-in.jsonld
new file mode 100644
index 000000000..ffc25a6b7
--- /dev/null
+++ b/test/jsonld/1.1/compact/en01-in.jsonld
@@ -0,0 +1,3 @@
+{
+ "http://example/foo": "bar"
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/ep05-context.jsonld b/test/jsonld/1.1/compact/ep05-context.jsonld
new file mode 100644
index 000000000..4caa4695e
--- /dev/null
+++ b/test/jsonld/1.1/compact/ep05-context.jsonld
@@ -0,0 +1,5 @@
+{
+ "@context": {
+ "@version": 1.1
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/ep05-in.jsonld b/test/jsonld/1.1/compact/ep05-in.jsonld
new file mode 100644
index 000000000..9e26dfeeb
--- /dev/null
+++ b/test/jsonld/1.1/compact/ep05-in.jsonld
@@ -0,0 +1 @@
+{}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/ep06-context.jsonld b/test/jsonld/1.1/compact/ep06-context.jsonld
new file mode 100644
index 000000000..63c70f63a
--- /dev/null
+++ b/test/jsonld/1.1/compact/ep06-context.jsonld
@@ -0,0 +1,5 @@
+{
+ "@context": {
+ "@version": 1.0
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/ep06-in.jsonld b/test/jsonld/1.1/compact/ep06-in.jsonld
new file mode 100644
index 000000000..9e26dfeeb
--- /dev/null
+++ b/test/jsonld/1.1/compact/ep06-in.jsonld
@@ -0,0 +1 @@
+{}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/ep07-context.jsonld b/test/jsonld/1.1/compact/ep07-context.jsonld
new file mode 100644
index 000000000..f2829c077
--- /dev/null
+++ b/test/jsonld/1.1/compact/ep07-context.jsonld
@@ -0,0 +1,5 @@
+{
+ "@context": {
+ "foo": {"@id": "http://example/foo", "@prefix": true}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/ep07-in.jsonld b/test/jsonld/1.1/compact/ep07-in.jsonld
new file mode 100644
index 000000000..ffc25a6b7
--- /dev/null
+++ b/test/jsonld/1.1/compact/ep07-in.jsonld
@@ -0,0 +1,3 @@
+{
+ "http://example/foo": "bar"
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/ep08-context.jsonld b/test/jsonld/1.1/compact/ep08-context.jsonld
new file mode 100644
index 000000000..1fde76ae9
--- /dev/null
+++ b/test/jsonld/1.1/compact/ep08-context.jsonld
@@ -0,0 +1,5 @@
+{
+ "@context": {
+ "foo": {"@id": "http://example/foo", "@prefix": "string"}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/ep08-in.jsonld b/test/jsonld/1.1/compact/ep08-in.jsonld
new file mode 100644
index 000000000..ffc25a6b7
--- /dev/null
+++ b/test/jsonld/1.1/compact/ep08-in.jsonld
@@ -0,0 +1,3 @@
+{
+ "http://example/foo": "bar"
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/ep09-context.jsonld b/test/jsonld/1.1/compact/ep09-context.jsonld
new file mode 100644
index 000000000..15b0bacaf
--- /dev/null
+++ b/test/jsonld/1.1/compact/ep09-context.jsonld
@@ -0,0 +1,6 @@
+{
+ "@context": {
+ "foo": "http://example/foo/",
+ "foo:bar": {"@id": "http://example/foo/bar", "@prefix": true}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/ep09-in.jsonld b/test/jsonld/1.1/compact/ep09-in.jsonld
new file mode 100644
index 000000000..6a50fcaa1
--- /dev/null
+++ b/test/jsonld/1.1/compact/ep09-in.jsonld
@@ -0,0 +1,3 @@
+{
+ "http://example/foo/bar/": "bar"
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/ep10-context.jsonld b/test/jsonld/1.1/compact/ep10-context.jsonld
new file mode 100644
index 000000000..c379d53d2
--- /dev/null
+++ b/test/jsonld/1.1/compact/ep10-context.jsonld
@@ -0,0 +1,5 @@
+{
+ "@context": {
+ "foo": {"@id": "http://example/foo", "@nest": "@nest"}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/ep10-in.jsonld b/test/jsonld/1.1/compact/ep10-in.jsonld
new file mode 100644
index 000000000..ffc25a6b7
--- /dev/null
+++ b/test/jsonld/1.1/compact/ep10-in.jsonld
@@ -0,0 +1,3 @@
+{
+ "http://example/foo": "bar"
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/ep11-context.jsonld b/test/jsonld/1.1/compact/ep11-context.jsonld
new file mode 100644
index 000000000..c74980521
--- /dev/null
+++ b/test/jsonld/1.1/compact/ep11-context.jsonld
@@ -0,0 +1,5 @@
+{
+ "@context": {
+ "foo": {"@id": "http://example/foo", "@context": {}}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/ep11-in.jsonld b/test/jsonld/1.1/compact/ep11-in.jsonld
new file mode 100644
index 000000000..ffc25a6b7
--- /dev/null
+++ b/test/jsonld/1.1/compact/ep11-in.jsonld
@@ -0,0 +1,3 @@
+{
+ "http://example/foo": "bar"
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/ep12-context.jsonld b/test/jsonld/1.1/compact/ep12-context.jsonld
new file mode 100644
index 000000000..0acc2d81d
--- /dev/null
+++ b/test/jsonld/1.1/compact/ep12-context.jsonld
@@ -0,0 +1,5 @@
+{
+ "@context": {
+ "foo": {"@id": "http://example/foo", "@container": ["@set"]}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/ep12-in.jsonld b/test/jsonld/1.1/compact/ep12-in.jsonld
new file mode 100644
index 000000000..ffc25a6b7
--- /dev/null
+++ b/test/jsonld/1.1/compact/ep12-in.jsonld
@@ -0,0 +1,3 @@
+{
+ "http://example/foo": "bar"
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/ep13-context.jsonld b/test/jsonld/1.1/compact/ep13-context.jsonld
new file mode 100644
index 000000000..20cd3cd25
--- /dev/null
+++ b/test/jsonld/1.1/compact/ep13-context.jsonld
@@ -0,0 +1,5 @@
+{
+ "@context": {
+ "foo": {"@id": "http://example/foo", "@container": "@id"}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/ep13-in.jsonld b/test/jsonld/1.1/compact/ep13-in.jsonld
new file mode 100644
index 000000000..d79e470b4
--- /dev/null
+++ b/test/jsonld/1.1/compact/ep13-in.jsonld
@@ -0,0 +1,3 @@
+{
+ "http://example/foo": {"@id": "http://example/foo", "http://example/bar": "bar"}
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/ep14-context.jsonld b/test/jsonld/1.1/compact/ep14-context.jsonld
new file mode 100644
index 000000000..8b1f72cb9
--- /dev/null
+++ b/test/jsonld/1.1/compact/ep14-context.jsonld
@@ -0,0 +1,5 @@
+{
+ "@context": {
+ "foo": {"@id": "http://example/foo", "@container": "@type"}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/ep14-in.jsonld b/test/jsonld/1.1/compact/ep14-in.jsonld
new file mode 100644
index 000000000..286bc559f
--- /dev/null
+++ b/test/jsonld/1.1/compact/ep14-in.jsonld
@@ -0,0 +1,3 @@
+{
+ "http://example/foo": {"@type": "http://example/foo", "http://example/bar": "bar"}
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/ep15-context.jsonld b/test/jsonld/1.1/compact/ep15-context.jsonld
new file mode 100644
index 000000000..d3f8c2a91
--- /dev/null
+++ b/test/jsonld/1.1/compact/ep15-context.jsonld
@@ -0,0 +1,5 @@
+{
+ "@context": {
+ "foo": {"@id": "http://example/foo", "@container": "@graph"}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/ep15-in.jsonld b/test/jsonld/1.1/compact/ep15-in.jsonld
new file mode 100644
index 000000000..69e849215
--- /dev/null
+++ b/test/jsonld/1.1/compact/ep15-in.jsonld
@@ -0,0 +1,3 @@
+{
+ "http://example/foo": {"@graph": {"http://example/bar": "bar"}}
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/in01-context.jsonld b/test/jsonld/1.1/compact/in01-context.jsonld
new file mode 100644
index 000000000..d52ab4457
--- /dev/null
+++ b/test/jsonld/1.1/compact/in01-context.jsonld
@@ -0,0 +1,7 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "@vocab": "http://example.org/",
+ "included": {"@id": "@included", "@container": "@set"}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/in01-in.jsonld b/test/jsonld/1.1/compact/in01-in.jsonld
new file mode 100644
index 000000000..2e2188309
--- /dev/null
+++ b/test/jsonld/1.1/compact/in01-in.jsonld
@@ -0,0 +1,6 @@
+[{
+ "http://example.org/prop": [{"@value": "value"}],
+ "@included": [{
+ "http://example.org/prop": [{"@value": "value2"}]
+ }]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/in01-out.jsonld b/test/jsonld/1.1/compact/in01-out.jsonld
new file mode 100644
index 000000000..4b8a9be6c
--- /dev/null
+++ b/test/jsonld/1.1/compact/in01-out.jsonld
@@ -0,0 +1,11 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "@vocab": "http://example.org/",
+ "included": {"@id": "@included", "@container": "@set"}
+ },
+ "prop": "value",
+ "included": [{
+ "prop": "value2"
+ }]
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/in02-context.jsonld b/test/jsonld/1.1/compact/in02-context.jsonld
new file mode 100644
index 000000000..c5dbc8e99
--- /dev/null
+++ b/test/jsonld/1.1/compact/in02-context.jsonld
@@ -0,0 +1,6 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "@vocab": "http://example.org/"
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/in02-in.jsonld b/test/jsonld/1.1/compact/in02-in.jsonld
new file mode 100644
index 000000000..2e2188309
--- /dev/null
+++ b/test/jsonld/1.1/compact/in02-in.jsonld
@@ -0,0 +1,6 @@
+[{
+ "http://example.org/prop": [{"@value": "value"}],
+ "@included": [{
+ "http://example.org/prop": [{"@value": "value2"}]
+ }]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/in02-out.jsonld b/test/jsonld/1.1/compact/in02-out.jsonld
new file mode 100644
index 000000000..a976cce70
--- /dev/null
+++ b/test/jsonld/1.1/compact/in02-out.jsonld
@@ -0,0 +1,10 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "@vocab": "http://example.org/"
+ },
+ "prop": "value",
+ "@included": {
+ "prop": "value2"
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/in03-context.jsonld b/test/jsonld/1.1/compact/in03-context.jsonld
new file mode 100644
index 000000000..f55110881
--- /dev/null
+++ b/test/jsonld/1.1/compact/in03-context.jsonld
@@ -0,0 +1,7 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "@vocab": "http://example.org/",
+ "included": "@included"
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/in03-in.jsonld b/test/jsonld/1.1/compact/in03-in.jsonld
new file mode 100644
index 000000000..349be02d2
--- /dev/null
+++ b/test/jsonld/1.1/compact/in03-in.jsonld
@@ -0,0 +1,6 @@
+[{
+ "@included": [
+ {"http://example.org/prop": [{"@value": "value1"}]},
+ {"http://example.org/prop": [{"@value": "value2"}]}
+ ]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/in03-out.jsonld b/test/jsonld/1.1/compact/in03-out.jsonld
new file mode 100644
index 000000000..3db34b64f
--- /dev/null
+++ b/test/jsonld/1.1/compact/in03-out.jsonld
@@ -0,0 +1,11 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "@vocab": "http://example.org/",
+ "included": "@included"
+ },
+ "included": [
+ {"prop": "value1"},
+ {"prop": "value2"}
+ ]
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/in04-context.jsonld b/test/jsonld/1.1/compact/in04-context.jsonld
new file mode 100644
index 000000000..c5dbc8e99
--- /dev/null
+++ b/test/jsonld/1.1/compact/in04-context.jsonld
@@ -0,0 +1,6 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "@vocab": "http://example.org/"
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/in04-in.jsonld b/test/jsonld/1.1/compact/in04-in.jsonld
new file mode 100644
index 000000000..766ef215e
--- /dev/null
+++ b/test/jsonld/1.1/compact/in04-in.jsonld
@@ -0,0 +1,9 @@
+[{
+ "http://example.org/prop": [{"@value": "value"}],
+ "@included": [{
+ "http://example.org/prop": [{"@value": "value2"}],
+ "@included": [{
+ "http://example.org/prop": [{"@value": "value3"}]
+ }]
+ }]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/in04-out.jsonld b/test/jsonld/1.1/compact/in04-out.jsonld
new file mode 100644
index 000000000..2436a4541
--- /dev/null
+++ b/test/jsonld/1.1/compact/in04-out.jsonld
@@ -0,0 +1,13 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "@vocab": "http://example.org/"
+ },
+ "prop": "value",
+ "@included": {
+ "prop": "value2",
+ "@included": {
+ "prop": "value3"
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/in05-context.jsonld b/test/jsonld/1.1/compact/in05-context.jsonld
new file mode 100644
index 000000000..c5dbc8e99
--- /dev/null
+++ b/test/jsonld/1.1/compact/in05-context.jsonld
@@ -0,0 +1,6 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "@vocab": "http://example.org/"
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/in05-in.jsonld b/test/jsonld/1.1/compact/in05-in.jsonld
new file mode 100644
index 000000000..671224bdc
--- /dev/null
+++ b/test/jsonld/1.1/compact/in05-in.jsonld
@@ -0,0 +1,8 @@
+[{
+ "http://example.org/prop": [{
+ "@type": ["http://example.org/Foo"],
+ "@included": [{
+ "@type": ["http://example.org/Bar"]
+ }]
+ }]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/in05-out.jsonld b/test/jsonld/1.1/compact/in05-out.jsonld
new file mode 100644
index 000000000..b94709b4e
--- /dev/null
+++ b/test/jsonld/1.1/compact/in05-out.jsonld
@@ -0,0 +1,12 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "@vocab": "http://example.org/"
+ },
+ "prop": {
+ "@type": "Foo",
+ "@included": {
+ "@type": "Bar"
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/js01-context.jsonld b/test/jsonld/1.1/compact/js01-context.jsonld
new file mode 100644
index 000000000..946ab91a8
--- /dev/null
+++ b/test/jsonld/1.1/compact/js01-context.jsonld
@@ -0,0 +1,6 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "e": {"@id": "http://example.org/vocab#bool", "@type": "@json"}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/js01-in.jsonld b/test/jsonld/1.1/compact/js01-in.jsonld
new file mode 100644
index 000000000..642709fd7
--- /dev/null
+++ b/test/jsonld/1.1/compact/js01-in.jsonld
@@ -0,0 +1,3 @@
+[{
+ "http://example.org/vocab#bool": [{"@value": true, "@type": "@json"}]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/js01-out.jsonld b/test/jsonld/1.1/compact/js01-out.jsonld
new file mode 100644
index 000000000..ace09383e
--- /dev/null
+++ b/test/jsonld/1.1/compact/js01-out.jsonld
@@ -0,0 +1,7 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "e": {"@id": "http://example.org/vocab#bool", "@type": "@json"}
+ },
+ "e": true
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/js02-context.jsonld b/test/jsonld/1.1/compact/js02-context.jsonld
new file mode 100644
index 000000000..946ab91a8
--- /dev/null
+++ b/test/jsonld/1.1/compact/js02-context.jsonld
@@ -0,0 +1,6 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "e": {"@id": "http://example.org/vocab#bool", "@type": "@json"}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/js02-in.jsonld b/test/jsonld/1.1/compact/js02-in.jsonld
new file mode 100644
index 000000000..640d3d298
--- /dev/null
+++ b/test/jsonld/1.1/compact/js02-in.jsonld
@@ -0,0 +1,3 @@
+[{
+ "http://example.org/vocab#bool": [{"@value": false, "@type": "@json"}]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/js02-out.jsonld b/test/jsonld/1.1/compact/js02-out.jsonld
new file mode 100644
index 000000000..65f32bf2b
--- /dev/null
+++ b/test/jsonld/1.1/compact/js02-out.jsonld
@@ -0,0 +1,7 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "e": {"@id": "http://example.org/vocab#bool", "@type": "@json"}
+ },
+ "e": false
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/js03-context.jsonld b/test/jsonld/1.1/compact/js03-context.jsonld
new file mode 100644
index 000000000..e933a8f1b
--- /dev/null
+++ b/test/jsonld/1.1/compact/js03-context.jsonld
@@ -0,0 +1,6 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "e": {"@id": "http://example.org/vocab#double", "@type": "@json"}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/js03-in.jsonld b/test/jsonld/1.1/compact/js03-in.jsonld
new file mode 100644
index 000000000..060691ac7
--- /dev/null
+++ b/test/jsonld/1.1/compact/js03-in.jsonld
@@ -0,0 +1,3 @@
+[{
+ "http://example.org/vocab#double": [{"@value": 1.23, "@type": "@json"}]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/js03-out.jsonld b/test/jsonld/1.1/compact/js03-out.jsonld
new file mode 100644
index 000000000..3f98c4fca
--- /dev/null
+++ b/test/jsonld/1.1/compact/js03-out.jsonld
@@ -0,0 +1,7 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "e": {"@id": "http://example.org/vocab#double", "@type": "@json"}
+ },
+ "e": 1.23
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/js04-context.jsonld b/test/jsonld/1.1/compact/js04-context.jsonld
new file mode 100644
index 000000000..e933a8f1b
--- /dev/null
+++ b/test/jsonld/1.1/compact/js04-context.jsonld
@@ -0,0 +1,6 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "e": {"@id": "http://example.org/vocab#double", "@type": "@json"}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/js04-in.jsonld b/test/jsonld/1.1/compact/js04-in.jsonld
new file mode 100644
index 000000000..278b08f0c
--- /dev/null
+++ b/test/jsonld/1.1/compact/js04-in.jsonld
@@ -0,0 +1,3 @@
+[{
+ "http://example.org/vocab#double": [{"@value": 0.0e0, "@type": "@json"}]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/js04-out.jsonld b/test/jsonld/1.1/compact/js04-out.jsonld
new file mode 100644
index 000000000..dfd129c81
--- /dev/null
+++ b/test/jsonld/1.1/compact/js04-out.jsonld
@@ -0,0 +1,7 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "e": {"@id": "http://example.org/vocab#double", "@type": "@json"}
+ },
+ "e": 0.0e0
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/js05-context.jsonld b/test/jsonld/1.1/compact/js05-context.jsonld
new file mode 100644
index 000000000..8185ea177
--- /dev/null
+++ b/test/jsonld/1.1/compact/js05-context.jsonld
@@ -0,0 +1,6 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "e": {"@id": "http://example.org/vocab#integer", "@type": "@json"}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/js05-in.jsonld b/test/jsonld/1.1/compact/js05-in.jsonld
new file mode 100644
index 000000000..364fc8ff1
--- /dev/null
+++ b/test/jsonld/1.1/compact/js05-in.jsonld
@@ -0,0 +1,3 @@
+[{
+ "http://example.org/vocab#integer": [{"@value": 123, "@type": "@json"}]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/js05-out.jsonld b/test/jsonld/1.1/compact/js05-out.jsonld
new file mode 100644
index 000000000..227024935
--- /dev/null
+++ b/test/jsonld/1.1/compact/js05-out.jsonld
@@ -0,0 +1,7 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "e": {"@id": "http://example.org/vocab#integer", "@type": "@json"}
+ },
+ "e": 123
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/js06-context.jsonld b/test/jsonld/1.1/compact/js06-context.jsonld
new file mode 100644
index 000000000..98422103d
--- /dev/null
+++ b/test/jsonld/1.1/compact/js06-context.jsonld
@@ -0,0 +1,6 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "e": {"@id": "http://example.org/vocab#object", "@type": "@json"}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/js06-in.jsonld b/test/jsonld/1.1/compact/js06-in.jsonld
new file mode 100644
index 000000000..c9df28669
--- /dev/null
+++ b/test/jsonld/1.1/compact/js06-in.jsonld
@@ -0,0 +1,3 @@
+[{
+ "http://example.org/vocab#object": [{"@value": {"foo": "bar"}, "@type": "@json"}]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/js06-out.jsonld b/test/jsonld/1.1/compact/js06-out.jsonld
new file mode 100644
index 000000000..b0c57352e
--- /dev/null
+++ b/test/jsonld/1.1/compact/js06-out.jsonld
@@ -0,0 +1,7 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "e": {"@id": "http://example.org/vocab#object", "@type": "@json"}
+ },
+ "e": {"foo": "bar"}
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/js07-context.jsonld b/test/jsonld/1.1/compact/js07-context.jsonld
new file mode 100644
index 000000000..c037c68d5
--- /dev/null
+++ b/test/jsonld/1.1/compact/js07-context.jsonld
@@ -0,0 +1,6 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "e": {"@id": "http://example.org/vocab#array", "@type": "@json", "@container": "@set"}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/js07-in.jsonld b/test/jsonld/1.1/compact/js07-in.jsonld
new file mode 100644
index 000000000..d0b1b28e0
--- /dev/null
+++ b/test/jsonld/1.1/compact/js07-in.jsonld
@@ -0,0 +1,3 @@
+[{
+ "http://example.org/vocab#array": [{"@value": [{"foo": "bar"}], "@type": "@json"}]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/js07-out.jsonld b/test/jsonld/1.1/compact/js07-out.jsonld
new file mode 100644
index 000000000..d4e7c2cbb
--- /dev/null
+++ b/test/jsonld/1.1/compact/js07-out.jsonld
@@ -0,0 +1,7 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "e": {"@id": "http://example.org/vocab#array", "@type": "@json", "@container": "@set"}
+ },
+ "e": [{"foo": "bar"}]
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/js08-context.jsonld b/test/jsonld/1.1/compact/js08-context.jsonld
new file mode 100644
index 000000000..91f0f1030
--- /dev/null
+++ b/test/jsonld/1.1/compact/js08-context.jsonld
@@ -0,0 +1,3 @@
+{
+ "@context": {"@version": 1.1}
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/js08-in.jsonld b/test/jsonld/1.1/compact/js08-in.jsonld
new file mode 100644
index 000000000..c9df28669
--- /dev/null
+++ b/test/jsonld/1.1/compact/js08-in.jsonld
@@ -0,0 +1,3 @@
+[{
+ "http://example.org/vocab#object": [{"@value": {"foo": "bar"}, "@type": "@json"}]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/js08-out.jsonld b/test/jsonld/1.1/compact/js08-out.jsonld
new file mode 100644
index 000000000..2b136f3ff
--- /dev/null
+++ b/test/jsonld/1.1/compact/js08-out.jsonld
@@ -0,0 +1,4 @@
+{
+ "@context": {"@version": 1.1},
+ "http://example.org/vocab#object": {"@value": {"foo": "bar"}, "@type": "@json"}
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/js09-context.jsonld b/test/jsonld/1.1/compact/js09-context.jsonld
new file mode 100644
index 000000000..724029d95
--- /dev/null
+++ b/test/jsonld/1.1/compact/js09-context.jsonld
@@ -0,0 +1,3 @@
+{
+ "@context": {"@version": 1.1, "value": "@value", "type": "@type", "json": "@json"}
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/js09-in.jsonld b/test/jsonld/1.1/compact/js09-in.jsonld
new file mode 100644
index 000000000..c9df28669
--- /dev/null
+++ b/test/jsonld/1.1/compact/js09-in.jsonld
@@ -0,0 +1,3 @@
+[{
+ "http://example.org/vocab#object": [{"@value": {"foo": "bar"}, "@type": "@json"}]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/js09-out.jsonld b/test/jsonld/1.1/compact/js09-out.jsonld
new file mode 100644
index 000000000..71bb1b5f7
--- /dev/null
+++ b/test/jsonld/1.1/compact/js09-out.jsonld
@@ -0,0 +1,4 @@
+{
+ "@context": {"@version": 1.1, "value": "@value", "type": "@type", "json": "@json"},
+ "http://example.org/vocab#object": {"value": {"foo": "bar"}, "type": "json"}
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/js10-context.jsonld b/test/jsonld/1.1/compact/js10-context.jsonld
new file mode 100644
index 000000000..d42e08edf
--- /dev/null
+++ b/test/jsonld/1.1/compact/js10-context.jsonld
@@ -0,0 +1,6 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "e": {"@id": "http://example.org/vocab#string", "@type": "@json"}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/js10-in.jsonld b/test/jsonld/1.1/compact/js10-in.jsonld
new file mode 100644
index 000000000..56ae74fcb
--- /dev/null
+++ b/test/jsonld/1.1/compact/js10-in.jsonld
@@ -0,0 +1,6 @@
+[{
+ "http://example.org/vocab#string": [{
+ "@value": "string",
+ "@type": "@json"
+ }]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/js10-out.jsonld b/test/jsonld/1.1/compact/js10-out.jsonld
new file mode 100644
index 000000000..08fc84f7f
--- /dev/null
+++ b/test/jsonld/1.1/compact/js10-out.jsonld
@@ -0,0 +1,7 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "e": {"@id": "http://example.org/vocab#string", "@type": "@json"}
+ },
+ "e": "string"
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/js11-context.jsonld b/test/jsonld/1.1/compact/js11-context.jsonld
new file mode 100644
index 000000000..1daac1c2a
--- /dev/null
+++ b/test/jsonld/1.1/compact/js11-context.jsonld
@@ -0,0 +1,6 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "e": {"@id": "http://example.org/vocab#null", "@type": "@json"}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/js11-in.jsonld b/test/jsonld/1.1/compact/js11-in.jsonld
new file mode 100644
index 000000000..5efe8b140
--- /dev/null
+++ b/test/jsonld/1.1/compact/js11-in.jsonld
@@ -0,0 +1,6 @@
+[{
+ "http://example.org/vocab#null": [{
+ "@value": null,
+ "@type": "@json"
+ }]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/js11-out.jsonld b/test/jsonld/1.1/compact/js11-out.jsonld
new file mode 100644
index 000000000..564111494
--- /dev/null
+++ b/test/jsonld/1.1/compact/js11-out.jsonld
@@ -0,0 +1,7 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "e": {"@id": "http://example.org/vocab#null", "@type": "@json"}
+ },
+ "e": null
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/la01-context.jsonld b/test/jsonld/1.1/compact/la01-context.jsonld
new file mode 100644
index 000000000..ee0dc44d7
--- /dev/null
+++ b/test/jsonld/1.1/compact/la01-context.jsonld
@@ -0,0 +1,15 @@
+{
+ "@context": {
+ "type1": "http://example.com/t1",
+ "type2": "http://example.com/t2",
+ "@language": "de",
+ "termL": { "@id": "http://example.com/termLanguage" },
+ "termLL0": { "@id": "http://example.com/termLanguage", "@container": "@list" },
+ "termLL1": { "@id": "http://example.com/termLanguage", "@container": "@list", "@language": "eN" },
+ "termLL2": { "@id": "http://example.com/termLanguage", "@container": "@list", "@language": null },
+ "termT": { "@id": "http://example.com/termType" },
+ "termTL0": { "@id": "http://example.com/termType", "@container": "@list" },
+ "termTL1": { "@id": "http://example.com/termType", "@container": "@list", "@type": "type1" },
+ "termTL2": { "@id": "http://example.com/termType", "@container": "@list", "@type": "type2" }
+ }
+}
diff --git a/test/jsonld/1.1/compact/la01-in.jsonld b/test/jsonld/1.1/compact/la01-in.jsonld
new file mode 100644
index 000000000..e25e21f40
--- /dev/null
+++ b/test/jsonld/1.1/compact/la01-in.jsonld
@@ -0,0 +1,48 @@
+{
+
+ "@context": {
+ "type1": "http://example.com/t1",
+ "type2": "http://example.com/t2"
+ },
+ "@id": "http://example.com/id1",
+ "http://example.com/termLanguage": [
+ {
+ "@list": [
+ { "@value": "termLL0.1", "@language": "de" },
+ { "@value": "termLL0.2", "@language": "de" }
+ ]
+ },
+ {
+ "@list": [
+ { "@value": "termLL1.1", "@language": "en" },
+ { "@value": "termLL1.2", "@language": "en" }
+ ]
+ },
+ {
+ "@list": [
+ "termLL2.1",
+ "termLL2.2"
+ ]
+ }
+ ],
+ "http://example.com/termType": [
+ {
+ "@list": [
+ { "@value": "termTL0.1", "@type": "type1" },
+ { "@value": "termTL0.2", "@type": "type2" }
+ ]
+ },
+ {
+ "@list": [
+ { "@value": "termTL1.1", "@type": "type1" },
+ { "@value": "termTL1.2", "@type": "type1" }
+ ]
+ },
+ {
+ "@list": [
+ { "@value": "termTL2.1", "@type": "type2" },
+ { "@value": "termTL2.2", "@type": "type2" }
+ ]
+ }
+ ]
+}
diff --git a/test/jsonld/1.1/compact/la01-out.jsonld b/test/jsonld/1.1/compact/la01-out.jsonld
new file mode 100644
index 000000000..050002e2d
--- /dev/null
+++ b/test/jsonld/1.1/compact/la01-out.jsonld
@@ -0,0 +1,46 @@
+{
+ "@context": {
+ "type1": "http://example.com/t1",
+ "type2": "http://example.com/t2",
+ "@language": "de",
+ "termL": { "@id": "http://example.com/termLanguage" },
+ "termLL0": { "@id": "http://example.com/termLanguage", "@container": "@list" },
+ "termLL1": { "@id": "http://example.com/termLanguage", "@container": "@list", "@language": "eN" },
+ "termLL2": { "@id": "http://example.com/termLanguage", "@container": "@list", "@language": null },
+ "termT": { "@id": "http://example.com/termType" },
+ "termTL0": { "@id": "http://example.com/termType", "@container": "@list" },
+ "termTL1": { "@id": "http://example.com/termType", "@container": "@list", "@type": "type1" },
+ "termTL2": { "@id": "http://example.com/termType", "@container": "@list", "@type": "type2" }
+ },
+ "@id": "http://example.com/id1",
+ "termLL0": [
+ "termLL0.1",
+ "termLL0.2"
+ ],
+ "termLL1": [
+ "termLL1.1",
+ "termLL1.2"
+ ],
+ "termLL2": [
+ "termLL2.1",
+ "termLL2.2"
+ ],
+ "termTL0": [
+ {
+ "@type": "type1",
+ "@value": "termTL0.1"
+ },
+ {
+ "@type": "type2",
+ "@value": "termTL0.2"
+ }
+ ],
+ "termTL1": [
+ "termTL1.1",
+ "termTL1.2"
+ ],
+ "termTL2": [
+ "termTL2.1",
+ "termTL2.2"
+ ]
+}
diff --git a/test/jsonld/1.1/compact/li01-context.jsonld b/test/jsonld/1.1/compact/li01-context.jsonld
new file mode 100644
index 000000000..d244b9125
--- /dev/null
+++ b/test/jsonld/1.1/compact/li01-context.jsonld
@@ -0,0 +1,3 @@
+{
+ "@context": {"foo": {"@id": "http://example.com/foo", "@container": "@list"}}
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/li01-in.jsonld b/test/jsonld/1.1/compact/li01-in.jsonld
new file mode 100644
index 000000000..e77375043
--- /dev/null
+++ b/test/jsonld/1.1/compact/li01-in.jsonld
@@ -0,0 +1,3 @@
+[{
+ "http://example.com/foo": [{"@list": [{"@list": []}]}]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/li01-out.jsonld b/test/jsonld/1.1/compact/li01-out.jsonld
new file mode 100644
index 000000000..81c8b23e6
--- /dev/null
+++ b/test/jsonld/1.1/compact/li01-out.jsonld
@@ -0,0 +1,4 @@
+{
+ "@context": {"foo": {"@id": "http://example.com/foo", "@container": "@list"}},
+ "foo": [[]]
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/li02-context.jsonld b/test/jsonld/1.1/compact/li02-context.jsonld
new file mode 100644
index 000000000..d244b9125
--- /dev/null
+++ b/test/jsonld/1.1/compact/li02-context.jsonld
@@ -0,0 +1,3 @@
+{
+ "@context": {"foo": {"@id": "http://example.com/foo", "@container": "@list"}}
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/li02-in.jsonld b/test/jsonld/1.1/compact/li02-in.jsonld
new file mode 100644
index 000000000..998c20a6f
--- /dev/null
+++ b/test/jsonld/1.1/compact/li02-in.jsonld
@@ -0,0 +1,3 @@
+[{
+ "http://example.com/foo": [{"@list": [{"@list": [{"@value": "baz"}]}]}]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/li02-out.jsonld b/test/jsonld/1.1/compact/li02-out.jsonld
new file mode 100644
index 000000000..e38ec8ce4
--- /dev/null
+++ b/test/jsonld/1.1/compact/li02-out.jsonld
@@ -0,0 +1,4 @@
+{
+ "@context": {"foo": {"@id": "http://example.com/foo", "@container": "@list"}},
+ "foo": [["baz"]]
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/li03-context.jsonld b/test/jsonld/1.1/compact/li03-context.jsonld
new file mode 100644
index 000000000..d244b9125
--- /dev/null
+++ b/test/jsonld/1.1/compact/li03-context.jsonld
@@ -0,0 +1,3 @@
+{
+ "@context": {"foo": {"@id": "http://example.com/foo", "@container": "@list"}}
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/li03-in.jsonld b/test/jsonld/1.1/compact/li03-in.jsonld
new file mode 100644
index 000000000..329a79c9f
--- /dev/null
+++ b/test/jsonld/1.1/compact/li03-in.jsonld
@@ -0,0 +1,3 @@
+[{
+ "http://example.com/foo": [{"@list": [{"@list": [{"@list": [{"@value": "baz"}]}]}]}]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/li03-out.jsonld b/test/jsonld/1.1/compact/li03-out.jsonld
new file mode 100644
index 000000000..e01353af7
--- /dev/null
+++ b/test/jsonld/1.1/compact/li03-out.jsonld
@@ -0,0 +1,4 @@
+{
+ "@context": {"foo": {"@id": "http://example.com/foo", "@container": "@list"}},
+ "foo": [[["baz"]]]
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/li04-context.jsonld b/test/jsonld/1.1/compact/li04-context.jsonld
new file mode 100644
index 000000000..d244b9125
--- /dev/null
+++ b/test/jsonld/1.1/compact/li04-context.jsonld
@@ -0,0 +1,3 @@
+{
+ "@context": {"foo": {"@id": "http://example.com/foo", "@container": "@list"}}
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/li04-in.jsonld b/test/jsonld/1.1/compact/li04-in.jsonld
new file mode 100644
index 000000000..bb6227d11
--- /dev/null
+++ b/test/jsonld/1.1/compact/li04-in.jsonld
@@ -0,0 +1,6 @@
+[{
+ "http://example.com/foo": [{"@list": [
+ {"@list": [{"@value": "a"}]},
+ {"@list": [{"@value": "b"}]}
+ ]}]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/li04-out.jsonld b/test/jsonld/1.1/compact/li04-out.jsonld
new file mode 100644
index 000000000..58aea4aae
--- /dev/null
+++ b/test/jsonld/1.1/compact/li04-out.jsonld
@@ -0,0 +1,4 @@
+{
+ "@context": {"foo": {"@id": "http://example.com/foo", "@container": "@list"}},
+ "foo": [["a"], ["b"]]
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/li05-context.jsonld b/test/jsonld/1.1/compact/li05-context.jsonld
new file mode 100644
index 000000000..d244b9125
--- /dev/null
+++ b/test/jsonld/1.1/compact/li05-context.jsonld
@@ -0,0 +1,3 @@
+{
+ "@context": {"foo": {"@id": "http://example.com/foo", "@container": "@list"}}
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/li05-in.jsonld b/test/jsonld/1.1/compact/li05-in.jsonld
new file mode 100644
index 000000000..3c0dd9bcd
--- /dev/null
+++ b/test/jsonld/1.1/compact/li05-in.jsonld
@@ -0,0 +1,6 @@
+{
+ "http://example.com/foo": [{"@list": [
+ {"@list": [{"@value": "a"}]},
+ {"@value": "b"}
+ ]}]
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/li05-out.jsonld b/test/jsonld/1.1/compact/li05-out.jsonld
new file mode 100644
index 000000000..b1db13b18
--- /dev/null
+++ b/test/jsonld/1.1/compact/li05-out.jsonld
@@ -0,0 +1,4 @@
+{
+ "@context": {"foo": {"@id": "http://example.com/foo", "@container": "@list"}},
+ "foo": [["a"], "b"]
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/m001-context.jsonld b/test/jsonld/1.1/compact/m001-context.jsonld
new file mode 100644
index 000000000..e78b68996
--- /dev/null
+++ b/test/jsonld/1.1/compact/m001-context.jsonld
@@ -0,0 +1,6 @@
+{
+ "@context": {
+ "@vocab": "http://example/",
+ "idmap": {"@container": "@id"}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/m001-in.jsonld b/test/jsonld/1.1/compact/m001-in.jsonld
new file mode 100644
index 000000000..c44d5e63e
--- /dev/null
+++ b/test/jsonld/1.1/compact/m001-in.jsonld
@@ -0,0 +1,6 @@
+[{
+ "http://example/idmap": [
+ {"http://example/label": [{"@value": "Object with @id _:bar"}], "@id": "_:bar"},
+ {"http://example/label": [{"@value": "Object with @id "}], "@id": "http://example.org/foo"}
+ ]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/m001-out.jsonld b/test/jsonld/1.1/compact/m001-out.jsonld
new file mode 100644
index 000000000..81a736c75
--- /dev/null
+++ b/test/jsonld/1.1/compact/m001-out.jsonld
@@ -0,0 +1,10 @@
+{
+ "@context": {
+ "@vocab": "http://example/",
+ "idmap": {"@container": "@id"}
+ },
+ "idmap": {
+ "http://example.org/foo": {"label": "Object with @id "},
+ "_:bar": {"label": "Object with @id _:bar"}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/m002-context.jsonld b/test/jsonld/1.1/compact/m002-context.jsonld
new file mode 100644
index 000000000..e78b68996
--- /dev/null
+++ b/test/jsonld/1.1/compact/m002-context.jsonld
@@ -0,0 +1,6 @@
+{
+ "@context": {
+ "@vocab": "http://example/",
+ "idmap": {"@container": "@id"}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/m002-in.jsonld b/test/jsonld/1.1/compact/m002-in.jsonld
new file mode 100644
index 000000000..274bb8c73
--- /dev/null
+++ b/test/jsonld/1.1/compact/m002-in.jsonld
@@ -0,0 +1,6 @@
+[{
+ "http://example/idmap": [
+ {"@id": "_:foo", "http://example/label": [{"@value": "Object with @id _:bar"}]},
+ {"@id": "http://example.org/bar", "http://example/label": [{"@value": "Object with @id "}]}
+ ]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/m002-out.jsonld b/test/jsonld/1.1/compact/m002-out.jsonld
new file mode 100644
index 000000000..c11c0bdd5
--- /dev/null
+++ b/test/jsonld/1.1/compact/m002-out.jsonld
@@ -0,0 +1,10 @@
+{
+ "@context": {
+ "@vocab": "http://example/",
+ "idmap": {"@container": "@id"}
+ },
+ "idmap": {
+ "_:foo": {"label": "Object with @id _:bar"},
+ "http://example.org/bar": {"label": "Object with @id "}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/m003-context.jsonld b/test/jsonld/1.1/compact/m003-context.jsonld
new file mode 100644
index 000000000..6540eb51d
--- /dev/null
+++ b/test/jsonld/1.1/compact/m003-context.jsonld
@@ -0,0 +1,6 @@
+{
+ "@context": {
+ "@vocab": "http://example/",
+ "typemap": {"@container": "@type"}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/m003-in.jsonld b/test/jsonld/1.1/compact/m003-in.jsonld
new file mode 100644
index 000000000..ecdfc4498
--- /dev/null
+++ b/test/jsonld/1.1/compact/m003-in.jsonld
@@ -0,0 +1,6 @@
+[{
+ "http://example/typemap": [
+ {"http://example/label": [{"@value": "Object with @type _:bar"}], "@type": ["_:bar"]},
+ {"http://example/label": [{"@value": "Object with @type "}], "@type": ["http://example.org/foo"]}
+ ]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/m003-out.jsonld b/test/jsonld/1.1/compact/m003-out.jsonld
new file mode 100644
index 000000000..f79d87a63
--- /dev/null
+++ b/test/jsonld/1.1/compact/m003-out.jsonld
@@ -0,0 +1,10 @@
+{
+ "@context": {
+ "@vocab": "http://example/",
+ "typemap": {"@container": "@type"}
+ },
+ "typemap": {
+ "http://example.org/foo": {"label": "Object with @type "},
+ "_:bar": {"label": "Object with @type _:bar"}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/m004-context.jsonld b/test/jsonld/1.1/compact/m004-context.jsonld
new file mode 100644
index 000000000..6540eb51d
--- /dev/null
+++ b/test/jsonld/1.1/compact/m004-context.jsonld
@@ -0,0 +1,6 @@
+{
+ "@context": {
+ "@vocab": "http://example/",
+ "typemap": {"@container": "@type"}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/m004-in.jsonld b/test/jsonld/1.1/compact/m004-in.jsonld
new file mode 100644
index 000000000..f35a9a884
--- /dev/null
+++ b/test/jsonld/1.1/compact/m004-in.jsonld
@@ -0,0 +1,12 @@
+[{
+ "http://example/typemap": [
+ {
+ "@type": ["_:bar", "_:foo"],
+ "http://example/label": [{"@value": "Object with @type _:bar"}]
+ },
+ {
+ "@type": ["http://example.org/foo", "http://example.org/bar"],
+ "http://example/label": [{"@value": "Object with @type "}]
+ }
+ ]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/m004-out.jsonld b/test/jsonld/1.1/compact/m004-out.jsonld
new file mode 100644
index 000000000..b75a0ff84
--- /dev/null
+++ b/test/jsonld/1.1/compact/m004-out.jsonld
@@ -0,0 +1,10 @@
+{
+ "@context": {
+ "@vocab": "http://example/",
+ "typemap": {"@container": "@type"}
+ },
+ "typemap": {
+ "http://example.org/foo": {"@type": "http://example.org/bar", "label": "Object with @type "},
+ "_:bar": {"@type": "_:foo", "label": "Object with @type _:bar"}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/m005-context.jsonld b/test/jsonld/1.1/compact/m005-context.jsonld
new file mode 100644
index 000000000..5ebfbc699
--- /dev/null
+++ b/test/jsonld/1.1/compact/m005-context.jsonld
@@ -0,0 +1,7 @@
+{
+ "@context": {
+ "@vocab": "http://example/",
+ "ex": "http://example.org/",
+ "idmap": {"@container": "@id"}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/m005-in.jsonld b/test/jsonld/1.1/compact/m005-in.jsonld
new file mode 100644
index 000000000..fe15d6377
--- /dev/null
+++ b/test/jsonld/1.1/compact/m005-in.jsonld
@@ -0,0 +1,5 @@
+[{
+ "http://example/idmap": [
+ {"http://example/label": [{"@value": "Object with @id "}], "@id": "http://example.org/foo"}
+ ]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/m005-out.jsonld b/test/jsonld/1.1/compact/m005-out.jsonld
new file mode 100644
index 000000000..68c15c472
--- /dev/null
+++ b/test/jsonld/1.1/compact/m005-out.jsonld
@@ -0,0 +1,10 @@
+{
+ "@context": {
+ "@vocab": "http://example/",
+ "ex": "http://example.org/",
+ "idmap": {"@container": "@id"}
+ },
+ "idmap": {
+ "ex:foo": {"label": "Object with @id "}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/m006-context.jsonld b/test/jsonld/1.1/compact/m006-context.jsonld
new file mode 100644
index 000000000..6540eb51d
--- /dev/null
+++ b/test/jsonld/1.1/compact/m006-context.jsonld
@@ -0,0 +1,6 @@
+{
+ "@context": {
+ "@vocab": "http://example/",
+ "typemap": {"@container": "@type"}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/m006-in.jsonld b/test/jsonld/1.1/compact/m006-in.jsonld
new file mode 100644
index 000000000..a6cfccfeb
--- /dev/null
+++ b/test/jsonld/1.1/compact/m006-in.jsonld
@@ -0,0 +1,5 @@
+[{
+ "http://example/typemap": [
+ {"http://example/label": [{"@value": "Object with @type "}], "@type": ["http://example/Foo"]}
+ ]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/m006-out.jsonld b/test/jsonld/1.1/compact/m006-out.jsonld
new file mode 100644
index 000000000..ce359b452
--- /dev/null
+++ b/test/jsonld/1.1/compact/m006-out.jsonld
@@ -0,0 +1,9 @@
+{
+ "@context": {
+ "@vocab": "http://example/",
+ "typemap": {"@container": "@type"}
+ },
+ "typemap": {
+ "Foo": {"label": "Object with @type "}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/m007-context.jsonld b/test/jsonld/1.1/compact/m007-context.jsonld
new file mode 100644
index 000000000..16ee43db0
--- /dev/null
+++ b/test/jsonld/1.1/compact/m007-context.jsonld
@@ -0,0 +1,7 @@
+{
+ "@context": {
+ "@vocab": "http://example/",
+ "typemap": {"@container": "@type"},
+ "Type": {"@context": {"a": "http://example.org/a"}}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/m007-in.jsonld b/test/jsonld/1.1/compact/m007-in.jsonld
new file mode 100644
index 000000000..e1da44ee2
--- /dev/null
+++ b/test/jsonld/1.1/compact/m007-in.jsonld
@@ -0,0 +1,5 @@
+[{
+ "http://example/typemap": [
+ {"http://example.org/a": [{"@value": "Object with @type "}], "@type": ["http://example/Type"]}
+ ]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/m007-out.jsonld b/test/jsonld/1.1/compact/m007-out.jsonld
new file mode 100644
index 000000000..3e48d6e63
--- /dev/null
+++ b/test/jsonld/1.1/compact/m007-out.jsonld
@@ -0,0 +1,10 @@
+{
+ "@context": {
+ "@vocab": "http://example/",
+ "typemap": {"@container": "@type"},
+ "Type": {"@context": {"a": "http://example.org/a"}}
+ },
+ "typemap": {
+ "Type": {"a": "Object with @type "}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/m008-context.jsonld b/test/jsonld/1.1/compact/m008-context.jsonld
new file mode 100644
index 000000000..722af08d0
--- /dev/null
+++ b/test/jsonld/1.1/compact/m008-context.jsonld
@@ -0,0 +1,8 @@
+{
+ "@context": {
+ "author": {
+ "@id": "http://example.com/vocab/author",
+ "@container": "@index"
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/m008-in.jsonld b/test/jsonld/1.1/compact/m008-in.jsonld
new file mode 100644
index 000000000..a2e1e396e
--- /dev/null
+++ b/test/jsonld/1.1/compact/m008-in.jsonld
@@ -0,0 +1,9 @@
+[{
+ "@id": "http://example.com/article",
+ "http://example.com/vocab/author": [{
+ "@id": "http://example.org/person/1",
+ "@index": "regular"
+ }, {
+ "@id": "http://example.org/guest/cd24f329aa"
+ }]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/m008-out.jsonld b/test/jsonld/1.1/compact/m008-out.jsonld
new file mode 100644
index 000000000..9d752eeef
--- /dev/null
+++ b/test/jsonld/1.1/compact/m008-out.jsonld
@@ -0,0 +1,17 @@
+{
+ "@context": {
+ "author": {
+ "@id": "http://example.com/vocab/author",
+ "@container": "@index"
+ }
+ },
+ "@id": "http://example.com/article",
+ "author": {
+ "regular": {
+ "@id": "http://example.org/person/1"
+ },
+ "@none": {
+ "@id": "http://example.org/guest/cd24f329aa"
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/m009-context.jsonld b/test/jsonld/1.1/compact/m009-context.jsonld
new file mode 100644
index 000000000..722af08d0
--- /dev/null
+++ b/test/jsonld/1.1/compact/m009-context.jsonld
@@ -0,0 +1,8 @@
+{
+ "@context": {
+ "author": {
+ "@id": "http://example.com/vocab/author",
+ "@container": "@index"
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/m009-in.jsonld b/test/jsonld/1.1/compact/m009-in.jsonld
new file mode 100644
index 000000000..8ed51acb1
--- /dev/null
+++ b/test/jsonld/1.1/compact/m009-in.jsonld
@@ -0,0 +1,9 @@
+[{
+ "@id": "http://example.com/article",
+ "http://example.com/vocab/author": [{
+ "@value": "Gregg",
+ "@index": "regular"
+ }, {
+ "@value": "Manu"
+ }]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/m009-out.jsonld b/test/jsonld/1.1/compact/m009-out.jsonld
new file mode 100644
index 000000000..42b29d4d8
--- /dev/null
+++ b/test/jsonld/1.1/compact/m009-out.jsonld
@@ -0,0 +1,13 @@
+{
+ "@context": {
+ "author": {
+ "@id": "http://example.com/vocab/author",
+ "@container": "@index"
+ }
+ },
+ "@id": "http://example.com/article",
+ "author": {
+ "regular": "Gregg",
+ "@none": "Manu"
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/m010-context.jsonld b/test/jsonld/1.1/compact/m010-context.jsonld
new file mode 100644
index 000000000..f39d1c790
--- /dev/null
+++ b/test/jsonld/1.1/compact/m010-context.jsonld
@@ -0,0 +1,9 @@
+{
+ "@context": {
+ "author": {
+ "@id": "http://example.com/vocab/author",
+ "@container": "@index"
+ },
+ "none": "@none"
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/m010-in.jsonld b/test/jsonld/1.1/compact/m010-in.jsonld
new file mode 100644
index 000000000..8ed51acb1
--- /dev/null
+++ b/test/jsonld/1.1/compact/m010-in.jsonld
@@ -0,0 +1,9 @@
+[{
+ "@id": "http://example.com/article",
+ "http://example.com/vocab/author": [{
+ "@value": "Gregg",
+ "@index": "regular"
+ }, {
+ "@value": "Manu"
+ }]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/m010-out.jsonld b/test/jsonld/1.1/compact/m010-out.jsonld
new file mode 100644
index 000000000..ebcf4c7b2
--- /dev/null
+++ b/test/jsonld/1.1/compact/m010-out.jsonld
@@ -0,0 +1,14 @@
+{
+ "@context": {
+ "author": {
+ "@id": "http://example.com/vocab/author",
+ "@container": "@index"
+ },
+ "none": "@none"
+ },
+ "@id": "http://example.com/article",
+ "author": {
+ "regular": "Gregg",
+ "none": "Manu"
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/m011-context.jsonld b/test/jsonld/1.1/compact/m011-context.jsonld
new file mode 100644
index 000000000..374aa5b22
--- /dev/null
+++ b/test/jsonld/1.1/compact/m011-context.jsonld
@@ -0,0 +1,6 @@
+{
+ "@context": {
+ "vocab": "http://example.com/vocab/",
+ "label": {"@id": "vocab:label", "@container": "@language"}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/m011-in.jsonld b/test/jsonld/1.1/compact/m011-in.jsonld
new file mode 100644
index 000000000..f2f1c9ea2
--- /dev/null
+++ b/test/jsonld/1.1/compact/m011-in.jsonld
@@ -0,0 +1,10 @@
+[
+ {
+ "@id": "http://example.com/queen",
+ "http://example.com/vocab/label": [
+ {"@value": "The Queen", "@language": "en"},
+ {"@value": "Die Königin", "@language": "de"},
+ {"@value": "Ihre Majestät"}
+ ]
+ }
+]
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/m011-out.jsonld b/test/jsonld/1.1/compact/m011-out.jsonld
new file mode 100644
index 000000000..eabfa7855
--- /dev/null
+++ b/test/jsonld/1.1/compact/m011-out.jsonld
@@ -0,0 +1,12 @@
+{
+ "@context": {
+ "vocab": "http://example.com/vocab/",
+ "label": {"@id": "vocab:label", "@container": "@language"}
+ },
+ "@id": "http://example.com/queen",
+ "label": {
+ "en": "The Queen",
+ "de": "Die Königin",
+ "@none": "Ihre Majestät"
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/m012-context.jsonld b/test/jsonld/1.1/compact/m012-context.jsonld
new file mode 100644
index 000000000..93b531ea9
--- /dev/null
+++ b/test/jsonld/1.1/compact/m012-context.jsonld
@@ -0,0 +1,7 @@
+{
+ "@context": {
+ "vocab": "http://example.com/vocab/",
+ "label": {"@id": "vocab:label", "@container": "@language"},
+ "none": "@none"
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/m012-in.jsonld b/test/jsonld/1.1/compact/m012-in.jsonld
new file mode 100644
index 000000000..f2f1c9ea2
--- /dev/null
+++ b/test/jsonld/1.1/compact/m012-in.jsonld
@@ -0,0 +1,10 @@
+[
+ {
+ "@id": "http://example.com/queen",
+ "http://example.com/vocab/label": [
+ {"@value": "The Queen", "@language": "en"},
+ {"@value": "Die Königin", "@language": "de"},
+ {"@value": "Ihre Majestät"}
+ ]
+ }
+]
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/m012-out.jsonld b/test/jsonld/1.1/compact/m012-out.jsonld
new file mode 100644
index 000000000..14fc6ac9d
--- /dev/null
+++ b/test/jsonld/1.1/compact/m012-out.jsonld
@@ -0,0 +1,13 @@
+{
+ "@context": {
+ "vocab": "http://example.com/vocab/",
+ "label": {"@id": "vocab:label", "@container": "@language"},
+ "none": "@none"
+ },
+ "@id": "http://example.com/queen",
+ "label": {
+ "en": "The Queen",
+ "de": "Die Königin",
+ "none": "Ihre Majestät"
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/m013-context.jsonld b/test/jsonld/1.1/compact/m013-context.jsonld
new file mode 100644
index 000000000..5ebfbc699
--- /dev/null
+++ b/test/jsonld/1.1/compact/m013-context.jsonld
@@ -0,0 +1,7 @@
+{
+ "@context": {
+ "@vocab": "http://example/",
+ "ex": "http://example.org/",
+ "idmap": {"@container": "@id"}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/m013-in.jsonld b/test/jsonld/1.1/compact/m013-in.jsonld
new file mode 100644
index 000000000..0beca7ed4
--- /dev/null
+++ b/test/jsonld/1.1/compact/m013-in.jsonld
@@ -0,0 +1,5 @@
+[{
+ "http://example/idmap": [
+ {"http://example/label": [{"@value": "Object with no @id"}]}
+ ]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/m013-out.jsonld b/test/jsonld/1.1/compact/m013-out.jsonld
new file mode 100644
index 000000000..baf3a6566
--- /dev/null
+++ b/test/jsonld/1.1/compact/m013-out.jsonld
@@ -0,0 +1,10 @@
+{
+ "@context": {
+ "@vocab": "http://example/",
+ "ex": "http://example.org/",
+ "idmap": {"@container": "@id"}
+ },
+ "idmap": {
+ "@none": {"label": "Object with no @id"}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/m014-context.jsonld b/test/jsonld/1.1/compact/m014-context.jsonld
new file mode 100644
index 000000000..921356443
--- /dev/null
+++ b/test/jsonld/1.1/compact/m014-context.jsonld
@@ -0,0 +1,8 @@
+{
+ "@context": {
+ "@vocab": "http://example/",
+ "ex": "http://example.org/",
+ "idmap": {"@container": "@id"},
+ "none": "@none"
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/m014-in.jsonld b/test/jsonld/1.1/compact/m014-in.jsonld
new file mode 100644
index 000000000..0beca7ed4
--- /dev/null
+++ b/test/jsonld/1.1/compact/m014-in.jsonld
@@ -0,0 +1,5 @@
+[{
+ "http://example/idmap": [
+ {"http://example/label": [{"@value": "Object with no @id"}]}
+ ]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/m014-out.jsonld b/test/jsonld/1.1/compact/m014-out.jsonld
new file mode 100644
index 000000000..55bab565f
--- /dev/null
+++ b/test/jsonld/1.1/compact/m014-out.jsonld
@@ -0,0 +1,11 @@
+{
+ "@context": {
+ "@vocab": "http://example/",
+ "ex": "http://example.org/",
+ "idmap": {"@container": "@id"},
+ "none": "@none"
+ },
+ "idmap": {
+ "none": {"label": "Object with no @id"}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/m015-context.jsonld b/test/jsonld/1.1/compact/m015-context.jsonld
new file mode 100644
index 000000000..5978667b4
--- /dev/null
+++ b/test/jsonld/1.1/compact/m015-context.jsonld
@@ -0,0 +1,7 @@
+{
+ "@context": {
+ "@vocab": "http://example/",
+ "ex": "http://example.org/",
+ "typemap": {"@container": "@type"}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/m015-in.jsonld b/test/jsonld/1.1/compact/m015-in.jsonld
new file mode 100644
index 000000000..e14b54c8d
--- /dev/null
+++ b/test/jsonld/1.1/compact/m015-in.jsonld
@@ -0,0 +1,5 @@
+[{
+ "http://example/typemap": [
+ {"http://example/label": [{"@value": "Object with no @type"}]}
+ ]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/m015-out.jsonld b/test/jsonld/1.1/compact/m015-out.jsonld
new file mode 100644
index 000000000..270b93194
--- /dev/null
+++ b/test/jsonld/1.1/compact/m015-out.jsonld
@@ -0,0 +1,10 @@
+{
+ "@context": {
+ "@vocab": "http://example/",
+ "ex": "http://example.org/",
+ "typemap": {"@container": "@type"}
+ },
+ "typemap": {
+ "@none": {"label": "Object with no @type"}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/m016-context.jsonld b/test/jsonld/1.1/compact/m016-context.jsonld
new file mode 100644
index 000000000..b517bc35d
--- /dev/null
+++ b/test/jsonld/1.1/compact/m016-context.jsonld
@@ -0,0 +1,8 @@
+{
+ "@context": {
+ "@vocab": "http://example/",
+ "ex": "http://example.org/",
+ "typemap": {"@container": "@type"},
+ "none": "@none"
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/m016-in.jsonld b/test/jsonld/1.1/compact/m016-in.jsonld
new file mode 100644
index 000000000..2a7defe91
--- /dev/null
+++ b/test/jsonld/1.1/compact/m016-in.jsonld
@@ -0,0 +1,5 @@
+[{
+ "http://example/typemap": [
+ {"http://example/label": [{"@value": "Object with no @id"}]}
+ ]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/m016-out.jsonld b/test/jsonld/1.1/compact/m016-out.jsonld
new file mode 100644
index 000000000..5d115f19d
--- /dev/null
+++ b/test/jsonld/1.1/compact/m016-out.jsonld
@@ -0,0 +1,11 @@
+{
+ "@context": {
+ "@vocab": "http://example/",
+ "ex": "http://example.org/",
+ "typemap": {"@container": "@type"},
+ "none": "@none"
+ },
+ "typemap": {
+ "none": {"label": "Object with no @id"}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/m017-context.jsonld b/test/jsonld/1.1/compact/m017-context.jsonld
new file mode 100644
index 000000000..f12919ce1
--- /dev/null
+++ b/test/jsonld/1.1/compact/m017-context.jsonld
@@ -0,0 +1,6 @@
+{
+ "@context": {
+ "@vocab": "http://example.org/",
+ "input": {"@container": ["@graph", "@index", "@set"]}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/m017-in.jsonld b/test/jsonld/1.1/compact/m017-in.jsonld
new file mode 100644
index 000000000..e01c12ee5
--- /dev/null
+++ b/test/jsonld/1.1/compact/m017-in.jsonld
@@ -0,0 +1,7 @@
+[{
+ "http://example.org/input": [{
+ "@graph": [{
+ "http://example.org/value": [{"@value": "x"}]
+ }]
+ }]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/m017-out.jsonld b/test/jsonld/1.1/compact/m017-out.jsonld
new file mode 100644
index 000000000..ce09bd9ee
--- /dev/null
+++ b/test/jsonld/1.1/compact/m017-out.jsonld
@@ -0,0 +1,9 @@
+{
+ "@context": {
+ "@vocab": "http://example.org/",
+ "input": {"@container": ["@graph", "@index", "@set"]}
+ },
+ "input": {
+ "@none": [{"value": "x"}]
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/m018-context.jsonld b/test/jsonld/1.1/compact/m018-context.jsonld
new file mode 100644
index 000000000..2de136b02
--- /dev/null
+++ b/test/jsonld/1.1/compact/m018-context.jsonld
@@ -0,0 +1,6 @@
+{
+ "@context": {
+ "@vocab": "http://example.org/",
+ "input": {"@container": ["@graph", "@id"]}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/m018-in.jsonld b/test/jsonld/1.1/compact/m018-in.jsonld
new file mode 100644
index 000000000..e01c12ee5
--- /dev/null
+++ b/test/jsonld/1.1/compact/m018-in.jsonld
@@ -0,0 +1,7 @@
+[{
+ "http://example.org/input": [{
+ "@graph": [{
+ "http://example.org/value": [{"@value": "x"}]
+ }]
+ }]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/m018-out.jsonld b/test/jsonld/1.1/compact/m018-out.jsonld
new file mode 100644
index 000000000..67ff92410
--- /dev/null
+++ b/test/jsonld/1.1/compact/m018-out.jsonld
@@ -0,0 +1,9 @@
+{
+ "@context": {
+ "@vocab": "http://example.org/",
+ "input": {"@container": ["@graph", "@id"]}
+ },
+ "input": {
+ "@none" : {"value": "x"}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/m019-context.jsonld b/test/jsonld/1.1/compact/m019-context.jsonld
new file mode 100644
index 000000000..5160a1269
--- /dev/null
+++ b/test/jsonld/1.1/compact/m019-context.jsonld
@@ -0,0 +1,7 @@
+{
+ "@context": {
+ "@vocab": "http://example.org/",
+ "input": {"@container": ["@graph", "@id"]},
+ "none": "@none"
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/m019-in.jsonld b/test/jsonld/1.1/compact/m019-in.jsonld
new file mode 100644
index 000000000..e01c12ee5
--- /dev/null
+++ b/test/jsonld/1.1/compact/m019-in.jsonld
@@ -0,0 +1,7 @@
+[{
+ "http://example.org/input": [{
+ "@graph": [{
+ "http://example.org/value": [{"@value": "x"}]
+ }]
+ }]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/m019-out.jsonld b/test/jsonld/1.1/compact/m019-out.jsonld
new file mode 100644
index 000000000..bba709a78
--- /dev/null
+++ b/test/jsonld/1.1/compact/m019-out.jsonld
@@ -0,0 +1,10 @@
+{
+ "@context": {
+ "@vocab": "http://example.org/",
+ "input": {"@container": ["@graph", "@id"]},
+ "none": "@none"
+ },
+ "input": {
+ "none" : {"value": "x"}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/m020-context.jsonld b/test/jsonld/1.1/compact/m020-context.jsonld
new file mode 100644
index 000000000..1dcdb5882
--- /dev/null
+++ b/test/jsonld/1.1/compact/m020-context.jsonld
@@ -0,0 +1,8 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "@vocab": "http://example.org/ns/",
+ "@base": "http://example.org/base/",
+ "foo": { "@container": "@type" }
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/m020-in.jsonld b/test/jsonld/1.1/compact/m020-in.jsonld
new file mode 100644
index 000000000..b1076fd6d
--- /dev/null
+++ b/test/jsonld/1.1/compact/m020-in.jsonld
@@ -0,0 +1,6 @@
+[{
+ "http://example.org/ns/foo": [{
+ "@id": "http://example.org/base/baz",
+ "@type": [ "http://example.org/ns/bar" ]
+ }]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/m020-out.jsonld b/test/jsonld/1.1/compact/m020-out.jsonld
new file mode 100644
index 000000000..d571678d1
--- /dev/null
+++ b/test/jsonld/1.1/compact/m020-out.jsonld
@@ -0,0 +1,9 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "@vocab": "http://example.org/ns/",
+ "@base": "http://example.org/base/",
+ "foo": { "@container": "@type" }
+ },
+ "foo": {"bar": "baz"}
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/m021-context.jsonld b/test/jsonld/1.1/compact/m021-context.jsonld
new file mode 100644
index 000000000..2f2343328
--- /dev/null
+++ b/test/jsonld/1.1/compact/m021-context.jsonld
@@ -0,0 +1,8 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "@vocab": "http://example.org/ns/",
+ "@base": "http://example.org/base/",
+ "foo": { "@type": "@id", "@container": "@type" }
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/m021-in.jsonld b/test/jsonld/1.1/compact/m021-in.jsonld
new file mode 100644
index 000000000..b1076fd6d
--- /dev/null
+++ b/test/jsonld/1.1/compact/m021-in.jsonld
@@ -0,0 +1,6 @@
+[{
+ "http://example.org/ns/foo": [{
+ "@id": "http://example.org/base/baz",
+ "@type": [ "http://example.org/ns/bar" ]
+ }]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/m021-out.jsonld b/test/jsonld/1.1/compact/m021-out.jsonld
new file mode 100644
index 000000000..7acaba291
--- /dev/null
+++ b/test/jsonld/1.1/compact/m021-out.jsonld
@@ -0,0 +1,9 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "@vocab": "http://example.org/ns/",
+ "@base": "http://example.org/base/",
+ "foo": { "@type": "@id", "@container": "@type" }
+ },
+ "foo": {"bar": "baz"}
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/m022-context.jsonld b/test/jsonld/1.1/compact/m022-context.jsonld
new file mode 100644
index 000000000..a596a5e33
--- /dev/null
+++ b/test/jsonld/1.1/compact/m022-context.jsonld
@@ -0,0 +1,8 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "@vocab": "http://example.org/ns/",
+ "@base": "http://example.org/base/",
+ "foo": { "@type": "@vocab", "@container": "@type" }
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/m022-in.jsonld b/test/jsonld/1.1/compact/m022-in.jsonld
new file mode 100644
index 000000000..29e72e9fa
--- /dev/null
+++ b/test/jsonld/1.1/compact/m022-in.jsonld
@@ -0,0 +1,6 @@
+[{
+ "http://example.org/ns/foo": [{
+ "@id": "http://example.org/ns/baz",
+ "@type": [ "http://example.org/ns/bar" ]
+ }]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/m022-out.jsonld b/test/jsonld/1.1/compact/m022-out.jsonld
new file mode 100644
index 000000000..81386dfe5
--- /dev/null
+++ b/test/jsonld/1.1/compact/m022-out.jsonld
@@ -0,0 +1,9 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "@vocab": "http://example.org/ns/",
+ "@base": "http://example.org/base/",
+ "foo": { "@type": "@vocab", "@container": "@type" }
+ },
+ "foo": {"bar": "baz"}
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/n001-context.jsonld b/test/jsonld/1.1/compact/n001-context.jsonld
new file mode 100644
index 000000000..18017f10b
--- /dev/null
+++ b/test/jsonld/1.1/compact/n001-context.jsonld
@@ -0,0 +1,6 @@
+{
+ "@context": {
+ "@vocab": "http://example.org/",
+ "p2": {"@nest": "@nest"}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/n001-in.jsonld b/test/jsonld/1.1/compact/n001-in.jsonld
new file mode 100644
index 000000000..c03734564
--- /dev/null
+++ b/test/jsonld/1.1/compact/n001-in.jsonld
@@ -0,0 +1,4 @@
+[{
+ "http://example.org/p1": [{"@value": "v1"}],
+ "http://example.org/p2": [{"@value": "v2"}]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/n001-out.jsonld b/test/jsonld/1.1/compact/n001-out.jsonld
new file mode 100644
index 000000000..15819870e
--- /dev/null
+++ b/test/jsonld/1.1/compact/n001-out.jsonld
@@ -0,0 +1,10 @@
+{
+ "@context": {
+ "@vocab": "http://example.org/",
+ "p2": {"@nest": "@nest"}
+ },
+ "p1": "v1",
+ "@nest": {
+ "p2": "v2"
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/n002-context.jsonld b/test/jsonld/1.1/compact/n002-context.jsonld
new file mode 100644
index 000000000..557c93ac2
--- /dev/null
+++ b/test/jsonld/1.1/compact/n002-context.jsonld
@@ -0,0 +1,7 @@
+{
+ "@context": {
+ "@vocab": "http://example.org/",
+ "p1": {"@nest": "@nest"},
+ "p2": {"@nest": "@nest"}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/n002-in.jsonld b/test/jsonld/1.1/compact/n002-in.jsonld
new file mode 100644
index 000000000..c03734564
--- /dev/null
+++ b/test/jsonld/1.1/compact/n002-in.jsonld
@@ -0,0 +1,4 @@
+[{
+ "http://example.org/p1": [{"@value": "v1"}],
+ "http://example.org/p2": [{"@value": "v2"}]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/n002-out.jsonld b/test/jsonld/1.1/compact/n002-out.jsonld
new file mode 100644
index 000000000..e9ff8d7c1
--- /dev/null
+++ b/test/jsonld/1.1/compact/n002-out.jsonld
@@ -0,0 +1,11 @@
+{
+ "@context": {
+ "@vocab": "http://example.org/",
+ "p1": {"@nest": "@nest"},
+ "p2": {"@nest": "@nest"}
+ },
+ "@nest": {
+ "p1": "v1",
+ "p2": "v2"
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/n003-context.jsonld b/test/jsonld/1.1/compact/n003-context.jsonld
new file mode 100644
index 000000000..421621b30
--- /dev/null
+++ b/test/jsonld/1.1/compact/n003-context.jsonld
@@ -0,0 +1,7 @@
+{
+ "@context": {
+ "@vocab": "http://example.org/",
+ "nest": "@nest",
+ "p2": {"@nest": "nest"}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/n003-in.jsonld b/test/jsonld/1.1/compact/n003-in.jsonld
new file mode 100644
index 000000000..c03734564
--- /dev/null
+++ b/test/jsonld/1.1/compact/n003-in.jsonld
@@ -0,0 +1,4 @@
+[{
+ "http://example.org/p1": [{"@value": "v1"}],
+ "http://example.org/p2": [{"@value": "v2"}]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/n003-out.jsonld b/test/jsonld/1.1/compact/n003-out.jsonld
new file mode 100644
index 000000000..a2415a83c
--- /dev/null
+++ b/test/jsonld/1.1/compact/n003-out.jsonld
@@ -0,0 +1,11 @@
+{
+ "@context": {
+ "@vocab": "http://example.org/",
+ "nest": "@nest",
+ "p2": {"@nest": "nest"}
+ },
+ "p1": "v1",
+ "nest": {
+ "p2": "v2"
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/n004-context.jsonld b/test/jsonld/1.1/compact/n004-context.jsonld
new file mode 100644
index 000000000..18017f10b
--- /dev/null
+++ b/test/jsonld/1.1/compact/n004-context.jsonld
@@ -0,0 +1,6 @@
+{
+ "@context": {
+ "@vocab": "http://example.org/",
+ "p2": {"@nest": "@nest"}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/n004-in.jsonld b/test/jsonld/1.1/compact/n004-in.jsonld
new file mode 100644
index 000000000..5b70771a3
--- /dev/null
+++ b/test/jsonld/1.1/compact/n004-in.jsonld
@@ -0,0 +1,4 @@
+[{
+ "http://example.org/p1": [{"@value": "v1"}],
+ "http://example.org/p2": [{"@value": "v2"}, {"@value": "v3"}]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/n004-out.jsonld b/test/jsonld/1.1/compact/n004-out.jsonld
new file mode 100644
index 000000000..66705e9b9
--- /dev/null
+++ b/test/jsonld/1.1/compact/n004-out.jsonld
@@ -0,0 +1,10 @@
+{
+ "@context": {
+ "@vocab": "http://example.org/",
+ "p2": {"@nest": "@nest"}
+ },
+ "p1": "v1",
+ "@nest": {
+ "p2": ["v2", "v3"]
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/n005-context.jsonld b/test/jsonld/1.1/compact/n005-context.jsonld
new file mode 100644
index 000000000..5a712da14
--- /dev/null
+++ b/test/jsonld/1.1/compact/n005-context.jsonld
@@ -0,0 +1,7 @@
+{
+ "@context": {
+ "@vocab": "http://example.org/",
+ "list": {"@container": "@list", "@nest": "nestedlist"},
+ "nestedlist": "@nest"
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/n005-in.jsonld b/test/jsonld/1.1/compact/n005-in.jsonld
new file mode 100644
index 000000000..ad985e83f
--- /dev/null
+++ b/test/jsonld/1.1/compact/n005-in.jsonld
@@ -0,0 +1,6 @@
+[{
+ "http://example.org/list": [{"@list": [
+ {"@value": "a"},
+ {"@value": "b"}
+ ]}]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/n005-out.jsonld b/test/jsonld/1.1/compact/n005-out.jsonld
new file mode 100644
index 000000000..5e0035ab3
--- /dev/null
+++ b/test/jsonld/1.1/compact/n005-out.jsonld
@@ -0,0 +1,10 @@
+{
+ "@context": {
+ "@vocab": "http://example.org/",
+ "list": {"@container": "@list", "@nest": "nestedlist"},
+ "nestedlist": "@nest"
+ },
+ "nestedlist": {
+ "list": ["a", "b"]
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/n006-context.jsonld b/test/jsonld/1.1/compact/n006-context.jsonld
new file mode 100644
index 000000000..281100fc7
--- /dev/null
+++ b/test/jsonld/1.1/compact/n006-context.jsonld
@@ -0,0 +1,7 @@
+{
+ "@context": {
+ "@vocab": "http://example.org/",
+ "index": {"@container": "@index", "@nest": "nestedindex"},
+ "nestedindex": "@nest"
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/n006-in.jsonld b/test/jsonld/1.1/compact/n006-in.jsonld
new file mode 100644
index 000000000..2682faf32
--- /dev/null
+++ b/test/jsonld/1.1/compact/n006-in.jsonld
@@ -0,0 +1,6 @@
+[{
+ "http://example.org/index": [
+ {"@value": "a", "@index": "A"},
+ {"@value": "b", "@index": "B"}
+ ]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/n006-out.jsonld b/test/jsonld/1.1/compact/n006-out.jsonld
new file mode 100644
index 000000000..49f2172da
--- /dev/null
+++ b/test/jsonld/1.1/compact/n006-out.jsonld
@@ -0,0 +1,13 @@
+{
+ "@context": {
+ "@vocab": "http://example.org/",
+ "index": {"@container": "@index", "@nest": "nestedindex"},
+ "nestedindex": "@nest"
+ },
+ "nestedindex": {
+ "index": {
+ "A": "a",
+ "B": "b"
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/n007-context.jsonld b/test/jsonld/1.1/compact/n007-context.jsonld
new file mode 100644
index 000000000..02492cee3
--- /dev/null
+++ b/test/jsonld/1.1/compact/n007-context.jsonld
@@ -0,0 +1,7 @@
+{
+ "@context": {
+ "@vocab": "http://example.org/",
+ "container": {"@container": "@language", "@nest": "nestedlanguage"},
+ "nestedlanguage": "@nest"
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/n007-in.jsonld b/test/jsonld/1.1/compact/n007-in.jsonld
new file mode 100644
index 000000000..f32329ab1
--- /dev/null
+++ b/test/jsonld/1.1/compact/n007-in.jsonld
@@ -0,0 +1,6 @@
+[{
+ "http://example.org/container": [
+ {"@value": "Die Königin", "@language": "de"},
+ {"@value": "The Queen", "@language": "en"}
+ ]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/n007-out.jsonld b/test/jsonld/1.1/compact/n007-out.jsonld
new file mode 100644
index 000000000..659788d4c
--- /dev/null
+++ b/test/jsonld/1.1/compact/n007-out.jsonld
@@ -0,0 +1,13 @@
+{
+ "@context": {
+ "@vocab": "http://example.org/",
+ "container": {"@container": "@language", "@nest": "nestedlanguage"},
+ "nestedlanguage": "@nest"
+ },
+ "nestedlanguage": {
+ "container": {
+ "en": "The Queen",
+ "de": "Die Königin"
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/n008-context.jsonld b/test/jsonld/1.1/compact/n008-context.jsonld
new file mode 100644
index 000000000..0eeff3163
--- /dev/null
+++ b/test/jsonld/1.1/compact/n008-context.jsonld
@@ -0,0 +1,7 @@
+{
+ "@context": {
+ "@vocab": "http://example/",
+ "typemap": {"@container": "@type", "@nest": "nestedtypemap"},
+ "nestedtypemap": "@nest"
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/n008-in.jsonld b/test/jsonld/1.1/compact/n008-in.jsonld
new file mode 100644
index 000000000..ecdfc4498
--- /dev/null
+++ b/test/jsonld/1.1/compact/n008-in.jsonld
@@ -0,0 +1,6 @@
+[{
+ "http://example/typemap": [
+ {"http://example/label": [{"@value": "Object with @type _:bar"}], "@type": ["_:bar"]},
+ {"http://example/label": [{"@value": "Object with @type "}], "@type": ["http://example.org/foo"]}
+ ]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/n008-out.jsonld b/test/jsonld/1.1/compact/n008-out.jsonld
new file mode 100644
index 000000000..d1e44c631
--- /dev/null
+++ b/test/jsonld/1.1/compact/n008-out.jsonld
@@ -0,0 +1,13 @@
+{
+ "@context": {
+ "@vocab": "http://example/",
+ "typemap": {"@container": "@type", "@nest": "nestedtypemap"},
+ "nestedtypemap": "@nest"
+ },
+ "nestedtypemap": {
+ "typemap": {
+ "_:bar": {"label": "Object with @type _:bar"},
+ "http://example.org/foo": {"label": "Object with @type "}
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/n009-context.jsonld b/test/jsonld/1.1/compact/n009-context.jsonld
new file mode 100644
index 000000000..2d4914180
--- /dev/null
+++ b/test/jsonld/1.1/compact/n009-context.jsonld
@@ -0,0 +1,7 @@
+{
+ "@context": {
+ "@vocab": "http://example/",
+ "idmap": {"@container": "@id", "@nest": "nestedidmap"},
+ "nestedidmap": "@nest"
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/n009-in.jsonld b/test/jsonld/1.1/compact/n009-in.jsonld
new file mode 100644
index 000000000..c44d5e63e
--- /dev/null
+++ b/test/jsonld/1.1/compact/n009-in.jsonld
@@ -0,0 +1,6 @@
+[{
+ "http://example/idmap": [
+ {"http://example/label": [{"@value": "Object with @id _:bar"}], "@id": "_:bar"},
+ {"http://example/label": [{"@value": "Object with @id "}], "@id": "http://example.org/foo"}
+ ]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/n009-out.jsonld b/test/jsonld/1.1/compact/n009-out.jsonld
new file mode 100644
index 000000000..a251580cb
--- /dev/null
+++ b/test/jsonld/1.1/compact/n009-out.jsonld
@@ -0,0 +1,13 @@
+{
+ "@context": {
+ "@vocab": "http://example/",
+ "idmap": {"@container": "@id", "@nest": "nestedidmap"},
+ "nestedidmap": "@nest"
+ },
+ "nestedidmap": {
+ "idmap": {
+ "http://example.org/foo": {"label": "Object with @id "},
+ "_:bar": {"label": "Object with @id _:bar"}
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/n010-context.jsonld b/test/jsonld/1.1/compact/n010-context.jsonld
new file mode 100644
index 000000000..c3f0c9dfc
--- /dev/null
+++ b/test/jsonld/1.1/compact/n010-context.jsonld
@@ -0,0 +1,9 @@
+{
+ "@context": {
+ "@vocab": "http://example.org/",
+ "foonest": "@nest",
+ "barnest": "@nest",
+ "foo": {"@nest": "foonest"},
+ "bar": {"@nest": "barnest"}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/n010-in.jsonld b/test/jsonld/1.1/compact/n010-in.jsonld
new file mode 100644
index 000000000..5a47bb396
--- /dev/null
+++ b/test/jsonld/1.1/compact/n010-in.jsonld
@@ -0,0 +1,4 @@
+{
+ "http://example.org/foo": "bar",
+ "http://example.org/bar": "foo"
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/n010-out.jsonld b/test/jsonld/1.1/compact/n010-out.jsonld
new file mode 100644
index 000000000..c53a3d76b
--- /dev/null
+++ b/test/jsonld/1.1/compact/n010-out.jsonld
@@ -0,0 +1,11 @@
+{
+ "@context": {
+ "@vocab": "http://example.org/",
+ "foonest": "@nest",
+ "barnest": "@nest",
+ "foo": {"@nest": "foonest"},
+ "bar": {"@nest": "barnest"}
+ },
+ "barnest": {"bar": "foo"},
+ "foonest": {"foo": "bar"}
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/n011-context.jsonld b/test/jsonld/1.1/compact/n011-context.jsonld
new file mode 100644
index 000000000..61aa78360
--- /dev/null
+++ b/test/jsonld/1.1/compact/n011-context.jsonld
@@ -0,0 +1,7 @@
+{
+ "@context": {
+ "@vocab": "http://example.org/",
+ "nest": {"@id": "@nest"},
+ "p2": {"@nest": "nest"}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/n011-in.jsonld b/test/jsonld/1.1/compact/n011-in.jsonld
new file mode 100644
index 000000000..c03734564
--- /dev/null
+++ b/test/jsonld/1.1/compact/n011-in.jsonld
@@ -0,0 +1,4 @@
+[{
+ "http://example.org/p1": [{"@value": "v1"}],
+ "http://example.org/p2": [{"@value": "v2"}]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/n011-out.jsonld b/test/jsonld/1.1/compact/n011-out.jsonld
new file mode 100644
index 000000000..001d2436d
--- /dev/null
+++ b/test/jsonld/1.1/compact/n011-out.jsonld
@@ -0,0 +1,11 @@
+{
+ "@context": {
+ "@vocab": "http://example.org/",
+ "nest": {"@id": "@nest"},
+ "p2": {"@nest": "nest"}
+ },
+ "p1": "v1",
+ "nest": {
+ "p2": "v2"
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/p001-context.jsonld b/test/jsonld/1.1/compact/p001-context.jsonld
new file mode 100644
index 000000000..2d72ed662
--- /dev/null
+++ b/test/jsonld/1.1/compact/p001-context.jsonld
@@ -0,0 +1,5 @@
+{
+ "@context": {
+ "ex": {"@id": "http://example.org/"}
+ }
+}
diff --git a/test/jsonld/1.1/compact/p001-in.jsonld b/test/jsonld/1.1/compact/p001-in.jsonld
new file mode 100644
index 000000000..19beb0f3d
--- /dev/null
+++ b/test/jsonld/1.1/compact/p001-in.jsonld
@@ -0,0 +1,5 @@
+{
+ "@id": "http://example.org/id1",
+ "@type": ["http://example.org/Type1", "http://example.org/Type2"],
+ "http://example.org/term": {"@id": "http://example.org/id2"}
+}
diff --git a/test/jsonld/1.1/compact/p001-out.jsonld b/test/jsonld/1.1/compact/p001-out.jsonld
new file mode 100644
index 000000000..5dfd781a7
--- /dev/null
+++ b/test/jsonld/1.1/compact/p001-out.jsonld
@@ -0,0 +1,8 @@
+{
+ "@context": {
+ "ex": {"@id": "http://example.org/"}
+ },
+ "@id": "http://example.org/id1",
+ "@type": ["http://example.org/Type1", "http://example.org/Type2"],
+ "http://example.org/term": {"@id": "http://example.org/id2"}
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/p002-context.jsonld b/test/jsonld/1.1/compact/p002-context.jsonld
new file mode 100644
index 000000000..2d72ed662
--- /dev/null
+++ b/test/jsonld/1.1/compact/p002-context.jsonld
@@ -0,0 +1,5 @@
+{
+ "@context": {
+ "ex": {"@id": "http://example.org/"}
+ }
+}
diff --git a/test/jsonld/1.1/compact/p002-in.jsonld b/test/jsonld/1.1/compact/p002-in.jsonld
new file mode 100644
index 000000000..19beb0f3d
--- /dev/null
+++ b/test/jsonld/1.1/compact/p002-in.jsonld
@@ -0,0 +1,5 @@
+{
+ "@id": "http://example.org/id1",
+ "@type": ["http://example.org/Type1", "http://example.org/Type2"],
+ "http://example.org/term": {"@id": "http://example.org/id2"}
+}
diff --git a/test/jsonld/1.1/compact/p002-out.jsonld b/test/jsonld/1.1/compact/p002-out.jsonld
new file mode 100644
index 000000000..5dfd781a7
--- /dev/null
+++ b/test/jsonld/1.1/compact/p002-out.jsonld
@@ -0,0 +1,8 @@
+{
+ "@context": {
+ "ex": {"@id": "http://example.org/"}
+ },
+ "@id": "http://example.org/id1",
+ "@type": ["http://example.org/Type1", "http://example.org/Type2"],
+ "http://example.org/term": {"@id": "http://example.org/id2"}
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/p003-context.jsonld b/test/jsonld/1.1/compact/p003-context.jsonld
new file mode 100644
index 000000000..589074441
--- /dev/null
+++ b/test/jsonld/1.1/compact/p003-context.jsonld
@@ -0,0 +1,6 @@
+{
+ "@context": {
+ "compact-iris:": "http://example.com/compact-iris-",
+ "property": "http://example.com/property"
+ }
+}
diff --git a/test/jsonld/1.1/compact/p003-in.jsonld b/test/jsonld/1.1/compact/p003-in.jsonld
new file mode 100644
index 000000000..948a5d52a
--- /dev/null
+++ b/test/jsonld/1.1/compact/p003-in.jsonld
@@ -0,0 +1,6 @@
+{
+ "http://example.com/property": {
+ "@id": "http://example.com/compact-iris-are-considered",
+ "http://example.com/property": "Prefix terms must end in a gen-delim"
+ }
+}
diff --git a/test/jsonld/1.1/compact/p003-out.jsonld b/test/jsonld/1.1/compact/p003-out.jsonld
new file mode 100644
index 000000000..be552f3b9
--- /dev/null
+++ b/test/jsonld/1.1/compact/p003-out.jsonld
@@ -0,0 +1,10 @@
+{
+ "@context": {
+ "compact-iris:": "http://example.com/compact-iris-",
+ "property": "http://example.com/property"
+ },
+ "property": {
+ "@id": "http://example.com/compact-iris-are-considered",
+ "property": "Prefix terms must end in a gen-delim"
+ }
+}
diff --git a/test/jsonld/1.1/compact/p004-context.jsonld b/test/jsonld/1.1/compact/p004-context.jsonld
new file mode 100644
index 000000000..f4348ae16
--- /dev/null
+++ b/test/jsonld/1.1/compact/p004-context.jsonld
@@ -0,0 +1,11 @@
+{
+ "@context": {
+ "ex": "http://example.com/",
+ "colon": "http://example.org/:",
+ "question": "http://example.org/?",
+ "hash": "http://example.org/#",
+ "lbracket": "http://example.org/[",
+ "rbracket": "http://example.org/]",
+ "at": "http://example.org/@"
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/p004-in.jsonld b/test/jsonld/1.1/compact/p004-in.jsonld
new file mode 100644
index 000000000..4f9847f97
--- /dev/null
+++ b/test/jsonld/1.1/compact/p004-in.jsonld
@@ -0,0 +1,9 @@
+{
+ "http://example.com/foo": "Use term with IRI ending in '/'",
+ "http://example.org/:foo": "Use term with IRI ending in ':'",
+ "http://example.org/?foo": "Use term with IRI ending in '?'",
+ "http://example.org/#foo": "Use term with IRI ending in '#'",
+ "http://example.org/[foo": "Use term with IRI ending in '['",
+ "http://example.org/]foo": "Use term with IRI ending in ']'",
+ "http://example.org/@foo": "Use term with IRI ending in '@'"
+}
diff --git a/test/jsonld/1.1/compact/p004-out.jsonld b/test/jsonld/1.1/compact/p004-out.jsonld
new file mode 100644
index 000000000..20de37219
--- /dev/null
+++ b/test/jsonld/1.1/compact/p004-out.jsonld
@@ -0,0 +1,18 @@
+{
+ "@context": {
+ "ex": "http://example.com/",
+ "colon": "http://example.org/:",
+ "question": "http://example.org/?",
+ "hash": "http://example.org/#",
+ "lbracket": "http://example.org/[",
+ "rbracket": "http://example.org/]",
+ "at": "http://example.org/@"
+ },
+ "ex:foo": "Use term with IRI ending in '/'",
+ "colon:foo": "Use term with IRI ending in ':'",
+ "question:foo": "Use term with IRI ending in '?'",
+ "hash:foo": "Use term with IRI ending in '#'",
+ "lbracket:foo": "Use term with IRI ending in '['",
+ "rbracket:foo": "Use term with IRI ending in ']'",
+ "at:foo": "Use term with IRI ending in '@'"
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/p005-context.jsonld b/test/jsonld/1.1/compact/p005-context.jsonld
new file mode 100644
index 000000000..daa9107db
--- /dev/null
+++ b/test/jsonld/1.1/compact/p005-context.jsonld
@@ -0,0 +1,6 @@
+{
+ "@context": {
+ "compact-iris": {"@id": "http://example.com/compact-iris-", "@prefix": true},
+ "property": "http://example.com/property"
+ }
+}
diff --git a/test/jsonld/1.1/compact/p005-in.jsonld b/test/jsonld/1.1/compact/p005-in.jsonld
new file mode 100644
index 000000000..cef01fc88
--- /dev/null
+++ b/test/jsonld/1.1/compact/p005-in.jsonld
@@ -0,0 +1,6 @@
+{
+ "http://example.com/property": {
+ "@id": "http://example.com/compact-iris-are-considered",
+ "http://example.com/property": "@prefix does not require a gen-delim"
+ }
+}
diff --git a/test/jsonld/1.1/compact/p005-out.jsonld b/test/jsonld/1.1/compact/p005-out.jsonld
new file mode 100644
index 000000000..6920c1935
--- /dev/null
+++ b/test/jsonld/1.1/compact/p005-out.jsonld
@@ -0,0 +1,10 @@
+{
+ "@context": {
+ "compact-iris": {"@id": "http://example.com/compact-iris-", "@prefix": true},
+ "property": "http://example.com/property"
+ },
+ "property": {
+ "@id": "compact-iris:are-considered",
+ "property": "@prefix does not require a gen-delim"
+ }
+}
diff --git a/test/jsonld/1.1/compact/p006-context.jsonld b/test/jsonld/1.1/compact/p006-context.jsonld
new file mode 100644
index 000000000..daa9107db
--- /dev/null
+++ b/test/jsonld/1.1/compact/p006-context.jsonld
@@ -0,0 +1,6 @@
+{
+ "@context": {
+ "compact-iris": {"@id": "http://example.com/compact-iris-", "@prefix": true},
+ "property": "http://example.com/property"
+ }
+}
diff --git a/test/jsonld/1.1/compact/p006-in.jsonld b/test/jsonld/1.1/compact/p006-in.jsonld
new file mode 100644
index 000000000..cef01fc88
--- /dev/null
+++ b/test/jsonld/1.1/compact/p006-in.jsonld
@@ -0,0 +1,6 @@
+{
+ "http://example.com/property": {
+ "@id": "http://example.com/compact-iris-are-considered",
+ "http://example.com/property": "@prefix does not require a gen-delim"
+ }
+}
diff --git a/test/jsonld/1.1/compact/p006-out.jsonld b/test/jsonld/1.1/compact/p006-out.jsonld
new file mode 100644
index 000000000..6920c1935
--- /dev/null
+++ b/test/jsonld/1.1/compact/p006-out.jsonld
@@ -0,0 +1,10 @@
+{
+ "@context": {
+ "compact-iris": {"@id": "http://example.com/compact-iris-", "@prefix": true},
+ "property": "http://example.com/property"
+ },
+ "property": {
+ "@id": "compact-iris:are-considered",
+ "property": "@prefix does not require a gen-delim"
+ }
+}
diff --git a/test/jsonld/1.1/compact/p007-context.jsonld b/test/jsonld/1.1/compact/p007-context.jsonld
new file mode 100644
index 000000000..8d06da6bb
--- /dev/null
+++ b/test/jsonld/1.1/compact/p007-context.jsonld
@@ -0,0 +1,6 @@
+{
+ "@context": {
+ "foo": "http://example.org/",
+ "foo:bar": {"@type": "@id"}
+ }
+}
diff --git a/test/jsonld/1.1/compact/p007-in.jsonld b/test/jsonld/1.1/compact/p007-in.jsonld
new file mode 100644
index 000000000..47e98a8ae
--- /dev/null
+++ b/test/jsonld/1.1/compact/p007-in.jsonld
@@ -0,0 +1,4 @@
+{
+ "@id": "http://example.org/bar/a",
+ "http://example.org/bar/b": "c"
+}
diff --git a/test/jsonld/1.1/compact/p007-out.jsonld b/test/jsonld/1.1/compact/p007-out.jsonld
new file mode 100644
index 000000000..b82492a84
--- /dev/null
+++ b/test/jsonld/1.1/compact/p007-out.jsonld
@@ -0,0 +1,8 @@
+{
+ "@context": {
+ "foo": "http://example.org/",
+ "foo:bar": {"@type": "@id"}
+ },
+ "@id": "foo:bar/a",
+ "foo:bar/b": "c"
+}
diff --git a/test/jsonld/1.1/compact/p008-context.jsonld b/test/jsonld/1.1/compact/p008-context.jsonld
new file mode 100644
index 000000000..9c7f2363d
--- /dev/null
+++ b/test/jsonld/1.1/compact/p008-context.jsonld
@@ -0,0 +1,6 @@
+{
+ "@context": {
+ "compact-iris": {"@id": "http://example.com/compact-iris#", "@prefix": false},
+ "property": "http://example.com/property"
+ }
+}
diff --git a/test/jsonld/1.1/compact/p008-in.jsonld b/test/jsonld/1.1/compact/p008-in.jsonld
new file mode 100644
index 000000000..55a50021b
--- /dev/null
+++ b/test/jsonld/1.1/compact/p008-in.jsonld
@@ -0,0 +1,6 @@
+{
+ "http://example.com/property": {
+ "@id": "http://example.com/compact-iris#are-considered",
+ "http://example.com/property": "@prefix false not really necessary, but doubly prevents term from being used as a prefix"
+ }
+}
diff --git a/test/jsonld/1.1/compact/p008-out.jsonld b/test/jsonld/1.1/compact/p008-out.jsonld
new file mode 100644
index 000000000..3ad606947
--- /dev/null
+++ b/test/jsonld/1.1/compact/p008-out.jsonld
@@ -0,0 +1,13 @@
+{
+ "@context": {
+ "compact-iris": {
+ "@id": "http://example.com/compact-iris#",
+ "@prefix": false
+ },
+ "property": "http://example.com/property"
+ },
+ "property": {
+ "@id": "http://example.com/compact-iris#are-considered",
+ "property": "@prefix false not really necessary, but doubly prevents term from being used as a prefix"
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/pi01-context.jsonld b/test/jsonld/1.1/compact/pi01-context.jsonld
new file mode 100644
index 000000000..f2a62b3e8
--- /dev/null
+++ b/test/jsonld/1.1/compact/pi01-context.jsonld
@@ -0,0 +1,8 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "@base": "http://example.com/",
+ "@vocab": "http://example.com/",
+ "author": {"@type": "@id", "@container": "@index", "@index": "prop"}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/pi01-in.jsonld b/test/jsonld/1.1/compact/pi01-in.jsonld
new file mode 100644
index 000000000..391db54d1
--- /dev/null
+++ b/test/jsonld/1.1/compact/pi01-in.jsonld
@@ -0,0 +1,8 @@
+[{
+ "@id": "http://example.com/article",
+ "http://example.com/author": [
+ {"@id": "http://example.com/person/1", "http://example.com/prop": [{"@value": "regular"}]},
+ {"@id": "http://example.com/person/2", "http://example.com/prop": [{"@value": "guest"}]},
+ {"@id": "http://example.com/person/3", "http://example.com/prop": [{"@value": "guest"}]}
+ ]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/pi01-out.jsonld b/test/jsonld/1.1/compact/pi01-out.jsonld
new file mode 100644
index 000000000..7a92c136b
--- /dev/null
+++ b/test/jsonld/1.1/compact/pi01-out.jsonld
@@ -0,0 +1,13 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "@base": "http://example.com/",
+ "@vocab": "http://example.com/",
+ "author": {"@type": "@id", "@container": "@index", "@index": "prop"}
+ },
+ "@id": "article",
+ "author": {
+ "regular": {"@id": "person/1"},
+ "guest": [{"@id": "person/2"}, {"@id": "person/3"}]
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/pi02-context.jsonld b/test/jsonld/1.1/compact/pi02-context.jsonld
new file mode 100644
index 000000000..f2a62b3e8
--- /dev/null
+++ b/test/jsonld/1.1/compact/pi02-context.jsonld
@@ -0,0 +1,8 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "@base": "http://example.com/",
+ "@vocab": "http://example.com/",
+ "author": {"@type": "@id", "@container": "@index", "@index": "prop"}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/pi02-in.jsonld b/test/jsonld/1.1/compact/pi02-in.jsonld
new file mode 100644
index 000000000..6068c779e
--- /dev/null
+++ b/test/jsonld/1.1/compact/pi02-in.jsonld
@@ -0,0 +1,8 @@
+[{
+ "@id": "http://example.com/article",
+ "http://example.com/author": [
+ {"@id": "http://example.com/person/1", "http://example.com/prop": [{"@value": "regular"}, {"@value": "foo"}]},
+ {"@id": "http://example.com/person/2", "http://example.com/prop": [{"@value": "guest"}, {"@value": "foo"}]},
+ {"@id": "http://example.com/person/3", "http://example.com/prop": [{"@value": "guest"}, {"@value": "foo"}]}
+ ]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/pi02-out.jsonld b/test/jsonld/1.1/compact/pi02-out.jsonld
new file mode 100644
index 000000000..850558eb1
--- /dev/null
+++ b/test/jsonld/1.1/compact/pi02-out.jsonld
@@ -0,0 +1,16 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "@base": "http://example.com/",
+ "@vocab": "http://example.com/",
+ "author": {"@type": "@id", "@container": "@index", "@index": "prop"}
+ },
+ "@id": "article",
+ "author": {
+ "regular": {"@id": "person/1", "prop": "foo"},
+ "guest": [
+ {"@id": "person/2", "prop": "foo"},
+ {"@id": "person/3", "prop": "foo"}
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/pi03-context.jsonld b/test/jsonld/1.1/compact/pi03-context.jsonld
new file mode 100644
index 000000000..cb0fd5dd7
--- /dev/null
+++ b/test/jsonld/1.1/compact/pi03-context.jsonld
@@ -0,0 +1,9 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "@base": "http://example.com/",
+ "@vocab": "http://example.com/",
+ "author": {"@type": "@vocab", "@container": "@index", "@index": "prop"},
+ "prop": {"@type": "@id"}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/pi03-in.jsonld b/test/jsonld/1.1/compact/pi03-in.jsonld
new file mode 100644
index 000000000..165092dcf
--- /dev/null
+++ b/test/jsonld/1.1/compact/pi03-in.jsonld
@@ -0,0 +1,8 @@
+[{
+ "@id": "http://example.com/article",
+ "http://example.com/author": [
+ {"@id": "http://example.com/person/1", "http://example.com/prop": [{"@id": "http://example.com/regular"}]},
+ {"@id": "http://example.com/person/2", "http://example.com/prop": [{"@id": "http://example.com/guest"}]},
+ {"@id": "http://example.com/person/3", "http://example.com/prop": [{"@id": "http://example.com/guest"}]}
+ ]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/pi03-out.jsonld b/test/jsonld/1.1/compact/pi03-out.jsonld
new file mode 100644
index 000000000..2e9e5780c
--- /dev/null
+++ b/test/jsonld/1.1/compact/pi03-out.jsonld
@@ -0,0 +1,17 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "@base": "http://example.com/",
+ "@vocab": "http://example.com/",
+ "author": {"@type": "@vocab", "@container": "@index", "@index": "prop"},
+ "prop": {"@type": "@id"}
+ },
+ "@id": "article",
+ "author": {
+ "regular": {"@id": "person/1"},
+ "guest": [
+ {"@id": "person/2"},
+ {"@id": "person/3"}
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/pi04-context.jsonld b/test/jsonld/1.1/compact/pi04-context.jsonld
new file mode 100644
index 000000000..cb0fd5dd7
--- /dev/null
+++ b/test/jsonld/1.1/compact/pi04-context.jsonld
@@ -0,0 +1,9 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "@base": "http://example.com/",
+ "@vocab": "http://example.com/",
+ "author": {"@type": "@vocab", "@container": "@index", "@index": "prop"},
+ "prop": {"@type": "@id"}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/pi04-in.jsonld b/test/jsonld/1.1/compact/pi04-in.jsonld
new file mode 100644
index 000000000..3b4ffdeb4
--- /dev/null
+++ b/test/jsonld/1.1/compact/pi04-in.jsonld
@@ -0,0 +1,8 @@
+[{
+ "@id": "http://example.com/article",
+ "http://example.com/author": [
+ {"@id": "http://example.com/person/1", "http://example.com/prop": [{"@id": "http://example.com/regular"}, {"@id": "http://example.com/foo"}]},
+ {"@id": "http://example.com/person/2", "http://example.com/prop": [{"@id": "http://example.com/guest"}, {"@id": "http://example.com/foo"}]},
+ {"@id": "http://example.com/person/3", "http://example.com/prop": [{"@id": "http://example.com/guest"}, {"@id": "http://example.com/foo"}]}
+ ]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/pi04-out.jsonld b/test/jsonld/1.1/compact/pi04-out.jsonld
new file mode 100644
index 000000000..11dd58c26
--- /dev/null
+++ b/test/jsonld/1.1/compact/pi04-out.jsonld
@@ -0,0 +1,17 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "@base": "http://example.com/",
+ "@vocab": "http://example.com/",
+ "author": {"@type": "@vocab", "@container": "@index", "@index": "prop"},
+ "prop": {"@type": "@id"}
+ },
+ "@id": "article",
+ "author": {
+ "regular": {"@id": "person/1", "prop": "foo"},
+ "guest": [
+ {"@id": "person/2", "prop": "foo"},
+ {"@id": "person/3", "prop": "foo"}
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/pi05-context.jsonld b/test/jsonld/1.1/compact/pi05-context.jsonld
new file mode 100644
index 000000000..f2a62b3e8
--- /dev/null
+++ b/test/jsonld/1.1/compact/pi05-context.jsonld
@@ -0,0 +1,8 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "@base": "http://example.com/",
+ "@vocab": "http://example.com/",
+ "author": {"@type": "@id", "@container": "@index", "@index": "prop"}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/pi05-in.jsonld b/test/jsonld/1.1/compact/pi05-in.jsonld
new file mode 100644
index 000000000..4f8d91d28
--- /dev/null
+++ b/test/jsonld/1.1/compact/pi05-in.jsonld
@@ -0,0 +1,8 @@
+[{
+ "@id": "http://example.com/article",
+ "http://example.com/author": [
+ {"@id": "http://example.com/person/1"},
+ {"@id": "http://example.com/person/2"},
+ {"@id": "http://example.com/person/3"}
+ ]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/pi05-out.jsonld b/test/jsonld/1.1/compact/pi05-out.jsonld
new file mode 100644
index 000000000..c0d890785
--- /dev/null
+++ b/test/jsonld/1.1/compact/pi05-out.jsonld
@@ -0,0 +1,12 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "@base": "http://example.com/",
+ "@vocab": "http://example.com/",
+ "author": {"@type": "@id", "@container": "@index", "@index": "prop"}
+ },
+ "@id": "article",
+ "author": {
+ "@none": ["person/1", "person/2", "person/3"]
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/pi06-context.jsonld b/test/jsonld/1.1/compact/pi06-context.jsonld
new file mode 100644
index 000000000..f2a62b3e8
--- /dev/null
+++ b/test/jsonld/1.1/compact/pi06-context.jsonld
@@ -0,0 +1,8 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "@base": "http://example.com/",
+ "@vocab": "http://example.com/",
+ "author": {"@type": "@id", "@container": "@index", "@index": "prop"}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/pi06-in.jsonld b/test/jsonld/1.1/compact/pi06-in.jsonld
new file mode 100644
index 000000000..165092dcf
--- /dev/null
+++ b/test/jsonld/1.1/compact/pi06-in.jsonld
@@ -0,0 +1,8 @@
+[{
+ "@id": "http://example.com/article",
+ "http://example.com/author": [
+ {"@id": "http://example.com/person/1", "http://example.com/prop": [{"@id": "http://example.com/regular"}]},
+ {"@id": "http://example.com/person/2", "http://example.com/prop": [{"@id": "http://example.com/guest"}]},
+ {"@id": "http://example.com/person/3", "http://example.com/prop": [{"@id": "http://example.com/guest"}]}
+ ]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/pi06-out.jsonld b/test/jsonld/1.1/compact/pi06-out.jsonld
new file mode 100644
index 000000000..146f10fe1
--- /dev/null
+++ b/test/jsonld/1.1/compact/pi06-out.jsonld
@@ -0,0 +1,16 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "@base": "http://example.com/",
+ "@vocab": "http://example.com/",
+ "author": {"@type": "@id", "@container": "@index", "@index": "prop"}
+ },
+ "@id": "article",
+ "author": {
+ "@none": [
+ {"@id": "person/1", "prop": {"@id": "regular"}},
+ {"@id": "person/2", "prop": {"@id": "guest"}},
+ {"@id": "person/3", "prop": {"@id": "guest"}}
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/pr01-context.jsonld b/test/jsonld/1.1/compact/pr01-context.jsonld
new file mode 100644
index 000000000..a6875709c
--- /dev/null
+++ b/test/jsonld/1.1/compact/pr01-context.jsonld
@@ -0,0 +1,7 @@
+{
+ "@context": [{
+ "@vocab": "http://example.com/",
+ "@version": 1.1,
+ "protected": {"@protected": true}
+ }, null]
+}
diff --git a/test/jsonld/1.1/compact/pr01-in.jsonld b/test/jsonld/1.1/compact/pr01-in.jsonld
new file mode 100644
index 000000000..d6a85b74a
--- /dev/null
+++ b/test/jsonld/1.1/compact/pr01-in.jsonld
@@ -0,0 +1,3 @@
+[{
+ "http://example/a": [{"@id": "http://example.org/foo"}]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/pr02-context.jsonld b/test/jsonld/1.1/compact/pr02-context.jsonld
new file mode 100644
index 000000000..2c7433f92
--- /dev/null
+++ b/test/jsonld/1.1/compact/pr02-context.jsonld
@@ -0,0 +1,9 @@
+{
+ "@context": [{
+ "@vocab": "http://example.com/",
+ "@version": 1.1,
+ "protected": {"@type": "@id", "@protected": true}
+ }, {
+ "protected": {"@type": "@vocab"}
+ }]
+}
diff --git a/test/jsonld/1.1/compact/pr02-in.jsonld b/test/jsonld/1.1/compact/pr02-in.jsonld
new file mode 100644
index 000000000..d6a85b74a
--- /dev/null
+++ b/test/jsonld/1.1/compact/pr02-in.jsonld
@@ -0,0 +1,3 @@
+[{
+ "http://example/a": [{"@id": "http://example.org/foo"}]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/pr03-context.jsonld b/test/jsonld/1.1/compact/pr03-context.jsonld
new file mode 100644
index 000000000..0863ce0d2
--- /dev/null
+++ b/test/jsonld/1.1/compact/pr03-context.jsonld
@@ -0,0 +1,8 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "@vocab": "http://example.com/",
+ "protected": {"@protected": true},
+ "Type": {"@context": {"protected": {"@type": "@id"}}}
+ }
+}
diff --git a/test/jsonld/1.1/compact/pr03-in.jsonld b/test/jsonld/1.1/compact/pr03-in.jsonld
new file mode 100644
index 000000000..0b7804386
--- /dev/null
+++ b/test/jsonld/1.1/compact/pr03-in.jsonld
@@ -0,0 +1,7 @@
+[{
+ "http://example.com/protected": [{"@value": "p === http://example.com/protected"}],
+ "http://example.com/unprotected": [{
+ "@type": "http://example.com/Type",
+ "http://example.com/protected": [{"@value": "p === http://example.com/protected"}]
+ }]
+}]
diff --git a/test/jsonld/1.1/compact/pr04-context.jsonld b/test/jsonld/1.1/compact/pr04-context.jsonld
new file mode 100644
index 000000000..1d3519035
--- /dev/null
+++ b/test/jsonld/1.1/compact/pr04-context.jsonld
@@ -0,0 +1,8 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "@vocab": "http://example.com/",
+ "protected": {"@protected": true},
+ "unprotected": {"@context": {"protected": {"@language": "en"}}}
+ }
+}
diff --git a/test/jsonld/1.1/compact/pr04-in.jsonld b/test/jsonld/1.1/compact/pr04-in.jsonld
new file mode 100644
index 000000000..e108683c2
--- /dev/null
+++ b/test/jsonld/1.1/compact/pr04-in.jsonld
@@ -0,0 +1,9 @@
+[{
+ "http://example.com/protected": [{"@value": "p === http://example.com/protected"}],
+ "http://example.com/unprotected": [{
+ "http://example.com/protected": [{
+ "@value": "p === http://example.com/protected",
+ "@language": "en"
+ }]
+ }]
+}]
diff --git a/test/jsonld/1.1/compact/pr04-out.jsonld b/test/jsonld/1.1/compact/pr04-out.jsonld
new file mode 100644
index 000000000..41eaedee5
--- /dev/null
+++ b/test/jsonld/1.1/compact/pr04-out.jsonld
@@ -0,0 +1,14 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "@vocab": "http://example.com/",
+ "protected": {"@protected": true},
+ "unprotected": {
+ "@context": {"protected": {"@language": "en"}}
+ }
+ },
+ "protected": "p === http://example.com/protected",
+ "unprotected": {
+ "protected": "p === http://example.com/protected"
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/pr05-context.jsonld b/test/jsonld/1.1/compact/pr05-context.jsonld
new file mode 100644
index 000000000..a066af950
--- /dev/null
+++ b/test/jsonld/1.1/compact/pr05-context.jsonld
@@ -0,0 +1,12 @@
+{
+ "@context": [{
+ "@version": 1.1,
+ "@protected": true,
+ "@vocab": "http://example.com/",
+ "Parent": {"@context": {"@protected": true, "foo": {"@type": "@id"}}}
+ }, {
+ "@version": 1.1,
+ "@protected": true,
+ "Child": {"@context": {"@protected": true, "foo": {"@type": "@id"}}}
+ }]
+}
diff --git a/test/jsonld/1.1/compact/pr05-in.jsonld b/test/jsonld/1.1/compact/pr05-in.jsonld
new file mode 100644
index 000000000..4e97b905f
--- /dev/null
+++ b/test/jsonld/1.1/compact/pr05-in.jsonld
@@ -0,0 +1,20 @@
+[
+ {
+ "@type": [
+ "http://example.com/Parent"
+ ],
+ "http://example.com/foo": [
+ {
+ "@type": [
+ "http://example.com/Child"
+ ],
+ "http://example.com/foo": [
+ {
+ "@id": "http://example.com/test"
+ }
+ ]
+ }
+ ]
+ }
+]
+
diff --git a/test/jsonld/1.1/compact/pr05-out.jsonld b/test/jsonld/1.1/compact/pr05-out.jsonld
new file mode 100644
index 000000000..7cd17cb8a
--- /dev/null
+++ b/test/jsonld/1.1/compact/pr05-out.jsonld
@@ -0,0 +1,17 @@
+{
+ "@context": [{
+ "@version": 1.1,
+ "@protected": true,
+ "@vocab": "http://example.com/",
+ "Parent": {"@context": {"@protected": true, "foo": {"@type": "@id"}}}
+ }, {
+ "@version": 1.1,
+ "@protected": true,
+ "Child": {"@context": {"@protected": true, "foo": {"@type": "@id"}}}
+ }],
+ "@type": "Parent",
+ "foo": {
+ "@type": "Child",
+ "foo": "http://example.com/test"
+ }
+}
diff --git a/test/jsonld/1.1/compact/r001-context.jsonld b/test/jsonld/1.1/compact/r001-context.jsonld
new file mode 100644
index 000000000..304ef521a
--- /dev/null
+++ b/test/jsonld/1.1/compact/r001-context.jsonld
@@ -0,0 +1,3 @@
+{
+ "@context": {"b": "http://example.com/b"}
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/r001-in.jsonld b/test/jsonld/1.1/compact/r001-in.jsonld
new file mode 100644
index 000000000..543c3609a
--- /dev/null
+++ b/test/jsonld/1.1/compact/r001-in.jsonld
@@ -0,0 +1,4 @@
+{
+ "@id": "a",
+ "http://example.com/b": {"@id": "c"}
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/r001-out.jsonld b/test/jsonld/1.1/compact/r001-out.jsonld
new file mode 100644
index 000000000..89a6b5566
--- /dev/null
+++ b/test/jsonld/1.1/compact/r001-out.jsonld
@@ -0,0 +1,5 @@
+{
+ "@context": {"b": "http://example.com/b"},
+ "@id": "a",
+ "b": {"@id": "c"}
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/r002-context.jsonld b/test/jsonld/1.1/compact/r002-context.jsonld
new file mode 100644
index 000000000..304ef521a
--- /dev/null
+++ b/test/jsonld/1.1/compact/r002-context.jsonld
@@ -0,0 +1,3 @@
+{
+ "@context": {"b": "http://example.com/b"}
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/r002-in.jsonld b/test/jsonld/1.1/compact/r002-in.jsonld
new file mode 100644
index 000000000..765625c35
--- /dev/null
+++ b/test/jsonld/1.1/compact/r002-in.jsonld
@@ -0,0 +1,4 @@
+{
+ "@id": "http://example.org/a",
+ "http://example.com/b": {"@id": "http://example.org/c"}
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/r002-out.jsonld b/test/jsonld/1.1/compact/r002-out.jsonld
new file mode 100644
index 000000000..b87865393
--- /dev/null
+++ b/test/jsonld/1.1/compact/r002-out.jsonld
@@ -0,0 +1,5 @@
+{
+ "@context": {"b": "http://example.com/b"},
+ "@id": "http://example.org/a",
+ "b": {"@id": "http://example.org/c"}
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/s001-context.jsonld b/test/jsonld/1.1/compact/s001-context.jsonld
new file mode 100644
index 000000000..41a0cf97d
--- /dev/null
+++ b/test/jsonld/1.1/compact/s001-context.jsonld
@@ -0,0 +1,10 @@
+{
+ "@context": {
+ "mylist": {"@id": "http://example.com/mylist", "@container": ["@list"]},
+ "myset": {"@id": "http://example.com/myset", "@container": ["@set"]},
+ "myid": {"@id": "http://example.com/myid", "@container": ["@id"]},
+ "mytype": {"@id": "http://example.com/mytype", "@container": ["@type"]},
+ "mylanguage": {"@id": "http://example.com/mylanguage", "@container": ["@language"]},
+ "myindex": {"@id": "http://example.com/myindex", "@container": ["@index"]}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/s001-in.jsonld b/test/jsonld/1.1/compact/s001-in.jsonld
new file mode 100644
index 000000000..459a2978a
--- /dev/null
+++ b/test/jsonld/1.1/compact/s001-in.jsonld
@@ -0,0 +1,9 @@
+{
+ "@id": "http://example.org/id",
+ "http://example.com/mylist": {"@list": ["foo"]},
+ "http://example.com/myset": "foo",
+ "http://example.com/myid": {"@id": "http://example/id", "@type": "http://example/type"},
+ "http://example.com/mytype": {"@id": "http://example/id", "@type": "http://example/type"},
+ "http://example.com/mylanguage": {"@value": "foo", "@language": "en"},
+ "http://example.com/myindex": {"@value": "foo", "@index": "bar"}
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/s001-out.jsonld b/test/jsonld/1.1/compact/s001-out.jsonld
new file mode 100644
index 000000000..f0b9bc2b3
--- /dev/null
+++ b/test/jsonld/1.1/compact/s001-out.jsonld
@@ -0,0 +1,17 @@
+{
+ "@context": {
+ "mylist": {"@id": "http://example.com/mylist", "@container": ["@list"]},
+ "myset": {"@id": "http://example.com/myset", "@container": ["@set"]},
+ "myid": {"@id": "http://example.com/myid", "@container": ["@id"]},
+ "mytype": {"@id": "http://example.com/mytype", "@container": ["@type"]},
+ "mylanguage": {"@id": "http://example.com/mylanguage", "@container": ["@language"]},
+ "myindex": {"@id": "http://example.com/myindex", "@container": ["@index"]}
+ },
+ "@id": "http://example.org/id",
+ "mylist": ["foo"],
+ "myset": ["foo"],
+ "myid": {"http://example/id": {"@type": "http://example/type"}},
+ "mytype": {"http://example/type": "http://example/id"},
+ "mylanguage": {"en": "foo"},
+ "myindex": {"bar": "foo"}
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/s002-context.jsonld b/test/jsonld/1.1/compact/s002-context.jsonld
new file mode 100644
index 000000000..b63af60df
--- /dev/null
+++ b/test/jsonld/1.1/compact/s002-context.jsonld
@@ -0,0 +1,8 @@
+{
+ "@context": {
+ "myid": {"@id": "http://example.com/myid", "@container": ["@id", "@set"]},
+ "mytype": {"@id": "http://example.com/mytype", "@container": ["@type", "@set"]},
+ "mylanguage": {"@id": "http://example.com/mylanguage", "@container": ["@language", "@set"]},
+ "myindex": {"@id": "http://example.com/myindex", "@container": ["@index", "@set"]}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/s002-in.jsonld b/test/jsonld/1.1/compact/s002-in.jsonld
new file mode 100644
index 000000000..6b1e951ee
--- /dev/null
+++ b/test/jsonld/1.1/compact/s002-in.jsonld
@@ -0,0 +1,7 @@
+{
+ "@id": "http://example.org/id",
+ "http://example.com/myid": {"@id": "http://example/id", "@type": "http://example/type"},
+ "http://example.com/mytype": {"@id": "http://example/id", "@type": "http://example/type"},
+ "http://example.com/mylanguage": {"@value": "foo", "@language": "en"},
+ "http://example.com/myindex": {"@value": "foo", "@index": "bar"}
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/s002-out.jsonld b/test/jsonld/1.1/compact/s002-out.jsonld
new file mode 100644
index 000000000..7a99c67e6
--- /dev/null
+++ b/test/jsonld/1.1/compact/s002-out.jsonld
@@ -0,0 +1,13 @@
+{
+ "@context": {
+ "myid": {"@id": "http://example.com/myid", "@container": ["@id", "@set"]},
+ "mytype": {"@id": "http://example.com/mytype", "@container": ["@type", "@set"]},
+ "mylanguage": {"@id": "http://example.com/mylanguage", "@container": ["@language", "@set"]},
+ "myindex": {"@id": "http://example.com/myindex", "@container": ["@index", "@set"]}
+ },
+ "@id": "http://example.org/id",
+ "myid": {"http://example/id": [{"@type": "http://example/type"}]},
+ "mytype": {"http://example/type": ["http://example/id"]},
+ "mylanguage": {"en": ["foo"]},
+ "myindex": {"bar": ["foo"]}
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/tn01-context.jsonld b/test/jsonld/1.1/compact/tn01-context.jsonld
new file mode 100644
index 000000000..4850765e8
--- /dev/null
+++ b/test/jsonld/1.1/compact/tn01-context.jsonld
@@ -0,0 +1,7 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "xsd": "http://www.w3.org/2001/XMLSchema#",
+ "notype": {"@id": "http://example.com/notype", "@type": "@none"}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/tn01-in.jsonld b/test/jsonld/1.1/compact/tn01-in.jsonld
new file mode 100644
index 000000000..2398cf628
--- /dev/null
+++ b/test/jsonld/1.1/compact/tn01-in.jsonld
@@ -0,0 +1,14 @@
+[{
+ "http://example.com/notype": [
+ {"@value": "string"},
+ {"@value": true},
+ {"@value": false},
+ {"@value": 1},
+ {"@value": 10.0},
+ {"@value": "plain"},
+ {"@value": true, "@type": "http://www.w3.org/2001/XMLSchema#boolean"},
+ {"@value": "english", "@language": "en"},
+ {"@value": "2018-02-17", "@type": "http://www.w3.org/2001/XMLSchema#date"},
+ {"@id": "http://example.com/iri"}
+ ]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/tn01-out.jsonld b/test/jsonld/1.1/compact/tn01-out.jsonld
new file mode 100644
index 000000000..bf6b641ff
--- /dev/null
+++ b/test/jsonld/1.1/compact/tn01-out.jsonld
@@ -0,0 +1,19 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "xsd": "http://www.w3.org/2001/XMLSchema#",
+ "notype": {"@id": "http://example.com/notype", "@type": "@none"}
+ },
+ "notype": [
+ {"@value": "string"},
+ {"@value": true},
+ {"@value": false},
+ {"@value": 1},
+ {"@value": 10.0},
+ {"@value": "plain"},
+ {"@value": true, "@type": "xsd:boolean"},
+ {"@value": "english", "@language": "en"},
+ {"@value": "2018-02-17", "@type": "xsd:date"},
+ {"@id": "http://example.com/iri"}
+ ]
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/tn02-context.jsonld b/test/jsonld/1.1/compact/tn02-context.jsonld
new file mode 100644
index 000000000..4850765e8
--- /dev/null
+++ b/test/jsonld/1.1/compact/tn02-context.jsonld
@@ -0,0 +1,7 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "xsd": "http://www.w3.org/2001/XMLSchema#",
+ "notype": {"@id": "http://example.com/notype", "@type": "@none"}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/tn02-in.jsonld b/test/jsonld/1.1/compact/tn02-in.jsonld
new file mode 100644
index 000000000..4d2ca6344
--- /dev/null
+++ b/test/jsonld/1.1/compact/tn02-in.jsonld
@@ -0,0 +1,3 @@
+[{
+ "http://example.com/notype": [{"@value": "string"}]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/tn02-out.jsonld b/test/jsonld/1.1/compact/tn02-out.jsonld
new file mode 100644
index 000000000..cada2038f
--- /dev/null
+++ b/test/jsonld/1.1/compact/tn02-out.jsonld
@@ -0,0 +1,8 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "xsd": "http://www.w3.org/2001/XMLSchema#",
+ "notype": {"@id": "http://example.com/notype", "@type": "@none"}
+ },
+ "notype": {"@value": "string"}
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/tn03-context.jsonld b/test/jsonld/1.1/compact/tn03-context.jsonld
new file mode 100644
index 000000000..39d1f8e9b
--- /dev/null
+++ b/test/jsonld/1.1/compact/tn03-context.jsonld
@@ -0,0 +1,7 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "xsd": "http://www.w3.org/2001/XMLSchema#",
+ "notype": {"@id": "http://example.com/notype", "@type": "@none", "@container": "@set"}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/tn03-in.jsonld b/test/jsonld/1.1/compact/tn03-in.jsonld
new file mode 100644
index 000000000..4d2ca6344
--- /dev/null
+++ b/test/jsonld/1.1/compact/tn03-in.jsonld
@@ -0,0 +1,3 @@
+[{
+ "http://example.com/notype": [{"@value": "string"}]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/compact/tn03-out.jsonld b/test/jsonld/1.1/compact/tn03-out.jsonld
new file mode 100644
index 000000000..bfbf9f7cc
--- /dev/null
+++ b/test/jsonld/1.1/compact/tn03-out.jsonld
@@ -0,0 +1,8 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "xsd": "http://www.w3.org/2001/XMLSchema#",
+ "notype": {"@id": "http://example.com/notype", "@type": "@none", "@container": "@set"}
+ },
+ "notype": [{"@value": "string"}]
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/context.jsonld b/test/jsonld/1.1/context.jsonld
new file mode 100644
index 000000000..bc03e7be9
--- /dev/null
+++ b/test/jsonld/1.1/context.jsonld
@@ -0,0 +1,37 @@
+{
+ "@context": {
+ "@vocab": "https://w3c.github.io/json-ld-api/tests/vocab#",
+ "dcterms": "http://purl.org/dc/terms/",
+ "jld": "https://w3c.github.io/json-ld-api/tests/vocab#",
+ "mf": "http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#",
+ "rdfs": "http://www.w3.org/2000/01/rdf-schema#",
+ "xsd": "http://www.w3.org/2001/XMLSchema#",
+
+ "context": { "@type": "@id" },
+ "expect": { "@id": "mf:result", "@type": "@id" },
+ "expectErrorCode": { "@id": "mf:result" },
+ "frame": { "@type": "@id" },
+ "input": { "@id": "mf:action", "@type": "@id" },
+ "option": { "@type": "@id"},
+ "sequence": { "@id": "mf:entries", "@type": "@id", "@container": "@list" },
+ "redirectTo": { "@type": "@id"},
+
+ "name": "mf:name",
+ "purpose": "rdfs:comment",
+ "description": "rdfs:comment",
+ "base": { "@type": "@id" },
+ "compactArrays": { "@type": "xsd:boolean" },
+ "compactToRelative": { "@type": "xsd:boolean" },
+ "contentType": { "@type": "xsd:string" },
+ "expandContext": { "@type": "@id" },
+ "extractAllScripts": { "@type": "xsd:boolean" },
+ "httpLink": { "@type": "xsd:string", "@container": "@set" },
+ "httpStatus": { "@type": "xsd:integer" },
+ "normative": { "@type": "xsd:boolean" },
+ "processingMode": { "@type": "xsd:string" },
+ "processorFeature": { "@type": "xsd:string" },
+ "produceGeneralizedRdf":{ "@type": "xsd:boolean" },
+ "specVersion": { "@type": "xsd:string" },
+ "useNativeTypes": { "@type": "xsd:boolean" }
+ }
+}
diff --git a/test/jsonld/1.1/expand-manifest.jsonld b/test/jsonld/1.1/expand-manifest.jsonld
new file mode 100644
index 000000000..0482a73ba
--- /dev/null
+++ b/test/jsonld/1.1/expand-manifest.jsonld
@@ -0,0 +1,2944 @@
+{
+ "@context": ["context.jsonld", {"@base": "expand-manifest"}],
+ "@id": "",
+ "@type": "mf:Manifest",
+ "name": "Expansion",
+ "description": "These tests implement the requirements for the JSON-LD [Expansion Algorithm](https://www.w3.org/TR/json-ld11-api/#expansion-algorithm).",
+ "baseIri": "https://w3c.github.io/json-ld-api/tests/",
+ "sequence": [
+ {
+ "@id": "#t0001",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "drop free-floating nodes",
+ "purpose": "Expand drops unreferenced nodes having only @id",
+ "input": "expand/0001-in.jsonld",
+ "expect": "expand/0001-out.jsonld"
+ }, {
+ "@id": "#t0002",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "basic",
+ "purpose": "Expanding terms with different types of values",
+ "input": "expand/0002-in.jsonld",
+ "expect": "expand/0002-out.jsonld"
+ }, {
+ "@id": "#t0003",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "drop null and unmapped properties",
+ "purpose": "Verifies that null values and unmapped properties are removed from expanded output",
+ "input": "expand/0003-in.jsonld",
+ "expect": "expand/0003-out.jsonld"
+ }, {
+ "@id": "#t0004",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "optimize @set, keep empty arrays",
+ "purpose": "Uses of @set are removed in expansion; values of @set, or just plain values which are empty arrays are retained",
+ "input": "expand/0004-in.jsonld",
+ "expect": "expand/0004-out.jsonld"
+ }, {
+ "@id": "#t0005",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "do not expand aliased @id/@type",
+ "purpose": "If a keyword is aliased, it is not used when expanding",
+ "input": "expand/0005-in.jsonld",
+ "expect": "expand/0005-out.jsonld"
+ }, {
+ "@id": "#t0006",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "alias keywords",
+ "purpose": "Aliased keywords expand in resulting document",
+ "input": "expand/0006-in.jsonld",
+ "expect": "expand/0006-out.jsonld"
+ }, {
+ "@id": "#t0007",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "date type-coercion",
+ "purpose": "Expand strings to expanded value with @type: xsd:dateTime",
+ "input": "expand/0007-in.jsonld",
+ "expect": "expand/0007-out.jsonld"
+ }, {
+ "@id": "#t0008",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "@value with @language",
+ "purpose": "Keep expanded values with @language, drop non-conforming value objects containing just @language",
+ "input": "expand/0008-in.jsonld",
+ "expect": "expand/0008-out.jsonld"
+ }, {
+ "@id": "#t0009",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "@graph with terms",
+ "purpose": "Use of @graph to contain multiple nodes within array",
+ "input": "expand/0009-in.jsonld",
+ "expect": "expand/0009-out.jsonld"
+ }, {
+ "@id": "#t0010",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "native types",
+ "purpose": "Expanding native scalar retains native scalar within expanded value",
+ "input": "expand/0010-in.jsonld",
+ "expect": "expand/0010-out.jsonld"
+ }, {
+ "@id": "#t0011",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "coerced @id",
+ "purpose": "A value of a property with @type: @id coercion expands to a node reference",
+ "input": "expand/0011-in.jsonld",
+ "expect": "expand/0011-out.jsonld"
+ }, {
+ "@id": "#t0012",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "@graph with embed",
+ "purpose": "Use of @graph to contain multiple nodes within array",
+ "input": "expand/0012-in.jsonld",
+ "expect": "expand/0012-out.jsonld"
+ }, {
+ "@id": "#t0013",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "expand already expanded",
+ "purpose": "Expand does not mess up already expanded document",
+ "input": "expand/0013-in.jsonld",
+ "expect": "expand/0013-out.jsonld"
+ }, {
+ "@id": "#t0014",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "@set of @value objects with keyword aliases",
+ "purpose": "Expanding aliased @set and @value",
+ "input": "expand/0014-in.jsonld",
+ "expect": "expand/0014-out.jsonld"
+ }, {
+ "@id": "#t0015",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "collapse set of sets, keep empty lists",
+ "purpose": "An array of multiple @set nodes are collapsed into a single array",
+ "input": "expand/0015-in.jsonld",
+ "expect": "expand/0015-out.jsonld"
+ }, {
+ "@id": "#t0016",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "context reset",
+ "purpose": "Setting @context to null within an embedded object resets back to initial context state",
+ "input": "expand/0016-in.jsonld",
+ "expect": "expand/0016-out.jsonld"
+ }, {
+ "@id": "#t0017",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "@graph and @id aliased",
+ "purpose": "Expanding with @graph and @id aliases",
+ "input": "expand/0017-in.jsonld",
+ "expect": "expand/0017-out.jsonld"
+ }, {
+ "@id": "#t0018",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "override default @language",
+ "purpose": "override default @language in terms; only language-tag strings",
+ "input": "expand/0018-in.jsonld",
+ "expect": "expand/0018-out.jsonld"
+ }, {
+ "@id": "#t0019",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "remove @value = null",
+ "purpose": "Expanding a value of null removes the value",
+ "input": "expand/0019-in.jsonld",
+ "expect": "expand/0019-out.jsonld"
+ }, {
+ "@id": "#t0020",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "do not remove @graph if not at top-level",
+ "purpose": "@graph used under a node is retained",
+ "input": "expand/0020-in.jsonld",
+ "expect": "expand/0020-out.jsonld"
+ }, {
+ "@id": "#t0021",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "do not remove @graph at top-level if not only property",
+ "purpose": "@graph used at the top level is retained if there are other properties",
+ "input": "expand/0021-in.jsonld",
+ "expect": "expand/0021-out.jsonld"
+ }, {
+ "@id": "#t0022",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "expand value with default language",
+ "purpose": "Expanding with a default language applies that language to string values",
+ "input": "expand/0022-in.jsonld",
+ "expect": "expand/0022-out.jsonld"
+ }, {
+ "@id": "#t0023",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Expanding list/set with coercion",
+ "purpose": "Expanding lists and sets with properties having coercion coerces list/set values",
+ "input": "expand/0023-in.jsonld",
+ "expect": "expand/0023-out.jsonld"
+ }, {
+ "@id": "#t0024",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Multiple contexts",
+ "purpose": "Tests that contexts in an array are merged",
+ "input": "expand/0024-in.jsonld",
+ "expect": "expand/0024-out.jsonld"
+ }, {
+ "@id": "#t0025",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Problematic IRI expansion tests",
+ "purpose": "Expanding different kinds of terms and Compact IRIs",
+ "input": "expand/0025-in.jsonld",
+ "expect": "expand/0025-out.jsonld"
+ }, {
+ "@id": "#t0026",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Term definition with @id: @type",
+ "purpose": "Expanding term mapping to @type uses @type syntax",
+ "input": "expand/0026-in.jsonld",
+ "expect": "expand/0026-out.jsonld",
+ "option": {"specVersion": "json-ld-1.0"}
+ }, {
+ "@id": "#t0027",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Duplicate values in @list and @set",
+ "purpose": "Duplicate values in @list and @set are not merged",
+ "input": "expand/0027-in.jsonld",
+ "expect": "expand/0027-out.jsonld"
+ }, {
+ "@id": "#t0028",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Use @vocab in properties and @type but not in @id",
+ "purpose": "@vocab is used to compact properties and @type, but is not used for @id",
+ "input": "expand/0028-in.jsonld",
+ "expect": "expand/0028-out.jsonld"
+ }, {
+ "@id": "#t0029",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Relative IRIs",
+ "purpose": "@base is used to compact @id; test with different relative IRIs",
+ "input": "expand/0029-in.jsonld",
+ "expect": "expand/0029-out.jsonld"
+ }, {
+ "@id": "#t0030",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Language maps",
+ "purpose": "Language Maps expand values to include @language",
+ "input": "expand/0030-in.jsonld",
+ "expect": "expand/0030-out.jsonld"
+ }, {
+ "@id": "#t0031",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "type-coercion of native types",
+ "purpose": "Expanding native types with type coercion adds the coerced type to an expanded value representation and retains the native value representation",
+ "input": "expand/0031-in.jsonld",
+ "expect": "expand/0031-out.jsonld"
+ }, {
+ "@id": "#t0032",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Null term and @vocab",
+ "purpose": "Mapping a term to null decouples it from @vocab",
+ "input": "expand/0032-in.jsonld",
+ "expect": "expand/0032-out.jsonld"
+ }, {
+ "@id": "#t0033",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Using @vocab with with type-coercion",
+ "purpose": "Verifies that terms can be defined using @vocab",
+ "input": "expand/0033-in.jsonld",
+ "expect": "expand/0033-out.jsonld"
+ }, {
+ "@id": "#t0034",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Multiple properties expanding to the same IRI",
+ "purpose": "Verifies multiple values from separate terms are deterministically made multiple values of the IRI associated with the terms",
+ "input": "expand/0034-in.jsonld",
+ "expect": "expand/0034-out.jsonld"
+ }, {
+ "@id": "#t0035",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Language maps with @vocab, default language, and colliding property",
+ "purpose": "Pathological tests of language maps",
+ "input": "expand/0035-in.jsonld",
+ "expect": "expand/0035-out.jsonld"
+ }, {
+ "@id": "#t0036",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Expanding @index",
+ "purpose": "Expanding index maps for terms defined with @container: @index",
+ "input": "expand/0036-in.jsonld",
+ "expect": "expand/0036-out.jsonld"
+ }, {
+ "@id": "#t0037",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Expanding @reverse",
+ "purpose": "Expanding @reverse keeps @reverse",
+ "input": "expand/0037-in.jsonld",
+ "expect": "expand/0037-out.jsonld"
+ }, {
+ "@id": "#t0038",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Expanding blank node labels",
+ "purpose": "Blank nodes are not relabeled during expansion",
+ "option": {"specVersion": "json-ld-1.0"},
+ "input": "expand/0038-in.jsonld",
+ "expect": "expand/0038-out.jsonld"
+ }, {
+ "@id": "#t0039",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Using terms in a reverse-maps",
+ "purpose": "Terms within @reverse are expanded",
+ "input": "expand/0039-in.jsonld",
+ "expect": "expand/0039-out.jsonld"
+ }, {
+ "@id": "#t0040",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "language and index expansion on non-objects",
+ "purpose": "Only invoke language and index map expansion if the value is a JSON object",
+ "input": "expand/0040-in.jsonld",
+ "expect": "expand/0040-out.jsonld"
+ }, {
+ "@id": "#t0041",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "@language: null resets the default language",
+ "input": "expand/0041-in.jsonld",
+ "expect": "expand/0041-out.jsonld"
+ }, {
+ "@id": "#t0042",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Reverse properties",
+ "purpose": "Expanding terms defined as reverse properties uses @reverse in expanded document",
+ "input": "expand/0042-in.jsonld",
+ "expect": "expand/0042-out.jsonld"
+ }, {
+ "@id": "#t0043",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Using reverse properties inside a @reverse-container",
+ "purpose": "Expanding a reverse property within a @reverse undoes both reversals",
+ "input": "expand/0043-in.jsonld",
+ "expect": "expand/0043-out.jsonld"
+ }, {
+ "@id": "#t0044",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Index maps with language mappings",
+ "purpose": "Ensure index maps use language mapping",
+ "input": "expand/0044-in.jsonld",
+ "expect": "expand/0044-out.jsonld"
+ }, {
+ "@id": "#t0045",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Top-level value objects",
+ "purpose": "Expanding top-level value objects causes them to be removed",
+ "input": "expand/0045-in.jsonld",
+ "expect": "expand/0045-out.jsonld"
+ }, {
+ "@id": "#t0046",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Free-floating nodes",
+ "purpose": "Expanding free-floating nodes causes them to be removed",
+ "input": "expand/0046-in.jsonld",
+ "expect": "expand/0046-out.jsonld"
+ }, {
+ "@id": "#t0047",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Free-floating values in sets and free-floating lists",
+ "purpose": "Free-floating values in sets are removed, free-floating lists are removed completely",
+ "input": "expand/0047-in.jsonld",
+ "expect": "expand/0047-out.jsonld"
+ }, {
+ "@id": "#t0048",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Terms are ignored in @id",
+ "purpose": "Values of @id are not expanded as terms",
+ "input": "expand/0048-in.jsonld",
+ "expect": "expand/0048-out.jsonld"
+ }, {
+ "@id": "#t0049",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "String values of reverse properties",
+ "purpose": "String values of a reverse property with @type: @id are treated as IRIs",
+ "input": "expand/0049-in.jsonld",
+ "expect": "expand/0049-out.jsonld"
+ }, {
+ "@id": "#t0050",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Term definitions with prefix separate from prefix definitions",
+ "purpose": "Term definitions using compact IRIs don't inherit the definitions of the prefix",
+ "input": "expand/0050-in.jsonld",
+ "expect": "expand/0050-out.jsonld"
+ }, {
+ "@id": "#t0051",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Expansion of keyword aliases in term definitions",
+ "purpose": "Expanding terms which are keyword aliases",
+ "input": "expand/0051-in.jsonld",
+ "expect": "expand/0051-out.jsonld"
+ }, {
+ "@id": "#t0052",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "@vocab-relative IRIs in term definitions",
+ "purpose": "If @vocab is defined, term definitions are expanded relative to @vocab",
+ "input": "expand/0052-in.jsonld",
+ "expect": "expand/0052-out.jsonld"
+ }, {
+ "@id": "#t0053",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Expand absolute IRI with @type: @vocab",
+ "purpose": "Expanding values of properties of @type: @vocab does not further expand absolute IRIs",
+ "input": "expand/0053-in.jsonld",
+ "expect": "expand/0053-out.jsonld"
+ }, {
+ "@id": "#t0054",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Expand term with @type: @vocab",
+ "purpose": "Expanding values of properties of @type: @vocab does not expand term values",
+ "input": "expand/0054-in.jsonld",
+ "expect": "expand/0054-out.jsonld"
+ }, {
+ "@id": "#t0055",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Expand @vocab-relative term with @type: @vocab",
+ "purpose": "Expanding values of properties of @type: @vocab expands relative IRIs using @vocab",
+ "input": "expand/0055-in.jsonld",
+ "expect": "expand/0055-out.jsonld"
+ }, {
+ "@id": "#t0056",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Use terms with @type: @vocab but not with @type: @id",
+ "purpose": "Checks that expansion uses appropriate base depending on term definition having @type @id or @vocab",
+ "input": "expand/0056-in.jsonld",
+ "expect": "expand/0056-out.jsonld"
+ }, {
+ "@id": "#t0057",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Expand relative IRI with @type: @vocab",
+ "purpose": "Relative values of terms with @type: @vocab expand relative to @vocab",
+ "input": "expand/0057-in.jsonld",
+ "expect": "expand/0057-out.jsonld"
+ }, {
+ "@id": "#t0058",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Expand compact IRI with @type: @vocab",
+ "purpose": "Compact IRIs are expanded normally even if term has @type: @vocab",
+ "input": "expand/0058-in.jsonld",
+ "expect": "expand/0058-out.jsonld"
+ }, {
+ "@id": "#t0059",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Reset @vocab by setting it to null",
+ "purpose": "Setting @vocab to null removes a previous definition",
+ "input": "expand/0059-in.jsonld",
+ "expect": "expand/0059-out.jsonld"
+ }, {
+ "@id": "#t0060",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Overwrite document base with @base and reset it again",
+ "purpose": "Setting @base to an IRI and then resetting it to nil",
+ "input": "expand/0060-in.jsonld",
+ "expect": "expand/0060-out.jsonld"
+ }, {
+ "@id": "#t0061",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Coercing native types to arbitrary datatypes",
+ "purpose": "Expanding native types when coercing to arbitrary datatypes",
+ "input": "expand/0061-in.jsonld",
+ "expect": "expand/0061-out.jsonld"
+ }, {
+ "@id": "#t0062",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Various relative IRIs with with @base",
+ "purpose": "Pathological relative IRIs",
+ "input": "expand/0062-in.jsonld",
+ "expect": "expand/0062-out.jsonld"
+ }, {
+ "@id": "#t0063",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Reverse property and index container",
+ "purpose": "Expaning reverse properties with an index-container",
+ "input": "expand/0063-in.jsonld",
+ "expect": "expand/0063-out.jsonld"
+ }, {
+ "@id": "#t0064",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "bnode values of reverse properties",
+ "purpose": "Expand reverse property whose values are unlabeled blank nodes",
+ "input": "expand/0064-in.jsonld",
+ "expect": "expand/0064-out.jsonld"
+ }, {
+ "@id": "#t0065",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Drop unmapped keys in reverse map",
+ "purpose": "Keys that are not mapped to an IRI in a reverse-map are dropped",
+ "input": "expand/0065-in.jsonld",
+ "expect": "expand/0065-out.jsonld"
+ }, {
+ "@id": "#t0066",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Reverse-map keys with @vocab",
+ "purpose": "Expand uses @vocab to expand keys in reverse-maps",
+ "input": "expand/0066-in.jsonld",
+ "expect": "expand/0066-out.jsonld"
+ }, {
+ "@id": "#t0067",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "prefix://suffix not a compact IRI",
+ "purpose": "prefix:suffix values are not interpreted as compact IRIs if suffix begins with two slashes",
+ "input": "expand/0067-in.jsonld",
+ "expect": "expand/0067-out.jsonld"
+ }, {
+ "@id": "#t0068",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "_:suffix values are not a compact IRI",
+ "purpose": "prefix:suffix values are not interpreted as compact IRIs if prefix is an underscore",
+ "input": "expand/0068-in.jsonld",
+ "expect": "expand/0068-out.jsonld"
+ }, {
+ "@id": "#t0069",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Compact IRI as term with type mapping",
+ "purpose": "Redefine compact IRI to define type mapping using the compact IRI itself as value of @id",
+ "input": "expand/0069-in.jsonld",
+ "expect": "expand/0069-out.jsonld"
+ }, {
+ "@id": "#t0070",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Compact IRI as term defined using equivalent compact IRI",
+ "purpose": "Redefine compact IRI to define type mapping using the compact IRI itself as string value",
+ "input": "expand/0070-in.jsonld",
+ "expect": "expand/0070-out.jsonld"
+ }, {
+ "@id": "#t0071",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Redefine terms looking like compact IRIs",
+ "purpose": "Term definitions may look like compact IRIs",
+ "input": "expand/0071-in.jsonld",
+ "expect": "expand/0071-out.jsonld",
+ "option": {"specVersion": "json-ld-1.0"}
+ }, {
+ "@id": "#t0072",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Redefine term using @vocab, not itself",
+ "purpose": "Redefining a term as itself when @vocab is defined uses @vocab, not previous term definition",
+ "input": "expand/0072-in.jsonld",
+ "expect": "expand/0072-out.jsonld"
+ }, {
+ "@id": "#t0073",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "@context not first property",
+ "purpose": "Objects are unordered, so serialized node definition containing @context may have @context at the end of the node definition",
+ "input": "expand/0073-in.jsonld",
+ "expect": "expand/0073-out.jsonld"
+ }, {
+ "@id": "#t0074",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "@id not first property",
+ "purpose": "Objects are unordered, so serialized node definition containing @id may have @id at the end of the node definition",
+ "input": "expand/0074-in.jsonld",
+ "expect": "expand/0074-out.jsonld"
+ }, {
+ "@id": "#t0075",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "@vocab as blank node identifier",
+ "purpose": "Use @vocab to map all properties to blank node identifiers",
+ "option": {"processingMode": "json-ld-1.0"},
+ "input": "expand/0075-in.jsonld",
+ "expect": "expand/0075-out.jsonld"
+ }, {
+ "@id": "#t0076",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "base option overrides document location",
+ "purpose": "Use of the base option overrides the document location",
+ "option": {
+ "base": "http://example/base/"
+ },
+ "input": "expand/0076-in.jsonld",
+ "expect": "expand/0076-out.jsonld"
+ }, {
+ "@id": "#t0077",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "expandContext option",
+ "purpose": "Use of the expandContext option to expand the input document",
+ "option": {
+ "expandContext": "expand/0077-context.jsonld"
+ },
+ "input": "expand/0077-in.jsonld",
+ "expect": "expand/0077-out.jsonld"
+ }, {
+ "@id": "#t0078",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "multiple reverse properties",
+ "purpose": "Use of multiple reverse properties",
+ "input": "expand/0078-in.jsonld",
+ "expect": "expand/0078-out.jsonld"
+ }, {
+ "@id": "#t0079",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "expand @graph container",
+ "purpose": "Use of @graph containers",
+ "input": "expand/0079-in.jsonld",
+ "expect": "expand/0079-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#t0080",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "expand [@graph, @set] container",
+ "purpose": "Use of [@graph, @set] containers",
+ "input": "expand/0080-in.jsonld",
+ "expect": "expand/0080-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#t0081",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Creates an @graph container if value is a graph",
+ "purpose": "Don't double-expand an already expanded graph",
+ "input": "expand/0081-in.jsonld",
+ "expect": "expand/0081-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#t0082",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "expand [@graph, @index] container",
+ "purpose": "Use of @graph containers with @index",
+ "input": "expand/0082-in.jsonld",
+ "expect": "expand/0082-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#t0083",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "expand [@graph, @index, @set] container",
+ "purpose": "Use of @graph containers with @index and @set",
+ "input": "expand/0083-in.jsonld",
+ "expect": "expand/0083-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#t0084",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Do not expand [@graph, @index] container if value is a graph",
+ "purpose": "Does not create a new graph object if indexed value is already a graph object",
+ "input": "expand/0084-in.jsonld",
+ "expect": "expand/0084-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#t0085",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "expand [@graph, @id] container",
+ "purpose": "Use of @graph containers with @id",
+ "input": "expand/0085-in.jsonld",
+ "expect": "expand/0085-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#t0086",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "expand [@graph, @id, @set] container",
+ "purpose": "Use of @graph containers with @id and @set",
+ "input": "expand/0086-in.jsonld",
+ "expect": "expand/0086-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#t0087",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Do not expand [@graph, @id] container if value is a graph",
+ "purpose": "Does not create a new graph object if indexed value is already a graph object",
+ "input": "expand/0087-in.jsonld",
+ "expect": "expand/0087-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#t0088",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Do not expand native values to IRIs",
+ "purpose": "Value Expansion does not expand native values, such as booleans, to a node object",
+ "input": "expand/0088-in.jsonld",
+ "expect": "expand/0088-out.jsonld"
+ }, {
+ "@id": "#t0089",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "empty @base applied to the base option",
+ "purpose": "Use of an empty @base is applied to the base option",
+ "option": {
+ "base": "http://example/base/"
+ },
+ "input": "expand/0089-in.jsonld",
+ "expect": "expand/0089-out.jsonld"
+ }, {
+ "@id": "#t0090",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "relative @base overrides base option and document location",
+ "purpose": "Use of a relative @base overrides base option and document location",
+ "option": {
+ "base": "http://example/base/"
+ },
+ "input": "expand/0090-in.jsonld",
+ "expect": "expand/0090-out.jsonld"
+ }, {
+ "@id": "#t0091",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "relative and absolute @base overrides base option and document location",
+ "purpose": "Use of a relative and absolute @base overrides base option and document location",
+ "option": {
+ "base": "http://example/base/"
+ },
+ "input": "expand/0091-in.jsonld",
+ "expect": "expand/0091-out.jsonld"
+ }, {
+ "@id": "#t0092",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Various relative IRIs as properties with with @vocab: ''",
+ "purpose": "Pathological relative property IRIs",
+ "input": "expand/0092-in.jsonld",
+ "expect": "expand/0092-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#t0093",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "expand @graph container (multiple objects)",
+ "purpose": "Use of @graph containers",
+ "input": "expand/0093-in.jsonld",
+ "expect": "expand/0093-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#t0094",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "expand [@graph, @set] container (multiple objects)",
+ "purpose": "Use of [@graph, @set] containers",
+ "input": "expand/0094-in.jsonld",
+ "expect": "expand/0094-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#t0095",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Creates an @graph container if value is a graph (multiple objects)",
+ "purpose": "Double-expand an already expanded graph",
+ "input": "expand/0095-in.jsonld",
+ "expect": "expand/0095-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#t0096",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "expand [@graph, @index] container (multiple indexed objects)",
+ "purpose": "Use of @graph containers with @index",
+ "input": "expand/0096-in.jsonld",
+ "expect": "expand/0096-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#t0097",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "expand [@graph, @index, @set] container (multiple objects)",
+ "purpose": "Use of @graph containers with @index and @set",
+ "input": "expand/0097-in.jsonld",
+ "expect": "expand/0097-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#t0098",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Do not expand [@graph, @index] container if value is a graph (multiple objects)",
+ "purpose": "Does not create a new graph object if indexed value is already a graph object",
+ "input": "expand/0098-in.jsonld",
+ "expect": "expand/0098-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#t0099",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "expand [@graph, @id] container (multiple objects)",
+ "purpose": "Use of @graph containers with @id",
+ "input": "expand/0099-in.jsonld",
+ "expect": "expand/0099-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#t0100",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "expand [@graph, @id, @set] container (multiple objects)",
+ "purpose": "Use of @graph containers with @id and @set",
+ "input": "expand/0100-in.jsonld",
+ "expect": "expand/0100-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#t0101",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Do not expand [@graph, @id] container if value is a graph (multiple objects)",
+ "purpose": "Does not create a new graph object if indexed value is already a graph object",
+ "input": "expand/0101-in.jsonld",
+ "expect": "expand/0101-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#t0102",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Expand @graph container if value is a graph (multiple objects)",
+ "purpose": "Creates a new graph object if indexed value is already a graph object",
+ "input": "expand/0102-in.jsonld",
+ "expect": "expand/0102-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#t0103",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Expand @graph container if value is a graph (multiple graphs)",
+ "purpose": "Creates a new graph object if indexed value is already a graph object",
+ "input": "expand/0103-in.jsonld",
+ "expect": "expand/0103-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#t0104",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Creates an @graph container if value is a graph (mixed graph and object)",
+ "purpose": "Double-expand an already expanded graph",
+ "input": "expand/0104-in.jsonld",
+ "expect": "expand/0104-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#t0105",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Do not expand [@graph, @index] container if value is a graph (mixed graph and object)",
+ "purpose": "Does not create a new graph object if indexed value is already a graph object",
+ "input": "expand/0105-in.jsonld",
+ "expect": "expand/0105-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#t0106",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Do not expand [@graph, @id] container if value is a graph (mixed graph and object)",
+ "purpose": "Does not create a new graph object if indexed value is already a graph object",
+ "input": "expand/0106-in.jsonld",
+ "expect": "expand/0106-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#t0107",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "expand [@graph, @index] container (indexes with multiple objects)",
+ "purpose": "Use of @graph containers with @index",
+ "input": "expand/0107-in.jsonld",
+ "expect": "expand/0107-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#t0108",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "expand [@graph, @id] container (multiple ids and objects)",
+ "purpose": "Use of @graph containers with @id",
+ "input": "expand/0108-in.jsonld",
+ "expect": "expand/0108-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#t0109",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "IRI expansion of fragments including ':'",
+ "purpose": "Do not treat as absolute IRIs values that look like compact IRIs if they're not absolute",
+ "input": "expand/0109-in.jsonld",
+ "expect": "expand/0109-out.jsonld"
+ }, {
+ "@id": "#t0110",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Various relative IRIs as properties with with relative @vocab",
+ "purpose": "Pathological relative property IRIs",
+ "input": "expand/0110-in.jsonld",
+ "expect": "expand/0110-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#t0111",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Various relative IRIs as properties with with relative @vocab itself relative to an existing vocabulary base",
+ "purpose": "Pathological relative property IRIs",
+ "input": "expand/0111-in.jsonld",
+ "expect": "expand/0111-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#t0112",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Various relative IRIs as properties with with relative @vocab relative to another relative vocabulary base",
+ "purpose": "Pathological relative property IRIs",
+ "input": "expand/0112-in.jsonld",
+ "expect": "expand/0112-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#t0113",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "context with JavaScript Object property names",
+ "purpose": "Expand with context including JavaScript Object property names",
+ "input": "expand/0113-in.jsonld",
+ "expect": "expand/0113-out.jsonld"
+ }, {
+ "@id": "#t0114",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Expansion allows multiple properties expanding to @type",
+ "purpose": "An exception for the colliding keywords error is made for @type",
+ "input": "expand/0114-in.jsonld",
+ "expect": "expand/0114-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#t0115",
+ "@type": ["jld:NegativeEvaluationTest", "jld:ExpandTest"],
+ "name": "Verifies that relative IRIs as properties with @vocab: '' in 1.0 generate an error",
+ "purpose": "Relative property IRIs with relative @vocab in 1.0",
+ "input": "expand/0115-in.jsonld",
+ "expectErrorCode": "invalid vocab mapping",
+ "option": {"specVersion": "json-ld-1.0"}
+ }, {
+ "@id": "#t0116",
+ "@type": ["jld:NegativeEvaluationTest", "jld:ExpandTest"],
+ "name": "Verifies that relative IRIs as properties with relative @vocab in 1.0 generate an error",
+ "purpose": "Relative property IRIs with relative @vocab in 1.0",
+ "input": "expand/0116-in.jsonld",
+ "expectErrorCode": "invalid vocab mapping",
+ "option": {"specVersion": "json-ld-1.0"}
+ }, {
+ "@id": "#t0117",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "A term starting with a colon can expand to a different IRI",
+ "purpose": "Terms may begin with a colon and not be treated as IRIs.",
+ "input": "expand/0117-in.jsonld",
+ "expect": "expand/0117-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#t0118",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Expanding a value staring with a colon does not treat that value as an IRI",
+ "purpose": "Terms may begin with a colon and not be treated as IRIs.",
+ "input": "expand/0118-in.jsonld",
+ "expect": "expand/0118-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#t0119",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Ignore some terms with @, allow others.",
+ "purpose": "Processors SHOULD generate a warning and MUST ignore terms having the form of a keyword.",
+ "input": "expand/0119-in.jsonld",
+ "expect": "expand/0119-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#t0120",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Ignore some values of @id with @, allow others.",
+ "purpose": "Processors SHOULD generate a warning and MUST ignore values of @id having the form of a keyword.",
+ "input": "expand/0120-in.jsonld",
+ "expect": "expand/0120-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#t0121",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Ignore some values of @reverse with @, allow others.",
+ "purpose": "Processors SHOULD generate a warning and MUST ignore values of @reverse having the form of a keyword.",
+ "input": "expand/0121-in.jsonld",
+ "expect": "expand/0121-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#t0122",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Ignore some IRIs when that start with @ when expanding.",
+ "purpose": "Processors SHOULD generate a warning and MUST ignore IRIs having the form of a keyword. (Note: the resulting document will not be valid JSON-LD, due to the `null` value for `@id`)",
+ "input": "expand/0122-in.jsonld",
+ "expect": "expand/0122-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1", "normative": false}
+ }, {
+ "@id": "#t0123",
+ "@type": ["jld:NegativeEvaluationTest", "jld:ExpandTest"],
+ "name": "Value objects including invalid literal datatype IRIs are rejected",
+ "purpose": "Processors MUST validate datatype IRIs.",
+ "input": "expand/0123-in.jsonld",
+ "expectErrorCode": "invalid typed value",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#t0124",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "compact IRI as @vocab",
+ "purpose": "Verifies that @vocab defined as a compact IRI expands properly",
+ "input": "expand/0124-in.jsonld",
+ "expect": "expand/0124-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#t0125",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "term as @vocab",
+ "purpose": "Verifies that @vocab defined as a term expands properly",
+ "input": "expand/0125-in.jsonld",
+ "expect": "expand/0125-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#t0126",
+ "@type": [ "jld:PositiveEvaluationTest", "jld:ExpandTest" ],
+ "name": "A scoped context may include itself recursively (direct)",
+ "purpose": "Verifies that no exception is raised on expansion when processing a scoped context referencing itself directly",
+ "input": "expand/0126-in.jsonld",
+ "expect": "expand/0126-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#t0127",
+ "@type": [ "jld:PositiveEvaluationTest", "jld:ExpandTest" ],
+ "name": "A scoped context may include itself recursively (indirect)",
+ "purpose": "Verifies that no exception is raised on expansion when processing a scoped context referencing itself indirectly",
+ "input": "expand/0127-in.jsonld",
+ "expect": "expand/0127-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#t0128",
+ "@type": [ "jld:PositiveEvaluationTest", "jld:ExpandTest" ],
+ "name": "Two scoped context may include a shared context",
+ "purpose": "Verifies that no exception is raised on expansion when processing two scoped contexts referencing a shared context",
+ "input": "expand/0128-in.jsonld",
+ "expect": "expand/0128-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#t0129",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Base without trailing slash, without path",
+ "purpose": "Verify URI resolution relative to base (without trailing slash, without path) according to RFC 3986",
+ "input": "expand/0129-in.jsonld",
+ "expect": "expand/0129-out.jsonld"
+ }, {
+ "@id": "#t0130",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Base without trailing slash, with path",
+ "purpose": "Verify URI resolution relative to base (without trailing slash, with path) according to RFC 3986",
+ "input": "expand/0130-in.jsonld",
+ "expect": "expand/0130-out.jsonld"
+ }, {
+ "@id": "#tc001",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "adding new term",
+ "purpose": "Expansion using a scoped context uses term scope for selecting proper term",
+ "input": "expand/c001-in.jsonld",
+ "expect": "expand/c001-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tc002",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "overriding a term",
+ "purpose": "Expansion using a scoped context uses term scope for selecting proper term",
+ "input": "expand/c002-in.jsonld",
+ "expect": "expand/c002-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tc003",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "property and value with different terms mapping to the same expanded property",
+ "purpose": "Expansion using a scoped context uses term scope for selecting proper term",
+ "input": "expand/c003-in.jsonld",
+ "expect": "expand/c003-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tc004",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "deep @context affects nested nodes",
+ "purpose": "Expansion using a scoped context uses term scope for selecting proper term",
+ "input": "expand/c004-in.jsonld",
+ "expect": "expand/c004-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tc005",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "scoped context layers on intemediate contexts",
+ "purpose": "Expansion using a scoped context uses term scope for selecting proper term",
+ "input": "expand/c005-in.jsonld",
+ "expect": "expand/c005-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tc006",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "adding new term",
+ "purpose": "scoped context on @type",
+ "input": "expand/c006-in.jsonld",
+ "expect": "expand/c006-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tc007",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "overriding a term",
+ "purpose": "scoped context on @type",
+ "input": "expand/c007-in.jsonld",
+ "expect": "expand/c007-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tc008",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "alias of @type",
+ "purpose": "scoped context on @type",
+ "input": "expand/c008-in.jsonld",
+ "expect": "expand/c008-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tc009",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "deep @type-scoped @context does NOT affect nested nodes",
+ "purpose": "scoped context on @type",
+ "input": "expand/c009-in.jsonld",
+ "expect": "expand/c009-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tc010",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "scoped context layers on intemediate contexts",
+ "purpose": "scoped context on @type",
+ "input": "expand/c010-in.jsonld",
+ "expect": "expand/c010-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tc011",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "orders @type terms when applying scoped contexts",
+ "purpose": "scoped context on @type",
+ "input": "expand/c011-in.jsonld",
+ "expect": "expand/c011-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tc012",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "deep property-term scoped @context in @type-scoped @context affects nested nodes",
+ "purpose": "scoped context on @type",
+ "input": "expand/c012-in.jsonld",
+ "expect": "expand/c012-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tc013",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "type maps use scoped context from type index and not scoped context from containing",
+ "purpose": "scoped context on @type",
+ "input": "expand/c013-in.jsonld",
+ "expect": "expand/c013-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tc014",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "type-scoped context nullification",
+ "purpose": "type-scoped context nullification",
+ "input": "expand/c014-in.jsonld",
+ "expect": "expand/c014-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tc015",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "type-scoped base",
+ "purpose": "type-scoped base",
+ "input": "expand/c015-in.jsonld",
+ "expect": "expand/c015-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tc016",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "type-scoped vocab",
+ "purpose": "type-scoped vocab",
+ "input": "expand/c016-in.jsonld",
+ "expect": "expand/c016-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tc017",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "multiple type-scoped contexts are properly reverted",
+ "purpose": "multiple type-scoped contexts are property reverted",
+ "input": "expand/c017-in.jsonld",
+ "expect": "expand/c017-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tc018",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "multiple type-scoped types resolved against previous context",
+ "purpose": "multiple type-scoped types resolved against previous context",
+ "input": "expand/c018-in.jsonld",
+ "expect": "expand/c018-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tc019",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "type-scoped context with multiple property scoped terms",
+ "purpose": "type-scoped context with multiple property scoped terms",
+ "input": "expand/c019-in.jsonld",
+ "expect": "expand/c019-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tc020",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "type-scoped value",
+ "purpose": "type-scoped value",
+ "input": "expand/c020-in.jsonld",
+ "expect": "expand/c020-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tc021",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "type-scoped value mix",
+ "purpose": "type-scoped value mix",
+ "input": "expand/c021-in.jsonld",
+ "expect": "expand/c021-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tc022",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "type-scoped property-scoped contexts including @type:@vocab",
+ "purpose": "type-scoped property-scoped contexts including @type:@vocab",
+ "input": "expand/c022-in.jsonld",
+ "expect": "expand/c022-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tc023",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "composed type-scoped property-scoped contexts including @type:@vocab",
+ "purpose": "composed type-scoped property-scoped contexts including @type:@vocab",
+ "input": "expand/c023-in.jsonld",
+ "expect": "expand/c023-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tc024",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "type-scoped + property-scoped + values evaluates against previous context",
+ "purpose": "type-scoped + property-scoped + values evaluates against previous context",
+ "input": "expand/c024-in.jsonld",
+ "expect": "expand/c024-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tc025",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "type-scoped + graph container",
+ "purpose": "type-scoped + graph container",
+ "input": "expand/c025-in.jsonld",
+ "expect": "expand/c025-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tc026",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "@propagate: true on type-scoped context",
+ "purpose": "type-scoped context with @propagate: true survive node-objects",
+ "input": "expand/c026-in.jsonld",
+ "expect": "expand/c026-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tc027",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "@propagate: false on property-scoped context",
+ "purpose": "property-scoped context with @propagate: false do not survive node-objects",
+ "input": "expand/c027-in.jsonld",
+ "expect": "expand/c027-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tc028",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "@propagate: false on embedded context",
+ "purpose": "embedded context with @propagate: false do not survive node-objects",
+ "input": "expand/c028-in.jsonld",
+ "expect": "expand/c028-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tc029",
+ "@type": ["jld:NegativeEvaluationTest", "jld:ExpandTest"],
+ "name": "@propagate is invalid in 1.0",
+ "purpose": "@propagate is invalid in 1.0",
+ "input": "expand/c029-in.jsonld",
+ "expectErrorCode": "invalid context entry",
+ "option": {"specVersion": "json-ld-1.1", "processingMode": "json-ld-1.0"}
+ }, {
+ "@id": "#tc030",
+ "@type": ["jld:NegativeEvaluationTest", "jld:ExpandTest"],
+ "name": "@propagate must be boolean valued",
+ "purpose": "@propagate must be boolean valued",
+ "input": "expand/c030-in.jsonld",
+ "expectErrorCode": "invalid @propagate value",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tc031",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "@context resolutions respects relative URLs.",
+ "purpose": "URL resolution follows RFC3986",
+ "input": "expand/c031-in.jsonld",
+ "expect": "expand/c031-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tc032",
+ "@type": ["jld:NegativeEvaluationTest", "jld:ExpandTest"],
+ "name": "Unused embedded context with error.",
+ "purpose": "An embedded context which is never used should still be checked.",
+ "input": "expand/c032-in.jsonld",
+ "expectErrorCode": "invalid scoped context",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tc033",
+ "@type": ["jld:NegativeEvaluationTest", "jld:ExpandTest"],
+ "name": "Unused context with an embedded context error.",
+ "purpose": "An unused context with an embedded context should still be checked.",
+ "input": "expand/c033-in.jsonld",
+ "expectErrorCode": "invalid scoped context",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tc034",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Remote scoped context.",
+ "purpose": "Scoped contexts may be externally loaded.",
+ "input": "expand/c034-in.jsonld",
+ "expect": "expand/c034-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tc035",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Term scoping with embedded contexts.",
+ "purpose": "Terms should make use of @vocab relative to the scope in which the term was defined.",
+ "input": "expand/c035-in.jsonld",
+ "expect": "expand/c035-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tc036",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Expansion with empty property-scoped context.",
+ "purpose": "Adding a minimal/empty property-scoped context should not affect expansion of terms defined in the outer scope.",
+ "input": "expand/c036-in.jsonld",
+ "expect": "expand/c036-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tc037",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "property-scoped contexts which are alias of @nest",
+ "purpose": "Nesting terms may have property-scoped contexts defined.",
+ "input": "expand/c037-in.jsonld",
+ "expect": "expand/c037-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tc038",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Bibframe example (poor-mans inferrence)",
+ "purpose": "Nesting terms may have property-scoped contexts defined.",
+ "input": "expand/c038-in.jsonld",
+ "expect": "expand/c038-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tdi01",
+ "@type": [ "jld:PositiveEvaluationTest", "jld:ExpandTest" ],
+ "name": "Expand string using default and term directions",
+ "purpose": "Strings are coerced to have @direction based on default and term direction.",
+ "option": {"specVersion": "json-ld-1.1"},
+ "input": "expand/di01-in.jsonld",
+ "expect": "expand/di01-out.jsonld"
+ }, {
+ "@id": "#tdi02",
+ "@type": [ "jld:PositiveEvaluationTest", "jld:ExpandTest" ],
+ "name": "Expand string using default and term directions and languages",
+ "purpose": "Strings are coerced to have @direction based on default and term direction.",
+ "option": {"specVersion": "json-ld-1.1"},
+ "input": "expand/di02-in.jsonld",
+ "expect": "expand/di02-out.jsonld"
+ }, {
+ "@id": "#tdi03",
+ "@type": [ "jld:PositiveEvaluationTest", "jld:ExpandTest" ],
+ "name": "expand list values with @direction",
+ "purpose": "List values where the term has @direction are used in expansion.",
+ "option": {"specVersion": "json-ld-1.1"},
+ "input": "expand/di03-in.jsonld",
+ "expect": "expand/di03-out.jsonld"
+ }, {
+ "@id": "#tdi04",
+ "@type": [ "jld:PositiveEvaluationTest", "jld:ExpandTest" ],
+ "name": "simple language map with term direction",
+ "purpose": "Term selection with language maps and @direction.",
+ "option": {"specVersion": "json-ld-1.1"},
+ "input": "expand/di04-in.jsonld",
+ "expect": "expand/di04-out.jsonld"
+ }, {
+ "@id": "#tdi05",
+ "@type": [ "jld:PositiveEvaluationTest", "jld:ExpandTest" ],
+ "name": "simple language mapwith overriding term direction",
+ "purpose": "Term selection with language maps and @direction.",
+ "option": {"specVersion": "json-ld-1.1"},
+ "input": "expand/di05-in.jsonld",
+ "expect": "expand/di05-out.jsonld"
+ }, {
+ "@id": "#tdi06",
+ "@type": [ "jld:PositiveEvaluationTest", "jld:ExpandTest" ],
+ "name": "simple language mapwith overriding null direction",
+ "purpose": "Term selection with language maps and @direction.",
+ "option": {"specVersion": "json-ld-1.1"},
+ "input": "expand/di06-in.jsonld",
+ "expect": "expand/di06-out.jsonld"
+ }, {
+ "@id": "#tdi07",
+ "@type": [ "jld:PositiveEvaluationTest", "jld:ExpandTest" ],
+ "name": "simple language map with mismatching term direction",
+ "purpose": "Term selection with language maps and @direction.",
+ "option": {"specVersion": "json-ld-1.1"},
+ "input": "expand/di07-in.jsonld",
+ "expect": "expand/di07-out.jsonld"
+ }, {
+ "@id": "#tdi08",
+ "@type": [ "jld:NegativeEvaluationTest", "jld:ExpandTest" ],
+ "name": "@direction must be one of ltr or rtl",
+ "purpose": "Generate an error if @direction has illegal value.",
+ "option": {"specVersion": "json-ld-1.1"},
+ "input": "expand/di08-in.jsonld",
+ "expectErrorCode": "invalid base direction"
+ }, {
+ "@id": "#tdi09",
+ "@type": [ "jld:NegativeEvaluationTest", "jld:ExpandTest" ],
+ "name": "@direction is incompatible with @type",
+ "purpose": "Value objects can have either @type but not @language or @direction.",
+ "option": {"specVersion": "json-ld-1.1"},
+ "input": "expand/di09-in.jsonld",
+ "expectErrorCode": "invalid value object"
+ }, {
+ "@id": "#tec01",
+ "@type": [ "jld:NegativeEvaluationTest", "jld:ExpandTest" ],
+ "name": "Invalid keyword in term definition",
+ "purpose": "Verifies that an exception is raised on expansion when a invalid term definition is found",
+ "input": "expand/ec01-in.jsonld",
+ "expectErrorCode": "invalid term definition",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tec02",
+ "@type": [ "jld:NegativeEvaluationTest", "jld:ExpandTest" ],
+ "name": "Term definition on @type with empty map",
+ "purpose": "Verifies that an exception is raised if @type is defined as a term with an empty map",
+ "input": "expand/ec02-in.jsonld",
+ "expectErrorCode": "keyword redefinition",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tem01",
+ "@type": [ "jld:NegativeEvaluationTest", "jld:ExpandTest" ],
+ "name": "Invalid container mapping",
+ "purpose": "Verifies that an exception is raised on expansion when a invalid container mapping is found",
+ "input": "expand/em01-in.jsonld",
+ "expectErrorCode": "invalid container mapping",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#ten01",
+ "@type": [ "jld:NegativeEvaluationTest", "jld:ExpandTest" ],
+ "name": "@nest MUST NOT have a string value",
+ "purpose": "container: @nest",
+ "input": "expand/en01-in.jsonld",
+ "expectErrorCode": "invalid @nest value",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#ten02",
+ "@type": [ "jld:NegativeEvaluationTest", "jld:ExpandTest" ],
+ "name": "@nest MUST NOT have a boolen value",
+ "purpose": "Transparent Nesting",
+ "input": "expand/en02-in.jsonld",
+ "expectErrorCode": "invalid @nest value",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#ten03",
+ "@type": [ "jld:NegativeEvaluationTest", "jld:ExpandTest" ],
+ "name": "@nest MUST NOT have a numeric value",
+ "purpose": "Transparent Nesting",
+ "input": "expand/en03-in.jsonld",
+ "expectErrorCode": "invalid @nest value",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#ten04",
+ "@type": [ "jld:NegativeEvaluationTest", "jld:ExpandTest" ],
+ "name": "@nest MUST NOT have a value object value",
+ "purpose": "Transparent Nesting",
+ "input": "expand/en04-in.jsonld",
+ "expectErrorCode": "invalid @nest value",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#ten05",
+ "@type": [ "jld:NegativeEvaluationTest", "jld:ExpandTest" ],
+ "name": "does not allow a keyword other than @nest for the value of @nest",
+ "purpose": "Transparent Nesting",
+ "input": "expand/en05-in.jsonld",
+ "expectErrorCode": "invalid @nest value",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#ten06",
+ "@type": [ "jld:NegativeEvaluationTest", "jld:ExpandTest" ],
+ "name": "does not allow @nest with @reverse",
+ "purpose": "Transparent Nesting",
+ "input": "expand/en06-in.jsonld",
+ "expectErrorCode": "invalid reverse property",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tep02",
+ "@type": ["jld:NegativeEvaluationTest", "jld:ExpandTest"],
+ "name": "processingMode json-ld-1.0 conflicts with @version: 1.1",
+ "purpose": "If processingMode is explicitly json-ld-1.0, it will conflict with 1.1 features.",
+ "input": "expand/ep02-in.jsonld",
+ "expectErrorCode": "processing mode conflict",
+ "option": {"processingMode": "json-ld-1.0", "specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tep03",
+ "@type": ["jld:NegativeEvaluationTest", "jld:ExpandTest"],
+ "name": "@version must be 1.1",
+ "purpose": "If @version is specified, it must be 1.1",
+ "option": {"specVersion": "json-ld-1.1"},
+ "input": "expand/ep03-in.jsonld",
+ "expectErrorCode": "invalid @version value"
+ }, {
+ "@id": "#ter01",
+ "@type": [ "jld:NegativeEvaluationTest", "jld:ExpandTest" ],
+ "name": "Keywords cannot be aliased to other keywords",
+ "purpose": "Verifies that an exception is raised on expansion when processing an invalid context aliasing a keyword to another keyword",
+ "input": "expand/er01-in.jsonld",
+ "expectErrorCode": "keyword redefinition"
+ }, {
+ "@id": "#ter02",
+ "@type": [ "jld:NegativeEvaluationTest", "jld:ExpandTest" ],
+ "name": "A context may not include itself recursively (direct)",
+ "purpose": "Verifies that an exception is raised on expansion when processing a context referencing itself",
+ "input": "expand/er02-in.jsonld",
+ "expectErrorCode": "recursive context inclusion",
+ "option": {"specVersion": "json-ld-1.0"}
+ }, {
+ "@id": "#ter03",
+ "@type": [ "jld:NegativeEvaluationTest", "jld:ExpandTest" ],
+ "name": "A context may not include itself recursively (indirect)",
+ "purpose": "Verifies that an exception is raised on expansion when processing a context referencing itself indirectly",
+ "input": "expand/er03-in.jsonld",
+ "expectErrorCode": "recursive context inclusion",
+ "option": {"specVersion": "json-ld-1.0"}
+ }, {
+ "@id": "#ter04",
+ "@type": [ "jld:NegativeEvaluationTest", "jld:ExpandTest" ],
+ "name": "Error dereferencing a remote context",
+ "purpose": "Verifies that an exception is raised on expansion when a context dereference results in an error",
+ "input": "expand/er04-in.jsonld",
+ "expectErrorCode": "loading remote context failed"
+ }, {
+ "@id": "#ter05",
+ "@type": [ "jld:NegativeEvaluationTest", "jld:ExpandTest" ],
+ "name": "Invalid remote context",
+ "purpose": "Verifies that an exception is raised on expansion when a remote context is not an object containing @context",
+ "input": "expand/er05-in.jsonld",
+ "expectErrorCode": "invalid remote context",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#ter06",
+ "@type": [ "jld:NegativeEvaluationTest", "jld:ExpandTest" ],
+ "name": "Invalid local context",
+ "purpose": "Verifies that an exception is raised on expansion when a context is not a string or object",
+ "input": "expand/er06-in.jsonld",
+ "expectErrorCode": "invalid local context"
+ }, {
+ "@id": "#ter07",
+ "@type": [ "jld:NegativeEvaluationTest", "jld:ExpandTest" ],
+ "name": "Invalid base IRI",
+ "purpose": "Verifies that an exception is raised on expansion when a context contains an invalid @base",
+ "input": "expand/er07-in.jsonld",
+ "expectErrorCode": "invalid base IRI"
+ }, {
+ "@id": "#ter08",
+ "@type": [ "jld:NegativeEvaluationTest", "jld:ExpandTest" ],
+ "name": "Invalid vocab mapping",
+ "purpose": "Verifies that an exception is raised on expansion when a context contains an invalid @vocab mapping",
+ "input": "expand/er08-in.jsonld",
+ "expectErrorCode": "invalid vocab mapping"
+ }, {
+ "@id": "#ter09",
+ "@type": [ "jld:NegativeEvaluationTest", "jld:ExpandTest" ],
+ "name": "Invalid default language",
+ "purpose": "Verifies that an exception is raised on expansion when a context contains an invalid @language",
+ "input": "expand/er09-in.jsonld",
+ "expectErrorCode": "invalid default language"
+ }, {
+ "@id": "#ter10",
+ "@type": [ "jld:NegativeEvaluationTest", "jld:ExpandTest" ],
+ "name": "Cyclic IRI mapping",
+ "purpose": "Verifies that an exception is raised on expansion when a cyclic IRI mapping is found",
+ "input": "expand/er10-in.jsonld",
+ "expectErrorCode": "cyclic IRI mapping"
+ }, {
+ "@id": "#ter11",
+ "@type": [ "jld:NegativeEvaluationTest", "jld:ExpandTest" ],
+ "name": "Invalid term definition",
+ "purpose": "Verifies that an exception is raised on expansion when a invalid term definition is found",
+ "input": "expand/er11-in.jsonld",
+ "expectErrorCode": "invalid term definition"
+ }, {
+ "@id": "#ter12",
+ "@type": [ "jld:NegativeEvaluationTest", "jld:ExpandTest" ],
+ "name": "Invalid type mapping (not a string)",
+ "purpose": "Verifies that an exception is raised on expansion when a invalid type mapping is found",
+ "input": "expand/er12-in.jsonld",
+ "expectErrorCode": "invalid type mapping"
+ }, {
+ "@id": "#ter13",
+ "@type": [ "jld:NegativeEvaluationTest", "jld:ExpandTest" ],
+ "name": "Invalid type mapping (not absolute IRI)",
+ "purpose": "Verifies that an exception is raised on expansion when a invalid type mapping is found",
+ "input": "expand/er13-in.jsonld",
+ "expectErrorCode": "invalid type mapping"
+ }, {
+ "@id": "#ter14",
+ "@type": [ "jld:NegativeEvaluationTest", "jld:ExpandTest" ],
+ "name": "Invalid reverse property (contains @id)",
+ "purpose": "Verifies that an exception is raised on expansion when a invalid reverse property is found",
+ "input": "expand/er14-in.jsonld",
+ "expectErrorCode": "invalid reverse property"
+ }, {
+ "@id": "#ter15",
+ "@type": [ "jld:NegativeEvaluationTest", "jld:ExpandTest" ],
+ "name": "Invalid IRI mapping (@reverse not a string)",
+ "purpose": "Verifies that an exception is raised on expansion when a invalid IRI mapping is found",
+ "input": "expand/er15-in.jsonld",
+ "expectErrorCode": "invalid IRI mapping"
+ }, {
+ "@id": "#ter17",
+ "@type": [ "jld:NegativeEvaluationTest", "jld:ExpandTest" ],
+ "name": "Invalid reverse property (invalid @container)",
+ "purpose": "Verifies that an exception is raised on expansion when a invalid reverse property is found",
+ "input": "expand/er17-in.jsonld",
+ "expectErrorCode": "invalid reverse property"
+ }, {
+ "@id": "#ter18",
+ "@type": [ "jld:NegativeEvaluationTest", "jld:ExpandTest" ],
+ "name": "Invalid IRI mapping (@id not a string)",
+ "purpose": "Verifies that an exception is raised on expansion when a invalid IRI mapping is found",
+ "input": "expand/er18-in.jsonld",
+ "expectErrorCode": "invalid IRI mapping"
+ }, {
+ "@id": "#ter19",
+ "@type": [ "jld:NegativeEvaluationTest", "jld:ExpandTest" ],
+ "name": "Invalid keyword alias (@context)",
+ "purpose": "Verifies that an exception is raised on expansion when a invalid keyword alias is found",
+ "input": "expand/er19-in.jsonld",
+ "expectErrorCode": "invalid keyword alias"
+ }, {
+ "@id": "#ter20",
+ "@type": [ "jld:NegativeEvaluationTest", "jld:ExpandTest" ],
+ "name": "Invalid IRI mapping (no vocab mapping)",
+ "purpose": "Verifies that an exception is raised on expansion when a invalid IRI mapping is found",
+ "input": "expand/er20-in.jsonld",
+ "expectErrorCode": "invalid IRI mapping"
+ }, {
+ "@id": "#ter21",
+ "@type": [ "jld:NegativeEvaluationTest", "jld:ExpandTest" ],
+ "name": "Invalid container mapping",
+ "purpose": "Verifies that an exception is raised on expansion when a invalid container mapping is found",
+ "input": "expand/er21-in.jsonld",
+ "expectErrorCode": "invalid container mapping",
+ "option": {"processingMode": "json-ld-1.0", "specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#ter22",
+ "@type": [ "jld:NegativeEvaluationTest", "jld:ExpandTest" ],
+ "name": "Invalid language mapping",
+ "purpose": "Verifies that an exception is raised on expansion when a invalid language mapping is found",
+ "input": "expand/er22-in.jsonld",
+ "expectErrorCode": "invalid language mapping"
+ }, {
+ "@id": "#ter23",
+ "@type": [ "jld:NegativeEvaluationTest", "jld:ExpandTest" ],
+ "name": "Invalid IRI mapping (relative IRI in @type)",
+ "purpose": "Verifies that an exception is raised on expansion when a invalid type mapping is found",
+ "input": "expand/er23-in.jsonld",
+ "expectErrorCode": "invalid type mapping"
+ }, {
+ "@id": "#ter24",
+ "@type": [ "jld:NegativeEvaluationTest", "jld:ExpandTest" ],
+ "name": "List of lists (from array)",
+ "purpose": "Verifies that an exception is raised in Expansion when a list of lists is found",
+ "input": "expand/er24-in.jsonld",
+ "expectErrorCode": "list of lists",
+ "option": {"specVersion": "json-ld-1.0"}
+ }, {
+ "@id": "#ter25",
+ "@type": [ "jld:NegativeEvaluationTest", "jld:ExpandTest" ],
+ "name": "Invalid reverse property map",
+ "purpose": "Verifies that an exception is raised in Expansion when a invalid reverse property map is found",
+ "input": "expand/er25-in.jsonld",
+ "expectErrorCode": "invalid reverse property map"
+ }, {
+ "@id": "#ter26",
+ "@type": [ "jld:NegativeEvaluationTest", "jld:ExpandTest" ],
+ "name": "Colliding keywords",
+ "purpose": "Verifies that an exception is raised in Expansion when colliding keywords are found",
+ "input": "expand/er26-in.jsonld",
+ "expectErrorCode": "colliding keywords"
+ }, {
+ "@id": "#ter27",
+ "@type": [ "jld:NegativeEvaluationTest", "jld:ExpandTest" ],
+ "name": "Invalid @id value",
+ "purpose": "Verifies that an exception is raised in Expansion when an invalid @id value is found",
+ "input": "expand/er27-in.jsonld",
+ "expectErrorCode": "invalid @id value"
+ }, {
+ "@id": "#ter28",
+ "@type": [ "jld:NegativeEvaluationTest", "jld:ExpandTest" ],
+ "name": "Invalid type value",
+ "purpose": "Verifies that an exception is raised in Expansion when an invalid type value is found",
+ "input": "expand/er28-in.jsonld",
+ "expectErrorCode": "invalid type value"
+ }, {
+ "@id": "#ter29",
+ "@type": [ "jld:NegativeEvaluationTest", "jld:ExpandTest" ],
+ "name": "Invalid value object value",
+ "purpose": "Verifies that an exception is raised in Expansion when an invalid value object value is found",
+ "input": "expand/er29-in.jsonld",
+ "expectErrorCode": "invalid value object value"
+ }, {
+ "@id": "#ter30",
+ "@type": [ "jld:NegativeEvaluationTest", "jld:ExpandTest" ],
+ "name": "Invalid language-tagged string",
+ "purpose": "Verifies that an exception is raised in Expansion when an invalid language-tagged string value is found",
+ "input": "expand/er30-in.jsonld",
+ "expectErrorCode": "invalid language-tagged string"
+ }, {
+ "@id": "#ter31",
+ "@type": [ "jld:NegativeEvaluationTest", "jld:ExpandTest" ],
+ "name": "Invalid @index value",
+ "purpose": "Verifies that an exception is raised in Expansion when an invalid @index value value is found",
+ "input": "expand/er31-in.jsonld",
+ "expectErrorCode": "invalid @index value"
+ }, {
+ "@id": "#ter32",
+ "@type": [ "jld:NegativeEvaluationTest", "jld:ExpandTest" ],
+ "name": "List of lists (from array)",
+ "purpose": "Verifies that an exception is raised in Expansion when a list of lists is found",
+ "input": "expand/er32-in.jsonld",
+ "expectErrorCode": "list of lists",
+ "option": {"specVersion": "json-ld-1.0"}
+ }, {
+ "@id": "#ter33",
+ "@type": [ "jld:NegativeEvaluationTest", "jld:ExpandTest" ],
+ "name": "Invalid @reverse value",
+ "purpose": "Verifies that an exception is raised in Expansion when an invalid @reverse value is found",
+ "input": "expand/er33-in.jsonld",
+ "expectErrorCode": "invalid @reverse value"
+ }, {
+ "@id": "#ter34",
+ "@type": [ "jld:NegativeEvaluationTest", "jld:ExpandTest" ],
+ "name": "Invalid reverse property value (in @reverse)",
+ "purpose": "Verifies that an exception is raised in Expansion when an invalid reverse property value is found",
+ "input": "expand/er34-in.jsonld",
+ "expectErrorCode": "invalid reverse property value"
+ }, {
+ "@id": "#ter35",
+ "@type": [ "jld:NegativeEvaluationTest", "jld:ExpandTest" ],
+ "name": "Invalid language map value",
+ "purpose": "Verifies that an exception is raised in Expansion when an invalid language map value is found",
+ "input": "expand/er35-in.jsonld",
+ "expectErrorCode": "invalid language map value"
+ }, {
+ "@id": "#ter36",
+ "@type": [ "jld:NegativeEvaluationTest", "jld:ExpandTest" ],
+ "name": "Invalid reverse property value (through coercion)",
+ "purpose": "Verifies that an exception is raised in Expansion when an invalid reverse property value is found",
+ "input": "expand/er36-in.jsonld",
+ "expectErrorCode": "invalid reverse property value"
+ }, {
+ "@id": "#ter37",
+ "@type": [ "jld:NegativeEvaluationTest", "jld:ExpandTest" ],
+ "name": "Invalid value object (unexpected keyword)",
+ "purpose": "Verifies that an exception is raised in Expansion when an invalid value object is found",
+ "input": "expand/er37-in.jsonld",
+ "expectErrorCode": "invalid value object"
+ }, {
+ "@id": "#ter38",
+ "@type": [ "jld:NegativeEvaluationTest", "jld:ExpandTest" ],
+ "name": "Invalid value object (@type and @language)",
+ "purpose": "Verifies that an exception is raised in Expansion when an invalid value object is found",
+ "input": "expand/er38-in.jsonld",
+ "expectErrorCode": "invalid value object"
+ }, {
+ "@id": "#ter39",
+ "@type": [ "jld:NegativeEvaluationTest", "jld:ExpandTest" ],
+ "name": "Invalid language-tagged value",
+ "purpose": "Verifies that an exception is raised in Expansion when an invalid language-tagged value is found",
+ "input": "expand/er39-in.jsonld",
+ "expectErrorCode": "invalid language-tagged value"
+ }, {
+ "@id": "#ter40",
+ "@type": [ "jld:NegativeEvaluationTest", "jld:ExpandTest" ],
+ "name": "Invalid typed value",
+ "purpose": "Verifies that an exception is raised in Expansion when an invalid typed value is found",
+ "input": "expand/er40-in.jsonld",
+ "expectErrorCode": "invalid typed value"
+ }, {
+ "@id": "#ter41",
+ "@type": [ "jld:NegativeEvaluationTest", "jld:ExpandTest" ],
+ "name": "Invalid set or list object",
+ "purpose": "Verifies that an exception is raised in Expansion when an invalid set or list object is found",
+ "input": "expand/er41-in.jsonld",
+ "expectErrorCode": "invalid set or list object"
+ }, {
+ "@id": "#ter42",
+ "@type": [ "jld:NegativeEvaluationTest", "jld:ExpandTest" ],
+ "name": "Keywords may not be redefined in 1.0",
+ "purpose": "Verifies that an exception is raised on expansion when processing an invalid context attempting to define @container on a keyword",
+ "option": {"specVersion": "json-ld-1.1", "processingMode": "json-ld-1.0"},
+ "input": "expand/er42-in.jsonld",
+ "expectErrorCode": "keyword redefinition"
+ }, {
+ "@id": "#ter43",
+ "@type": ["jld:NegativeEvaluationTest", "jld:ExpandTest"],
+ "name": "Term definition with @id: @type",
+ "purpose": "Expanding term mapping to @type uses @type syntax now illegal",
+ "input": "expand/er43-in.jsonld",
+ "expectErrorCode": "invalid IRI mapping",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#ter44",
+ "@type": ["jld:NegativeEvaluationTest", "jld:ExpandTest"],
+ "name": "Redefine terms looking like compact IRIs",
+ "purpose": "Term definitions may look like compact IRIs, but must be consistent.",
+ "input": "expand/er44-in.jsonld",
+ "expectErrorCode": "invalid IRI mapping",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#ter48",
+ "@type": ["jld:NegativeEvaluationTest", "jld:ExpandTest"],
+ "name": "Invalid term as relative IRI",
+ "purpose": "Verifies that a relative IRI cannot be used as a term.",
+ "input": "expand/er48-in.jsonld",
+ "expectErrorCode": "invalid IRI mapping",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#ter49",
+ "@type": ["jld:NegativeEvaluationTest", "jld:ExpandTest"],
+ "name": "A relative IRI cannot be used as a prefix",
+ "purpose": "Verifies that a relative IRI cannot be used as a term.",
+ "input": "expand/er49-in.jsonld",
+ "expectErrorCode": "invalid term definition",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#ter50",
+ "@type": [ "jld:NegativeEvaluationTest", "jld:ExpandTest" ],
+ "name": "Invalid reverse id",
+ "purpose": "Verifies that an exception is raised in Expansion when an invalid IRI is used for @reverse.",
+ "input": "expand/er50-in.jsonld",
+ "expectErrorCode": "invalid IRI mapping"
+ }, {
+ "@id": "#ter51",
+ "@type": [ "jld:NegativeEvaluationTest", "jld:ExpandTest" ],
+ "name": "Invalid value object value using a value alias",
+ "purpose": "Verifies that an exception is raised in Expansion when an invalid value object value is found using a value alias",
+ "input": "expand/er51-in.jsonld",
+ "expectErrorCode": "invalid value object value"
+ }, {
+ "@id": "#ter52",
+ "@type": [ "jld:NegativeEvaluationTest", "jld:ExpandTest" ],
+ "name": "Definition for the empty term",
+ "purpose": "Verifies that an exception is raised on expansion when a context contains a definition for the empty term",
+ "input": "expand/er52-in.jsonld",
+ "expectErrorCode": "invalid term definition"
+ }, {
+ "@id": "#ter53",
+ "@type": [ "jld:NegativeEvaluationTest", "jld:ExpandTest" ],
+ "name": "Invalid prefix value",
+ "purpose": "Verifies that an exception is raised on expansion when a context contains an invalid @prefix value",
+ "input": "expand/er53-in.jsonld",
+ "expectErrorCode": "invalid @prefix value",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#ter54",
+ "@type": [ "jld:NegativeEvaluationTest", "jld:ExpandTest" ],
+ "name": "Invalid value object, multiple values for @type.",
+ "purpose": "The value of @type in a value object MUST be a string or null.",
+ "input": "expand/er54-in.jsonld",
+ "expectErrorCode": "invalid typed value"
+ }, {
+ "@id": "#ter55",
+ "@type": [ "jld:NegativeEvaluationTest", "jld:ExpandTest" ],
+ "name": "Invalid term definition, multiple values for @type.",
+ "purpose": "The value of @type in an expanded term definition object MUST be a string or null.",
+ "input": "expand/er55-in.jsonld",
+ "expectErrorCode": "invalid type mapping"
+ }, {
+ "@id": "#tes01",
+ "@type": ["jld:NegativeEvaluationTest", "jld:ExpandTest"],
+ "name": "Using an array value for @context is illegal in JSON-LD 1.0",
+ "purpose": "Verifies that an exception is raised on expansion when a invalid container mapping is found",
+ "input": "expand/es01-in.jsonld",
+ "expectErrorCode": "invalid container mapping",
+ "option": {"processingMode": "json-ld-1.0", "specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tes02",
+ "@type": ["jld:NegativeEvaluationTest", "jld:ExpandTest"],
+ "name": "Mapping @container: [@list, @set] is invalid",
+ "purpose": "Testing legal combinations of @set with other container values",
+ "input": "expand/es02-in.jsonld",
+ "expectErrorCode": "invalid container mapping",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tin01",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Basic Included array",
+ "purpose": "Tests included blocks.",
+ "input": "expand/in01-in.jsonld",
+ "expect": "expand/in01-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tin02",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Basic Included object",
+ "purpose": "Tests included blocks.",
+ "input": "expand/in02-in.jsonld",
+ "expect": "expand/in02-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tin03",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Multiple properties mapping to @included are folded together",
+ "purpose": "Tests included blocks.",
+ "input": "expand/in03-in.jsonld",
+ "expect": "expand/in03-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tin04",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Included containing @included",
+ "purpose": "Tests included blocks.",
+ "input": "expand/in04-in.jsonld",
+ "expect": "expand/in04-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tin05",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Property value with @included",
+ "purpose": "Tests included blocks.",
+ "input": "expand/in05-in.jsonld",
+ "expect": "expand/in05-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tin06",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "json.api example",
+ "purpose": "Tests included blocks.",
+ "input": "expand/in06-in.jsonld",
+ "expect": "expand/in06-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tin07",
+ "@type": ["jld:NegativeEvaluationTest", "jld:ExpandTest"],
+ "name": "Error if @included value is a string",
+ "purpose": "Tests included blocks.",
+ "input": "expand/in07-in.jsonld",
+ "expectErrorCode": "invalid @included value",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tin08",
+ "@type": ["jld:NegativeEvaluationTest", "jld:ExpandTest"],
+ "name": "Error if @included value is a value object",
+ "purpose": "Tests included blocks.",
+ "input": "expand/in08-in.jsonld",
+ "expectErrorCode": "invalid @included value",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tin09",
+ "@type": ["jld:NegativeEvaluationTest", "jld:ExpandTest"],
+ "name": "Error if @included value is a list object",
+ "purpose": "Tests included blocks.",
+ "input": "expand/in09-in.jsonld",
+ "expectErrorCode": "invalid @included value",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tjs01",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Expand JSON literal (boolean true)",
+ "purpose": "Tests expanding property with @type @json to a JSON literal (boolean true).",
+ "input": "expand/js01-in.jsonld",
+ "expect": "expand/js01-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tjs02",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Expand JSON literal (boolean false)",
+ "purpose": "Tests expanding property with @type @json to a JSON literal (boolean false).",
+ "input": "expand/js02-in.jsonld",
+ "expect": "expand/js02-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tjs03",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Expand JSON literal (double)",
+ "purpose": "Tests expanding property with @type @json to a JSON literal (double).",
+ "input": "expand/js03-in.jsonld",
+ "expect": "expand/js03-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tjs04",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Expand JSON literal (double-zero)",
+ "purpose": "Tests expanding property with @type @json to a JSON literal (double-zero).",
+ "input": "expand/js04-in.jsonld",
+ "expect": "expand/js04-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tjs05",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Expand JSON literal (integer)",
+ "purpose": "Tests expanding property with @type @json to a JSON literal (integer).",
+ "input": "expand/js05-in.jsonld",
+ "expect": "expand/js05-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tjs06",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Expand JSON literal (object)",
+ "purpose": "Tests expanding property with @type @json to a JSON literal (object).",
+ "input": "expand/js06-in.jsonld",
+ "expect": "expand/js06-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tjs07",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Expand JSON literal (array)",
+ "purpose": "Tests expanding property with @type @json to a JSON literal (array).",
+ "input": "expand/js07-in.jsonld",
+ "expect": "expand/js07-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tjs08",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Expand JSON literal with array canonicalization",
+ "purpose": "Tests expanding JSON literal with array canonicalization.",
+ "input": "expand/js08-in.jsonld",
+ "expect": "expand/js08-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tjs09",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Transform JSON literal with string canonicalization",
+ "purpose": "Tests expanding JSON literal with string canonicalization.",
+ "input": "expand/js09-in.jsonld",
+ "expect": "expand/js09-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tjs10",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Expand JSON literal with structural canonicalization",
+ "purpose": "Tests expanding JSON literal with structural canonicalization.",
+ "input": "expand/js10-in.jsonld",
+ "expect": "expand/js10-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tjs11",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Expand JSON literal with unicode canonicalization",
+ "purpose": "Tests expanding JSON literal with unicode canonicalization.",
+ "input": "expand/js11-in.jsonld",
+ "expect": "expand/js11-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tjs12",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Expand JSON literal with value canonicalization",
+ "purpose": "Tests expanding JSON literal with value canonicalization.",
+ "input": "expand/js12-in.jsonld",
+ "expect": "expand/js12-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tjs13",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Expand JSON literal with wierd canonicalization",
+ "purpose": "Tests expanding JSON literal with wierd canonicalization.",
+ "input": "expand/js13-in.jsonld",
+ "expect": "expand/js13-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tjs14",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Expand JSON literal without expanding contents",
+ "purpose": "Tests expanding JSON literal does not expand terms inside json.",
+ "input": "expand/js14-in.jsonld",
+ "expect": "expand/js14-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tjs15",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Expand JSON literal aleady in expanded form",
+ "purpose": "Tests expanding JSON literal in expanded form.",
+ "input": "expand/js15-in.jsonld",
+ "expect": "expand/js15-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tjs16",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Expand JSON literal aleady in expanded form with aliased keys",
+ "purpose": "Tests expanding JSON literal in expanded form with aliased keys in value object.",
+ "input": "expand/js16-in.jsonld",
+ "expect": "expand/js16-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tjs17",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Expand JSON literal (string)",
+ "purpose": "Tests expanding property with @type @json to a JSON literal (string).",
+ "input": "expand/js17-in.jsonld",
+ "expect": "expand/js17-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tjs18",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Expand JSON literal (null)",
+ "purpose": "Tests expanding property with @type @json to a JSON literal (null).",
+ "input": "expand/js18-in.jsonld",
+ "expect": "expand/js18-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tjs19",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Expand JSON literal with aliased @type",
+ "purpose": "Tests expanding JSON literal with aliased @type.",
+ "input": "expand/js19-in.jsonld",
+ "expect": "expand/js19-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tjs20",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Expand JSON literal with aliased @value",
+ "purpose": "Tests expanding JSON literal with aliased @value.",
+ "input": "expand/js20-in.jsonld",
+ "expect": "expand/js20-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tjs21",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Expand JSON literal with @context",
+ "purpose": "Tests expanding JSON literal with a @context.",
+ "input": "expand/js21-in.jsonld",
+ "expect": "expand/js21-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tjs22",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Expand JSON literal (null) aleady in expanded form.",
+ "purpose": "Tests expanding property with @type @json to a JSON literal (null).",
+ "input": "expand/js22-in.jsonld",
+ "expect": "expand/js22-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tjs23",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Expand JSON literal (empty array).",
+ "purpose": "Tests expanding property with @type @json to a JSON literal (empty array).",
+ "input": "expand/js23-in.jsonld",
+ "expect": "expand/js23-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tl001",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Language map with null value",
+ "purpose": "A language map may have a null value, which is ignored",
+ "option": {"specVersion": "json-ld-1.1"},
+ "input": "expand/l001-in.jsonld",
+ "expect": "expand/l001-out.jsonld"
+ }, {
+ "@id": "#tli01",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "@list containing @list",
+ "purpose": "List of lists",
+ "option": {"specVersion": "json-ld-1.1"},
+ "input": "expand/li01-in.jsonld",
+ "expect": "expand/li01-out.jsonld"
+ }, {
+ "@id": "#tli02",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "@list containing empty @list",
+ "purpose": "List of lists",
+ "option": {"specVersion": "json-ld-1.1"},
+ "input": "expand/li02-in.jsonld",
+ "expect": "expand/li02-out.jsonld"
+ }, {
+ "@id": "#tli03",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "@list containing @list (with coercion)",
+ "purpose": "List of lists",
+ "option": {"specVersion": "json-ld-1.1"},
+ "input": "expand/li03-in.jsonld",
+ "expect": "expand/li03-out.jsonld"
+ }, {
+ "@id": "#tli04",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "@list containing empty @list (with coercion)",
+ "purpose": "List of lists",
+ "option": {"specVersion": "json-ld-1.1"},
+ "input": "expand/li04-in.jsonld",
+ "expect": "expand/li04-out.jsonld"
+ }, {
+ "@id": "#tli05",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "coerced @list containing an array",
+ "purpose": "List of lists",
+ "option": {"specVersion": "json-ld-1.1"},
+ "input": "expand/li05-in.jsonld",
+ "expect": "expand/li05-out.jsonld"
+ }, {
+ "@id": "#tli06",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "coerced @list containing an empty array",
+ "purpose": "List of lists",
+ "option": {"specVersion": "json-ld-1.1"},
+ "input": "expand/li06-in.jsonld",
+ "expect": "expand/li06-out.jsonld"
+ }, {
+ "@id": "#tli07",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "coerced @list containing deep arrays",
+ "purpose": "List of lists",
+ "option": {"specVersion": "json-ld-1.1"},
+ "input": "expand/li07-in.jsonld",
+ "expect": "expand/li07-out.jsonld"
+ }, {
+ "@id": "#tli08",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "coerced @list containing deep empty arrays",
+ "purpose": "List of lists",
+ "option": {"specVersion": "json-ld-1.1"},
+ "input": "expand/li08-in.jsonld",
+ "expect": "expand/li08-out.jsonld"
+ }, {
+ "@id": "#tli09",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "coerced @list containing multiple lists",
+ "purpose": "List of lists",
+ "option": {"specVersion": "json-ld-1.1"},
+ "input": "expand/li09-in.jsonld",
+ "expect": "expand/li09-out.jsonld"
+ }, {
+ "@id": "#tli10",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "coerced @list containing mixed list values",
+ "purpose": "List of lists",
+ "option": {"specVersion": "json-ld-1.1"},
+ "input": "expand/li10-in.jsonld",
+ "expect": "expand/li10-out.jsonld"
+ }, {
+ "@id": "#tm001",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Adds @id to object not having an @id",
+ "purpose": "Expansion using @container: @id",
+ "input": "expand/m001-in.jsonld",
+ "expect": "expand/m001-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tm002",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Retains @id in object already having an @id",
+ "purpose": "Expansion using @container: @id",
+ "input": "expand/m002-in.jsonld",
+ "expect": "expand/m002-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tm003",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Adds @type to object not having an @type",
+ "purpose": "Expansion using @container: @type",
+ "input": "expand/m003-in.jsonld",
+ "expect": "expand/m003-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tm004",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Prepends @type in object already having an @type",
+ "purpose": "Expansion using @container: @type",
+ "input": "expand/m004-in.jsonld",
+ "expect": "expand/m004-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tm005",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Adds expanded @id to object",
+ "purpose": "Expansion using @container: @id",
+ "input": "expand/m005-in.jsonld",
+ "expect": "expand/m005-out.jsonld",
+ "option": {"base": "http://example.org/", "specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tm006",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Adds vocabulary expanded @type to object",
+ "purpose": "Expansion using @container: @type",
+ "input": "expand/m006-in.jsonld",
+ "expect": "expand/m006-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tm007",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Adds document expanded @type to object",
+ "purpose": "Expansion using @container: @type",
+ "input": "expand/m007-in.jsonld",
+ "expect": "expand/m007-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tm008",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "When type is in a type map",
+ "purpose": "scoped context on @type",
+ "input": "expand/m008-in.jsonld",
+ "expect": "expand/m008-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tm009",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "language map with @none",
+ "purpose": "index on @language",
+ "input": "expand/m009-in.jsonld",
+ "expect": "expand/m009-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tm010",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "language map with alias of @none",
+ "purpose": "index on @language",
+ "input": "expand/m010-in.jsonld",
+ "expect": "expand/m010-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tm011",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "id map with @none",
+ "purpose": "index on @id",
+ "input": "expand/m011-in.jsonld",
+ "expect": "expand/m011-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tm012",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "type map with alias of @none",
+ "purpose": "index on @type",
+ "input": "expand/m012-in.jsonld",
+ "expect": "expand/m012-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tm013",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "graph index map with @none",
+ "purpose": "index on @graph and @index",
+ "input": "expand/m013-in.jsonld",
+ "expect": "expand/m013-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tm014",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "graph index map with alias @none",
+ "purpose": "index on @graph and @index",
+ "input": "expand/m014-in.jsonld",
+ "expect": "expand/m014-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tm015",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "graph id index map with aliased @none",
+ "purpose": "index on @graph and @id with @none",
+ "input": "expand/m015-in.jsonld",
+ "expect": "expand/m015-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tm016",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "graph id index map with aliased @none",
+ "purpose": "index on @graph and @id with @none",
+ "input": "expand/m016-in.jsonld",
+ "expect": "expand/m016-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tm017",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "string value of type map expands to node reference",
+ "purpose": "index on @type",
+ "input": "expand/m017-in.jsonld",
+ "expect": "expand/m017-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tm018",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "string value of type map expands to node reference with @type: @id",
+ "purpose": "index on @type",
+ "input": "expand/m018-in.jsonld",
+ "expect": "expand/m018-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tm019",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "string value of type map expands to node reference with @type: @vocab",
+ "purpose": "index on @type",
+ "input": "expand/m019-in.jsonld",
+ "expect": "expand/m019-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tm020",
+ "@type": ["jld:NegativeEvaluationTest", "jld:ExpandTest"],
+ "name": "string value of type map must not be a literal",
+ "purpose": "index on @type",
+ "input": "expand/m020-in.jsonld",
+ "expectErrorCode": "invalid type mapping",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tn001",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Expands input using @nest",
+ "purpose": "Expansion using @nest",
+ "input": "expand/n001-in.jsonld",
+ "expect": "expand/n001-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tn002",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Expands input using aliased @nest",
+ "purpose": "Expansion using @nest",
+ "input": "expand/n002-in.jsonld",
+ "expect": "expand/n002-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tn003",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Appends nested values when property at base and nested",
+ "purpose": "Expansion using @nest",
+ "input": "expand/n003-in.jsonld",
+ "expect": "expand/n003-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tn004",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Appends nested values from all @nest aliases",
+ "purpose": "Expansion using @nest",
+ "input": "expand/n004-in.jsonld",
+ "expect": "expand/n004-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tn005",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Nested nested containers",
+ "purpose": "Expansion using @nest",
+ "input": "expand/n005-in.jsonld",
+ "expect": "expand/n005-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tn006",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Arrays of nested values",
+ "purpose": "Expansion using @nest",
+ "input": "expand/n006-in.jsonld",
+ "expect": "expand/n006-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tn007",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "A nest of arrays",
+ "purpose": "Expansion using @nest",
+ "input": "expand/n007-in.jsonld",
+ "expect": "expand/n007-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tn008",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Multiple keys may mapping to @type when nesting",
+ "purpose": "Expansion using @nest",
+ "input": "expand/n008-in.jsonld",
+ "expect": "expand/n008-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tp001",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "@version may be specified after first context",
+ "purpose": "If processing mode is not set through API, it is set by the first context containing @version.",
+ "option": {"specVersion": "json-ld-1.1"},
+ "input": "expand/p001-in.jsonld",
+ "expect": "expand/p001-out.jsonld"
+ }, {
+ "@id": "#tp002",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "@version setting [1.0, 1.1, 1.0]",
+ "purpose": "If processing mode is not set through API, it is set by the first context containing @version.",
+ "option": {"specVersion": "json-ld-1.1"},
+ "input": "expand/p002-in.jsonld",
+ "expect": "expand/p002-out.jsonld"
+ }, {
+ "@id": "#tp003",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "@version setting [1.1, 1.0]",
+ "purpose": "If processing mode is not set through API, it is set by the first context containing @version.",
+ "option": {"specVersion": "json-ld-1.1"},
+ "input": "expand/p003-in.jsonld",
+ "expect": "expand/p003-out.jsonld"
+ }, {
+ "@id": "#tp004",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "@version setting [1.1, 1.0, 1.1]",
+ "purpose": "If processing mode is not set through API, it is set by the first context containing @version.",
+ "option": {"specVersion": "json-ld-1.1"},
+ "input": "expand/p004-in.jsonld",
+ "expect": "expand/p004-out.jsonld"
+ }, {
+ "@id": "#tpi01",
+ "@type": ["jld:NegativeEvaluationTest", "jld:ExpandTest"],
+ "name": "error if @version is json-ld-1.0 for property-valued index",
+ "purpose": "Expanding index maps where index is a property.",
+ "option": {"specVersion": "json-ld-1.1", "processingMode": "json-ld-1.0"},
+ "input": "expand/pi01-in.jsonld",
+ "expectErrorCode": "invalid term definition"
+ }, {
+ "@id": "#tpi02",
+ "@type": ["jld:NegativeEvaluationTest", "jld:ExpandTest"],
+ "name": "error if @container does not include @index for property-valued index",
+ "purpose": "Expanding index maps where index is a property.",
+ "option": {"specVersion": "json-ld-1.1"},
+ "input": "expand/pi02-in.jsonld",
+ "expectErrorCode": "invalid term definition"
+ }, {
+ "@id": "#tpi03",
+ "@type": ["jld:NegativeEvaluationTest", "jld:ExpandTest"],
+ "name": "error if @index is a keyword for property-valued index",
+ "purpose": "Expanding index maps where index is a property.",
+ "option": {"specVersion": "json-ld-1.1"},
+ "input": "expand/pi03-in.jsonld",
+ "expectErrorCode": "invalid term definition"
+ }, {
+ "@id": "#tpi04",
+ "@type": ["jld:NegativeEvaluationTest", "jld:ExpandTest"],
+ "name": "error if @index is not a string for property-valued index",
+ "purpose": "Expanding index maps where index is a property.",
+ "option": {"specVersion": "json-ld-1.1"},
+ "input": "expand/pi04-in.jsonld",
+ "expectErrorCode": "invalid term definition"
+ }, {
+ "@id": "#tpi05",
+ "@type": ["jld:NegativeEvaluationTest", "jld:ExpandTest"],
+ "name": "error if attempting to add property to value object for property-valued index",
+ "purpose": "Expanding index maps where index is a property.",
+ "option": {"specVersion": "json-ld-1.1"},
+ "input": "expand/pi05-in.jsonld",
+ "expectErrorCode": "invalid value object"
+ }, {
+ "@id": "#tpi06",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "property-valued index expands to property value, instead of @index (value)",
+ "purpose": "Expanding index maps where index is a property.",
+ "option": {"specVersion": "json-ld-1.1"},
+ "input": "expand/pi06-in.jsonld",
+ "expect": "expand/pi06-out.jsonld"
+ }, {
+ "@id": "#tpi07",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "property-valued index appends to property value, instead of @index (value)",
+ "purpose": "Expanding index maps where index is a property.",
+ "option": {"specVersion": "json-ld-1.1"},
+ "input": "expand/pi07-in.jsonld",
+ "expect": "expand/pi07-out.jsonld"
+ }, {
+ "@id": "#tpi08",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "property-valued index expands to property value, instead of @index (node)",
+ "purpose": "Expanding index maps where index is a property.",
+ "option": {"specVersion": "json-ld-1.1"},
+ "input": "expand/pi08-in.jsonld",
+ "expect": "expand/pi08-out.jsonld"
+ }, {
+ "@id": "#tpi09",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "property-valued index appends to property value, instead of @index (node)",
+ "purpose": "Expanding index maps where index is a property.",
+ "option": {"specVersion": "json-ld-1.1"},
+ "input": "expand/pi09-in.jsonld",
+ "expect": "expand/pi09-out.jsonld"
+ }, {
+ "@id": "#tpi10",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "property-valued index does not output property for @none",
+ "purpose": "Expanding index maps where index is a property.",
+ "option": {"specVersion": "json-ld-1.1"},
+ "input": "expand/pi10-in.jsonld",
+ "expect": "expand/pi10-out.jsonld"
+ }, {
+ "@id": "#tpi11",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "property-valued index adds property to graph object",
+ "purpose": "Expanding index maps where index is a property.",
+ "option": {"specVersion": "json-ld-1.1"},
+ "input": "expand/pi11-in.jsonld",
+ "expect": "expand/pi11-out.jsonld"
+ }, {
+ "@id": "#tpr01",
+ "@type": ["jld:NegativeEvaluationTest", "jld:ExpandTest"],
+ "name": "Protect a term",
+ "purpose": "Check error when overriding a protected term.",
+ "option": {"specVersion": "json-ld-1.1"},
+ "input": "expand/pr01-in.jsonld",
+ "expectErrorCode": "protected term redefinition"
+ }, {
+ "@id": "#tpr02",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Set a term to not be protected",
+ "purpose": "A term with @protected: false is not protected.",
+ "option": {"specVersion": "json-ld-1.1"},
+ "input": "expand/pr02-in.jsonld",
+ "expect": "expand/pr02-out.jsonld"
+ }, {
+ "@id": "#tpr03",
+ "@type": ["jld:NegativeEvaluationTest", "jld:ExpandTest"],
+ "name": "Protect all terms in context",
+ "purpose": "A protected context protects all term definitions.",
+ "option": {"specVersion": "json-ld-1.1"},
+ "input": "expand/pr03-in.jsonld",
+ "expectErrorCode": "protected term redefinition"
+ }, {
+ "@id": "#tpr04",
+ "@type": ["jld:NegativeEvaluationTest", "jld:ExpandTest"],
+ "name": "Do not protect term with @protected: false",
+ "purpose": "A protected context does not protect terms with @protected: false.",
+ "option": {"specVersion": "json-ld-1.1"},
+ "input": "expand/pr04-in.jsonld",
+ "expectErrorCode": "protected term redefinition"
+ }, {
+ "@id": "#tpr05",
+ "@type": ["jld:NegativeEvaluationTest", "jld:ExpandTest"],
+ "name": "Clear active context with protected terms from an embedded context",
+ "purpose": "The Active context be set to null from an embedded context.",
+ "option": {"specVersion": "json-ld-1.1"},
+ "input": "expand/pr05-in.jsonld",
+ "expectErrorCode": "invalid context nullification"
+ }, {
+ "@id": "#tpr06",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Clear active context of protected terms from a term.",
+ "purpose": "The Active context may be set to null from a scoped context of a term.",
+ "option": {"specVersion": "json-ld-1.1"},
+ "input": "expand/pr06-in.jsonld",
+ "expect": "expand/pr06-out.jsonld"
+ }, {
+ "@id": "#tpr08",
+ "@type": ["jld:NegativeEvaluationTest", "jld:ExpandTest"],
+ "name": "Term with protected scoped context.",
+ "purpose": "A scoped context can protect terms.",
+ "option": {"specVersion": "json-ld-1.1"},
+ "input": "expand/pr08-in.jsonld",
+ "expectErrorCode": "protected term redefinition"
+ }, {
+ "@id": "#tpr09",
+ "@type": ["jld:NegativeEvaluationTest", "jld:ExpandTest"],
+ "name": "Attempt to redefine term in other protected context.",
+ "purpose": "A protected term cannot redefine another protected term.",
+ "option": {"specVersion": "json-ld-1.1"},
+ "input": "expand/pr09-in.jsonld",
+ "expectErrorCode": "protected term redefinition"
+ }, {
+ "@id": "#tpr10",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Simple protected and unprotected terms.",
+ "purpose": "Simple protected and unprotected terms.",
+ "option": {"specVersion": "json-ld-1.1"},
+ "input": "expand/pr10-in.jsonld",
+ "expect": "expand/pr10-out.jsonld"
+ }, {
+ "@id": "#tpr11",
+ "@type": ["jld:NegativeEvaluationTest", "jld:ExpandTest"],
+ "name": "Fail to override protected term.",
+ "purpose": "Fail to override protected term.",
+ "option": {"specVersion": "json-ld-1.1"},
+ "input": "expand/pr11-in.jsonld",
+ "expectErrorCode": "protected term redefinition"
+ }, {
+ "@id": "#tpr12",
+ "@type": ["jld:NegativeEvaluationTest", "jld:ExpandTest"],
+ "name": "Scoped context fail to override protected term.",
+ "purpose": "Scoped context fail to override protected term.",
+ "option": {"specVersion": "json-ld-1.1"},
+ "input": "expand/pr12-in.jsonld",
+ "expectErrorCode": "protected term redefinition"
+ }, {
+ "@id": "#tpr13",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Override unprotected term.",
+ "purpose": "Override unprotected term.",
+ "option": {"specVersion": "json-ld-1.1"},
+ "input": "expand/pr13-in.jsonld",
+ "expect": "expand/pr13-out.jsonld"
+ }, {
+ "@id": "#tpr14",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Clear protection with null context.",
+ "purpose": "Clear protection with null context.",
+ "option": {"specVersion": "json-ld-1.1"},
+ "input": "expand/pr14-in.jsonld",
+ "expect": "expand/pr14-out.jsonld"
+ }, {
+ "@id": "#tpr15",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Clear protection with array with null context",
+ "purpose": "Clear protection with array with null context",
+ "option": {"specVersion": "json-ld-1.1"},
+ "input": "expand/pr15-in.jsonld",
+ "expect": "expand/pr15-out.jsonld"
+ }, {
+ "@id": "#tpr16",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Override protected terms after null.",
+ "purpose": "Override protected terms after null.",
+ "option": {"specVersion": "json-ld-1.1"},
+ "input": "expand/pr16-in.jsonld",
+ "expect": "expand/pr16-out.jsonld"
+ }, {
+ "@id": "#tpr17",
+ "@type": ["jld:NegativeEvaluationTest", "jld:ExpandTest"],
+ "name": "Fail to override protected terms with type.",
+ "purpose": "Fail to override protected terms with type.",
+ "option": {"specVersion": "json-ld-1.1"},
+ "input": "expand/pr17-in.jsonld",
+ "expectErrorCode": "invalid context nullification"
+ }, {
+ "@id": "#tpr18",
+ "@type": ["jld:NegativeEvaluationTest", "jld:ExpandTest"],
+ "name": "Fail to override protected terms with type+null+ctx.",
+ "purpose": "Fail to override protected terms with type+null+ctx.",
+ "option": {"specVersion": "json-ld-1.1"},
+ "input": "expand/pr18-in.jsonld",
+ "expectErrorCode": "invalid context nullification"
+ }, {
+ "@id": "#tpr19",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Mix of protected and unprotected terms.",
+ "purpose": "Mix of protected and unprotected terms.",
+ "option": {"specVersion": "json-ld-1.1"},
+ "input": "expand/pr19-in.jsonld",
+ "expect": "expand/pr19-out.jsonld"
+ }, {
+ "@id": "#tpr20",
+ "@type": ["jld:NegativeEvaluationTest", "jld:ExpandTest"],
+ "name": "Fail with mix of protected and unprotected terms with type+null+ctx.",
+ "purpose": "Fail with mix of protected and unprotected terms with type+null+ctx.",
+ "option": {"specVersion": "json-ld-1.1"},
+ "input": "expand/pr20-in.jsonld",
+ "expectErrorCode": "invalid context nullification"
+ }, {
+ "@id": "#tpr21",
+ "@type": ["jld:NegativeEvaluationTest", "jld:ExpandTest"],
+ "name": "Fail with mix of protected and unprotected terms with type+null.",
+ "purpose": "Fail with mix of protected and unprotected terms with type+null.",
+ "option": {"specVersion": "json-ld-1.1"},
+ "input": "expand/pr21-in.jsonld",
+ "expectErrorCode": "invalid context nullification"
+ }, {
+ "@id": "#tpr22",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Check legal overriding of type-scoped protected term from nested node.",
+ "purpose": "Check legal overriding of type-scoped protected term from nested node.",
+ "option": {"specVersion": "json-ld-1.1"},
+ "input": "expand/pr22-in.jsonld",
+ "expect": "expand/pr22-out.jsonld"
+ }, {
+ "@id": "#tpr23",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Allows redefinition of protected alias term with same definition.",
+ "purpose": "Allows redefinition of protected alias term with same definition.",
+ "option": {"specVersion": "json-ld-1.1"},
+ "input": "expand/pr23-in.jsonld",
+ "expect": "expand/pr23-out.jsonld"
+ }, {
+ "@id": "#tpr24",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Allows redefinition of protected prefix term with same definition.",
+ "purpose": "Allows redefinition of protected prefix term with same definition.",
+ "option": {"specVersion": "json-ld-1.1"},
+ "input": "expand/pr24-in.jsonld",
+ "expect": "expand/pr24-out.jsonld"
+ }, {
+ "@id": "#tpr25",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Allows redefinition of terms with scoped contexts using same definitions.",
+ "purpose": "Allows redefinition of terms with scoped contexts using same definitions.",
+ "option": {"specVersion": "json-ld-1.1"},
+ "input": "expand/pr25-in.jsonld",
+ "expect": "expand/pr25-out.jsonld"
+ }, {
+ "@id": "#tpr26",
+ "@type": ["jld:NegativeEvaluationTest", "jld:ExpandTest"],
+ "name": "Fails on redefinition of terms with scoped contexts using different definitions.",
+ "purpose": "Fails on redefinition of terms with scoped contexts using different definitions.",
+ "option": {"specVersion": "json-ld-1.1"},
+ "input": "expand/pr26-in.jsonld",
+ "expectErrorCode": "protected term redefinition"
+ }, {
+ "@id": "#tpr27",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Allows redefinition of protected alias term with same definition modulo protected flag.",
+ "purpose": "Allows redefinition of protected alias term with same definition modulo protected flag.",
+ "option": {"specVersion": "json-ld-1.1"},
+ "input": "expand/pr27-in.jsonld",
+ "expect": "expand/pr27-out.jsonld"
+ }, {
+ "@id": "#tpr28",
+ "@type": ["jld:NegativeEvaluationTest", "jld:ExpandTest"],
+ "name": "Fails if trying to redefine a protected null term.",
+ "purpose": "A protected term with a null IRI mapping cannot be redefined.",
+ "option": {"specVersion": "json-ld-1.1"},
+ "input": "expand/pr28-in.jsonld",
+ "expectErrorCode": "protected term redefinition"
+ }, {
+ "@id": "#tpr29",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Does not expand a Compact IRI using a non-prefix term.",
+ "purpose": "Expansion of Compact IRIs considers if the term can be used as a prefix.",
+ "option": {"specVersion": "json-ld-1.1"},
+ "input": "expand/pr29-in.jsonld",
+ "expect": "expand/pr29-out.jsonld"
+ }, {
+ "@id": "#tpr30",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Keywords may be protected.",
+ "purpose": "Keywords may not be redefined other than to protect them.",
+ "option": {"specVersion": "json-ld-1.1"},
+ "input": "expand/pr30-in.jsonld",
+ "expect": "expand/pr30-out.jsonld"
+ }, {
+ "@id": "#tpr31",
+ "@type": ["jld:NegativeEvaluationTest", "jld:ExpandTest"],
+ "name": "Protected keyword aliases cannot be overridden.",
+ "purpose": "Keywords may not be redefined other than to protect them.",
+ "option": {"specVersion": "json-ld-1.1"},
+ "input": "expand/pr31-in.jsonld",
+ "expectErrorCode": "protected term redefinition"
+ }, {
+ "@id": "#tpr32",
+ "@type": ["jld:NegativeEvaluationTest", "jld:ExpandTest"],
+ "name": "Protected @type cannot be overridden.",
+ "purpose": "Keywords may not be redefined other than to protect them.",
+ "option": {"specVersion": "json-ld-1.1"},
+ "input": "expand/pr32-in.jsonld",
+ "expectErrorCode": "protected term redefinition"
+ }, {
+ "@id": "#tpr33",
+ "@type": ["jld:NegativeEvaluationTest", "jld:ExpandTest"],
+ "name": "Fails if trying to declare a keyword alias as prefix.",
+ "purpose": "Keyword aliases can not be used as prefixes.",
+ "option": {"specVersion": "json-ld-1.1"},
+ "input": "expand/pr33-in.jsonld",
+ "expectErrorCode": "invalid term definition"
+ }, {
+ "@id": "#tpr34",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Ignores a non-keyword term starting with '@'",
+ "purpose": "Terms in the form of a keyword, which are not keywords, are ignored.",
+ "option": {"specVersion": "json-ld-1.1"},
+ "input": "expand/pr34-in.jsonld",
+ "expect": "expand/pr34-out.jsonld"
+ }, {
+ "@id": "#tpr35",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Ignores a non-keyword term starting with '@' (with @vocab)",
+ "purpose": "Terms in the form of a keyword, which are not keywords, are ignored.",
+ "option": {"specVersion": "json-ld-1.1"},
+ "input": "expand/pr35-in.jsonld",
+ "expect": "expand/pr35-out.jsonld"
+ }, {
+ "@id": "#tpr36",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Ignores a term mapping to a value in the form of a keyword.",
+ "purpose": "Terms in the form of a keyword, which are not keywords, are ignored.",
+ "option": {"specVersion": "json-ld-1.1"},
+ "input": "expand/pr36-in.jsonld",
+ "expect": "expand/pr36-out.jsonld"
+ }, {
+ "@id": "#tpr37",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Ignores a term mapping to a value in the form of a keyword (with @vocab).",
+ "purpose": "Terms in the form of a keyword, which are not keywords, are ignored.",
+ "option": {"specVersion": "json-ld-1.1"},
+ "input": "expand/pr37-in.jsonld",
+ "expect": "expand/pr37-out.jsonld"
+ }, {
+ "@id": "#tpr38",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Ignores a term mapping to a value in the form of a keyword (@reverse).",
+ "purpose": "Terms in the form of a keyword, which are not keywords, are ignored.",
+ "option": {"specVersion": "json-ld-1.1"},
+ "input": "expand/pr38-in.jsonld",
+ "expect": "expand/pr38-out.jsonld"
+ }, {
+ "@id": "#tpr39",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Ignores a term mapping to a value in the form of a keyword (@reverse with @vocab).",
+ "purpose": "Terms in the form of a keyword, which are not keywords, are ignored.",
+ "option": {"specVersion": "json-ld-1.1"},
+ "input": "expand/pr39-in.jsonld",
+ "expect": "expand/pr39-out.jsonld"
+ }, {
+ "@id": "#tpr40",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Protected terms and property-scoped contexts",
+ "purpose": "Check overriding of protected term from property-scoped context.",
+ "option": {"specVersion": "json-ld-1.1"},
+ "input": "expand/pr40-in.jsonld",
+ "expect": "expand/pr40-out.jsonld"
+ }, {
+ "@id": "#tso01",
+ "@type": ["jld:NegativeEvaluationTest", "jld:ExpandTest"],
+ "name": "@import is invalid in 1.0.",
+ "purpose": "@import is invalid in 1.0.",
+ "option": {"specVersion": "json-ld-1.1", "processingMode": "json-ld-1.0"},
+ "input": "expand/so01-in.jsonld",
+ "expectErrorCode": "invalid context entry"
+ }, {
+ "@id": "#tso02",
+ "@type": ["jld:NegativeEvaluationTest", "jld:ExpandTest"],
+ "name": "@import must be a string",
+ "purpose": "@import must be a string.",
+ "option": {"specVersion": "json-ld-1.1"},
+ "input": "expand/so02-in.jsonld",
+ "expectErrorCode": "invalid @import value"
+ }, {
+ "@id": "#tso03",
+ "@type": ["jld:NegativeEvaluationTest", "jld:ExpandTest"],
+ "name": "@import overflow",
+ "purpose": "Processors must detect source contexts that include @import.",
+ "option": {"specVersion": "json-ld-1.1"},
+ "input": "expand/so03-in.jsonld",
+ "expectErrorCode": "invalid context entry"
+ }, {
+ "@id": "#tso05",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "@propagate: true on type-scoped context with @import",
+ "purpose": "type-scoped context with @propagate: true survive node-objects (with @import)",
+ "input": "expand/so05-in.jsonld",
+ "expect": "expand/so05-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tso06",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "@propagate: false on property-scoped context with @import",
+ "purpose": "property-scoped context with @propagate: false do not survive node-objects (with @import)",
+ "input": "expand/so06-in.jsonld",
+ "expect": "expand/so06-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tso07",
+ "@type": ["jld:NegativeEvaluationTest", "jld:ExpandTest"],
+ "name": "Protect all terms in sourced context",
+ "purpose": "A protected context protects all term definitions.",
+ "option": {"specVersion": "json-ld-1.1"},
+ "input": "expand/so07-in.jsonld",
+ "expectErrorCode": "protected term redefinition"
+ }, {
+ "@id": "#tso08",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Override term defined in sourced context",
+ "purpose": "The containing context is merged into the source context.",
+ "option": {"specVersion": "json-ld-1.1"},
+ "input": "expand/so08-in.jsonld",
+ "expect": "expand/so08-out.jsonld"
+ }, {
+ "@id": "#tso09",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Override @vocab defined in sourced context",
+ "purpose": "The containing context is merged into the source context.",
+ "option": {"specVersion": "json-ld-1.1"},
+ "input": "expand/so09-in.jsonld",
+ "expect": "expand/so09-out.jsonld"
+ }, {
+ "@id": "#tso10",
+ "@type": ["jld:NegativeEvaluationTest", "jld:ExpandTest"],
+ "name": "Protect terms in sourced context",
+ "purpose": "The containing context is merged into the source context.",
+ "option": {"specVersion": "json-ld-1.1"},
+ "input": "expand/so10-in.jsonld",
+ "expectErrorCode": "protected term redefinition"
+ }, {
+ "@id": "#tso11",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "Override protected terms in sourced context",
+ "purpose": "The containing context is merged into the source context.",
+ "option": {"specVersion": "json-ld-1.1"},
+ "input": "expand/so11-in.jsonld",
+ "expect": "expand/so11-out.jsonld"
+ }, {
+ "@id": "#tso12",
+ "@type": ["jld:NegativeEvaluationTest", "jld:ExpandTest"],
+ "name": "@import may not be used in an imported context.",
+ "purpose": "@import only valid within a term definition.",
+ "option": {"specVersion": "json-ld-1.1"},
+ "input": "expand/so12-in.jsonld",
+ "expectErrorCode": "invalid context entry"
+ }, {
+ "@id": "#tso13",
+ "@type": ["jld:NegativeEvaluationTest", "jld:ExpandTest"],
+ "name": "@import can only reference a single context",
+ "purpose": "@import can only reference a single context.",
+ "option": {"specVersion": "json-ld-1.1"},
+ "input": "expand/so13-in.jsonld",
+ "expectErrorCode": "invalid remote context"
+ }, {
+ "@id": "#ttn01",
+ "@type": ["jld:NegativeEvaluationTest", "jld:ExpandTest"],
+ "name": "@type: @none is illegal in 1.0.",
+ "purpose": "@type: @none is illegal in json-ld-1.0.",
+ "option": {"specVersion": "json-ld-1.1", "processingMode": "json-ld-1.0"},
+ "input": "expand/tn01-in.jsonld",
+ "expectErrorCode": "invalid type mapping"
+ }, {
+ "@id": "#ttn02",
+ "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
+ "name": "@type: @none expands strings as value objects",
+ "purpose": "@type: @none leaves inputs other than strings alone",
+ "option": {"specVersion": "json-ld-1.1"},
+ "input": "expand/tn02-in.jsonld",
+ "expect": "expand/tn02-out.jsonld"
+ }
+ ]
+}
diff --git a/test/jsonld/1.1/expand/0001-in.jsonld b/test/jsonld/1.1/expand/0001-in.jsonld
new file mode 100644
index 000000000..0bfd26f07
--- /dev/null
+++ b/test/jsonld/1.1/expand/0001-in.jsonld
@@ -0,0 +1 @@
+{"@id": "http://example.org/test#example"}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/0001-out.jsonld b/test/jsonld/1.1/expand/0001-out.jsonld
new file mode 100644
index 000000000..1e3ec7217
--- /dev/null
+++ b/test/jsonld/1.1/expand/0001-out.jsonld
@@ -0,0 +1 @@
+[ ]
diff --git a/test/jsonld/1.1/expand/0002-in.jsonld b/test/jsonld/1.1/expand/0002-in.jsonld
new file mode 100644
index 000000000..e4598e552
--- /dev/null
+++ b/test/jsonld/1.1/expand/0002-in.jsonld
@@ -0,0 +1,18 @@
+{
+ "@context": {
+ "t1": "http://example.com/t1",
+ "t2": "http://example.com/t2",
+ "term1": "http://example.com/term1",
+ "term2": "http://example.com/term2",
+ "term3": "http://example.com/term3",
+ "term4": "http://example.com/term4",
+ "term5": "http://example.com/term5"
+ },
+ "@id": "http://example.com/id1",
+ "@type": "t1",
+ "term1": "v1",
+ "term2": {"@value": "v2", "@type": "t2"},
+ "term3": {"@value": "v3", "@language": "en"},
+ "term4": 4,
+ "term5": [50, 51]
+}
diff --git a/test/jsonld/1.1/expand/0002-out.jsonld b/test/jsonld/1.1/expand/0002-out.jsonld
new file mode 100644
index 000000000..cc8e658e1
--- /dev/null
+++ b/test/jsonld/1.1/expand/0002-out.jsonld
@@ -0,0 +1,9 @@
+[{
+ "@id": "http://example.com/id1",
+ "@type": ["http://example.com/t1"],
+ "http://example.com/term1": [{"@value": "v1"}],
+ "http://example.com/term2": [{"@value": "v2", "@type": "http://example.com/t2"}],
+ "http://example.com/term3": [{"@value": "v3", "@language": "en"}],
+ "http://example.com/term4": [{"@value": 4}],
+ "http://example.com/term5": [{"@value": 50}, {"@value": 51}]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/0003-in.jsonld b/test/jsonld/1.1/expand/0003-in.jsonld
new file mode 100644
index 000000000..2007f363d
--- /dev/null
+++ b/test/jsonld/1.1/expand/0003-in.jsonld
@@ -0,0 +1,12 @@
+{
+ "@id": "http://example.org/id",
+ "http://example.org/property": null,
+ "regularJson": {
+ "nonJsonLd": "property",
+ "deep": [{
+ "foo": "bar"
+ }, {
+ "bar": "foo"
+ }]
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/0003-out.jsonld b/test/jsonld/1.1/expand/0003-out.jsonld
new file mode 100644
index 000000000..1e3ec7217
--- /dev/null
+++ b/test/jsonld/1.1/expand/0003-out.jsonld
@@ -0,0 +1 @@
+[ ]
diff --git a/test/jsonld/1.1/expand/0004-in.jsonld b/test/jsonld/1.1/expand/0004-in.jsonld
new file mode 100644
index 000000000..8499bfa08
--- /dev/null
+++ b/test/jsonld/1.1/expand/0004-in.jsonld
@@ -0,0 +1,21 @@
+{
+ "@context": {
+ "mylist1": {"@id": "http://example.com/mylist1", "@container": "@list"},
+ "mylist2": {"@id": "http://example.com/mylist2", "@container": "@list"},
+ "myset2": {"@id": "http://example.com/myset2", "@container": "@set"},
+ "myset3": {"@id": "http://example.com/myset3", "@container": "@set"}
+ },
+ "@id": "http://example.org/id",
+ "mylist1": { "@list": [ ] },
+ "mylist2": "one item",
+ "myset2": { "@set": [ ] },
+ "myset3": [ "v1" ],
+ "http://example.org/list1": { "@list": [ null ] },
+ "http://example.org/list2": { "@list": [ {"@value": null} ] },
+ "http://example.org/set1": { "@set": [ ] },
+ "http://example.org/set2": { "@set": [ null ] },
+ "http://example.org/set3": [ ],
+ "http://example.org/set4": [ null ],
+ "http://example.org/set5": "one item",
+ "http://example.org/property": { "@list": "one item" }
+}
diff --git a/test/jsonld/1.1/expand/0004-out.jsonld b/test/jsonld/1.1/expand/0004-out.jsonld
new file mode 100644
index 000000000..2911bd4aa
--- /dev/null
+++ b/test/jsonld/1.1/expand/0004-out.jsonld
@@ -0,0 +1,15 @@
+[{
+ "@id": "http://example.org/id",
+ "http://example.com/mylist1": [ { "@list": [ ] } ],
+ "http://example.com/mylist2": [ { "@list": [ {"@value": "one item"} ] } ],
+ "http://example.com/myset2": [ ],
+ "http://example.com/myset3": [ {"@value": "v1"} ],
+ "http://example.org/list1": [ { "@list": [ ] } ],
+ "http://example.org/list2": [ { "@list": [ ] } ],
+ "http://example.org/set1": [ ],
+ "http://example.org/set2": [ ],
+ "http://example.org/set3": [ ],
+ "http://example.org/set4": [ ],
+ "http://example.org/set5": [ {"@value": "one item"} ],
+ "http://example.org/property": [ { "@list": [ {"@value": "one item"} ] } ]
+}]
diff --git a/test/jsonld/1.1/expand/0005-in.jsonld b/test/jsonld/1.1/expand/0005-in.jsonld
new file mode 100644
index 000000000..33622d538
--- /dev/null
+++ b/test/jsonld/1.1/expand/0005-in.jsonld
@@ -0,0 +1,23 @@
+{
+ "@context": {
+ "name": "http://xmlns.com/foaf/0.1/name",
+ "homepage": {
+ "@id": "http://xmlns.com/foaf/0.1/homepage",
+ "@type": "@id"
+ },
+ "know": "http://xmlns.com/foaf/0.1/knows",
+ "@iri": "@id"
+ },
+ "@id": "#me",
+ "know": [
+ {
+ "@id": "http://example.com/bob#me",
+ "name": "Bob",
+ "homepage": "http://example.com/bob"
+ }, {
+ "@id": "http://example.com/alice#me",
+ "name": "Alice",
+ "homepage": "http://example.com/alice"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/0005-out.jsonld b/test/jsonld/1.1/expand/0005-out.jsonld
new file mode 100644
index 000000000..a273f90f6
--- /dev/null
+++ b/test/jsonld/1.1/expand/0005-out.jsonld
@@ -0,0 +1,18 @@
+[{
+ "@id": "https://w3c.github.io/json-ld-api/tests/expand/0005-in.jsonld#me",
+ "http://xmlns.com/foaf/0.1/knows": [
+ {
+ "@id": "http://example.com/bob#me",
+ "http://xmlns.com/foaf/0.1/name": [{"@value": "Bob"}],
+ "http://xmlns.com/foaf/0.1/homepage": [{
+ "@id": "http://example.com/bob"
+ }]
+ }, {
+ "@id": "http://example.com/alice#me",
+ "http://xmlns.com/foaf/0.1/name": [{"@value": "Alice"}],
+ "http://xmlns.com/foaf/0.1/homepage": [{
+ "@id": "http://example.com/alice"
+ }]
+ }
+ ]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/0006-in.jsonld b/test/jsonld/1.1/expand/0006-in.jsonld
new file mode 100644
index 000000000..045e2a2a8
--- /dev/null
+++ b/test/jsonld/1.1/expand/0006-in.jsonld
@@ -0,0 +1,20 @@
+{
+ "@context": {
+ "http://example.org/test#property1": {
+ "@type": "@id"
+ },
+ "http://example.org/test#property2": {
+ "@type": "@id"
+ },
+ "uri": "@id"
+ },
+ "http://example.org/test#property1": {
+ "http://example.org/test#property4": "foo",
+ "uri": "http://example.org/test#example2"
+ },
+ "http://example.org/test#property2": "http://example.org/test#example3",
+ "http://example.org/test#property3": {
+ "uri": "http://example.org/test#example4"
+ },
+ "uri": "http://example.org/test#example1"
+}
diff --git a/test/jsonld/1.1/expand/0006-out.jsonld b/test/jsonld/1.1/expand/0006-out.jsonld
new file mode 100644
index 000000000..84a109a01
--- /dev/null
+++ b/test/jsonld/1.1/expand/0006-out.jsonld
@@ -0,0 +1,13 @@
+[{
+ "@id": "http://example.org/test#example1",
+ "http://example.org/test#property1": [{
+ "@id": "http://example.org/test#example2",
+ "http://example.org/test#property4": [{"@value": "foo"}]
+ }],
+ "http://example.org/test#property2": [{
+ "@id": "http://example.org/test#example3"
+ }],
+ "http://example.org/test#property3": [{
+ "@id": "http://example.org/test#example4"
+ }]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/0007-in.jsonld b/test/jsonld/1.1/expand/0007-in.jsonld
new file mode 100644
index 000000000..b49fac4e2
--- /dev/null
+++ b/test/jsonld/1.1/expand/0007-in.jsonld
@@ -0,0 +1,18 @@
+{
+ "@context": {
+ "ex": "http://example.org/vocab#",
+ "ex:date": {
+ "@type": "xsd:dateTime"
+ },
+ "ex:parent": {
+ "@type": "@id"
+ },
+ "xsd": "http://www.w3.org/2001/XMLSchema#"
+ },
+ "@id": "http://example.org/test#example1",
+ "ex:date": "2011-01-25T00:00:00Z",
+ "ex:embed": {
+ "@id": "http://example.org/test#example2",
+ "ex:parent": "http://example.org/test#example1"
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/0007-out.jsonld b/test/jsonld/1.1/expand/0007-out.jsonld
new file mode 100644
index 000000000..76279e1b4
--- /dev/null
+++ b/test/jsonld/1.1/expand/0007-out.jsonld
@@ -0,0 +1,13 @@
+[{
+ "@id": "http://example.org/test#example1",
+ "http://example.org/vocab#date": [{
+ "@value": "2011-01-25T00:00:00Z",
+ "@type": "http://www.w3.org/2001/XMLSchema#dateTime"
+ }],
+ "http://example.org/vocab#embed": [{
+ "@id": "http://example.org/test#example2",
+ "http://example.org/vocab#parent": [{
+ "@id": "http://example.org/test#example1"
+ }]
+ }]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/0008-in.jsonld b/test/jsonld/1.1/expand/0008-in.jsonld
new file mode 100644
index 000000000..a17b94930
--- /dev/null
+++ b/test/jsonld/1.1/expand/0008-in.jsonld
@@ -0,0 +1,9 @@
+{
+ "@context": {
+ "ex": "http://example.org/vocab#"
+ },
+ "@id": "http://example.org/test",
+ "ex:test": { "@value": "test", "@language": "en" },
+ "ex:drop-lang-only": { "@language": "en" },
+ "ex:keep-full-value": { "@value": "only value" }
+}
diff --git a/test/jsonld/1.1/expand/0008-out.jsonld b/test/jsonld/1.1/expand/0008-out.jsonld
new file mode 100644
index 000000000..91cb7a569
--- /dev/null
+++ b/test/jsonld/1.1/expand/0008-out.jsonld
@@ -0,0 +1,7 @@
+[
+ {
+ "@id": "http://example.org/test",
+ "http://example.org/vocab#test": [ { "@value": "test", "@language": "en" } ],
+ "http://example.org/vocab#keep-full-value": [ {"@value": "only value"} ]
+ }
+]
diff --git a/test/jsonld/1.1/expand/0009-in.jsonld b/test/jsonld/1.1/expand/0009-in.jsonld
new file mode 100644
index 000000000..6acef5c56
--- /dev/null
+++ b/test/jsonld/1.1/expand/0009-in.jsonld
@@ -0,0 +1,43 @@
+{
+ "@context": {
+ "authored": {
+ "@id": "http://example.org/vocab#authored",
+ "@type": "@id"
+ },
+ "contains": {
+ "@id": "http://example.org/vocab#contains",
+ "@type": "@id"
+ },
+ "contributor": "http://purl.org/dc/elements/1.1/contributor",
+ "description": "http://purl.org/dc/elements/1.1/description",
+ "name": "http://xmlns.com/foaf/0.1/name",
+ "title": {
+ "@id": "http://purl.org/dc/elements/1.1/title"
+ }
+ },
+ "@graph": [
+ {
+ "@id": "http://example.org/test#chapter",
+ "description": "Fun",
+ "title": "Chapter One"
+ },
+ {
+ "@id": "http://example.org/test#jane",
+ "authored": "http://example.org/test#chapter",
+ "name": "Jane"
+ },
+ {
+ "@id": "http://example.org/test#john",
+ "name": "John"
+ },
+ {
+ "@id": "http://example.org/test#library",
+ "contains": {
+ "@id": "http://example.org/test#book",
+ "contains": "http://example.org/test#chapter",
+ "contributor": "Writer",
+ "title": "My Book"
+ }
+ }
+ ]
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/0009-out.jsonld b/test/jsonld/1.1/expand/0009-out.jsonld
new file mode 100644
index 000000000..376c11cdf
--- /dev/null
+++ b/test/jsonld/1.1/expand/0009-out.jsonld
@@ -0,0 +1,29 @@
+[
+ {
+ "@id": "http://example.org/test#chapter",
+ "http://purl.org/dc/elements/1.1/description": [{"@value": "Fun"}],
+ "http://purl.org/dc/elements/1.1/title": [{"@value": "Chapter One"}]
+ },
+ {
+ "@id": "http://example.org/test#jane",
+ "http://example.org/vocab#authored": [{
+ "@id": "http://example.org/test#chapter"
+ }],
+ "http://xmlns.com/foaf/0.1/name": [{"@value": "Jane"}]
+ },
+ {
+ "@id": "http://example.org/test#john",
+ "http://xmlns.com/foaf/0.1/name": [{"@value": "John"}]
+ },
+ {
+ "@id": "http://example.org/test#library",
+ "http://example.org/vocab#contains": [{
+ "@id": "http://example.org/test#book",
+ "http://example.org/vocab#contains": [{
+ "@id": "http://example.org/test#chapter"
+ }],
+ "http://purl.org/dc/elements/1.1/contributor": [{"@value": "Writer"}],
+ "http://purl.org/dc/elements/1.1/title": [{"@value": "My Book"}]
+ }]
+ }
+]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/0010-in.jsonld b/test/jsonld/1.1/expand/0010-in.jsonld
new file mode 100644
index 000000000..f2d0a3847
--- /dev/null
+++ b/test/jsonld/1.1/expand/0010-in.jsonld
@@ -0,0 +1,11 @@
+{
+ "@context": {
+ "d": "http://purl.org/dc/elements/1.1/",
+ "e": "http://example.org/vocab#",
+ "f": "http://xmlns.com/foaf/0.1/",
+ "xsd": "http://www.w3.org/2001/XMLSchema#"
+ },
+ "@id": "http://example.org/test",
+ "e:bool": true,
+ "e:int": 123
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/0010-out.jsonld b/test/jsonld/1.1/expand/0010-out.jsonld
new file mode 100644
index 000000000..5c60b4a4d
--- /dev/null
+++ b/test/jsonld/1.1/expand/0010-out.jsonld
@@ -0,0 +1,5 @@
+[{
+ "@id": "http://example.org/test",
+ "http://example.org/vocab#bool": [{"@value": true}],
+ "http://example.org/vocab#int": [{"@value": 123}]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/0011-in.jsonld b/test/jsonld/1.1/expand/0011-in.jsonld
new file mode 100644
index 000000000..fa90d97d0
--- /dev/null
+++ b/test/jsonld/1.1/expand/0011-in.jsonld
@@ -0,0 +1,13 @@
+{
+ "@context": {
+ "dc11": "http://purl.org/dc/elements/1.1/",
+ "ex": "http://example.org/vocab#",
+ "ex:contains": {
+ "@type": "@id"
+ },
+ "xsd": "http://www.w3.org/2001/XMLSchema#"
+ },
+ "@id": "http://example.org/test#book",
+ "dc11:title": "Title",
+ "ex:contains": "http://example.org/test#chapter"
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/0011-out.jsonld b/test/jsonld/1.1/expand/0011-out.jsonld
new file mode 100644
index 000000000..08a05db99
--- /dev/null
+++ b/test/jsonld/1.1/expand/0011-out.jsonld
@@ -0,0 +1,7 @@
+[{
+ "@id": "http://example.org/test#book",
+ "http://example.org/vocab#contains": [{
+ "@id": "http://example.org/test#chapter"
+ }],
+ "http://purl.org/dc/elements/1.1/title": [{"@value": "Title"}]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/0012-in.jsonld b/test/jsonld/1.1/expand/0012-in.jsonld
new file mode 100644
index 000000000..ebda57326
--- /dev/null
+++ b/test/jsonld/1.1/expand/0012-in.jsonld
@@ -0,0 +1,39 @@
+{
+ "@context": {
+ "dc11": "http://purl.org/dc/elements/1.1/",
+ "ex": "http://example.org/vocab#",
+ "ex:authored": {
+ "@type": "@id"
+ },
+ "ex:contains": {
+ "@type": "@id"
+ },
+ "foaf": "http://xmlns.com/foaf/0.1/",
+ "xsd": "http://www.w3.org/2001/XMLSchema#"
+ },
+ "@graph": [
+ {
+ "@id": "http://example.org/test#chapter",
+ "dc11:description": "Fun",
+ "dc11:title": "Chapter One"
+ },
+ {
+ "@id": "http://example.org/test#jane",
+ "ex:authored": "http://example.org/test#chapter",
+ "foaf:name": "Jane"
+ },
+ {
+ "@id": "http://example.org/test#john",
+ "foaf:name": "John"
+ },
+ {
+ "@id": "http://example.org/test#library",
+ "ex:contains": {
+ "@id": "http://example.org/test#book",
+ "dc11:contributor": "Writer",
+ "dc11:title": "My Book",
+ "ex:contains": "http://example.org/test#chapter"
+ }
+ }
+ ]
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/0012-out.jsonld b/test/jsonld/1.1/expand/0012-out.jsonld
new file mode 100644
index 000000000..376c11cdf
--- /dev/null
+++ b/test/jsonld/1.1/expand/0012-out.jsonld
@@ -0,0 +1,29 @@
+[
+ {
+ "@id": "http://example.org/test#chapter",
+ "http://purl.org/dc/elements/1.1/description": [{"@value": "Fun"}],
+ "http://purl.org/dc/elements/1.1/title": [{"@value": "Chapter One"}]
+ },
+ {
+ "@id": "http://example.org/test#jane",
+ "http://example.org/vocab#authored": [{
+ "@id": "http://example.org/test#chapter"
+ }],
+ "http://xmlns.com/foaf/0.1/name": [{"@value": "Jane"}]
+ },
+ {
+ "@id": "http://example.org/test#john",
+ "http://xmlns.com/foaf/0.1/name": [{"@value": "John"}]
+ },
+ {
+ "@id": "http://example.org/test#library",
+ "http://example.org/vocab#contains": [{
+ "@id": "http://example.org/test#book",
+ "http://example.org/vocab#contains": [{
+ "@id": "http://example.org/test#chapter"
+ }],
+ "http://purl.org/dc/elements/1.1/contributor": [{"@value": "Writer"}],
+ "http://purl.org/dc/elements/1.1/title": [{"@value": "My Book"}]
+ }]
+ }
+]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/0013-in.jsonld b/test/jsonld/1.1/expand/0013-in.jsonld
new file mode 100644
index 000000000..7795576fe
--- /dev/null
+++ b/test/jsonld/1.1/expand/0013-in.jsonld
@@ -0,0 +1,9 @@
+[{
+ "@id": "http://example.com/id1",
+ "@type": ["http://example.com/t1"],
+ "http://example.com/term1": ["v1"],
+ "http://example.com/term2": [{"@value": "v2", "@type": "http://example.com/t2"}],
+ "http://example.com/term3": [{"@value": "v3", "@language": "en"}],
+ "http://example.com/term4": [4],
+ "http://example.com/term5": [50, 51]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/0013-out.jsonld b/test/jsonld/1.1/expand/0013-out.jsonld
new file mode 100644
index 000000000..cc8e658e1
--- /dev/null
+++ b/test/jsonld/1.1/expand/0013-out.jsonld
@@ -0,0 +1,9 @@
+[{
+ "@id": "http://example.com/id1",
+ "@type": ["http://example.com/t1"],
+ "http://example.com/term1": [{"@value": "v1"}],
+ "http://example.com/term2": [{"@value": "v2", "@type": "http://example.com/t2"}],
+ "http://example.com/term3": [{"@value": "v3", "@language": "en"}],
+ "http://example.com/term4": [{"@value": 4}],
+ "http://example.com/term5": [{"@value": 50}, {"@value": 51}]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/0014-in.jsonld b/test/jsonld/1.1/expand/0014-in.jsonld
new file mode 100644
index 000000000..f10b39a50
--- /dev/null
+++ b/test/jsonld/1.1/expand/0014-in.jsonld
@@ -0,0 +1,50 @@
+{
+ "@context": {
+ "ex": "http://example.org/test#",
+ "property1": {
+ "@id": "http://example.org/test#property1",
+ "@type": "@id"
+ },
+ "property2": {
+ "@id": "ex:property2",
+ "@type": "@id"
+ },
+ "uri": "@id",
+ "set": "@set",
+ "value": "@value",
+ "type": "@type",
+ "xsd": "http://www.w3.org/2001/XMLSchema#"
+ },
+ "property1": {
+ "uri": "ex:example2",
+ "http://example.org/test#property4": "foo"
+ },
+ "property2": "http://example.org/test#example3",
+ "http://example.org/test#property3": {
+ "uri": "http://example.org/test#example4"
+ },
+ "ex:property4": {
+ "uri": "ex:example4",
+ "ex:property5": [
+ {
+ "set": [
+ {
+ "value": "2012-03-31",
+ "type": "xsd:date"
+ }
+ ]
+ }
+ ]
+ },
+ "ex:property6": [
+ {
+ "set": [
+ {
+ "value": null,
+ "type": "xsd:date"
+ }
+ ]
+ }
+ ],
+ "uri": "http://example.org/test#example1"
+}
diff --git a/test/jsonld/1.1/expand/0014-out.jsonld b/test/jsonld/1.1/expand/0014-out.jsonld
new file mode 100644
index 000000000..748e6d545
--- /dev/null
+++ b/test/jsonld/1.1/expand/0014-out.jsonld
@@ -0,0 +1,31 @@
+[
+ {
+ "http://example.org/test#property1": [
+ {
+ "@id": "http://example.org/test#example2",
+ "http://example.org/test#property4": [
+ {"@value": "foo"}
+ ]
+ }
+ ],
+ "http://example.org/test#property2": [
+ { "@id": "http://example.org/test#example3" }
+ ],
+ "http://example.org/test#property3": [
+ { "@id": "http://example.org/test#example4" }
+ ],
+ "http://example.org/test#property4": [
+ {
+ "@id": "http://example.org/test#example4",
+ "http://example.org/test#property5": [
+ {
+ "@value": "2012-03-31",
+ "@type": "http://www.w3.org/2001/XMLSchema#date"
+ }
+ ]
+ }
+ ],
+ "http://example.org/test#property6": [],
+ "@id": "http://example.org/test#example1"
+ }
+]
diff --git a/test/jsonld/1.1/expand/0015-in.jsonld b/test/jsonld/1.1/expand/0015-in.jsonld
new file mode 100644
index 000000000..ae60d7314
--- /dev/null
+++ b/test/jsonld/1.1/expand/0015-in.jsonld
@@ -0,0 +1,14 @@
+{
+ "@context": {
+ "mylist1": {"@id": "http://example.com/mylist1", "@container": "@list"},
+ "mylist2": {"@id": "http://example.com/mylist2", "@container": "@list"},
+ "myset1": {"@id": "http://example.com/myset1", "@container": "@set" },
+ "myset2": {"@id": "http://example.com/myset2", "@container": "@set" },
+ "myset3": {"@id": "http://example.com/myset3", "@container": "@set" }
+ },
+ "@id": "http://example.org/id",
+ "mylist1": [],
+ "myset1": { "@set": [] },
+ "myset2": [ { "@set": [] }, [], { "@set": [ null ] }, [ null ] ],
+ "myset3": [ { "@set": [ "hello", "this" ] }, "will", { "@set": [ "be", "collapsed" ] } ]
+}
diff --git a/test/jsonld/1.1/expand/0015-out.jsonld b/test/jsonld/1.1/expand/0015-out.jsonld
new file mode 100644
index 000000000..c627939f0
--- /dev/null
+++ b/test/jsonld/1.1/expand/0015-out.jsonld
@@ -0,0 +1,14 @@
+[
+ {
+ "@id": "http://example.org/id",
+ "http://example.com/mylist1": [ { "@list": [] } ],
+ "http://example.com/myset1": [ ],
+ "http://example.com/myset2": [ ],
+ "http://example.com/myset3": [
+ {"@value": "hello"},
+ {"@value": "this"},
+ {"@value": "will"},
+ {"@value": "be"},
+ {"@value": "collapsed"} ]
+ }
+]
diff --git a/test/jsonld/1.1/expand/0016-in.jsonld b/test/jsonld/1.1/expand/0016-in.jsonld
new file mode 100644
index 000000000..c151040a6
--- /dev/null
+++ b/test/jsonld/1.1/expand/0016-in.jsonld
@@ -0,0 +1,30 @@
+{
+ "@context": {
+ "myproperty": { "@id": "http://example.com/myproperty" },
+ "mylist1": {"@id": "http://example.com/mylist1", "@container": "@list"},
+ "mylist2": {"@id": "http://example.com/mylist2", "@container": "@list"},
+ "myset1": {"@id": "http://example.com/myset1", "@container": "@set" },
+ "myset2": {"@id": "http://example.com/myset2", "@container": "@set" }
+ },
+ "@id": "http://example.org/id1",
+ "mylist1": [],
+ "mylist2": [ 2, "hi" ],
+ "myset1": { "@set": [] },
+ "myset2": [ { "@set": [] }, [], { "@set": [ null ] }, [ null ] ],
+ "myproperty": {
+ "@context": null,
+ "@id": "http://example.org/id2",
+ "mylist1": [],
+ "mylist2": [ 2, "hi" ],
+ "myset1": { "@set": [] },
+ "myset2": [ { "@set": [] }, [], { "@set": [ null ] }, [ null ] ],
+ "http://example.org/myproperty2": "ok"
+ },
+ "http://example.com/emptyobj": {
+ "@context": null,
+ "mylist1": [],
+ "mylist2": [ 2, "hi" ],
+ "myset1": { "@set": [] },
+ "myset2": [ { "@set": [] }, [], { "@set": [ null ] }, [ null ] ]
+ }
+}
diff --git a/test/jsonld/1.1/expand/0016-out.jsonld b/test/jsonld/1.1/expand/0016-out.jsonld
new file mode 100644
index 000000000..3403e10ae
--- /dev/null
+++ b/test/jsonld/1.1/expand/0016-out.jsonld
@@ -0,0 +1,18 @@
+[
+ {
+ "@id": "http://example.org/id1",
+ "http://example.com/mylist1": [ { "@list": [] } ],
+ "http://example.com/mylist2": [
+ { "@list": [ {"@value": 2}, {"@value": "hi"} ] }
+ ],
+ "http://example.com/myset1": [ ],
+ "http://example.com/myset2": [ ],
+ "http://example.com/myproperty": [
+ {
+ "@id": "http://example.org/id2",
+ "http://example.org/myproperty2": [ {"@value": "ok"} ]
+ }
+ ],
+ "http://example.com/emptyobj": [ { } ]
+ }
+]
diff --git a/test/jsonld/1.1/expand/0017-in.jsonld b/test/jsonld/1.1/expand/0017-in.jsonld
new file mode 100644
index 000000000..dea8bf808
--- /dev/null
+++ b/test/jsonld/1.1/expand/0017-in.jsonld
@@ -0,0 +1,45 @@
+{
+ "@context": {
+ "authored": {
+ "@id": "http://example.org/vocab#authored",
+ "@type": "@id"
+ },
+ "contains": {
+ "@id": "http://example.org/vocab#contains",
+ "@type": "@id"
+ },
+ "contributor": "http://purl.org/dc/elements/1.1/contributor",
+ "description": "http://purl.org/dc/elements/1.1/description",
+ "name": "http://xmlns.com/foaf/0.1/name",
+ "title": {
+ "@id": "http://purl.org/dc/elements/1.1/title"
+ },
+ "id": "@id",
+ "data": "@graph"
+ },
+ "data": [
+ {
+ "id": "http://example.org/test#chapter",
+ "description": "Fun",
+ "title": "Chapter One"
+ },
+ {
+ "@id": "http://example.org/test#jane",
+ "authored": "http://example.org/test#chapter",
+ "name": "Jane"
+ },
+ {
+ "id": "http://example.org/test#john",
+ "name": "John"
+ },
+ {
+ "id": "http://example.org/test#library",
+ "contains": {
+ "@id": "http://example.org/test#book",
+ "contains": "http://example.org/test#chapter",
+ "contributor": "Writer",
+ "title": "My Book"
+ }
+ }
+ ]
+}
diff --git a/test/jsonld/1.1/expand/0017-out.jsonld b/test/jsonld/1.1/expand/0017-out.jsonld
new file mode 100644
index 000000000..376c11cdf
--- /dev/null
+++ b/test/jsonld/1.1/expand/0017-out.jsonld
@@ -0,0 +1,29 @@
+[
+ {
+ "@id": "http://example.org/test#chapter",
+ "http://purl.org/dc/elements/1.1/description": [{"@value": "Fun"}],
+ "http://purl.org/dc/elements/1.1/title": [{"@value": "Chapter One"}]
+ },
+ {
+ "@id": "http://example.org/test#jane",
+ "http://example.org/vocab#authored": [{
+ "@id": "http://example.org/test#chapter"
+ }],
+ "http://xmlns.com/foaf/0.1/name": [{"@value": "Jane"}]
+ },
+ {
+ "@id": "http://example.org/test#john",
+ "http://xmlns.com/foaf/0.1/name": [{"@value": "John"}]
+ },
+ {
+ "@id": "http://example.org/test#library",
+ "http://example.org/vocab#contains": [{
+ "@id": "http://example.org/test#book",
+ "http://example.org/vocab#contains": [{
+ "@id": "http://example.org/test#chapter"
+ }],
+ "http://purl.org/dc/elements/1.1/contributor": [{"@value": "Writer"}],
+ "http://purl.org/dc/elements/1.1/title": [{"@value": "My Book"}]
+ }]
+ }
+]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/0018-in.jsonld b/test/jsonld/1.1/expand/0018-in.jsonld
new file mode 100644
index 000000000..21933fdac
--- /dev/null
+++ b/test/jsonld/1.1/expand/0018-in.jsonld
@@ -0,0 +1,24 @@
+{
+ "@context": {
+ "ex": "http://example.org/vocab#",
+ "@language": "en",
+ "de": { "@id": "ex:german", "@language": "de" },
+ "nolang": { "@id": "ex:nolang", "@language": null }
+ },
+ "@id": "http://example.org/test",
+ "ex:test-default": [
+ "hello",
+ 1,
+ true
+ ],
+ "de": [
+ "hallo",
+ 2,
+ true
+ ],
+ "nolang": [
+ "no language",
+ 3,
+ false
+ ]
+}
diff --git a/test/jsonld/1.1/expand/0018-out.jsonld b/test/jsonld/1.1/expand/0018-out.jsonld
new file mode 100644
index 000000000..12d54b263
--- /dev/null
+++ b/test/jsonld/1.1/expand/0018-out.jsonld
@@ -0,0 +1,8 @@
+[
+ {
+ "@id": "http://example.org/test",
+ "http://example.org/vocab#test-default": [ { "@value": "hello", "@language": "en" }, { "@value": 1 }, { "@value": true } ],
+ "http://example.org/vocab#german": [ { "@value": "hallo", "@language": "de" }, { "@value": 2 }, { "@value": true } ],
+ "http://example.org/vocab#nolang": [ {"@value": "no language"}, { "@value": 3 }, { "@value": false } ]
+ }
+]
diff --git a/test/jsonld/1.1/expand/0019-in.jsonld b/test/jsonld/1.1/expand/0019-in.jsonld
new file mode 100644
index 000000000..b91f88606
--- /dev/null
+++ b/test/jsonld/1.1/expand/0019-in.jsonld
@@ -0,0 +1,6 @@
+{
+ "@context": {
+ "myproperty": "http://example.com/myproperty"
+ },
+ "myproperty": { "@value" : null }
+}
diff --git a/test/jsonld/1.1/expand/0019-out.jsonld b/test/jsonld/1.1/expand/0019-out.jsonld
new file mode 100644
index 000000000..1e3ec7217
--- /dev/null
+++ b/test/jsonld/1.1/expand/0019-out.jsonld
@@ -0,0 +1 @@
+[ ]
diff --git a/test/jsonld/1.1/expand/0020-in.jsonld b/test/jsonld/1.1/expand/0020-in.jsonld
new file mode 100644
index 000000000..989e1192d
--- /dev/null
+++ b/test/jsonld/1.1/expand/0020-in.jsonld
@@ -0,0 +1,51 @@
+{
+ "@context": {
+ "authored": {
+ "@id": "http://example.org/vocab#authored",
+ "@type": "@id"
+ },
+ "contains": {
+ "@id": "http://example.org/vocab#contains",
+ "@type": "@id"
+ },
+ "contributor": "http://purl.org/dc/elements/1.1/contributor",
+ "description": "http://purl.org/dc/elements/1.1/description",
+ "name": "http://xmlns.com/foaf/0.1/name",
+ "title": {
+ "@id": "http://purl.org/dc/elements/1.1/title"
+ }
+ },
+ "@graph": [
+ {
+ "@id": "http://example.org/test#jane",
+ "name": "Jane",
+ "authored": {
+ "@graph": [
+ {
+ "@id": "http://example.org/test#chapter1",
+ "description": "Fun",
+ "title": "Chapter One"
+ },
+ {
+ "@id": "http://example.org/test#chapter2",
+ "description": "More fun",
+ "title": "Chapter Two"
+ }
+ ]
+ }
+ },
+ {
+ "@id": "http://example.org/test#john",
+ "name": "John"
+ },
+ {
+ "@id": "http://example.org/test#library",
+ "contains": {
+ "@id": "http://example.org/test#book",
+ "contains": "http://example.org/test#chapter",
+ "contributor": "Writer",
+ "title": "My Book"
+ }
+ }
+ ]
+}
diff --git a/test/jsonld/1.1/expand/0020-out.jsonld b/test/jsonld/1.1/expand/0020-out.jsonld
new file mode 100644
index 000000000..2e929d099
--- /dev/null
+++ b/test/jsonld/1.1/expand/0020-out.jsonld
@@ -0,0 +1,37 @@
+[
+ {
+ "@id": "http://example.org/test#jane",
+ "http://xmlns.com/foaf/0.1/name": [ {"@value": "Jane"} ],
+ "http://example.org/vocab#authored": [
+ {
+ "@graph": [
+ {
+ "@id": "http://example.org/test#chapter1",
+ "http://purl.org/dc/elements/1.1/description": [ {"@value": "Fun"} ],
+ "http://purl.org/dc/elements/1.1/title": [ {"@value": "Chapter One"} ]
+ },
+ {
+ "@id": "http://example.org/test#chapter2",
+ "http://purl.org/dc/elements/1.1/description": [ {"@value": "More fun"} ],
+ "http://purl.org/dc/elements/1.1/title": [ {"@value": "Chapter Two"} ]
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "@id": "http://example.org/test#john",
+ "http://xmlns.com/foaf/0.1/name": [ {"@value": "John"} ]
+ },
+ {
+ "@id": "http://example.org/test#library",
+ "http://example.org/vocab#contains": [
+ {
+ "@id": "http://example.org/test#book",
+ "http://example.org/vocab#contains": [ { "@id": "http://example.org/test#chapter" } ],
+ "http://purl.org/dc/elements/1.1/contributor": [ {"@value": "Writer"} ],
+ "http://purl.org/dc/elements/1.1/title": [ {"@value": "My Book"} ]
+ }
+ ]
+ }
+]
diff --git a/test/jsonld/1.1/expand/0021-in.jsonld b/test/jsonld/1.1/expand/0021-in.jsonld
new file mode 100644
index 000000000..e52fd1b8f
--- /dev/null
+++ b/test/jsonld/1.1/expand/0021-in.jsonld
@@ -0,0 +1,56 @@
+{
+ "@context": {
+ "authored": {
+ "@id": "http://example.org/vocab#authored",
+ "@type": "@id"
+ },
+ "contains": {
+ "@id": "http://example.org/vocab#contains",
+ "@type": "@id"
+ },
+ "contributor": "http://purl.org/dc/elements/1.1/contributor",
+ "description": "http://purl.org/dc/elements/1.1/description",
+ "name": "http://xmlns.com/foaf/0.1/name",
+ "title": {
+ "@id": "http://purl.org/dc/elements/1.1/title"
+ }
+ },
+ "title": "My first graph",
+ "@graph": [
+ {
+ "@id": "http://example.org/test#jane",
+ "name": "Jane",
+ "authored": {
+ "@graph": [
+ {
+ "@id": "http://example.org/test#chapter1",
+ "description": "Fun",
+ "title": "Chapter One"
+ },
+ {
+ "@id": "http://example.org/test#chapter2",
+ "description": "More fun",
+ "title": "Chapter Two"
+ },
+ {
+ "@id": "http://example.org/test#chapter3",
+ "title": "Chapter Three"
+ }
+ ]
+ }
+ },
+ {
+ "@id": "http://example.org/test#john",
+ "name": "John"
+ },
+ {
+ "@id": "http://example.org/test#library",
+ "contains": {
+ "@id": "http://example.org/test#book",
+ "contains": "http://example.org/test#chapter",
+ "contributor": "Writer",
+ "title": "My Book"
+ }
+ }
+ ]
+}
diff --git a/test/jsonld/1.1/expand/0021-out.jsonld b/test/jsonld/1.1/expand/0021-out.jsonld
new file mode 100644
index 000000000..99a5aa543
--- /dev/null
+++ b/test/jsonld/1.1/expand/0021-out.jsonld
@@ -0,0 +1,46 @@
+[
+ {
+ "http://purl.org/dc/elements/1.1/title": [ {"@value": "My first graph"} ],
+ "@graph": [
+ {
+ "@id": "http://example.org/test#jane",
+ "http://xmlns.com/foaf/0.1/name": [ {"@value": "Jane"} ],
+ "http://example.org/vocab#authored": [
+ {
+ "@graph": [
+ {
+ "@id": "http://example.org/test#chapter1",
+ "http://purl.org/dc/elements/1.1/description": [ {"@value": "Fun"} ],
+ "http://purl.org/dc/elements/1.1/title": [ {"@value": "Chapter One"} ]
+ },
+ {
+ "@id": "http://example.org/test#chapter2",
+ "http://purl.org/dc/elements/1.1/description": [ {"@value": "More fun"} ],
+ "http://purl.org/dc/elements/1.1/title": [ {"@value": "Chapter Two"} ]
+ },
+ {
+ "@id": "http://example.org/test#chapter3",
+ "http://purl.org/dc/elements/1.1/title": [ {"@value": "Chapter Three"} ]
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "@id": "http://example.org/test#john",
+ "http://xmlns.com/foaf/0.1/name": [ {"@value": "John"} ]
+ },
+ {
+ "@id": "http://example.org/test#library",
+ "http://example.org/vocab#contains": [
+ {
+ "@id": "http://example.org/test#book",
+ "http://example.org/vocab#contains": [ { "@id": "http://example.org/test#chapter" } ],
+ "http://purl.org/dc/elements/1.1/contributor": [ {"@value": "Writer"} ],
+ "http://purl.org/dc/elements/1.1/title": [ {"@value": "My Book"} ]
+ }
+ ]
+ }
+ ]
+ }
+]
diff --git a/test/jsonld/1.1/expand/0022-in.jsonld b/test/jsonld/1.1/expand/0022-in.jsonld
new file mode 100644
index 000000000..e7f938ae1
--- /dev/null
+++ b/test/jsonld/1.1/expand/0022-in.jsonld
@@ -0,0 +1,7 @@
+{
+ "@context": {
+ "term": "http://example.com/term",
+ "@language": "en"
+ },
+ "term": "v"
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/0022-out.jsonld b/test/jsonld/1.1/expand/0022-out.jsonld
new file mode 100644
index 000000000..ebdf8d4ac
--- /dev/null
+++ b/test/jsonld/1.1/expand/0022-out.jsonld
@@ -0,0 +1,3 @@
+[{
+ "http://example.com/term": [{"@value": "v", "@language": "en"}]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/0023-in.jsonld b/test/jsonld/1.1/expand/0023-in.jsonld
new file mode 100644
index 000000000..2a33783d5
--- /dev/null
+++ b/test/jsonld/1.1/expand/0023-in.jsonld
@@ -0,0 +1,21 @@
+{
+ "@context": {
+ "xsd": "http://www.w3.org/2001/XMLSchema#",
+ "idlist": {"@id": "http://example.com/idlist", "@container": "@list", "@type": "@id"},
+ "datelist": {"@id": "http://example.com/datelist", "@container": "@list", "@type": "xsd:date"},
+ "idset": {"@id": "http://example.com/idset", "@container": "@set", "@type": "@id"},
+ "dateset": {"@id": "http://example.com/dateset", "@container": "@set", "@type": "xsd:date"},
+ "idprop": {"@id": "http://example.com/idprop", "@type": "@id" },
+ "dateprop": {"@id": "http://example.com/dateprop", "@type": "xsd:date" },
+ "idprop2": {"@id": "http://example.com/idprop2", "@type": "@id" },
+ "dateprop2": {"@id": "http://example.com/dateprop2", "@type": "xsd:date" }
+ },
+ "idlist": ["http://example.org/id"],
+ "datelist": ["2012-04-12"],
+ "idprop": {"@list": ["http://example.org/id"]},
+ "dateprop": {"@list": ["2012-04-12"]},
+ "idset": ["http://example.org/id"],
+ "dateset": ["2012-04-12"],
+ "idprop2": {"@set": ["http://example.org/id"]},
+ "dateprop2": {"@set": ["2012-04-12"]}
+}
diff --git a/test/jsonld/1.1/expand/0023-out.jsonld b/test/jsonld/1.1/expand/0023-out.jsonld
new file mode 100644
index 000000000..66e0285c6
--- /dev/null
+++ b/test/jsonld/1.1/expand/0023-out.jsonld
@@ -0,0 +1,12 @@
+[
+ {
+ "http://example.com/idlist": [{"@list": [{"@id": "http://example.org/id"}]}],
+ "http://example.com/datelist": [{"@list": [{"@value": "2012-04-12","@type": "http://www.w3.org/2001/XMLSchema#date"}]}],
+ "http://example.com/idprop": [{"@list": [{"@id": "http://example.org/id"}]}],
+ "http://example.com/dateprop": [{"@list": [{"@value": "2012-04-12","@type": "http://www.w3.org/2001/XMLSchema#date"}]}],
+ "http://example.com/idset": [{"@id": "http://example.org/id"}],
+ "http://example.com/dateset": [{"@value": "2012-04-12","@type": "http://www.w3.org/2001/XMLSchema#date"}],
+ "http://example.com/idprop2": [{"@id": "http://example.org/id"}],
+ "http://example.com/dateprop2": [{"@value": "2012-04-12","@type": "http://www.w3.org/2001/XMLSchema#date"}]
+ }
+]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/0024-in.jsonld b/test/jsonld/1.1/expand/0024-in.jsonld
new file mode 100644
index 000000000..fcf010c40
--- /dev/null
+++ b/test/jsonld/1.1/expand/0024-in.jsonld
@@ -0,0 +1,14 @@
+{
+ "@context": [
+ {
+ "name": "http://xmlns.com/foaf/0.1/name",
+ "homepage": {"@id": "http://xmlns.com/foaf/0.1/homepage","@type": "@id"}
+ },
+ {"ical": "http://www.w3.org/2002/12/cal/ical#"}
+ ],
+ "@id": "http://example.com/speakers#Alice",
+ "name": "Alice",
+ "homepage": "http://xkcd.com/177/",
+ "ical:summary": "Alice Talk",
+ "ical:location": "Lyon Convention Centre, Lyon, France"
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/0024-out.jsonld b/test/jsonld/1.1/expand/0024-out.jsonld
new file mode 100644
index 000000000..f2b21d8d4
--- /dev/null
+++ b/test/jsonld/1.1/expand/0024-out.jsonld
@@ -0,0 +1,7 @@
+[{
+ "@id": "http://example.com/speakers#Alice",
+ "http://xmlns.com/foaf/0.1/name": [{"@value": "Alice"}],
+ "http://xmlns.com/foaf/0.1/homepage": [{"@id": "http://xkcd.com/177/"}],
+ "http://www.w3.org/2002/12/cal/ical#summary": [{"@value": "Alice Talk"}],
+ "http://www.w3.org/2002/12/cal/ical#location": [{"@value": "Lyon Convention Centre, Lyon, France"}]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/0025-in.jsonld b/test/jsonld/1.1/expand/0025-in.jsonld
new file mode 100644
index 000000000..2cd0d48eb
--- /dev/null
+++ b/test/jsonld/1.1/expand/0025-in.jsonld
@@ -0,0 +1,9 @@
+{
+ "@context": {
+ "foo": "http://example.com/foo/",
+ "foo:bar": "http://example.com/foo/bar",
+ "bar": {"@id": "foo:bar", "@type": "@id"},
+ "_": "http://example.com/underscore/"
+ },
+ "@type": [ "foo", "foo:bar", "_" ]
+}
diff --git a/test/jsonld/1.1/expand/0025-out.jsonld b/test/jsonld/1.1/expand/0025-out.jsonld
new file mode 100644
index 000000000..eea75af14
--- /dev/null
+++ b/test/jsonld/1.1/expand/0025-out.jsonld
@@ -0,0 +1,7 @@
+[{
+ "@type": [
+ "http://example.com/foo/",
+ "http://example.com/foo/bar",
+ "http://example.com/underscore/"
+ ]
+}]
diff --git a/test/jsonld/1.1/expand/0026-in.jsonld b/test/jsonld/1.1/expand/0026-in.jsonld
new file mode 100644
index 000000000..36d8cac73
--- /dev/null
+++ b/test/jsonld/1.1/expand/0026-in.jsonld
@@ -0,0 +1,20 @@
+{
+ "@context": {
+ "http://www.w3.org/1999/02/22-rdf-syntax-ns#type": {"@id": "@type", "@type": "@id"}
+ },
+ "@graph": [
+ {
+ "@id": "http://example.com/a",
+ "http://www.w3.org/1999/02/22-rdf-syntax-ns#type": "http://example.com/b"
+ }, {
+ "@id": "http://example.com/c",
+ "http://www.w3.org/1999/02/22-rdf-syntax-ns#type": [
+ "http://example.com/d",
+ "http://example.com/e"
+ ]
+ }, {
+ "@id": "http://example.com/f",
+ "http://www.w3.org/1999/02/22-rdf-syntax-ns#type": "http://example.com/g"
+ }
+ ]
+}
diff --git a/test/jsonld/1.1/expand/0026-out.jsonld b/test/jsonld/1.1/expand/0026-out.jsonld
new file mode 100644
index 000000000..75dc58d9e
--- /dev/null
+++ b/test/jsonld/1.1/expand/0026-out.jsonld
@@ -0,0 +1,21 @@
+[
+ {
+ "@id": "http://example.com/a",
+ "@type": [
+ "http://example.com/b"
+ ]
+ },
+ {
+ "@id": "http://example.com/c",
+ "@type": [
+ "http://example.com/d",
+ "http://example.com/e"
+ ]
+ },
+ {
+ "@id": "http://example.com/f",
+ "@type": [
+ "http://example.com/g"
+ ]
+ }
+]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/0027-in.jsonld b/test/jsonld/1.1/expand/0027-in.jsonld
new file mode 100644
index 000000000..6c47cfb75
--- /dev/null
+++ b/test/jsonld/1.1/expand/0027-in.jsonld
@@ -0,0 +1,9 @@
+{
+ "@context": {
+ "mylist": {"@id": "http://example.com/mylist", "@container": "@list"},
+ "myset": {"@id": "http://example.com/myset", "@container": "@set"}
+ },
+ "@id": "http://example.org/id",
+ "mylist": [1, 2, 2, 3],
+ "myset": [1, 2, 2, 3]
+}
diff --git a/test/jsonld/1.1/expand/0027-out.jsonld b/test/jsonld/1.1/expand/0027-out.jsonld
new file mode 100644
index 000000000..15efa2e39
--- /dev/null
+++ b/test/jsonld/1.1/expand/0027-out.jsonld
@@ -0,0 +1,17 @@
+[{
+ "@id": "http://example.org/id",
+ "http://example.com/mylist": [{
+ "@list": [
+ {"@value": 1},
+ {"@value": 2},
+ {"@value": 2},
+ {"@value": 3}
+ ]
+ }],
+ "http://example.com/myset": [
+ {"@value": 1},
+ {"@value": 2},
+ {"@value": 2},
+ {"@value": 3}
+ ]
+}]
diff --git a/test/jsonld/1.1/expand/0028-in.jsonld b/test/jsonld/1.1/expand/0028-in.jsonld
new file mode 100644
index 000000000..4f05d0e4f
--- /dev/null
+++ b/test/jsonld/1.1/expand/0028-in.jsonld
@@ -0,0 +1,13 @@
+{
+ "@context": {
+ "@vocab": "http://example.org/vocab#",
+ "date": { "@type": "dateTime" }
+ },
+ "@id": "example1",
+ "@type": "test",
+ "date": "2011-01-25T00:00:00Z",
+ "embed": {
+ "@id": "example2",
+ "expandedDate": { "@value": "2012-08-01T00:00:00Z", "@type": "dateTime" }
+ }
+}
diff --git a/test/jsonld/1.1/expand/0028-out.jsonld b/test/jsonld/1.1/expand/0028-out.jsonld
new file mode 100644
index 000000000..bd4e612f2
--- /dev/null
+++ b/test/jsonld/1.1/expand/0028-out.jsonld
@@ -0,0 +1,23 @@
+[
+ {
+ "@id": "https://w3c.github.io/json-ld-api/tests/expand/example1",
+ "@type": [ "http://example.org/vocab#test" ],
+ "http://example.org/vocab#date": [
+ {
+ "@value": "2011-01-25T00:00:00Z",
+ "@type": "http://example.org/vocab#dateTime"
+ }
+ ],
+ "http://example.org/vocab#embed": [
+ {
+ "@id": "https://w3c.github.io/json-ld-api/tests/expand/example2",
+ "http://example.org/vocab#expandedDate": [
+ {
+ "@value": "2012-08-01T00:00:00Z",
+ "@type": "http://example.org/vocab#dateTime"
+ }
+ ]
+ }
+ ]
+ }
+]
diff --git a/test/jsonld/1.1/expand/0029-in.jsonld b/test/jsonld/1.1/expand/0029-in.jsonld
new file mode 100644
index 000000000..dd425bda1
--- /dev/null
+++ b/test/jsonld/1.1/expand/0029-in.jsonld
@@ -0,0 +1,32 @@
+{
+ "@context": {
+ "links": { "@id": "http://www.example.com/link", "@type": "@id", "@container": "@list" }
+ },
+ "@id": "relativeIris",
+ "@type": [
+ "link",
+ "#fragment-works",
+ "?query=works",
+ "./",
+ "../",
+ "../parent",
+ "../../../parent-parent-eq-root",
+ "../../../../../still-root",
+ "../.././.././../../too-many-dots",
+ "/absolute",
+ "//example.org/scheme-relative"
+ ],
+ "links": [
+ "link",
+ "#fragment-works",
+ "?query=works",
+ "./",
+ "../",
+ "../parent",
+ "../../../parent-parent-eq-root",
+ "./../../../useless/../../../still-root",
+ "../.././.././../../too-many-dots",
+ "/absolute",
+ "//example.org/scheme-relative"
+ ]
+}
diff --git a/test/jsonld/1.1/expand/0029-out.jsonld b/test/jsonld/1.1/expand/0029-out.jsonld
new file mode 100644
index 000000000..641cc79ff
--- /dev/null
+++ b/test/jsonld/1.1/expand/0029-out.jsonld
@@ -0,0 +1,35 @@
+[
+ {
+ "@id": "https://w3c.github.io/json-ld-api/tests/expand/relativeIris",
+ "@type": [
+ "https://w3c.github.io/json-ld-api/tests/expand/link",
+ "https://w3c.github.io/json-ld-api/tests/expand/0029-in.jsonld#fragment-works",
+ "https://w3c.github.io/json-ld-api/tests/expand/0029-in.jsonld?query=works",
+ "https://w3c.github.io/json-ld-api/tests/expand/",
+ "https://w3c.github.io/json-ld-api/tests/",
+ "https://w3c.github.io/json-ld-api/tests/parent",
+ "https://w3c.github.io/parent-parent-eq-root",
+ "https://w3c.github.io/still-root",
+ "https://w3c.github.io/too-many-dots",
+ "https://w3c.github.io/absolute",
+ "https://example.org/scheme-relative"
+ ],
+ "http://www.example.com/link": [
+ {
+ "@list": [
+ {"@id": "https://w3c.github.io/json-ld-api/tests/expand/link"},
+ {"@id": "https://w3c.github.io/json-ld-api/tests/expand/0029-in.jsonld#fragment-works"},
+ {"@id": "https://w3c.github.io/json-ld-api/tests/expand/0029-in.jsonld?query=works"},
+ {"@id": "https://w3c.github.io/json-ld-api/tests/expand/"},
+ {"@id": "https://w3c.github.io/json-ld-api/tests/"},
+ {"@id": "https://w3c.github.io/json-ld-api/tests/parent"},
+ {"@id": "https://w3c.github.io/parent-parent-eq-root"},
+ {"@id": "https://w3c.github.io/still-root"},
+ {"@id": "https://w3c.github.io/too-many-dots"},
+ {"@id": "https://w3c.github.io/absolute"},
+ {"@id": "https://example.org/scheme-relative"}
+ ]
+ }
+ ]
+ }
+]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/0030-in.jsonld b/test/jsonld/1.1/expand/0030-in.jsonld
new file mode 100644
index 000000000..ca7116733
--- /dev/null
+++ b/test/jsonld/1.1/expand/0030-in.jsonld
@@ -0,0 +1,14 @@
+{
+ "@context": {
+ "vocab": "http://example.com/vocab/",
+ "label": {
+ "@id": "vocab:label",
+ "@container": "@language"
+ }
+ },
+ "@id": "http://example.com/queen",
+ "label": {
+ "en": "The Queen",
+ "de": [ "Die Königin", "Ihre Majestät" ]
+ }
+}
diff --git a/test/jsonld/1.1/expand/0030-out.jsonld b/test/jsonld/1.1/expand/0030-out.jsonld
new file mode 100644
index 000000000..b598483f2
--- /dev/null
+++ b/test/jsonld/1.1/expand/0030-out.jsonld
@@ -0,0 +1,18 @@
+[
+ {
+ "@id": "http://example.com/queen",
+ "http://example.com/vocab/label":
+ [
+ {
+ "@value": "Die Königin",
+ "@language": "de"
+ }, {
+ "@value": "Ihre Majestät",
+ "@language": "de"
+ }, {
+ "@value": "The Queen",
+ "@language": "en"
+ }
+ ]
+ }
+]
diff --git a/test/jsonld/1.1/expand/0031-in.jsonld b/test/jsonld/1.1/expand/0031-in.jsonld
new file mode 100644
index 000000000..192ff27c8
--- /dev/null
+++ b/test/jsonld/1.1/expand/0031-in.jsonld
@@ -0,0 +1,13 @@
+{
+ "@context": {
+ "ex": "http://example.org/vocab#",
+ "xsd": "http://www.w3.org/2001/XMLSchema#",
+ "ex:integer": { "@type": "xsd:integer" },
+ "ex:double": { "@type": "xsd:double" },
+ "ex:boolean": { "@type": "xsd:boolean" }
+ },
+ "@id": "http://example.org/test#example1",
+ "ex:integer": 1,
+ "ex:double": 123.45,
+ "ex:boolean": true
+}
diff --git a/test/jsonld/1.1/expand/0031-out.jsonld b/test/jsonld/1.1/expand/0031-out.jsonld
new file mode 100644
index 000000000..8b87d7145
--- /dev/null
+++ b/test/jsonld/1.1/expand/0031-out.jsonld
@@ -0,0 +1,17 @@
+[
+ {
+ "@id": "http://example.org/test#example1",
+ "http://example.org/vocab#integer": [ {
+ "@value": 1,
+ "@type": "http://www.w3.org/2001/XMLSchema#integer"
+ } ],
+ "http://example.org/vocab#double": [ {
+ "@value": 123.45,
+ "@type": "http://www.w3.org/2001/XMLSchema#double"
+ } ],
+ "http://example.org/vocab#boolean": [ {
+ "@value": true,
+ "@type": "http://www.w3.org/2001/XMLSchema#boolean"
+ } ]
+ }
+]
diff --git a/test/jsonld/1.1/expand/0032-in.jsonld b/test/jsonld/1.1/expand/0032-in.jsonld
new file mode 100644
index 000000000..920554fcd
--- /dev/null
+++ b/test/jsonld/1.1/expand/0032-in.jsonld
@@ -0,0 +1,11 @@
+{
+ "@context": {
+ "@vocab": "http://xmlns.com/foaf/0.1/",
+ "from": null,
+ "university": { "@id": null }
+ },
+ "@id": "http://me.markus-lanthaler.com/",
+ "name": "Markus Lanthaler",
+ "from": "Italy",
+ "university": "TU Graz"
+}
diff --git a/test/jsonld/1.1/expand/0032-out.jsonld b/test/jsonld/1.1/expand/0032-out.jsonld
new file mode 100644
index 000000000..abdba13aa
--- /dev/null
+++ b/test/jsonld/1.1/expand/0032-out.jsonld
@@ -0,0 +1,10 @@
+[
+ {
+ "@id": "http://me.markus-lanthaler.com/",
+ "http://xmlns.com/foaf/0.1/name": [
+ {
+ "@value": "Markus Lanthaler"
+ }
+ ]
+ }
+]
diff --git a/test/jsonld/1.1/expand/0033-in.jsonld b/test/jsonld/1.1/expand/0033-in.jsonld
new file mode 100644
index 000000000..abf6feed2
--- /dev/null
+++ b/test/jsonld/1.1/expand/0033-in.jsonld
@@ -0,0 +1,14 @@
+{
+ "@context": {
+ "@vocab": "http://example.com/vocab#",
+ "homepage": {
+ "@type": "@id"
+ },
+ "created_at": {
+ "@type": "http://www.w3.org/2001/XMLSchema#date"
+ }
+ },
+ "name": "Markus Lanthaler",
+ "homepage": "http://www.markus-lanthaler.com/",
+ "created_at": "2012-10-28"
+}
diff --git a/test/jsonld/1.1/expand/0033-out.jsonld b/test/jsonld/1.1/expand/0033-out.jsonld
new file mode 100644
index 000000000..5637ced35
--- /dev/null
+++ b/test/jsonld/1.1/expand/0033-out.jsonld
@@ -0,0 +1,12 @@
+[{
+ "http://example.com/vocab#name": [{
+ "@value": "Markus Lanthaler"
+ }],
+ "http://example.com/vocab#homepage": [{
+ "@id": "http://www.markus-lanthaler.com/"
+ }],
+ "http://example.com/vocab#created_at": [{
+ "@value": "2012-10-28",
+ "@type": "http://www.w3.org/2001/XMLSchema#date"
+ }]
+}]
diff --git a/test/jsonld/1.1/expand/0034-in.jsonld b/test/jsonld/1.1/expand/0034-in.jsonld
new file mode 100644
index 000000000..22bb60399
--- /dev/null
+++ b/test/jsonld/1.1/expand/0034-in.jsonld
@@ -0,0 +1,16 @@
+{
+ "@context": {
+ "@vocab": "http://example.com/vocab/",
+ "colliding": "http://example.com/vocab/collidingTerm"
+ },
+ "@id": "http://example.com/IriCollissions",
+ "colliding": [
+ "value 1",
+ 2
+ ],
+ "collidingTerm": [
+ 3,
+ "four"
+ ],
+ "http://example.com/vocab/collidingTerm": 5
+}
diff --git a/test/jsonld/1.1/expand/0034-out.jsonld b/test/jsonld/1.1/expand/0034-out.jsonld
new file mode 100644
index 000000000..afa7687b1
--- /dev/null
+++ b/test/jsonld/1.1/expand/0034-out.jsonld
@@ -0,0 +1,17 @@
+[{
+ "@id": "http://example.com/IriCollissions",
+ "http://example.com/vocab/collidingTerm": [
+ {
+ "@value": "value 1"
+ }, {
+ "@value": 2
+ }, {
+ "@value": 3
+ }, {
+ "@value": "four"
+ },
+ {
+ "@value": 5
+ }
+ ]
+}]
diff --git a/test/jsonld/1.1/expand/0035-in.jsonld b/test/jsonld/1.1/expand/0035-in.jsonld
new file mode 100644
index 000000000..7bf591127
--- /dev/null
+++ b/test/jsonld/1.1/expand/0035-in.jsonld
@@ -0,0 +1,18 @@
+{
+ "@context": {
+ "@vocab": "http://example.com/vocab/",
+ "@language": "it",
+ "label": {
+ "@container": "@language"
+ }
+ },
+ "@id": "http://example.com/queen",
+ "label": {
+ "en": "The Queen",
+ "de": [ "Die Königin", "Ihre Majestät" ]
+ },
+ "http://example.com/vocab/label": [
+ "Il re",
+ { "@value": "The king", "@language": "en" }
+ ]
+}
diff --git a/test/jsonld/1.1/expand/0035-out.jsonld b/test/jsonld/1.1/expand/0035-out.jsonld
new file mode 100644
index 000000000..74a5f42a7
--- /dev/null
+++ b/test/jsonld/1.1/expand/0035-out.jsonld
@@ -0,0 +1,21 @@
+[{
+ "@id": "http://example.com/queen",
+ "http://example.com/vocab/label": [
+ {
+ "@value": "Il re",
+ "@language": "it"
+ }, {
+ "@value": "The king",
+ "@language": "en"
+ }, {
+ "@value": "Die Königin",
+ "@language": "de"
+ }, {
+ "@value": "Ihre Majestät",
+ "@language": "de"
+ }, {
+ "@value": "The Queen",
+ "@language": "en"
+ }
+ ]
+}]
diff --git a/test/jsonld/1.1/expand/0036-in.jsonld b/test/jsonld/1.1/expand/0036-in.jsonld
new file mode 100644
index 000000000..23c99b559
--- /dev/null
+++ b/test/jsonld/1.1/expand/0036-in.jsonld
@@ -0,0 +1,90 @@
+{
+ "@context": {
+ "property": "http://example.com/property",
+ "indexContainer": { "@id": "http://example.com/container", "@container": "@index" }
+ },
+ "@id": "http://example.org/indexTest",
+ "indexContainer": {
+ "A": [
+ {
+ "@id": "http://example.org/nodeWithoutIndexA"
+ },
+ {
+ "@id": "http://example.org/nodeWithIndexA",
+ "@index": "this overrides the 'A' index from the container"
+ },
+ 1,
+ true,
+ false,
+ null,
+ "simple string A",
+ {
+ "@value": "typed literal A",
+ "@type": "http://example.org/type"
+ },
+ {
+ "@value": "language-tagged string A",
+ "@language": "en"
+ }
+ ],
+ "B": "simple string B",
+ "C": [
+ {
+ "@id": "http://example.org/nodeWithoutIndexC"
+ },
+ {
+ "@id": "http://example.org/nodeWithIndexC",
+ "@index": "this overrides the 'C' index from the container"
+ },
+ 3,
+ true,
+ false,
+ null,
+ "simple string C",
+ {
+ "@value": "typed literal C",
+ "@type": "http://example.org/type"
+ },
+ {
+ "@value": "language-tagged string C",
+ "@language": "en"
+ }
+ ]
+ },
+ "property": [
+ {
+ "@id": "http://example.org/nodeWithoutIndexProp"
+ },
+ {
+ "@id": "http://example.org/nodeWithIndexProp",
+ "@index": "prop"
+ },
+ {
+ "@value": 3,
+ "@index": "prop"
+ },
+ {
+ "@value": true,
+ "@index": "prop"
+ },
+ {
+ "@value": false,
+ "@index": "prop"
+ },
+ {
+ "@value": null,
+ "@index": "prop"
+ },
+ "simple string no index",
+ {
+ "@value": "typed literal Prop",
+ "@type": "http://example.org/type",
+ "@index": "prop"
+ },
+ {
+ "@value": "language-tagged string Prop",
+ "@language": "en",
+ "@index": "prop"
+ }
+ ]
+}
diff --git a/test/jsonld/1.1/expand/0036-out.jsonld b/test/jsonld/1.1/expand/0036-out.jsonld
new file mode 100644
index 000000000..850353e2b
--- /dev/null
+++ b/test/jsonld/1.1/expand/0036-out.jsonld
@@ -0,0 +1,113 @@
+[
+ {
+ "@id": "http://example.org/indexTest",
+ "http://example.com/container": [
+ {
+ "@id": "http://example.org/nodeWithoutIndexA",
+ "@index": "A"
+ },
+ {
+ "@id": "http://example.org/nodeWithIndexA",
+ "@index": "this overrides the 'A' index from the container"
+ },
+ {
+ "@value": 1,
+ "@index": "A"
+ },
+ {
+ "@value": true,
+ "@index": "A"
+ },
+ {
+ "@value": false,
+ "@index": "A"
+ },
+ {
+ "@value": "simple string A",
+ "@index": "A"
+ },
+ {
+ "@value": "typed literal A",
+ "@type": "http://example.org/type",
+ "@index": "A"
+ },
+ {
+ "@value": "language-tagged string A",
+ "@language": "en",
+ "@index": "A"
+ },
+ {
+ "@value": "simple string B",
+ "@index": "B"
+ },
+ {
+ "@id": "http://example.org/nodeWithoutIndexC",
+ "@index": "C"
+ },
+ {
+ "@id": "http://example.org/nodeWithIndexC",
+ "@index": "this overrides the 'C' index from the container"
+ },
+ {
+ "@value": 3,
+ "@index": "C"
+ },
+ {
+ "@value": true,
+ "@index": "C"
+ },
+ {
+ "@value": false,
+ "@index": "C"
+ },
+ {
+ "@value": "simple string C",
+ "@index": "C"
+ },
+ {
+ "@value": "typed literal C",
+ "@type": "http://example.org/type",
+ "@index": "C"
+ },
+ {
+ "@value": "language-tagged string C",
+ "@language": "en",
+ "@index": "C"
+ }
+ ],
+ "http://example.com/property": [
+ {
+ "@id": "http://example.org/nodeWithoutIndexProp"
+ },
+ {
+ "@id": "http://example.org/nodeWithIndexProp",
+ "@index": "prop"
+ },
+ {
+ "@value": 3,
+ "@index": "prop"
+ },
+ {
+ "@value": true,
+ "@index": "prop"
+ },
+ {
+ "@value": false,
+ "@index": "prop"
+ },
+ {
+ "@value": "simple string no index"
+ },
+ {
+ "@value": "typed literal Prop",
+ "@type": "http://example.org/type",
+ "@index": "prop"
+ },
+ {
+ "@value": "language-tagged string Prop",
+ "@language": "en",
+ "@index": "prop"
+ }
+ ]
+ }
+]
diff --git a/test/jsonld/1.1/expand/0037-in.jsonld b/test/jsonld/1.1/expand/0037-in.jsonld
new file mode 100644
index 000000000..7e65af4a5
--- /dev/null
+++ b/test/jsonld/1.1/expand/0037-in.jsonld
@@ -0,0 +1,13 @@
+{
+ "@context": {
+ "name": "http://xmlns.com/foaf/0.1/name"
+ },
+ "@id": "http://example.com/people/markus",
+ "name": "Markus Lanthaler",
+ "@reverse": {
+ "http://xmlns.com/foaf/0.1/knows": {
+ "@id": "http://example.com/people/dave",
+ "name": "Dave Longley"
+ }
+ }
+}
diff --git a/test/jsonld/1.1/expand/0037-out.jsonld b/test/jsonld/1.1/expand/0037-out.jsonld
new file mode 100644
index 000000000..c03623ef2
--- /dev/null
+++ b/test/jsonld/1.1/expand/0037-out.jsonld
@@ -0,0 +1,14 @@
+[
+ {
+ "@id": "http://example.com/people/markus",
+ "@reverse": {
+ "http://xmlns.com/foaf/0.1/knows": [
+ {
+ "@id": "http://example.com/people/dave",
+ "http://xmlns.com/foaf/0.1/name": [ { "@value": "Dave Longley" } ]
+ }
+ ]
+ },
+ "http://xmlns.com/foaf/0.1/name": [ { "@value": "Markus Lanthaler" } ]
+ }
+]
diff --git a/test/jsonld/1.1/expand/0038-in.jsonld b/test/jsonld/1.1/expand/0038-in.jsonld
new file mode 100644
index 000000000..17071294d
--- /dev/null
+++ b/test/jsonld/1.1/expand/0038-in.jsonld
@@ -0,0 +1,38 @@
+{
+ "@context": {
+ "term": "_:term",
+ "termId": { "@id": "term", "@type": "@id" }
+ },
+ "@id": "_:term",
+ "@type": "_:term",
+ "term": [
+ {
+ "@id": "_:term",
+ "@type": "term"
+ },
+ {
+ "@id": "_:Bx",
+ "term": "term"
+ },
+ "plain value",
+ {
+ "@id": "_:term"
+ }
+ ],
+ "termId": [
+ {
+ "@id": "_:term",
+ "@type": "term"
+ },
+ {
+ "@id": "_:Cx",
+ "term": "termId"
+ },
+ "term:AppendedToBlankNode",
+ "_:termAppendedToBlankNode",
+ "relativeIri",
+ {
+ "@id": "_:term"
+ }
+ ]
+}
diff --git a/test/jsonld/1.1/expand/0038-out.jsonld b/test/jsonld/1.1/expand/0038-out.jsonld
new file mode 100644
index 000000000..328591b99
--- /dev/null
+++ b/test/jsonld/1.1/expand/0038-out.jsonld
@@ -0,0 +1,56 @@
+[
+ {
+ "@id": "_:term",
+ "@type": [
+ "_:term"
+ ],
+ "_:term": [
+ {
+ "@id": "_:term",
+ "@type": [
+ "_:term"
+ ]
+ },
+ {
+ "@id": "_:Bx",
+ "_:term": [
+ {
+ "@value": "term"
+ }
+ ]
+ },
+ {
+ "@value": "plain value"
+ },
+ {
+ "@id": "_:term"
+ },
+ {
+ "@id": "_:term",
+ "@type": [
+ "_:term"
+ ]
+ },
+ {
+ "@id": "_:Cx",
+ "_:term": [
+ {
+ "@value": "termId"
+ }
+ ]
+ },
+ {
+ "@id": "_:termAppendedToBlankNode"
+ },
+ {
+ "@id": "_:termAppendedToBlankNode"
+ },
+ {
+ "@id": "https://w3c.github.io/json-ld-api/tests/expand/relativeIri"
+ },
+ {
+ "@id": "_:term"
+ }
+ ]
+ }
+]
diff --git a/test/jsonld/1.1/expand/0039-in.jsonld b/test/jsonld/1.1/expand/0039-in.jsonld
new file mode 100644
index 000000000..7c3549ee3
--- /dev/null
+++ b/test/jsonld/1.1/expand/0039-in.jsonld
@@ -0,0 +1,14 @@
+{
+ "@context": {
+ "name": "http://xmlns.com/foaf/0.1/name",
+ "knows": "http://xmlns.com/foaf/0.1/knows"
+ },
+ "@id": "http://example.com/people/markus",
+ "name": "Markus Lanthaler",
+ "@reverse": {
+ "knows": {
+ "@id": "http://example.com/people/dave",
+ "name": "Dave Longley"
+ }
+ }
+}
diff --git a/test/jsonld/1.1/expand/0039-out.jsonld b/test/jsonld/1.1/expand/0039-out.jsonld
new file mode 100644
index 000000000..c03623ef2
--- /dev/null
+++ b/test/jsonld/1.1/expand/0039-out.jsonld
@@ -0,0 +1,14 @@
+[
+ {
+ "@id": "http://example.com/people/markus",
+ "@reverse": {
+ "http://xmlns.com/foaf/0.1/knows": [
+ {
+ "@id": "http://example.com/people/dave",
+ "http://xmlns.com/foaf/0.1/name": [ { "@value": "Dave Longley" } ]
+ }
+ ]
+ },
+ "http://xmlns.com/foaf/0.1/name": [ { "@value": "Markus Lanthaler" } ]
+ }
+]
diff --git a/test/jsonld/1.1/expand/0040-in.jsonld b/test/jsonld/1.1/expand/0040-in.jsonld
new file mode 100644
index 000000000..2d02e0ad0
--- /dev/null
+++ b/test/jsonld/1.1/expand/0040-in.jsonld
@@ -0,0 +1,23 @@
+{
+ "@context": {
+ "vocab": "http://example.com/vocab/",
+ "label": {
+ "@id": "vocab:label",
+ "@container": "@language"
+ },
+ "indexes": {
+ "@id": "vocab:index",
+ "@container": "@index"
+ }
+ },
+ "@id": "http://example.com/queen",
+ "label": [
+ "The Queen"
+ ],
+ "indexes":
+ [
+ "No",
+ "indexes",
+ { "@id": "asTheValueIsntAnObject" }
+ ]
+}
diff --git a/test/jsonld/1.1/expand/0040-out.jsonld b/test/jsonld/1.1/expand/0040-out.jsonld
new file mode 100644
index 000000000..ce40ea194
--- /dev/null
+++ b/test/jsonld/1.1/expand/0040-out.jsonld
@@ -0,0 +1,23 @@
+[
+ {
+ "@id": "http://example.com/queen",
+ "http://example.com/vocab/label":
+ [
+ {
+ "@value": "The Queen"
+ }
+ ],
+ "http://example.com/vocab/index":
+ [
+ {
+ "@value": "No"
+ },
+ {
+ "@value": "indexes"
+ },
+ {
+ "@id": "https://w3c.github.io/json-ld-api/tests/expand/asTheValueIsntAnObject"
+ }
+ ]
+ }
+]
diff --git a/test/jsonld/1.1/expand/0041-in.jsonld b/test/jsonld/1.1/expand/0041-in.jsonld
new file mode 100644
index 000000000..7915153ea
--- /dev/null
+++ b/test/jsonld/1.1/expand/0041-in.jsonld
@@ -0,0 +1,14 @@
+{
+ "@context": {
+ "property": "http://example.com/property",
+ "nested": "http://example.com/nested",
+ "@language": "en"
+ },
+ "property": "this is English",
+ "nested": {
+ "@context": {
+ "@language": null
+ },
+ "property": "and this is a plain string"
+ }
+}
diff --git a/test/jsonld/1.1/expand/0041-out.jsonld b/test/jsonld/1.1/expand/0041-out.jsonld
new file mode 100644
index 000000000..923a52009
--- /dev/null
+++ b/test/jsonld/1.1/expand/0041-out.jsonld
@@ -0,0 +1,10 @@
+[
+ {
+ "http://example.com/property": [ { "@value": "this is English", "@language": "en" } ],
+ "http://example.com/nested": [
+ {
+ "http://example.com/property": [ { "@value": "and this is a plain string" } ]
+ }
+ ]
+ }
+]
diff --git a/test/jsonld/1.1/expand/0042-in.jsonld b/test/jsonld/1.1/expand/0042-in.jsonld
new file mode 100644
index 000000000..60cf9ac2c
--- /dev/null
+++ b/test/jsonld/1.1/expand/0042-in.jsonld
@@ -0,0 +1,12 @@
+{
+ "@context": {
+ "name": "http://xmlns.com/foaf/0.1/name",
+ "isKnownBy": { "@reverse": "http://xmlns.com/foaf/0.1/knows" }
+ },
+ "@id": "http://example.com/people/markus",
+ "name": "Markus Lanthaler",
+ "isKnownBy": {
+ "@id": "http://example.com/people/dave",
+ "name": "Dave Longley"
+ }
+}
diff --git a/test/jsonld/1.1/expand/0042-out.jsonld b/test/jsonld/1.1/expand/0042-out.jsonld
new file mode 100644
index 000000000..c03623ef2
--- /dev/null
+++ b/test/jsonld/1.1/expand/0042-out.jsonld
@@ -0,0 +1,14 @@
+[
+ {
+ "@id": "http://example.com/people/markus",
+ "@reverse": {
+ "http://xmlns.com/foaf/0.1/knows": [
+ {
+ "@id": "http://example.com/people/dave",
+ "http://xmlns.com/foaf/0.1/name": [ { "@value": "Dave Longley" } ]
+ }
+ ]
+ },
+ "http://xmlns.com/foaf/0.1/name": [ { "@value": "Markus Lanthaler" } ]
+ }
+]
diff --git a/test/jsonld/1.1/expand/0043-in.jsonld b/test/jsonld/1.1/expand/0043-in.jsonld
new file mode 100644
index 000000000..8ef075870
--- /dev/null
+++ b/test/jsonld/1.1/expand/0043-in.jsonld
@@ -0,0 +1,20 @@
+{
+ "@context": {
+ "name": "http://xmlns.com/foaf/0.1/name",
+ "isKnownBy": { "@reverse": "http://xmlns.com/foaf/0.1/knows" }
+ },
+ "@id": "http://example.com/people/markus",
+ "name": "Markus Lanthaler",
+ "@reverse": {
+ "isKnownBy": [
+ {
+ "@id": "http://example.com/people/dave",
+ "name": "Dave Longley"
+ },
+ {
+ "@id": "http://example.com/people/gregg",
+ "name": "Gregg Kellogg"
+ }
+ ]
+ }
+}
diff --git a/test/jsonld/1.1/expand/0043-out.jsonld b/test/jsonld/1.1/expand/0043-out.jsonld
new file mode 100644
index 000000000..d6d2ab38d
--- /dev/null
+++ b/test/jsonld/1.1/expand/0043-out.jsonld
@@ -0,0 +1,16 @@
+[
+ {
+ "@id": "http://example.com/people/markus",
+ "http://xmlns.com/foaf/0.1/knows": [
+ {
+ "@id": "http://example.com/people/dave",
+ "http://xmlns.com/foaf/0.1/name": [ { "@value": "Dave Longley" } ]
+ },
+ {
+ "@id": "http://example.com/people/gregg",
+ "http://xmlns.com/foaf/0.1/name": [ { "@value": "Gregg Kellogg" } ]
+ }
+ ],
+ "http://xmlns.com/foaf/0.1/name": [ { "@value": "Markus Lanthaler" } ]
+ }
+]
diff --git a/test/jsonld/1.1/expand/0044-in.jsonld b/test/jsonld/1.1/expand/0044-in.jsonld
new file mode 100644
index 000000000..c12bd7b2e
--- /dev/null
+++ b/test/jsonld/1.1/expand/0044-in.jsonld
@@ -0,0 +1,16 @@
+{
+ "@context": {
+ "property": { "@id": "http://example.com/vocab/property", "@language": "de" },
+ "indexMap": { "@id": "http://example.com/vocab/indexMap", "@language": "en", "@container": "@index" }
+ },
+ "@id": "http://example.com/node",
+ "property": [
+ {
+ "@id": "http://example.com/propertyValueNode",
+ "indexMap": {
+ "expands to english string": "simple string"
+ }
+ },
+ "einfacher String"
+ ]
+}
diff --git a/test/jsonld/1.1/expand/0044-out.jsonld b/test/jsonld/1.1/expand/0044-out.jsonld
new file mode 100644
index 000000000..d5192b921
--- /dev/null
+++ b/test/jsonld/1.1/expand/0044-out.jsonld
@@ -0,0 +1,21 @@
+[
+ {
+ "@id": "http://example.com/node",
+ "http://example.com/vocab/property": [
+ {
+ "@id": "http://example.com/propertyValueNode",
+ "http://example.com/vocab/indexMap": [
+ {
+ "@value": "simple string",
+ "@language": "en",
+ "@index": "expands to english string"
+ }
+ ]
+ },
+ {
+ "@value": "einfacher String",
+ "@language": "de"
+ }
+ ]
+ }
+]
diff --git a/test/jsonld/1.1/expand/0045-in.jsonld b/test/jsonld/1.1/expand/0045-in.jsonld
new file mode 100644
index 000000000..09207e31e
--- /dev/null
+++ b/test/jsonld/1.1/expand/0045-in.jsonld
@@ -0,0 +1,3 @@
+{
+ "@value": "free-floating value"
+}
diff --git a/test/jsonld/1.1/expand/0045-out.jsonld b/test/jsonld/1.1/expand/0045-out.jsonld
new file mode 100644
index 000000000..1e3ec7217
--- /dev/null
+++ b/test/jsonld/1.1/expand/0045-out.jsonld
@@ -0,0 +1 @@
+[ ]
diff --git a/test/jsonld/1.1/expand/0046-in.jsonld b/test/jsonld/1.1/expand/0046-in.jsonld
new file mode 100644
index 000000000..081a88771
--- /dev/null
+++ b/test/jsonld/1.1/expand/0046-in.jsonld
@@ -0,0 +1,14 @@
+{
+ "@graph": [
+ { "@id": "http://example.com/free-floating-node" },
+ { "@value": "free-floating value object" },
+ { "@value": "free-floating value language-tagged string", "@language": "en" },
+ { "@value": "free-floating value typed value", "@type": "http://example.com/type" },
+ "free-floating plain string",
+ true,
+ false,
+ null,
+ 1,
+ 1.5
+ ]
+}
diff --git a/test/jsonld/1.1/expand/0046-out.jsonld b/test/jsonld/1.1/expand/0046-out.jsonld
new file mode 100644
index 000000000..1e3ec7217
--- /dev/null
+++ b/test/jsonld/1.1/expand/0046-out.jsonld
@@ -0,0 +1 @@
+[ ]
diff --git a/test/jsonld/1.1/expand/0047-in.jsonld b/test/jsonld/1.1/expand/0047-in.jsonld
new file mode 100644
index 000000000..90d541143
--- /dev/null
+++ b/test/jsonld/1.1/expand/0047-in.jsonld
@@ -0,0 +1,28 @@
+{
+ "@context": {
+ "property": "http://example.com/property"
+ },
+ "@graph": [
+ {
+ "@set": [
+ "free-floating strings in set objects are removed",
+ {
+ "@id": "http://example.com/free-floating-node"
+ },
+ {
+ "@id": "http://example.com/node",
+ "property": "nodes with properties are not removed"
+ }
+ ]
+ },
+ {
+ "@list": [
+ "lists are removed even though they represent an invisible linked structure, they have no real meaning",
+ {
+ "@id": "http://example.com/node-in-free-floating-list",
+ "property": "everything inside a free-floating list is removed with the list; also nodes with properties"
+ }
+ ]
+ }
+ ]
+}
diff --git a/test/jsonld/1.1/expand/0047-out.jsonld b/test/jsonld/1.1/expand/0047-out.jsonld
new file mode 100644
index 000000000..dba2d8ef6
--- /dev/null
+++ b/test/jsonld/1.1/expand/0047-out.jsonld
@@ -0,0 +1,10 @@
+[
+ {
+ "@id": "http://example.com/node",
+ "http://example.com/property": [
+ {
+ "@value": "nodes with properties are not removed"
+ }
+ ]
+ }
+]
diff --git a/test/jsonld/1.1/expand/0048-in.jsonld b/test/jsonld/1.1/expand/0048-in.jsonld
new file mode 100644
index 000000000..5854b8a04
--- /dev/null
+++ b/test/jsonld/1.1/expand/0048-in.jsonld
@@ -0,0 +1,19 @@
+{
+ "@context": {
+ "term": "http://example.com/terms-are-not-considered-in-id",
+ "compact-iris": "http://example.com/compact-iris#",
+ "property": "http://example.com/property",
+ "@vocab": "http://example.org/vocab-is-not-considered-for-id"
+ },
+ "@id": "term",
+ "property": [
+ {
+ "@id": "compact-iris:are-considered",
+ "property": "@id supports the following values: relative, absolute, and compact IRIs"
+ },
+ {
+ "@id": "../parent-node",
+ "property": "relative IRIs get resolved against the document's base IRI"
+ }
+ ]
+}
diff --git a/test/jsonld/1.1/expand/0048-out.jsonld b/test/jsonld/1.1/expand/0048-out.jsonld
new file mode 100644
index 000000000..da0a5bacc
--- /dev/null
+++ b/test/jsonld/1.1/expand/0048-out.jsonld
@@ -0,0 +1,19 @@
+[
+ {
+ "@id": "https://w3c.github.io/json-ld-api/tests/expand/term",
+ "http://example.com/property": [
+ {
+ "@id": "http://example.com/compact-iris#are-considered",
+ "http://example.com/property": [
+ { "@value": "@id supports the following values: relative, absolute, and compact IRIs" }
+ ]
+ },
+ {
+ "@id": "https://w3c.github.io/json-ld-api/tests/parent-node",
+ "http://example.com/property": [
+ { "@value": "relative IRIs get resolved against the document's base IRI" }
+ ]
+ }
+ ]
+ }
+]
diff --git a/test/jsonld/1.1/expand/0049-in.jsonld b/test/jsonld/1.1/expand/0049-in.jsonld
new file mode 100644
index 000000000..3f10e016f
--- /dev/null
+++ b/test/jsonld/1.1/expand/0049-in.jsonld
@@ -0,0 +1,12 @@
+{
+ "@context": {
+ "name": "http://xmlns.com/foaf/0.1/name",
+ "isKnownBy": { "@reverse": "http://xmlns.com/foaf/0.1/knows", "@type": "@id" }
+ },
+ "@id": "http://example.com/people/markus",
+ "name": "Markus Lanthaler",
+ "isKnownBy": [
+ "http://example.com/people/dave",
+ "http://example.com/people/gregg"
+ ]
+}
diff --git a/test/jsonld/1.1/expand/0049-out.jsonld b/test/jsonld/1.1/expand/0049-out.jsonld
new file mode 100644
index 000000000..f63e141a9
--- /dev/null
+++ b/test/jsonld/1.1/expand/0049-out.jsonld
@@ -0,0 +1,16 @@
+[
+ {
+ "@id": "http://example.com/people/markus",
+ "@reverse": {
+ "http://xmlns.com/foaf/0.1/knows": [
+ {
+ "@id": "http://example.com/people/dave"
+ },
+ {
+ "@id": "http://example.com/people/gregg"
+ }
+ ]
+ },
+ "http://xmlns.com/foaf/0.1/name": [ { "@value": "Markus Lanthaler" } ]
+ }
+]
diff --git a/test/jsonld/1.1/expand/0050-in.jsonld b/test/jsonld/1.1/expand/0050-in.jsonld
new file mode 100644
index 000000000..01b24726e
--- /dev/null
+++ b/test/jsonld/1.1/expand/0050-in.jsonld
@@ -0,0 +1,8 @@
+{
+ "@context": {
+ "issue": { "@id": "http://example.com/issue/", "@type": "@id" },
+ "issue:raisedBy": { "@container": "@set" }
+ },
+ "issue": "/issue/1",
+ "issue:raisedBy": "Markus"
+}
diff --git a/test/jsonld/1.1/expand/0050-out.jsonld b/test/jsonld/1.1/expand/0050-out.jsonld
new file mode 100644
index 000000000..adc001e3f
--- /dev/null
+++ b/test/jsonld/1.1/expand/0050-out.jsonld
@@ -0,0 +1,6 @@
+[
+ {
+ "http://example.com/issue/": [ { "@id": "https://w3c.github.io/issue/1" } ],
+ "http://example.com/issue/raisedBy": [ { "@value": "Markus" } ]
+ }
+]
diff --git a/test/jsonld/1.1/expand/0051-in.jsonld b/test/jsonld/1.1/expand/0051-in.jsonld
new file mode 100644
index 000000000..77b7fbd89
--- /dev/null
+++ b/test/jsonld/1.1/expand/0051-in.jsonld
@@ -0,0 +1,8 @@
+{
+ "@context": [
+ { "id": "@id" },
+ { "url": "id" }
+ ],
+ "url": "/issue/1",
+ "http://example.com/property": "ok"
+}
diff --git a/test/jsonld/1.1/expand/0051-out.jsonld b/test/jsonld/1.1/expand/0051-out.jsonld
new file mode 100644
index 000000000..c0a226fe3
--- /dev/null
+++ b/test/jsonld/1.1/expand/0051-out.jsonld
@@ -0,0 +1,6 @@
+[{
+ "http://example.com/property": [{
+ "@value": "ok"
+ }],
+ "@id": "https://w3c.github.io/issue/1"
+}]
diff --git a/test/jsonld/1.1/expand/0052-in.jsonld b/test/jsonld/1.1/expand/0052-in.jsonld
new file mode 100644
index 000000000..ee3d9d2e3
--- /dev/null
+++ b/test/jsonld/1.1/expand/0052-in.jsonld
@@ -0,0 +1,8 @@
+{
+ "@context": {
+ "@vocab": "http://example.org/",
+ "property": "vocabRelativeProperty"
+ },
+ "property": "must expand to http://example.org/vocabRelativeProperty",
+ "http://example.org/property": "ok"
+}
diff --git a/test/jsonld/1.1/expand/0052-out.jsonld b/test/jsonld/1.1/expand/0052-out.jsonld
new file mode 100644
index 000000000..27501fbed
--- /dev/null
+++ b/test/jsonld/1.1/expand/0052-out.jsonld
@@ -0,0 +1,6 @@
+[
+ {
+ "http://example.org/property": [ { "@value": "ok" } ],
+ "http://example.org/vocabRelativeProperty": [ { "@value": "must expand to http://example.org/vocabRelativeProperty" } ]
+ }
+]
diff --git a/test/jsonld/1.1/expand/0053-in.jsonld b/test/jsonld/1.1/expand/0053-in.jsonld
new file mode 100644
index 000000000..3ac3ea981
--- /dev/null
+++ b/test/jsonld/1.1/expand/0053-in.jsonld
@@ -0,0 +1,6 @@
+{
+ "@context": {
+ "term": {"@id": "http://example.org/term", "@type": "@vocab"}
+ },
+ "term": "http://example.org/enum"
+}
diff --git a/test/jsonld/1.1/expand/0053-out.jsonld b/test/jsonld/1.1/expand/0053-out.jsonld
new file mode 100644
index 000000000..7be3023c0
--- /dev/null
+++ b/test/jsonld/1.1/expand/0053-out.jsonld
@@ -0,0 +1,3 @@
+[{
+ "http://example.org/term": [{"@id": "http://example.org/enum"}]
+}]
diff --git a/test/jsonld/1.1/expand/0054-in.jsonld b/test/jsonld/1.1/expand/0054-in.jsonld
new file mode 100644
index 000000000..680afbf0d
--- /dev/null
+++ b/test/jsonld/1.1/expand/0054-in.jsonld
@@ -0,0 +1,7 @@
+{
+ "@context": {
+ "term": {"@id": "http://example.org/term", "@type": "@vocab"},
+ "enum": {"@id": "http://example.org/enum"}
+ },
+ "term": "enum"
+}
diff --git a/test/jsonld/1.1/expand/0054-out.jsonld b/test/jsonld/1.1/expand/0054-out.jsonld
new file mode 100644
index 000000000..7be3023c0
--- /dev/null
+++ b/test/jsonld/1.1/expand/0054-out.jsonld
@@ -0,0 +1,3 @@
+[{
+ "http://example.org/term": [{"@id": "http://example.org/enum"}]
+}]
diff --git a/test/jsonld/1.1/expand/0055-in.jsonld b/test/jsonld/1.1/expand/0055-in.jsonld
new file mode 100644
index 000000000..1c5ed3b07
--- /dev/null
+++ b/test/jsonld/1.1/expand/0055-in.jsonld
@@ -0,0 +1,7 @@
+{
+ "@context": {
+ "@vocab": "http://example.org/",
+ "term": {"@id": "http://example.org/term", "@type": "@vocab"}
+ },
+ "term": "enum"
+}
diff --git a/test/jsonld/1.1/expand/0055-out.jsonld b/test/jsonld/1.1/expand/0055-out.jsonld
new file mode 100644
index 000000000..7be3023c0
--- /dev/null
+++ b/test/jsonld/1.1/expand/0055-out.jsonld
@@ -0,0 +1,3 @@
+[{
+ "http://example.org/term": [{"@id": "http://example.org/enum"}]
+}]
diff --git a/test/jsonld/1.1/expand/0056-in.jsonld b/test/jsonld/1.1/expand/0056-in.jsonld
new file mode 100644
index 000000000..6d5b0cb94
--- /dev/null
+++ b/test/jsonld/1.1/expand/0056-in.jsonld
@@ -0,0 +1,13 @@
+{
+ "@context": {
+ "name": "http://xmlns.com/foaf/0.1/name",
+ "homepage": { "@id": "http://xmlns.com/foaf/0.1/homepage", "@type": "@vocab" },
+ "link": { "@id": "http://example.com/link", "@type": "@id" },
+ "MarkusHomepage": "http://www.markus-lanthaler.com/",
+ "relative-iri": "http://example.com/error-if-this-is-used-for-link"
+ },
+ "@id": "http://me.markus-lanthaler.com/",
+ "name": "Markus Lanthaler",
+ "homepage": "MarkusHomepage",
+ "link": "relative-iri"
+}
diff --git a/test/jsonld/1.1/expand/0056-out.jsonld b/test/jsonld/1.1/expand/0056-out.jsonld
new file mode 100644
index 000000000..d7e7a6d56
--- /dev/null
+++ b/test/jsonld/1.1/expand/0056-out.jsonld
@@ -0,0 +1,8 @@
+[
+ {
+ "@id": "http://me.markus-lanthaler.com/",
+ "http://xmlns.com/foaf/0.1/homepage": [ { "@id": "http://www.markus-lanthaler.com/" } ],
+ "http://example.com/link": [ { "@id": "https://w3c.github.io/json-ld-api/tests/expand/relative-iri" } ],
+ "http://xmlns.com/foaf/0.1/name": [ { "@value": "Markus Lanthaler" } ]
+ }
+]
diff --git a/test/jsonld/1.1/expand/0057-in.jsonld b/test/jsonld/1.1/expand/0057-in.jsonld
new file mode 100644
index 000000000..732cc9234
--- /dev/null
+++ b/test/jsonld/1.1/expand/0057-in.jsonld
@@ -0,0 +1,6 @@
+{
+ "@context": {
+ "term": { "@id": "http://example.org/term", "@type": "@vocab" }
+ },
+ "term": "not-a-term-thus-a-relative-IRI"
+}
diff --git a/test/jsonld/1.1/expand/0057-out.jsonld b/test/jsonld/1.1/expand/0057-out.jsonld
new file mode 100644
index 000000000..71ab83366
--- /dev/null
+++ b/test/jsonld/1.1/expand/0057-out.jsonld
@@ -0,0 +1,5 @@
+[
+ {
+ "http://example.org/term": [ { "@id": "https://w3c.github.io/json-ld-api/tests/expand/not-a-term-thus-a-relative-IRI" } ]
+ }
+]
diff --git a/test/jsonld/1.1/expand/0058-in.jsonld b/test/jsonld/1.1/expand/0058-in.jsonld
new file mode 100644
index 000000000..68dc32497
--- /dev/null
+++ b/test/jsonld/1.1/expand/0058-in.jsonld
@@ -0,0 +1,7 @@
+{
+ "@context": {
+ "term": { "@id": "http://example.org/term", "@type": "@vocab" },
+ "prefix": "http://example.com/vocab#"
+ },
+ "term": "prefix:suffix"
+}
diff --git a/test/jsonld/1.1/expand/0058-out.jsonld b/test/jsonld/1.1/expand/0058-out.jsonld
new file mode 100644
index 000000000..f127a40d8
--- /dev/null
+++ b/test/jsonld/1.1/expand/0058-out.jsonld
@@ -0,0 +1,5 @@
+[
+ {
+ "http://example.org/term": [ { "@id": "http://example.com/vocab#suffix" } ]
+ }
+]
diff --git a/test/jsonld/1.1/expand/0059-in.jsonld b/test/jsonld/1.1/expand/0059-in.jsonld
new file mode 100644
index 000000000..05f582f0c
--- /dev/null
+++ b/test/jsonld/1.1/expand/0059-in.jsonld
@@ -0,0 +1,16 @@
+{
+ "@context": {
+ "@vocab": "http://example.org/vocab#"
+ },
+ "@id": "example-with-vocab",
+ "@type": "vocab-prefixed",
+ "property": "property expanded using @vocab",
+ "embed": {
+ "@context": {
+ "@vocab": null
+ },
+ "@id": "example-vocab-reset",
+ "@type": "document-relative",
+ "property": "@vocab reset, property will be dropped"
+ }
+}
diff --git a/test/jsonld/1.1/expand/0059-out.jsonld b/test/jsonld/1.1/expand/0059-out.jsonld
new file mode 100644
index 000000000..a0365cde4
--- /dev/null
+++ b/test/jsonld/1.1/expand/0059-out.jsonld
@@ -0,0 +1,13 @@
+[
+ {
+ "@id": "https://w3c.github.io/json-ld-api/tests/expand/example-with-vocab",
+ "@type": [ "http://example.org/vocab#vocab-prefixed" ],
+ "http://example.org/vocab#embed": [
+ {
+ "@id": "https://w3c.github.io/json-ld-api/tests/expand/example-vocab-reset",
+ "@type": [ "https://w3c.github.io/json-ld-api/tests/expand/document-relative" ]
+ }
+ ],
+ "http://example.org/vocab#property": [ { "@value": "property expanded using @vocab" } ]
+ }
+]
diff --git a/test/jsonld/1.1/expand/0060-in.jsonld b/test/jsonld/1.1/expand/0060-in.jsonld
new file mode 100644
index 000000000..dbae017a9
--- /dev/null
+++ b/test/jsonld/1.1/expand/0060-in.jsonld
@@ -0,0 +1,30 @@
+{
+ "@context": {
+ "property": "http://example.com/vocab#property"
+ },
+ "@id": "../document-relative",
+ "@type": "#document-relative",
+ "property": {
+ "@context": {
+ "@base": "http://example.org/test/"
+ },
+ "@id": "../document-base-overwritten",
+ "@type": "#document-base-overwritten",
+ "property": [
+ {
+ "@context": null,
+ "@id": "../document-relative",
+ "@type": "#document-relative",
+ "property": "context completely reset, drops property"
+ },
+ {
+ "@context": {
+ "@base": null
+ },
+ "@id": "../document-relative",
+ "@type": "#document-relative",
+ "property": "only @base is cleared"
+ }
+ ]
+ }
+}
diff --git a/test/jsonld/1.1/expand/0060-out.jsonld b/test/jsonld/1.1/expand/0060-out.jsonld
new file mode 100644
index 000000000..4b387d3e7
--- /dev/null
+++ b/test/jsonld/1.1/expand/0060-out.jsonld
@@ -0,0 +1,23 @@
+[
+ {
+ "@id": "https://w3c.github.io/json-ld-api/tests/document-relative",
+ "@type": [ "https://w3c.github.io/json-ld-api/tests/expand/0060-in.jsonld#document-relative" ],
+ "http://example.com/vocab#property": [
+ {
+ "@id": "http://example.org/document-base-overwritten",
+ "@type": [ "http://example.org/test/#document-base-overwritten" ],
+ "http://example.com/vocab#property": [
+ {
+ "@id": "https://w3c.github.io/json-ld-api/tests/document-relative",
+ "@type": [ "https://w3c.github.io/json-ld-api/tests/expand/0060-in.jsonld#document-relative" ]
+ },
+ {
+ "@id": "../document-relative",
+ "@type": [ "#document-relative" ],
+ "http://example.com/vocab#property": [ { "@value": "only @base is cleared" } ]
+ }
+ ]
+ }
+ ]
+ }
+]
diff --git a/test/jsonld/1.1/expand/0061-in.jsonld b/test/jsonld/1.1/expand/0061-in.jsonld
new file mode 100644
index 000000000..45c1d511e
--- /dev/null
+++ b/test/jsonld/1.1/expand/0061-in.jsonld
@@ -0,0 +1,9 @@
+{
+ "@context": {
+ "property": {
+ "@id": "http://example.com/property",
+ "@type": "http://example.com/datatype"
+ }
+ },
+ "property": [ 1, true, false, 5.1 ]
+}
diff --git a/test/jsonld/1.1/expand/0061-out.jsonld b/test/jsonld/1.1/expand/0061-out.jsonld
new file mode 100644
index 000000000..bdde64748
--- /dev/null
+++ b/test/jsonld/1.1/expand/0061-out.jsonld
@@ -0,0 +1,10 @@
+[
+ {
+ "http://example.com/property": [
+ { "@value": 1, "@type": "http://example.com/datatype" },
+ { "@value": true, "@type": "http://example.com/datatype" },
+ { "@value": false, "@type": "http://example.com/datatype" },
+ { "@value": 5.1, "@type": "http://example.com/datatype" }
+ ]
+ }
+]
diff --git a/test/jsonld/1.1/expand/0062-in.jsonld b/test/jsonld/1.1/expand/0062-in.jsonld
new file mode 100644
index 000000000..fb472514d
--- /dev/null
+++ b/test/jsonld/1.1/expand/0062-in.jsonld
@@ -0,0 +1,35 @@
+{
+ "@context": {
+ "@base": "http://example.com/some/deep/directory/and/file#with-a-fragment",
+ "links": { "@id": "http://www.example.com/link", "@type": "@id", "@container": "@list" }
+ },
+ "@id": "relativeIris",
+ "@type": [
+ "link",
+ "#fragment-works",
+ "?query=works",
+ "./",
+ "../",
+ "../parent",
+ "../../parent-parent-eq-root",
+ "../../../../../still-root",
+ "../.././.././../../too-many-dots",
+ "/absolute",
+ "//example.org/scheme-relative"
+ ],
+ "links": [
+ "link",
+ "#fragment-works",
+ "?query=works",
+ "./",
+ "../",
+ "../parent",
+ "../../parent-parent-eq-root",
+ "./../../../../../still-root",
+ "../.././.././../../too-many-dots",
+ "/absolute",
+ "//example.org/scheme-relative",
+ "//example.org/../scheme-relative",
+ "//example.org/.././useless/../../scheme-relative"
+ ]
+}
diff --git a/test/jsonld/1.1/expand/0062-out.jsonld b/test/jsonld/1.1/expand/0062-out.jsonld
new file mode 100644
index 000000000..5a939f0e6
--- /dev/null
+++ b/test/jsonld/1.1/expand/0062-out.jsonld
@@ -0,0 +1,35 @@
+[
+ {
+ "@id": "http://example.com/some/deep/directory/and/relativeIris",
+ "@type": [
+ "http://example.com/some/deep/directory/and/link",
+ "http://example.com/some/deep/directory/and/file#fragment-works",
+ "http://example.com/some/deep/directory/and/file?query=works",
+ "http://example.com/some/deep/directory/and/",
+ "http://example.com/some/deep/directory/",
+ "http://example.com/some/deep/directory/parent",
+ "http://example.com/some/deep/parent-parent-eq-root",
+ "http://example.com/still-root",
+ "http://example.com/too-many-dots",
+ "http://example.com/absolute",
+ "http://example.org/scheme-relative"
+ ],
+ "http://www.example.com/link": [ {
+ "@list": [
+ { "@id": "http://example.com/some/deep/directory/and/link" },
+ { "@id": "http://example.com/some/deep/directory/and/file#fragment-works" },
+ { "@id": "http://example.com/some/deep/directory/and/file?query=works" },
+ { "@id": "http://example.com/some/deep/directory/and/" },
+ { "@id": "http://example.com/some/deep/directory/" },
+ { "@id": "http://example.com/some/deep/directory/parent" },
+ { "@id": "http://example.com/some/deep/parent-parent-eq-root" },
+ { "@id": "http://example.com/still-root" },
+ { "@id": "http://example.com/too-many-dots" },
+ { "@id": "http://example.com/absolute" },
+ { "@id": "http://example.org/scheme-relative" },
+ { "@id": "http://example.org/scheme-relative" },
+ { "@id": "http://example.org/scheme-relative" }
+ ]
+ } ]
+ }
+]
diff --git a/test/jsonld/1.1/expand/0063-in.jsonld b/test/jsonld/1.1/expand/0063-in.jsonld
new file mode 100644
index 000000000..a9a83b0c7
--- /dev/null
+++ b/test/jsonld/1.1/expand/0063-in.jsonld
@@ -0,0 +1,18 @@
+{
+ "@context": {
+ "name": "http://xmlns.com/foaf/0.1/name",
+ "isKnownBy": { "@reverse": "http://xmlns.com/foaf/0.1/knows", "@container": "@index" }
+ },
+ "@id": "http://example.com/people/markus",
+ "name": "Markus Lanthaler",
+ "isKnownBy": {
+ "Dave": {
+ "@id": "http://example.com/people/dave",
+ "name": "Dave Longley"
+ },
+ "Gregg": {
+ "@id": "http://example.com/people/gregg",
+ "name": "Gregg Kellogg"
+ }
+ }
+}
diff --git a/test/jsonld/1.1/expand/0063-out.jsonld b/test/jsonld/1.1/expand/0063-out.jsonld
new file mode 100644
index 000000000..ffa49d965
--- /dev/null
+++ b/test/jsonld/1.1/expand/0063-out.jsonld
@@ -0,0 +1,20 @@
+[
+ {
+ "@id": "http://example.com/people/markus",
+ "@reverse": {
+ "http://xmlns.com/foaf/0.1/knows": [
+ {
+ "@id": "http://example.com/people/dave",
+ "@index": "Dave",
+ "http://xmlns.com/foaf/0.1/name": [ { "@value": "Dave Longley" } ]
+ },
+ {
+ "@id": "http://example.com/people/gregg",
+ "@index": "Gregg",
+ "http://xmlns.com/foaf/0.1/name": [ { "@value": "Gregg Kellogg" } ]
+ }
+ ]
+ },
+ "http://xmlns.com/foaf/0.1/name": [ { "@value": "Markus Lanthaler" } ]
+ }
+]
diff --git a/test/jsonld/1.1/expand/0064-in.jsonld b/test/jsonld/1.1/expand/0064-in.jsonld
new file mode 100644
index 000000000..dc313893a
--- /dev/null
+++ b/test/jsonld/1.1/expand/0064-in.jsonld
@@ -0,0 +1,16 @@
+{
+ "@context": {
+ "name": "http://xmlns.com/foaf/0.1/name",
+ "isKnownBy": { "@reverse": "http://xmlns.com/foaf/0.1/knows" }
+ },
+ "@id": "http://example.com/people/markus",
+ "name": "Markus Lanthaler",
+ "isKnownBy": [
+ {
+ "name": "Dave Longley"
+ },
+ {
+ "name": "Gregg Kellogg"
+ }
+ ]
+}
diff --git a/test/jsonld/1.1/expand/0064-out.jsonld b/test/jsonld/1.1/expand/0064-out.jsonld
new file mode 100644
index 000000000..273226d2d
--- /dev/null
+++ b/test/jsonld/1.1/expand/0064-out.jsonld
@@ -0,0 +1,16 @@
+[
+ {
+ "@id": "http://example.com/people/markus",
+ "@reverse": {
+ "http://xmlns.com/foaf/0.1/knows": [
+ {
+ "http://xmlns.com/foaf/0.1/name": [ { "@value": "Dave Longley" } ]
+ },
+ {
+ "http://xmlns.com/foaf/0.1/name": [ { "@value": "Gregg Kellogg" } ]
+ }
+ ]
+ },
+ "http://xmlns.com/foaf/0.1/name": [ { "@value": "Markus Lanthaler" } ]
+ }
+]
diff --git a/test/jsonld/1.1/expand/0065-in.jsonld b/test/jsonld/1.1/expand/0065-in.jsonld
new file mode 100644
index 000000000..116e05041
--- /dev/null
+++ b/test/jsonld/1.1/expand/0065-in.jsonld
@@ -0,0 +1,18 @@
+{
+ "@context": {
+ "name": "http://xmlns.com/foaf/0.1/name",
+ "knows": "http://xmlns.com/foaf/0.1/knows"
+ },
+ "@id": "http://example.com/people/markus",
+ "name": "Markus Lanthaler",
+ "@reverse": {
+ "knows": {
+ "@id": "http://example.com/people/dave",
+ "name": "Dave Longley"
+ },
+ "relative-iri": {
+ "@id": "relative-node",
+ "name": "Keys that are not mapped to an IRI in a reverse-map are dropped"
+ }
+ }
+}
diff --git a/test/jsonld/1.1/expand/0065-out.jsonld b/test/jsonld/1.1/expand/0065-out.jsonld
new file mode 100644
index 000000000..c03623ef2
--- /dev/null
+++ b/test/jsonld/1.1/expand/0065-out.jsonld
@@ -0,0 +1,14 @@
+[
+ {
+ "@id": "http://example.com/people/markus",
+ "@reverse": {
+ "http://xmlns.com/foaf/0.1/knows": [
+ {
+ "@id": "http://example.com/people/dave",
+ "http://xmlns.com/foaf/0.1/name": [ { "@value": "Dave Longley" } ]
+ }
+ ]
+ },
+ "http://xmlns.com/foaf/0.1/name": [ { "@value": "Markus Lanthaler" } ]
+ }
+]
diff --git a/test/jsonld/1.1/expand/0066-in.jsonld b/test/jsonld/1.1/expand/0066-in.jsonld
new file mode 100644
index 000000000..b3a9bd80f
--- /dev/null
+++ b/test/jsonld/1.1/expand/0066-in.jsonld
@@ -0,0 +1,19 @@
+{
+ "@context": {
+ "name": "http://xmlns.com/foaf/0.1/name",
+ "knows": "http://xmlns.com/foaf/0.1/knows",
+ "@vocab": "http://example.com/vocab/"
+ },
+ "@id": "http://example.com/people/markus",
+ "name": "Markus Lanthaler",
+ "@reverse": {
+ "knows": {
+ "@id": "http://example.com/people/dave",
+ "name": "Dave Longley"
+ },
+ "noTerm": {
+ "@id": "relative-node",
+ "name": "Compact keys using @vocab"
+ }
+ }
+}
diff --git a/test/jsonld/1.1/expand/0066-out.jsonld b/test/jsonld/1.1/expand/0066-out.jsonld
new file mode 100644
index 000000000..4db1a0e8e
--- /dev/null
+++ b/test/jsonld/1.1/expand/0066-out.jsonld
@@ -0,0 +1,20 @@
+[
+ {
+ "@id": "http://example.com/people/markus",
+ "@reverse": {
+ "http://xmlns.com/foaf/0.1/knows": [
+ {
+ "@id": "http://example.com/people/dave",
+ "http://xmlns.com/foaf/0.1/name": [ { "@value": "Dave Longley" } ]
+ }
+ ],
+ "http://example.com/vocab/noTerm": [
+ {
+ "@id": "https://w3c.github.io/json-ld-api/tests/expand/relative-node",
+ "http://xmlns.com/foaf/0.1/name": [ { "@value": "Compact keys using @vocab" } ]
+ }
+ ]
+ },
+ "http://xmlns.com/foaf/0.1/name": [ { "@value": "Markus Lanthaler" } ]
+ }
+]
diff --git a/test/jsonld/1.1/expand/0067-in.jsonld b/test/jsonld/1.1/expand/0067-in.jsonld
new file mode 100644
index 000000000..a8e29a67b
--- /dev/null
+++ b/test/jsonld/1.1/expand/0067-in.jsonld
@@ -0,0 +1,8 @@
+{
+ "@context": {
+ "http": "http://example.com/this-prefix-would-overwrite-all-http-iris"
+ },
+ "@id": "http://example.org/node1",
+ "@type": "http://example.org/type",
+ "http://example.org/property": "all these IRIs remain unchanged because they are interpreted as absolute IRIs"
+}
diff --git a/test/jsonld/1.1/expand/0067-out.jsonld b/test/jsonld/1.1/expand/0067-out.jsonld
new file mode 100644
index 000000000..403b92c2c
--- /dev/null
+++ b/test/jsonld/1.1/expand/0067-out.jsonld
@@ -0,0 +1,9 @@
+[
+ {
+ "@id": "http://example.org/node1",
+ "@type": ["http://example.org/type"],
+ "http://example.org/property": [
+ { "@value": "all these IRIs remain unchanged because they are interpreted as absolute IRIs" }
+ ]
+ }
+]
diff --git a/test/jsonld/1.1/expand/0068-in.jsonld b/test/jsonld/1.1/expand/0068-in.jsonld
new file mode 100644
index 000000000..ab52e5e76
--- /dev/null
+++ b/test/jsonld/1.1/expand/0068-in.jsonld
@@ -0,0 +1,8 @@
+{
+ "@context": {
+ "_": "http://example.com/this-prefix-would-overwrite-all-blank-node-identifiers"
+ },
+ "@id": "_:node1",
+ "@type": "_:type",
+ "_:property": "all these IRIs remain unchanged because they are interpreted as blank node identifiers"
+}
diff --git a/test/jsonld/1.1/expand/0068-out.jsonld b/test/jsonld/1.1/expand/0068-out.jsonld
new file mode 100644
index 000000000..aa98b316b
--- /dev/null
+++ b/test/jsonld/1.1/expand/0068-out.jsonld
@@ -0,0 +1,9 @@
+[
+ {
+ "@id": "_:node1",
+ "@type": [ "_:type" ],
+ "_:property": [
+ { "@value": "all these IRIs remain unchanged because they are interpreted as blank node identifiers" }
+ ]
+ }
+]
diff --git a/test/jsonld/1.1/expand/0069-in.jsonld b/test/jsonld/1.1/expand/0069-in.jsonld
new file mode 100644
index 000000000..8f4a9aa95
--- /dev/null
+++ b/test/jsonld/1.1/expand/0069-in.jsonld
@@ -0,0 +1,9 @@
+{
+ "@context": {
+ "rdfs": "http://www.w3.org/2000/01/rdf-schema#",
+ "rdfs:subClassOf": { "@id": "rdfs:subClassOf", "@type": "@id" }
+ },
+ "@id": "http://example.com/vocab#class",
+ "@type": "rdfs:Class",
+ "rdfs:subClassOf": "http://example.com/vocab#someOtherClass"
+}
diff --git a/test/jsonld/1.1/expand/0069-out.jsonld b/test/jsonld/1.1/expand/0069-out.jsonld
new file mode 100644
index 000000000..4ca55346a
--- /dev/null
+++ b/test/jsonld/1.1/expand/0069-out.jsonld
@@ -0,0 +1,9 @@
+[
+ {
+ "@id": "http://example.com/vocab#class",
+ "@type": [ "http://www.w3.org/2000/01/rdf-schema#Class" ],
+ "http://www.w3.org/2000/01/rdf-schema#subClassOf": [
+ { "@id": "http://example.com/vocab#someOtherClass"}
+ ]
+ }
+]
diff --git a/test/jsonld/1.1/expand/0070-in.jsonld b/test/jsonld/1.1/expand/0070-in.jsonld
new file mode 100644
index 000000000..59733fb59
--- /dev/null
+++ b/test/jsonld/1.1/expand/0070-in.jsonld
@@ -0,0 +1,9 @@
+{
+ "@context": {
+ "prefix": "http://www.example.org/vocab#",
+ "prefix:foo": "prefix:foo"
+ },
+ "@id": "http://example.com/vocab#id",
+ "@type": "prefix:Class",
+ "prefix:foo": "bar"
+}
diff --git a/test/jsonld/1.1/expand/0070-out.jsonld b/test/jsonld/1.1/expand/0070-out.jsonld
new file mode 100644
index 000000000..ff650442d
--- /dev/null
+++ b/test/jsonld/1.1/expand/0070-out.jsonld
@@ -0,0 +1,9 @@
+[
+ {
+ "@id": "http://example.com/vocab#id",
+ "@type": [ "http://www.example.org/vocab#Class" ],
+ "http://www.example.org/vocab#foo": [
+ { "@value": "bar"}
+ ]
+ }
+]
diff --git a/test/jsonld/1.1/expand/0071-in.jsonld b/test/jsonld/1.1/expand/0071-in.jsonld
new file mode 100644
index 000000000..598c43fe6
--- /dev/null
+++ b/test/jsonld/1.1/expand/0071-in.jsonld
@@ -0,0 +1,15 @@
+{
+ "@context": [
+ {
+ "v": "http://example.com/vocab#",
+ "v:term": "v:somethingElse",
+ "v:termId": { "@id": "v:somethingElseId" }
+ },
+ {
+ "v:term": "v:term",
+ "v:termId": { "@id": "v:termId" }
+ }
+ ],
+ "v:term": "value of v:term",
+ "v:termId": "value of v:termId"
+}
diff --git a/test/jsonld/1.1/expand/0071-out.jsonld b/test/jsonld/1.1/expand/0071-out.jsonld
new file mode 100644
index 000000000..b09249d5d
--- /dev/null
+++ b/test/jsonld/1.1/expand/0071-out.jsonld
@@ -0,0 +1,10 @@
+[
+ {
+ "http://example.com/vocab#term": [
+ { "@value": "value of v:term" }
+ ],
+ "http://example.com/vocab#termId": [
+ { "@value": "value of v:termId" }
+ ]
+ }
+]
diff --git a/test/jsonld/1.1/expand/0072-in.jsonld b/test/jsonld/1.1/expand/0072-in.jsonld
new file mode 100644
index 000000000..dcfa1b405
--- /dev/null
+++ b/test/jsonld/1.1/expand/0072-in.jsonld
@@ -0,0 +1,13 @@
+{
+ "@context": [
+ {
+ "v": "http://example.com/vocab#",
+ "term": "v:somethingElse"
+ },
+ {
+ "@vocab": "http://example.com/anotherVocab#",
+ "term": "term"
+ }
+ ],
+ "term": "value of term"
+}
diff --git a/test/jsonld/1.1/expand/0072-out.jsonld b/test/jsonld/1.1/expand/0072-out.jsonld
new file mode 100644
index 000000000..7be24c322
--- /dev/null
+++ b/test/jsonld/1.1/expand/0072-out.jsonld
@@ -0,0 +1,7 @@
+[
+ {
+ "http://example.com/anotherVocab#term": [
+ { "@value": "value of term" }
+ ]
+ }
+]
diff --git a/test/jsonld/1.1/expand/0073-in.jsonld b/test/jsonld/1.1/expand/0073-in.jsonld
new file mode 100644
index 000000000..78873bd85
--- /dev/null
+++ b/test/jsonld/1.1/expand/0073-in.jsonld
@@ -0,0 +1,16 @@
+{
+ "@id": "ex:node1",
+ "owl:sameAs": {
+ "@id": "ex:node2",
+ "rdfs:label": "Node 2",
+ "link": "ex:node3",
+ "@context": {
+ "rdfs": "http://www.w3.org/2000/01/rdf-schema#"
+ }
+ },
+ "@context": {
+ "ex": "http://example.org/",
+ "owl": "http://www.w3.org/2002/07/owl#",
+ "link": { "@id": "ex:link", "@type": "@id" }
+ }
+}
diff --git a/test/jsonld/1.1/expand/0073-out.jsonld b/test/jsonld/1.1/expand/0073-out.jsonld
new file mode 100644
index 000000000..7a8eefdae
--- /dev/null
+++ b/test/jsonld/1.1/expand/0073-out.jsonld
@@ -0,0 +1,14 @@
+[
+ {
+ "@id": "http://example.org/node1",
+ "http://www.w3.org/2002/07/owl#sameAs": [
+ {
+ "@id": "http://example.org/node2",
+ "http://example.org/link": [
+ { "@id": "http://example.org/node3" }
+ ],
+ "http://www.w3.org/2000/01/rdf-schema#label": [ { "@value": "Node 2" } ]
+ }
+ ]
+ }
+]
diff --git a/test/jsonld/1.1/expand/0074-in.jsonld b/test/jsonld/1.1/expand/0074-in.jsonld
new file mode 100644
index 000000000..070a328fd
--- /dev/null
+++ b/test/jsonld/1.1/expand/0074-in.jsonld
@@ -0,0 +1,19 @@
+{
+ "@context": {
+ "ex": "http://example.org/",
+ "owl": "http://www.w3.org/2002/07/owl#",
+ "link": {
+ "@id": "ex:link",
+ "@type": "@id"
+ }
+ },
+ "owl:sameAs": {
+ "@context": {
+ "rdfs": "http://www.w3.org/2000/01/rdf-schema#"
+ },
+ "rdfs:label": "Node 2",
+ "link": "ex:node3",
+ "@id": "ex:node2"
+ },
+ "@id": "ex:node1"
+}
diff --git a/test/jsonld/1.1/expand/0074-out.jsonld b/test/jsonld/1.1/expand/0074-out.jsonld
new file mode 100644
index 000000000..7a8eefdae
--- /dev/null
+++ b/test/jsonld/1.1/expand/0074-out.jsonld
@@ -0,0 +1,14 @@
+[
+ {
+ "@id": "http://example.org/node1",
+ "http://www.w3.org/2002/07/owl#sameAs": [
+ {
+ "@id": "http://example.org/node2",
+ "http://example.org/link": [
+ { "@id": "http://example.org/node3" }
+ ],
+ "http://www.w3.org/2000/01/rdf-schema#label": [ { "@value": "Node 2" } ]
+ }
+ ]
+ }
+]
diff --git a/test/jsonld/1.1/expand/0075-in.jsonld b/test/jsonld/1.1/expand/0075-in.jsonld
new file mode 100644
index 000000000..23dd106b1
--- /dev/null
+++ b/test/jsonld/1.1/expand/0075-in.jsonld
@@ -0,0 +1,8 @@
+{
+ "@context": {
+ "@vocab": "_:"
+ },
+ "@id": "ex:node1",
+ "b1": "blank node property 1",
+ "b2": "blank node property 1"
+}
diff --git a/test/jsonld/1.1/expand/0075-out.jsonld b/test/jsonld/1.1/expand/0075-out.jsonld
new file mode 100644
index 000000000..eac1f9200
--- /dev/null
+++ b/test/jsonld/1.1/expand/0075-out.jsonld
@@ -0,0 +1,7 @@
+[
+ {
+ "@id": "ex:node1",
+ "_:b1": [ { "@value": "blank node property 1" } ],
+ "_:b2": [ { "@value": "blank node property 1" } ]
+ }
+]
diff --git a/test/jsonld/1.1/expand/0076-in.jsonld b/test/jsonld/1.1/expand/0076-in.jsonld
new file mode 100644
index 000000000..8793b6227
--- /dev/null
+++ b/test/jsonld/1.1/expand/0076-in.jsonld
@@ -0,0 +1,4 @@
+{
+ "@id": "relative-iri",
+ "http://prop": "value"
+}
diff --git a/test/jsonld/1.1/expand/0076-out.jsonld b/test/jsonld/1.1/expand/0076-out.jsonld
new file mode 100644
index 000000000..9e0896bc5
--- /dev/null
+++ b/test/jsonld/1.1/expand/0076-out.jsonld
@@ -0,0 +1,4 @@
+[{
+ "@id": "http://example/base/relative-iri",
+ "http://prop": [{"@value": "value"}]
+}]
diff --git a/test/jsonld/1.1/expand/0077-context.jsonld b/test/jsonld/1.1/expand/0077-context.jsonld
new file mode 100644
index 000000000..79129cb20
--- /dev/null
+++ b/test/jsonld/1.1/expand/0077-context.jsonld
@@ -0,0 +1,11 @@
+{
+ "@context": {
+ "t1": "http://example.com/t1",
+ "t2": "http://example.com/t2",
+ "term1": "http://example.com/term1",
+ "term2": "http://example.com/term2",
+ "term3": "http://example.com/term3",
+ "term4": "http://example.com/term4",
+ "term5": "http://example.com/term5"
+ }
+}
diff --git a/test/jsonld/1.1/expand/0077-in.jsonld b/test/jsonld/1.1/expand/0077-in.jsonld
new file mode 100644
index 000000000..5c5741fd7
--- /dev/null
+++ b/test/jsonld/1.1/expand/0077-in.jsonld
@@ -0,0 +1,9 @@
+{
+ "@id": "http://example.com/id1",
+ "@type": "t1",
+ "term1": "v1",
+ "term2": {"@value": "v2", "@type": "t2"},
+ "term3": {"@value": "v3", "@language": "en"},
+ "term4": 4,
+ "term5": [50, 51]
+}
diff --git a/test/jsonld/1.1/expand/0077-out.jsonld b/test/jsonld/1.1/expand/0077-out.jsonld
new file mode 100644
index 000000000..cc8e658e1
--- /dev/null
+++ b/test/jsonld/1.1/expand/0077-out.jsonld
@@ -0,0 +1,9 @@
+[{
+ "@id": "http://example.com/id1",
+ "@type": ["http://example.com/t1"],
+ "http://example.com/term1": [{"@value": "v1"}],
+ "http://example.com/term2": [{"@value": "v2", "@type": "http://example.com/t2"}],
+ "http://example.com/term3": [{"@value": "v3", "@language": "en"}],
+ "http://example.com/term4": [{"@value": 4}],
+ "http://example.com/term5": [{"@value": 50}, {"@value": 51}]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/0078-in.jsonld b/test/jsonld/1.1/expand/0078-in.jsonld
new file mode 100644
index 000000000..0a0cf729c
--- /dev/null
+++ b/test/jsonld/1.1/expand/0078-in.jsonld
@@ -0,0 +1,29 @@
+{
+ "@context": {
+ "name": "http://example.com/vocab#name",
+ "children": { "@reverse": "http://example.com/vocab#parent" },
+ "pets": { "@reverse": "http://example.com/vocab#owner" }
+ },
+ "@id": "#homer",
+ "name": "Homer",
+ "children": [
+ {
+ "@id": "#bart",
+ "name": "Bart"
+ },
+ {
+ "@id": "#lisa",
+ "name": "Lisa"
+ }
+ ],
+ "pets": [
+ {
+ "@id": "#snowball-ii",
+ "name": "Snowball II"
+ },
+ {
+ "@id": "#santas-little-helper",
+ "name": "Santa's Little Helper"
+ }
+ ]
+}
diff --git a/test/jsonld/1.1/expand/0078-out.jsonld b/test/jsonld/1.1/expand/0078-out.jsonld
new file mode 100644
index 000000000..0c3a9e6b6
--- /dev/null
+++ b/test/jsonld/1.1/expand/0078-out.jsonld
@@ -0,0 +1,26 @@
+[{
+ "@id": "https://w3c.github.io/json-ld-api/tests/expand/0078-in.jsonld#homer",
+ "@reverse": {
+ "http://example.com/vocab#parent": [
+ {
+ "@id": "https://w3c.github.io/json-ld-api/tests/expand/0078-in.jsonld#bart",
+ "http://example.com/vocab#name": [ { "@value": "Bart" } ]
+ },
+ {
+ "@id": "https://w3c.github.io/json-ld-api/tests/expand/0078-in.jsonld#lisa",
+ "http://example.com/vocab#name": [ { "@value": "Lisa" } ]
+ }
+ ],
+ "http://example.com/vocab#owner": [
+ {
+ "@id": "https://w3c.github.io/json-ld-api/tests/expand/0078-in.jsonld#snowball-ii",
+ "http://example.com/vocab#name": [ { "@value": "Snowball II" } ]
+ },
+ {
+ "@id": "https://w3c.github.io/json-ld-api/tests/expand/0078-in.jsonld#santas-little-helper",
+ "http://example.com/vocab#name": [ { "@value": "Santa's Little Helper" } ]
+ }
+ ]
+ },
+ "http://example.com/vocab#name": [ { "@value": "Homer" } ]
+}]
diff --git a/test/jsonld/1.1/expand/0079-in.jsonld b/test/jsonld/1.1/expand/0079-in.jsonld
new file mode 100644
index 000000000..8514ced21
--- /dev/null
+++ b/test/jsonld/1.1/expand/0079-in.jsonld
@@ -0,0 +1,10 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "input": {"@id": "foo:input", "@container": "@graph"},
+ "value": "foo:value"
+ },
+ "input": {
+ "value": "x"
+ }
+}
diff --git a/test/jsonld/1.1/expand/0079-out.jsonld b/test/jsonld/1.1/expand/0079-out.jsonld
new file mode 100644
index 000000000..371662470
--- /dev/null
+++ b/test/jsonld/1.1/expand/0079-out.jsonld
@@ -0,0 +1,9 @@
+[{
+ "foo:input": [{
+ "@graph": [{
+ "foo:value": [{
+ "@value": "x"
+ }]
+ }]
+ }]
+}]
diff --git a/test/jsonld/1.1/expand/0080-in.jsonld b/test/jsonld/1.1/expand/0080-in.jsonld
new file mode 100644
index 000000000..098f86841
--- /dev/null
+++ b/test/jsonld/1.1/expand/0080-in.jsonld
@@ -0,0 +1,10 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "input": {"@id": "foo:input", "@container": ["@graph", "@set"]},
+ "value": "foo:value"
+ },
+ "input": [{
+ "value": "x"
+ }]
+}
diff --git a/test/jsonld/1.1/expand/0080-out.jsonld b/test/jsonld/1.1/expand/0080-out.jsonld
new file mode 100644
index 000000000..371662470
--- /dev/null
+++ b/test/jsonld/1.1/expand/0080-out.jsonld
@@ -0,0 +1,9 @@
+[{
+ "foo:input": [{
+ "@graph": [{
+ "foo:value": [{
+ "@value": "x"
+ }]
+ }]
+ }]
+}]
diff --git a/test/jsonld/1.1/expand/0081-in.jsonld b/test/jsonld/1.1/expand/0081-in.jsonld
new file mode 100644
index 000000000..d17429791
--- /dev/null
+++ b/test/jsonld/1.1/expand/0081-in.jsonld
@@ -0,0 +1,11 @@
+{
+ "@context": {
+ "@vocab": "http://example.org/",
+ "input": {"@container": "@graph"}
+ },
+ "input": {
+ "@graph": {
+ "value": "x"
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/0081-out.jsonld b/test/jsonld/1.1/expand/0081-out.jsonld
new file mode 100644
index 000000000..abbd82719
--- /dev/null
+++ b/test/jsonld/1.1/expand/0081-out.jsonld
@@ -0,0 +1,9 @@
+[{
+ "http://example.org/input": [{
+ "@graph": [{
+ "@graph": [{
+ "http://example.org/value": [{"@value": "x"}]
+ }]
+ }]
+ }]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/0082-in.jsonld b/test/jsonld/1.1/expand/0082-in.jsonld
new file mode 100644
index 000000000..83d3182ba
--- /dev/null
+++ b/test/jsonld/1.1/expand/0082-in.jsonld
@@ -0,0 +1,9 @@
+{
+ "@context": {
+ "@vocab": "http://example.org/",
+ "input": {"@container": ["@graph", "@index"]}
+ },
+ "input": {
+ "g1": {"value": "x"}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/0082-out.jsonld b/test/jsonld/1.1/expand/0082-out.jsonld
new file mode 100644
index 000000000..dfc5b0aa1
--- /dev/null
+++ b/test/jsonld/1.1/expand/0082-out.jsonld
@@ -0,0 +1,8 @@
+[{
+ "http://example.org/input": [{
+ "@index": "g1",
+ "@graph": [{
+ "http://example.org/value": [{"@value": "x"}]
+ }]
+ }]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/0083-in.jsonld b/test/jsonld/1.1/expand/0083-in.jsonld
new file mode 100644
index 000000000..71f8a50fe
--- /dev/null
+++ b/test/jsonld/1.1/expand/0083-in.jsonld
@@ -0,0 +1,9 @@
+{
+ "@context": {
+ "@vocab": "http://example.org/",
+ "input": {"@container": ["@graph", "@index", "@set"]}
+ },
+ "input": {
+ "g1": {"value": "x"}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/0083-out.jsonld b/test/jsonld/1.1/expand/0083-out.jsonld
new file mode 100644
index 000000000..dfc5b0aa1
--- /dev/null
+++ b/test/jsonld/1.1/expand/0083-out.jsonld
@@ -0,0 +1,8 @@
+[{
+ "http://example.org/input": [{
+ "@index": "g1",
+ "@graph": [{
+ "http://example.org/value": [{"@value": "x"}]
+ }]
+ }]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/0084-in.jsonld b/test/jsonld/1.1/expand/0084-in.jsonld
new file mode 100644
index 000000000..0026a778b
--- /dev/null
+++ b/test/jsonld/1.1/expand/0084-in.jsonld
@@ -0,0 +1,13 @@
+{
+ "@context": {
+ "@vocab": "http://example.org/",
+ "input": {"@container": ["@graph", "@index"]}
+ },
+ "input": {
+ "g1": {
+ "@graph": {
+ "value": "x"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/0084-out.jsonld b/test/jsonld/1.1/expand/0084-out.jsonld
new file mode 100644
index 000000000..dfc5b0aa1
--- /dev/null
+++ b/test/jsonld/1.1/expand/0084-out.jsonld
@@ -0,0 +1,8 @@
+[{
+ "http://example.org/input": [{
+ "@index": "g1",
+ "@graph": [{
+ "http://example.org/value": [{"@value": "x"}]
+ }]
+ }]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/0085-in.jsonld b/test/jsonld/1.1/expand/0085-in.jsonld
new file mode 100644
index 000000000..3cd17bc25
--- /dev/null
+++ b/test/jsonld/1.1/expand/0085-in.jsonld
@@ -0,0 +1,9 @@
+{
+ "@context": {
+ "@vocab": "http://example.org/",
+ "input": {"@container": ["@graph", "@id"]}
+ },
+ "input": {
+ "http://example.com/g1": {"value": "x"}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/0085-out.jsonld b/test/jsonld/1.1/expand/0085-out.jsonld
new file mode 100644
index 000000000..7cb99fca1
--- /dev/null
+++ b/test/jsonld/1.1/expand/0085-out.jsonld
@@ -0,0 +1,8 @@
+[{
+ "http://example.org/input": [{
+ "@id": "http://example.com/g1",
+ "@graph": [{
+ "http://example.org/value": [{"@value": "x"}]
+ }]
+ }]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/0086-in.jsonld b/test/jsonld/1.1/expand/0086-in.jsonld
new file mode 100644
index 000000000..27ea6de71
--- /dev/null
+++ b/test/jsonld/1.1/expand/0086-in.jsonld
@@ -0,0 +1,9 @@
+{
+ "@context": {
+ "@vocab": "http://example.org/",
+ "input": {"@container": ["@graph", "@id", "@set"]}
+ },
+ "input": {
+ "http://example.com/g1": {"value": "x"}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/0086-out.jsonld b/test/jsonld/1.1/expand/0086-out.jsonld
new file mode 100644
index 000000000..7cb99fca1
--- /dev/null
+++ b/test/jsonld/1.1/expand/0086-out.jsonld
@@ -0,0 +1,8 @@
+[{
+ "http://example.org/input": [{
+ "@id": "http://example.com/g1",
+ "@graph": [{
+ "http://example.org/value": [{"@value": "x"}]
+ }]
+ }]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/0087-in.jsonld b/test/jsonld/1.1/expand/0087-in.jsonld
new file mode 100644
index 000000000..aa994f300
--- /dev/null
+++ b/test/jsonld/1.1/expand/0087-in.jsonld
@@ -0,0 +1,13 @@
+{
+ "@context": {
+ "@vocab": "http://example.org/",
+ "input": {"@container": ["@graph", "@id"]}
+ },
+ "input": {
+ "http://example.com/g1": {
+ "@graph": {
+ "value": "x"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/0087-out.jsonld b/test/jsonld/1.1/expand/0087-out.jsonld
new file mode 100644
index 000000000..7cb99fca1
--- /dev/null
+++ b/test/jsonld/1.1/expand/0087-out.jsonld
@@ -0,0 +1,8 @@
+[{
+ "http://example.org/input": [{
+ "@id": "http://example.com/g1",
+ "@graph": [{
+ "http://example.org/value": [{"@value": "x"}]
+ }]
+ }]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/0088-in.jsonld b/test/jsonld/1.1/expand/0088-in.jsonld
new file mode 100644
index 000000000..c0c20a1a3
--- /dev/null
+++ b/test/jsonld/1.1/expand/0088-in.jsonld
@@ -0,0 +1,11 @@
+{
+ "@context": {
+ "@vocab": "http://example.org/",
+ "@base": "http://example.com/",
+ "coerceId": {"@type": "@id"},
+ "coerceVocab": {"@type": "@vocab"}
+ },
+ "coerceDefault": ["string", true, false, 0, 1],
+ "coerceId": ["string", true, false, 0, 1],
+ "coerceVocab": ["string", true, false, 0, 1]
+}
diff --git a/test/jsonld/1.1/expand/0088-out.jsonld b/test/jsonld/1.1/expand/0088-out.jsonld
new file mode 100644
index 000000000..650d292d6
--- /dev/null
+++ b/test/jsonld/1.1/expand/0088-out.jsonld
@@ -0,0 +1,25 @@
+[
+ {
+ "http://example.org/coerceDefault": [
+ {"@value": "string"},
+ {"@value": true},
+ {"@value": false},
+ {"@value": 0},
+ {"@value": 1}
+ ],
+ "http://example.org/coerceId": [
+ {"@id": "http://example.com/string"},
+ {"@value": true},
+ {"@value": false},
+ {"@value": 0},
+ {"@value": 1}
+ ],
+ "http://example.org/coerceVocab": [
+ {"@id": "http://example.org/string"},
+ {"@value": true},
+ {"@value": false},
+ {"@value": 0},
+ {"@value": 1}
+ ]
+ }
+]
diff --git a/test/jsonld/1.1/expand/0089-in.jsonld b/test/jsonld/1.1/expand/0089-in.jsonld
new file mode 100644
index 000000000..7a6dcd8d5
--- /dev/null
+++ b/test/jsonld/1.1/expand/0089-in.jsonld
@@ -0,0 +1,7 @@
+{
+ "@context": {
+ "@base": ""
+ },
+ "@id": "relative-iri",
+ "http://prop": "value"
+}
diff --git a/test/jsonld/1.1/expand/0089-out.jsonld b/test/jsonld/1.1/expand/0089-out.jsonld
new file mode 100644
index 000000000..9e0896bc5
--- /dev/null
+++ b/test/jsonld/1.1/expand/0089-out.jsonld
@@ -0,0 +1,4 @@
+[{
+ "@id": "http://example/base/relative-iri",
+ "http://prop": [{"@value": "value"}]
+}]
diff --git a/test/jsonld/1.1/expand/0090-in.jsonld b/test/jsonld/1.1/expand/0090-in.jsonld
new file mode 100644
index 000000000..0853f89e8
--- /dev/null
+++ b/test/jsonld/1.1/expand/0090-in.jsonld
@@ -0,0 +1,7 @@
+{
+ "@context": {
+ "@base": ".."
+ },
+ "@id": "relative-iri",
+ "http://prop": "value"
+}
diff --git a/test/jsonld/1.1/expand/0090-out.jsonld b/test/jsonld/1.1/expand/0090-out.jsonld
new file mode 100644
index 000000000..299385987
--- /dev/null
+++ b/test/jsonld/1.1/expand/0090-out.jsonld
@@ -0,0 +1,4 @@
+[{
+ "@id": "http://example/relative-iri",
+ "http://prop": [{"@value": "value"}]
+}]
diff --git a/test/jsonld/1.1/expand/0091-in.jsonld b/test/jsonld/1.1/expand/0091-in.jsonld
new file mode 100644
index 000000000..bad0f06bd
--- /dev/null
+++ b/test/jsonld/1.1/expand/0091-in.jsonld
@@ -0,0 +1,9 @@
+{
+ "@context": [{
+ "@base": "http://foo.bar/./baz/"
+ }, {
+ "@base": "example/"
+ }],
+ "@id": "relative-iri",
+ "http://prop": "value"
+}
diff --git a/test/jsonld/1.1/expand/0091-out.jsonld b/test/jsonld/1.1/expand/0091-out.jsonld
new file mode 100644
index 000000000..638d6ee7e
--- /dev/null
+++ b/test/jsonld/1.1/expand/0091-out.jsonld
@@ -0,0 +1,4 @@
+[{
+ "@id": "http://foo.bar/baz/example/relative-iri",
+ "http://prop": [{"@value": "value"}]
+}]
diff --git a/test/jsonld/1.1/expand/0092-in.jsonld b/test/jsonld/1.1/expand/0092-in.jsonld
new file mode 100644
index 000000000..d7ed55e12
--- /dev/null
+++ b/test/jsonld/1.1/expand/0092-in.jsonld
@@ -0,0 +1,18 @@
+{
+ "@context": {
+ "@base": "http://example.com/some/deep/directory/and/file/",
+ "@vocab": ""
+ },
+ "@id": "relativePropertyIris",
+ "link": "link",
+ "#fragment-works": "#fragment-works",
+ "?query=works": "?query=works",
+ "./": "./",
+ "../": "../",
+ "../parent": "../parent",
+ "../../parent-parent-eq-root": "../../parent-parent-eq-root",
+ "../../../../../still-root": "../../../../../still-root",
+ "../.././.././../../too-many-dots": "../.././.././../../too-many-dots",
+ "/absolute": "/absolute",
+ "//example.org/scheme-relative": "//example.org/scheme-relative"
+}
diff --git a/test/jsonld/1.1/expand/0092-out.jsonld b/test/jsonld/1.1/expand/0092-out.jsonld
new file mode 100644
index 000000000..a8540122c
--- /dev/null
+++ b/test/jsonld/1.1/expand/0092-out.jsonld
@@ -0,0 +1,16 @@
+[
+ {
+ "@id": "http://example.com/some/deep/directory/and/file/relativePropertyIris",
+ "http://example.com/some/deep/directory/and/file/#fragment-works": [{"@value": "#fragment-works"}],
+ "http://example.com/some/deep/directory/and/file/../": [{"@value": "../"}],
+ "http://example.com/some/deep/directory/and/file/../../../../../still-root": [{"@value": "../../../../../still-root"}],
+ "http://example.com/some/deep/directory/and/file/../.././.././../../too-many-dots": [{"@value": "../.././.././../../too-many-dots"}],
+ "http://example.com/some/deep/directory/and/file/../../parent-parent-eq-root": [{"@value": "../../parent-parent-eq-root"}],
+ "http://example.com/some/deep/directory/and/file/../parent": [{"@value": "../parent"}],
+ "http://example.com/some/deep/directory/and/file/./": [{"@value": "./"}],
+ "http://example.com/some/deep/directory/and/file///example.org/scheme-relative": [{"@value": "//example.org/scheme-relative"}],
+ "http://example.com/some/deep/directory/and/file//absolute": [{"@value": "/absolute"}],
+ "http://example.com/some/deep/directory/and/file/?query=works": [{"@value": "?query=works"}],
+ "http://example.com/some/deep/directory/and/file/link": [{"@value": "link"}]
+ }
+]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/0093-in.jsonld b/test/jsonld/1.1/expand/0093-in.jsonld
new file mode 100644
index 000000000..b32c09491
--- /dev/null
+++ b/test/jsonld/1.1/expand/0093-in.jsonld
@@ -0,0 +1,12 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "input": {"@id": "foo:input", "@container": "@graph"},
+ "value": "foo:value"
+ },
+ "input": [{
+ "value": "x"
+ }, {
+ "value": "y"
+ }]
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/0093-out.jsonld b/test/jsonld/1.1/expand/0093-out.jsonld
new file mode 100644
index 000000000..5e4e5bd9a
--- /dev/null
+++ b/test/jsonld/1.1/expand/0093-out.jsonld
@@ -0,0 +1,15 @@
+[{
+ "foo:input": [{
+ "@graph": [{
+ "foo:value": [{
+ "@value": "x"
+ }]
+ }]
+ }, {
+ "@graph": [{
+ "foo:value": [{
+ "@value": "y"
+ }]
+ }]
+ }]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/0094-in.jsonld b/test/jsonld/1.1/expand/0094-in.jsonld
new file mode 100644
index 000000000..2e0dc6247
--- /dev/null
+++ b/test/jsonld/1.1/expand/0094-in.jsonld
@@ -0,0 +1,12 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "input": {"@id": "foo:input", "@container": ["@graph", "@set"]},
+ "value": "foo:value"
+ },
+ "input": [{
+ "value": "x"
+ }, {
+ "value": "y"
+ }]
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/0094-out.jsonld b/test/jsonld/1.1/expand/0094-out.jsonld
new file mode 100644
index 000000000..5e4e5bd9a
--- /dev/null
+++ b/test/jsonld/1.1/expand/0094-out.jsonld
@@ -0,0 +1,15 @@
+[{
+ "foo:input": [{
+ "@graph": [{
+ "foo:value": [{
+ "@value": "x"
+ }]
+ }]
+ }, {
+ "@graph": [{
+ "foo:value": [{
+ "@value": "y"
+ }]
+ }]
+ }]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/0095-in.jsonld b/test/jsonld/1.1/expand/0095-in.jsonld
new file mode 100644
index 000000000..bf1c08247
--- /dev/null
+++ b/test/jsonld/1.1/expand/0095-in.jsonld
@@ -0,0 +1,15 @@
+{
+ "@context": {
+ "@vocab": "http://example.org/",
+ "input": {"@container": "@graph"}
+ },
+ "input": [{
+ "@graph": {
+ "value": "x"
+ }
+ }, {
+ "@graph": {
+ "value": "y"
+ }
+ }]
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/0095-out.jsonld b/test/jsonld/1.1/expand/0095-out.jsonld
new file mode 100644
index 000000000..f49ef46f7
--- /dev/null
+++ b/test/jsonld/1.1/expand/0095-out.jsonld
@@ -0,0 +1,11 @@
+[{
+ "http://example.org/input": [{
+ "@graph": [{
+ "@graph": [{"http://example.org/value": [{"@value": "x"}]}]
+ }]
+ }, {
+ "@graph": [{
+ "@graph": [{"http://example.org/value": [{"@value": "y"}]}]
+ }]
+ }]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/0096-in.jsonld b/test/jsonld/1.1/expand/0096-in.jsonld
new file mode 100644
index 000000000..4c7c6f452
--- /dev/null
+++ b/test/jsonld/1.1/expand/0096-in.jsonld
@@ -0,0 +1,10 @@
+{
+ "@context": {
+ "@vocab": "http://example.org/",
+ "input": {"@container": ["@graph", "@index"]}
+ },
+ "input": {
+ "g1": {"value": "x"},
+ "g2": {"value": "y"}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/0096-out.jsonld b/test/jsonld/1.1/expand/0096-out.jsonld
new file mode 100644
index 000000000..6788bb490
--- /dev/null
+++ b/test/jsonld/1.1/expand/0096-out.jsonld
@@ -0,0 +1,13 @@
+[{
+ "http://example.org/input": [{
+ "@index": "g1",
+ "@graph": [{
+ "http://example.org/value": [{"@value": "x"}]
+ }]
+ }, {
+ "@index": "g2",
+ "@graph": [{
+ "http://example.org/value": [{"@value": "y"}]
+ }]
+ }]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/0097-in.jsonld b/test/jsonld/1.1/expand/0097-in.jsonld
new file mode 100644
index 000000000..dc5b90030
--- /dev/null
+++ b/test/jsonld/1.1/expand/0097-in.jsonld
@@ -0,0 +1,10 @@
+{
+ "@context": {
+ "@vocab": "http://example.org/",
+ "input": {"@container": ["@graph", "@index", "@set"]}
+ },
+ "input": {
+ "g1": {"value": "x"},
+ "g2": {"value": "y"}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/0097-out.jsonld b/test/jsonld/1.1/expand/0097-out.jsonld
new file mode 100644
index 000000000..6788bb490
--- /dev/null
+++ b/test/jsonld/1.1/expand/0097-out.jsonld
@@ -0,0 +1,13 @@
+[{
+ "http://example.org/input": [{
+ "@index": "g1",
+ "@graph": [{
+ "http://example.org/value": [{"@value": "x"}]
+ }]
+ }, {
+ "@index": "g2",
+ "@graph": [{
+ "http://example.org/value": [{"@value": "y"}]
+ }]
+ }]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/0098-in.jsonld b/test/jsonld/1.1/expand/0098-in.jsonld
new file mode 100644
index 000000000..27ae04b7d
--- /dev/null
+++ b/test/jsonld/1.1/expand/0098-in.jsonld
@@ -0,0 +1,10 @@
+{
+ "@context": {
+ "@vocab": "http://example.org/",
+ "input": {"@container": ["@graph", "@index"]}
+ },
+ "input": {
+ "g1": {"@graph": {"value": "x"}},
+ "g2": {"@graph": {"value": "y"}}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/0098-out.jsonld b/test/jsonld/1.1/expand/0098-out.jsonld
new file mode 100644
index 000000000..6788bb490
--- /dev/null
+++ b/test/jsonld/1.1/expand/0098-out.jsonld
@@ -0,0 +1,13 @@
+[{
+ "http://example.org/input": [{
+ "@index": "g1",
+ "@graph": [{
+ "http://example.org/value": [{"@value": "x"}]
+ }]
+ }, {
+ "@index": "g2",
+ "@graph": [{
+ "http://example.org/value": [{"@value": "y"}]
+ }]
+ }]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/0099-in.jsonld b/test/jsonld/1.1/expand/0099-in.jsonld
new file mode 100644
index 000000000..0010e0aa0
--- /dev/null
+++ b/test/jsonld/1.1/expand/0099-in.jsonld
@@ -0,0 +1,10 @@
+{
+ "@context": {
+ "@vocab": "http://example.org/",
+ "input": {"@container": ["@graph", "@id"]}
+ },
+ "input": {
+ "http://example.com/g1": {"value": "x"},
+ "http://example.com/g2": {"value": "y"}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/0099-out.jsonld b/test/jsonld/1.1/expand/0099-out.jsonld
new file mode 100644
index 000000000..45ce037ee
--- /dev/null
+++ b/test/jsonld/1.1/expand/0099-out.jsonld
@@ -0,0 +1,13 @@
+[{
+ "http://example.org/input": [{
+ "@id": "http://example.com/g1",
+ "@graph": [{
+ "http://example.org/value": [{"@value": "x"}]
+ }]
+ }, {
+ "@id": "http://example.com/g2",
+ "@graph": [{
+ "http://example.org/value": [{"@value": "y"}]
+ }]
+ }]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/0100-in.jsonld b/test/jsonld/1.1/expand/0100-in.jsonld
new file mode 100644
index 000000000..43d3528ff
--- /dev/null
+++ b/test/jsonld/1.1/expand/0100-in.jsonld
@@ -0,0 +1,10 @@
+{
+ "@context": {
+ "@vocab": "http://example.org/",
+ "input": {"@container": ["@graph", "@id", "@set"]}
+ },
+ "input": {
+ "http://example.com/g1": {"value": "x"},
+ "http://example.com/g2": {"value": "y"}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/0100-out.jsonld b/test/jsonld/1.1/expand/0100-out.jsonld
new file mode 100644
index 000000000..45ce037ee
--- /dev/null
+++ b/test/jsonld/1.1/expand/0100-out.jsonld
@@ -0,0 +1,13 @@
+[{
+ "http://example.org/input": [{
+ "@id": "http://example.com/g1",
+ "@graph": [{
+ "http://example.org/value": [{"@value": "x"}]
+ }]
+ }, {
+ "@id": "http://example.com/g2",
+ "@graph": [{
+ "http://example.org/value": [{"@value": "y"}]
+ }]
+ }]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/0101-in.jsonld b/test/jsonld/1.1/expand/0101-in.jsonld
new file mode 100644
index 000000000..cf6055659
--- /dev/null
+++ b/test/jsonld/1.1/expand/0101-in.jsonld
@@ -0,0 +1,18 @@
+{
+ "@context": {
+ "@vocab": "http://example.org/",
+ "input": {"@container": ["@graph", "@id"]}
+ },
+ "input": {
+ "http://example.com/g1": {
+ "@graph": {
+ "value": "x"
+ }
+ },
+ "http://example.com/g2": {
+ "@graph": {
+ "value": "y"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/0101-out.jsonld b/test/jsonld/1.1/expand/0101-out.jsonld
new file mode 100644
index 000000000..45ce037ee
--- /dev/null
+++ b/test/jsonld/1.1/expand/0101-out.jsonld
@@ -0,0 +1,13 @@
+[{
+ "http://example.org/input": [{
+ "@id": "http://example.com/g1",
+ "@graph": [{
+ "http://example.org/value": [{"@value": "x"}]
+ }]
+ }, {
+ "@id": "http://example.com/g2",
+ "@graph": [{
+ "http://example.org/value": [{"@value": "y"}]
+ }]
+ }]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/0102-in.jsonld b/test/jsonld/1.1/expand/0102-in.jsonld
new file mode 100644
index 000000000..cac7b7f61
--- /dev/null
+++ b/test/jsonld/1.1/expand/0102-in.jsonld
@@ -0,0 +1,13 @@
+{
+ "@context": {
+ "@vocab": "http://example.org/",
+ "input": {"@container": "@graph"}
+ },
+ "input": {
+ "@graph": [{
+ "value": "x"
+ }, {
+ "value": "y"
+ }]
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/0102-out.jsonld b/test/jsonld/1.1/expand/0102-out.jsonld
new file mode 100644
index 000000000..25c0f50ee
--- /dev/null
+++ b/test/jsonld/1.1/expand/0102-out.jsonld
@@ -0,0 +1,13 @@
+[{
+ "http://example.org/input": [
+ {
+ "@graph": [{
+ "@graph": [{
+ "http://example.org/value": [{"@value": "x"}]
+ }, {
+ "http://example.org/value": [{"@value": "y"}]
+ }]
+ }]
+ }
+ ]
+}]
diff --git a/test/jsonld/1.1/expand/0103-in.jsonld b/test/jsonld/1.1/expand/0103-in.jsonld
new file mode 100644
index 000000000..bf1c08247
--- /dev/null
+++ b/test/jsonld/1.1/expand/0103-in.jsonld
@@ -0,0 +1,15 @@
+{
+ "@context": {
+ "@vocab": "http://example.org/",
+ "input": {"@container": "@graph"}
+ },
+ "input": [{
+ "@graph": {
+ "value": "x"
+ }
+ }, {
+ "@graph": {
+ "value": "y"
+ }
+ }]
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/0103-out.jsonld b/test/jsonld/1.1/expand/0103-out.jsonld
new file mode 100644
index 000000000..5c29ced10
--- /dev/null
+++ b/test/jsonld/1.1/expand/0103-out.jsonld
@@ -0,0 +1,13 @@
+[{
+ "http://example.org/input": [
+ {
+ "@graph": [{
+ "@graph": [{"http://example.org/value": [{"@value": "x"}]}]
+ }]
+ }, {
+ "@graph": [{
+ "@graph": [{"http://example.org/value": [{"@value": "y"}]}]
+ }]
+ }
+ ]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/0104-in.jsonld b/test/jsonld/1.1/expand/0104-in.jsonld
new file mode 100644
index 000000000..7e8d19c36
--- /dev/null
+++ b/test/jsonld/1.1/expand/0104-in.jsonld
@@ -0,0 +1,10 @@
+{
+ "@context": {
+ "@vocab": "http://example.org/",
+ "input": {"@container": "@graph"}
+ },
+ "input": [
+ {"@graph": {"value": "x"}},
+ {"value": "y"}
+ ]
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/0104-out.jsonld b/test/jsonld/1.1/expand/0104-out.jsonld
new file mode 100644
index 000000000..77761d9b4
--- /dev/null
+++ b/test/jsonld/1.1/expand/0104-out.jsonld
@@ -0,0 +1,13 @@
+[{
+ "http://example.org/input": [
+ {
+ "@graph": [{
+ "@graph": [{"http://example.org/value": [{"@value": "x"}]}]
+ }]
+ }, {
+ "@graph": [{
+ "http://example.org/value": [{"@value": "y"}]
+ }]
+ }
+ ]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/0105-in.jsonld b/test/jsonld/1.1/expand/0105-in.jsonld
new file mode 100644
index 000000000..bcad0c63c
--- /dev/null
+++ b/test/jsonld/1.1/expand/0105-in.jsonld
@@ -0,0 +1,10 @@
+{
+ "@context": {
+ "@vocab": "http://example.org/",
+ "input": {"@container": ["@graph", "@index"]}
+ },
+ "input": {
+ "g1": [{"@graph": {"value": "x"}}, {"value": "y"}],
+ "g2": [{"@graph": {"value": "a"}}, {"value": "b"}]
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/0105-out.jsonld b/test/jsonld/1.1/expand/0105-out.jsonld
new file mode 100644
index 000000000..27d2cd885
--- /dev/null
+++ b/test/jsonld/1.1/expand/0105-out.jsonld
@@ -0,0 +1,23 @@
+[{
+ "http://example.org/input": [{
+ "@index": "g1",
+ "@graph": [{
+ "http://example.org/value": [{"@value": "x"}]
+ }]
+ }, {
+ "@index": "g1",
+ "@graph": [{
+ "http://example.org/value": [{"@value": "y"}]
+ }]
+ }, {
+ "@index": "g2",
+ "@graph": [{
+ "http://example.org/value": [{"@value": "a"}]
+ }]
+ }, {
+ "@index": "g2",
+ "@graph": [{
+ "http://example.org/value": [{"@value": "b"}]
+ }]
+ }]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/0106-in.jsonld b/test/jsonld/1.1/expand/0106-in.jsonld
new file mode 100644
index 000000000..cf6055659
--- /dev/null
+++ b/test/jsonld/1.1/expand/0106-in.jsonld
@@ -0,0 +1,18 @@
+{
+ "@context": {
+ "@vocab": "http://example.org/",
+ "input": {"@container": ["@graph", "@id"]}
+ },
+ "input": {
+ "http://example.com/g1": {
+ "@graph": {
+ "value": "x"
+ }
+ },
+ "http://example.com/g2": {
+ "@graph": {
+ "value": "y"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/0106-out.jsonld b/test/jsonld/1.1/expand/0106-out.jsonld
new file mode 100644
index 000000000..45ce037ee
--- /dev/null
+++ b/test/jsonld/1.1/expand/0106-out.jsonld
@@ -0,0 +1,13 @@
+[{
+ "http://example.org/input": [{
+ "@id": "http://example.com/g1",
+ "@graph": [{
+ "http://example.org/value": [{"@value": "x"}]
+ }]
+ }, {
+ "@id": "http://example.com/g2",
+ "@graph": [{
+ "http://example.org/value": [{"@value": "y"}]
+ }]
+ }]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/0107-in.jsonld b/test/jsonld/1.1/expand/0107-in.jsonld
new file mode 100644
index 000000000..3e1c5afa7
--- /dev/null
+++ b/test/jsonld/1.1/expand/0107-in.jsonld
@@ -0,0 +1,10 @@
+{
+ "@context": {
+ "@vocab": "http://example.org/",
+ "input": {"@container": ["@graph", "@index"]}
+ },
+ "input": {
+ "g1": [{"value": "x"}, {"value": "y"}],
+ "g2": [{"value": "a"}, {"value": "b"}]
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/0107-out.jsonld b/test/jsonld/1.1/expand/0107-out.jsonld
new file mode 100644
index 000000000..27d2cd885
--- /dev/null
+++ b/test/jsonld/1.1/expand/0107-out.jsonld
@@ -0,0 +1,23 @@
+[{
+ "http://example.org/input": [{
+ "@index": "g1",
+ "@graph": [{
+ "http://example.org/value": [{"@value": "x"}]
+ }]
+ }, {
+ "@index": "g1",
+ "@graph": [{
+ "http://example.org/value": [{"@value": "y"}]
+ }]
+ }, {
+ "@index": "g2",
+ "@graph": [{
+ "http://example.org/value": [{"@value": "a"}]
+ }]
+ }, {
+ "@index": "g2",
+ "@graph": [{
+ "http://example.org/value": [{"@value": "b"}]
+ }]
+ }]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/0108-in.jsonld b/test/jsonld/1.1/expand/0108-in.jsonld
new file mode 100644
index 000000000..182c031d9
--- /dev/null
+++ b/test/jsonld/1.1/expand/0108-in.jsonld
@@ -0,0 +1,10 @@
+{
+ "@context": {
+ "@vocab": "http://example.org/",
+ "input": {"@container": ["@graph", "@id"]}
+ },
+ "input": {
+ "http://example.com/g1": [{"value": "x"}, {"value": "y"}],
+ "http://example.com/g2": [{"value": "a"}, {"value": "b"}]
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/0108-out.jsonld b/test/jsonld/1.1/expand/0108-out.jsonld
new file mode 100644
index 000000000..a11e1d720
--- /dev/null
+++ b/test/jsonld/1.1/expand/0108-out.jsonld
@@ -0,0 +1,23 @@
+[{
+ "http://example.org/input": [{
+ "@id": "http://example.com/g1",
+ "@graph": [{
+ "http://example.org/value": [{"@value": "x"}]
+ }]
+ }, {
+ "@id": "http://example.com/g1",
+ "@graph": [{
+ "http://example.org/value": [{"@value": "y"}]
+ }]
+ }, {
+ "@id": "http://example.com/g2",
+ "@graph": [{
+ "http://example.org/value": [{"@value": "a"}]
+ }]
+ }, {
+ "@id": "http://example.com/g2",
+ "@graph": [{
+ "http://example.org/value": [{"@value": "b"}]
+ }]
+ }]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/0109-in.jsonld b/test/jsonld/1.1/expand/0109-in.jsonld
new file mode 100644
index 000000000..7fa226584
--- /dev/null
+++ b/test/jsonld/1.1/expand/0109-in.jsonld
@@ -0,0 +1,7 @@
+{
+ "@context": {
+ "@base": "https://ex.org/",
+ "u": {"@id": "urn:u:", "@type": "@id"}
+ },
+ "u": ["#Test", "#Test:2"]
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/0109-out.jsonld b/test/jsonld/1.1/expand/0109-out.jsonld
new file mode 100644
index 000000000..3a632e056
--- /dev/null
+++ b/test/jsonld/1.1/expand/0109-out.jsonld
@@ -0,0 +1,6 @@
+[{
+ "urn:u:": [
+ {"@id": "https://ex.org/#Test"},
+ {"@id": "https://ex.org/#Test:2"}
+ ]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/0110-in.jsonld b/test/jsonld/1.1/expand/0110-in.jsonld
new file mode 100644
index 000000000..a6f1e676a
--- /dev/null
+++ b/test/jsonld/1.1/expand/0110-in.jsonld
@@ -0,0 +1,18 @@
+{
+ "@context": {
+ "@base": "http://example.com/some/deep/directory/and/file/",
+ "@vocab": "/relative"
+ },
+ "@id": "relativePropertyIris",
+ "link": "link",
+ "#fragment-works": "#fragment-works",
+ "?query=works": "?query=works",
+ "./": "./",
+ "../": "../",
+ "../parent": "../parent",
+ "../../parent-parent-eq-root": "../../parent-parent-eq-root",
+ "../../../../../still-root": "../../../../../still-root",
+ "../.././.././../../too-many-dots": "../.././.././../../too-many-dots",
+ "/absolute": "/absolute",
+ "//example.org/scheme-relative": "//example.org/scheme-relative"
+}
diff --git a/test/jsonld/1.1/expand/0110-out.jsonld b/test/jsonld/1.1/expand/0110-out.jsonld
new file mode 100644
index 000000000..c93ab5eaa
--- /dev/null
+++ b/test/jsonld/1.1/expand/0110-out.jsonld
@@ -0,0 +1,16 @@
+[
+ {
+ "@id": "http://example.com/some/deep/directory/and/file/relativePropertyIris",
+ "http://example.com/relative#fragment-works": [{"@value": "#fragment-works"}],
+ "http://example.com/relative../": [{"@value": "../"}],
+ "http://example.com/relative../../../../../still-root": [{"@value": "../../../../../still-root"}],
+ "http://example.com/relative../.././.././../../too-many-dots": [{"@value": "../.././.././../../too-many-dots"}],
+ "http://example.com/relative../../parent-parent-eq-root": [{"@value": "../../parent-parent-eq-root"}],
+ "http://example.com/relative../parent": [{"@value": "../parent"}],
+ "http://example.com/relative./": [{"@value": "./"}],
+ "http://example.com/relative//example.org/scheme-relative": [{"@value": "//example.org/scheme-relative"}],
+ "http://example.com/relative/absolute": [{"@value": "/absolute"}],
+ "http://example.com/relative?query=works": [{"@value": "?query=works"}],
+ "http://example.com/relativelink": [{"@value": "link"}]
+ }
+]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/0111-in.jsonld b/test/jsonld/1.1/expand/0111-in.jsonld
new file mode 100644
index 000000000..f5118d3ff
--- /dev/null
+++ b/test/jsonld/1.1/expand/0111-in.jsonld
@@ -0,0 +1,21 @@
+{
+ "@context": [{
+ "@version": 1.1,
+ "@base": "http://example.com/some/deep/directory/and/file/",
+ "@vocab": "http://example.com/vocabulary/"
+ }, {
+ "@vocab": "./rel2#"
+ }],
+ "@id": "relativePropertyIris",
+ "link": "link",
+ "#fragment-works": "#fragment-works",
+ "?query=works": "?query=works",
+ "./": "./",
+ "../": "../",
+ "../parent": "../parent",
+ "../../parent-parent-eq-root": "../../parent-parent-eq-root",
+ "../../../../../still-root": "../../../../../still-root",
+ "../.././.././../../too-many-dots": "../.././.././../../too-many-dots",
+ "/absolute": "/absolute",
+ "//example.org/scheme-relative": "//example.org/scheme-relative"
+}
diff --git a/test/jsonld/1.1/expand/0111-out.jsonld b/test/jsonld/1.1/expand/0111-out.jsonld
new file mode 100644
index 000000000..8febce3bb
--- /dev/null
+++ b/test/jsonld/1.1/expand/0111-out.jsonld
@@ -0,0 +1,16 @@
+[
+ {
+ "@id": "http://example.com/some/deep/directory/and/file/relativePropertyIris",
+ "http://example.com/vocabulary/./rel2##fragment-works": [{"@value": "#fragment-works"}],
+ "http://example.com/vocabulary/./rel2#../": [{"@value": "../"}],
+ "http://example.com/vocabulary/./rel2#../../../../../still-root": [{"@value": "../../../../../still-root"}],
+ "http://example.com/vocabulary/./rel2#../.././.././../../too-many-dots": [{"@value": "../.././.././../../too-many-dots"}],
+ "http://example.com/vocabulary/./rel2#../../parent-parent-eq-root": [{"@value": "../../parent-parent-eq-root"}],
+ "http://example.com/vocabulary/./rel2#../parent": [{"@value": "../parent"}],
+ "http://example.com/vocabulary/./rel2#./": [{"@value": "./"}],
+ "http://example.com/vocabulary/./rel2#//example.org/scheme-relative": [{"@value": "//example.org/scheme-relative"}],
+ "http://example.com/vocabulary/./rel2#/absolute": [{"@value": "/absolute"}],
+ "http://example.com/vocabulary/./rel2#?query=works": [{"@value": "?query=works"}],
+ "http://example.com/vocabulary/./rel2#link": [{"@value": "link"}]
+ }
+]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/0112-in.jsonld b/test/jsonld/1.1/expand/0112-in.jsonld
new file mode 100644
index 000000000..660f5f1b2
--- /dev/null
+++ b/test/jsonld/1.1/expand/0112-in.jsonld
@@ -0,0 +1,21 @@
+{
+ "@context": [{
+ "@version": 1.1,
+ "@base": "http://example.com/some/deep/directory/and/file/",
+ "@vocab": "/rel1"
+ }, {
+ "@vocab": "./rel2#"
+ }],
+ "@id": "relativePropertyIris",
+ "link": "link",
+ "#fragment-works": "#fragment-works",
+ "?query=works": "?query=works",
+ "./": "./",
+ "../": "../",
+ "../parent": "../parent",
+ "../../parent-parent-eq-root": "../../parent-parent-eq-root",
+ "../../../../../still-root": "../../../../../still-root",
+ "../.././.././../../too-many-dots": "../.././.././../../too-many-dots",
+ "/absolute": "/absolute",
+ "//example.org/scheme-relative": "//example.org/scheme-relative"
+}
diff --git a/test/jsonld/1.1/expand/0112-out.jsonld b/test/jsonld/1.1/expand/0112-out.jsonld
new file mode 100644
index 000000000..07fe15c43
--- /dev/null
+++ b/test/jsonld/1.1/expand/0112-out.jsonld
@@ -0,0 +1,16 @@
+[
+ {
+ "@id": "http://example.com/some/deep/directory/and/file/relativePropertyIris",
+ "http://example.com/rel1./rel2##fragment-works": [{"@value": "#fragment-works"}],
+ "http://example.com/rel1./rel2#../": [{"@value": "../"}],
+ "http://example.com/rel1./rel2#../../../../../still-root": [{"@value": "../../../../../still-root"}],
+ "http://example.com/rel1./rel2#../.././.././../../too-many-dots": [{"@value": "../.././.././../../too-many-dots"}],
+ "http://example.com/rel1./rel2#../../parent-parent-eq-root": [{"@value": "../../parent-parent-eq-root"}],
+ "http://example.com/rel1./rel2#../parent": [{"@value": "../parent"}],
+ "http://example.com/rel1./rel2#./": [{"@value": "./"}],
+ "http://example.com/rel1./rel2#//example.org/scheme-relative": [{"@value": "//example.org/scheme-relative"}],
+ "http://example.com/rel1./rel2#/absolute": [{"@value": "/absolute"}],
+ "http://example.com/rel1./rel2#?query=works": [{"@value": "?query=works"}],
+ "http://example.com/rel1./rel2#link": [{"@value": "link"}]
+ }
+]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/0113-in.jsonld b/test/jsonld/1.1/expand/0113-in.jsonld
new file mode 100644
index 000000000..0e26a9df7
--- /dev/null
+++ b/test/jsonld/1.1/expand/0113-in.jsonld
@@ -0,0 +1,8 @@
+{
+ "@context": {
+ "valueOf": "http://example.org/valueOf",
+ "toString": "http://example.org/toString"
+ },
+ "valueOf": "first",
+ "toString": "second"
+}
diff --git a/test/jsonld/1.1/expand/0113-out.jsonld b/test/jsonld/1.1/expand/0113-out.jsonld
new file mode 100644
index 000000000..7f7af0843
--- /dev/null
+++ b/test/jsonld/1.1/expand/0113-out.jsonld
@@ -0,0 +1,14 @@
+[
+ {
+ "http://example.org/toString": [
+ {
+ "@value": "second"
+ }
+ ],
+ "http://example.org/valueOf": [
+ {
+ "@value": "first"
+ }
+ ]
+ }
+]
diff --git a/test/jsonld/1.1/expand/0114-in.jsonld b/test/jsonld/1.1/expand/0114-in.jsonld
new file mode 100644
index 000000000..82443b96a
--- /dev/null
+++ b/test/jsonld/1.1/expand/0114-in.jsonld
@@ -0,0 +1,9 @@
+{
+ "@context": {
+ "@vocab": "http://example.org/",
+ "type1": "@type",
+ "type2": "@type"
+ },
+ "type1": "Type1",
+ "type2": "Type2"
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/0114-out.jsonld b/test/jsonld/1.1/expand/0114-out.jsonld
new file mode 100644
index 000000000..0f20a86b0
--- /dev/null
+++ b/test/jsonld/1.1/expand/0114-out.jsonld
@@ -0,0 +1,3 @@
+[{
+ "@type": ["http://example.org/Type1", "http://example.org/Type2"]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/0115-in.jsonld b/test/jsonld/1.1/expand/0115-in.jsonld
new file mode 100644
index 000000000..b2feca593
--- /dev/null
+++ b/test/jsonld/1.1/expand/0115-in.jsonld
@@ -0,0 +1,8 @@
+{
+ "@context": {
+ "@base": "http://example.com/some/deep/directory/and/file/",
+ "@vocab": ""
+ },
+ "@id": "relativePropertyIris",
+ "link": "link"
+}
diff --git a/test/jsonld/1.1/expand/0116-in.jsonld b/test/jsonld/1.1/expand/0116-in.jsonld
new file mode 100644
index 000000000..4f9537537
--- /dev/null
+++ b/test/jsonld/1.1/expand/0116-in.jsonld
@@ -0,0 +1,8 @@
+{
+ "@context": {
+ "@base": "http://example.com/some/deep/directory/and/file/",
+ "@vocab": "/relative"
+ },
+ "@id": "relativePropertyIris",
+ "link": "link"
+}
diff --git a/test/jsonld/1.1/expand/0117-in.jsonld b/test/jsonld/1.1/expand/0117-in.jsonld
new file mode 100644
index 000000000..c2f5ca35b
--- /dev/null
+++ b/test/jsonld/1.1/expand/0117-in.jsonld
@@ -0,0 +1,7 @@
+{
+ "@context": {
+ "@vocab": "http://example.org/vocab",
+ ":term": {"@type": "@id"}
+ },
+ ":term": "http://example.org/base"
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/0117-out.jsonld b/test/jsonld/1.1/expand/0117-out.jsonld
new file mode 100644
index 000000000..960fab4ab
--- /dev/null
+++ b/test/jsonld/1.1/expand/0117-out.jsonld
@@ -0,0 +1,3 @@
+[{
+ "http://example.org/vocab:term": [{"@id": "http://example.org/base"}]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/0118-in.jsonld b/test/jsonld/1.1/expand/0118-in.jsonld
new file mode 100644
index 000000000..96a5d71d2
--- /dev/null
+++ b/test/jsonld/1.1/expand/0118-in.jsonld
@@ -0,0 +1,8 @@
+{
+ "@context": {"@vocab": "http://schema.org/"},
+ "@id": "foo:bar-id",
+ "@type": "foo:bar-type",
+ "foo:bar": "is an absolute iri property",
+ "term": "is schema.org/term",
+ ":fish": "is schema.org/:fish"
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/0118-out.jsonld b/test/jsonld/1.1/expand/0118-out.jsonld
new file mode 100644
index 000000000..388145ad2
--- /dev/null
+++ b/test/jsonld/1.1/expand/0118-out.jsonld
@@ -0,0 +1,7 @@
+[{
+ "@id": "foo:bar-id",
+ "@type": ["foo:bar-type"],
+ "foo:bar": [{"@value": "is an absolute iri property"}],
+ "http://schema.org/term": [{"@value": "is schema.org/term"}],
+ "http://schema.org/:fish": [{"@value": "is schema.org/:fish"}]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/0119-in.jsonld b/test/jsonld/1.1/expand/0119-in.jsonld
new file mode 100644
index 000000000..e1d2459e7
--- /dev/null
+++ b/test/jsonld/1.1/expand/0119-in.jsonld
@@ -0,0 +1,10 @@
+{
+ "@context": {
+ "@": "http://example.org/vocab/at",
+ "@foo.bar": "http://example.org/vocab/foo.bar",
+ "@ignoreMe": "http://example.org/vocab/ignoreMe"
+ },
+ "@": "allowed",
+ "@foo.bar": "allowed",
+ "@ignoreMe": "ignored"
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/0119-out.jsonld b/test/jsonld/1.1/expand/0119-out.jsonld
new file mode 100644
index 000000000..ea7c93a97
--- /dev/null
+++ b/test/jsonld/1.1/expand/0119-out.jsonld
@@ -0,0 +1,4 @@
+[{
+ "http://example.org/vocab/at": [{"@value": "allowed"}],
+ "http://example.org/vocab/foo.bar": [{"@value": "allowed"}]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/0120-in.jsonld b/test/jsonld/1.1/expand/0120-in.jsonld
new file mode 100644
index 000000000..171f431cc
--- /dev/null
+++ b/test/jsonld/1.1/expand/0120-in.jsonld
@@ -0,0 +1,11 @@
+{
+ "@context": {
+ "@vocab": "http://example.orb/vocab/",
+ "at": {"@id": "@"},
+ "foo.bar": {"@id": "@foo.bar"},
+ "ignoreMe": {"@id": "@ignoreMe"}
+ },
+ "at": "allowed",
+ "foo.bar": "allowed",
+ "ignoreMe": "resolves to @vocab"
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/0120-out.jsonld b/test/jsonld/1.1/expand/0120-out.jsonld
new file mode 100644
index 000000000..b154e014f
--- /dev/null
+++ b/test/jsonld/1.1/expand/0120-out.jsonld
@@ -0,0 +1,5 @@
+[{
+ "http://example.orb/vocab/@": [{"@value": "allowed"}],
+ "http://example.orb/vocab/@foo.bar": [{"@value": "allowed"}],
+ "http://example.orb/vocab/ignoreMe": [{"@value": "resolves to @vocab"}]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/0121-in.jsonld b/test/jsonld/1.1/expand/0121-in.jsonld
new file mode 100644
index 000000000..1b7f7fb2a
--- /dev/null
+++ b/test/jsonld/1.1/expand/0121-in.jsonld
@@ -0,0 +1,11 @@
+{
+ "@context": {
+ "@base": "http://example.org/",
+ "@vocab": "http://example.org/vocab/",
+ "at": {"@reverse": "@"},
+ "foo.bar": {"@reverse": "@foo.bar"}
+ },
+ "@id": "foo",
+ "at": {"@id": "allowed"},
+ "foo.bar": {"@id": "allowed"}
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/0121-out.jsonld b/test/jsonld/1.1/expand/0121-out.jsonld
new file mode 100644
index 000000000..cccb95677
--- /dev/null
+++ b/test/jsonld/1.1/expand/0121-out.jsonld
@@ -0,0 +1,7 @@
+[{
+ "@id": "http://example.org/foo",
+ "@reverse": {
+ "http://example.org/vocab/@": [{"@id": "http://example.org/allowed"}],
+ "http://example.org/vocab/@foo.bar": [{"@id": "http://example.org/allowed"}]
+ }
+}]
diff --git a/test/jsonld/1.1/expand/0122-in.jsonld b/test/jsonld/1.1/expand/0122-in.jsonld
new file mode 100644
index 000000000..528bf3351
--- /dev/null
+++ b/test/jsonld/1.1/expand/0122-in.jsonld
@@ -0,0 +1,8 @@
+{
+ "@context": {
+ "@base": "http://example.org/"
+ },
+ "http://example.org/vocab/at": {"@id": "@"},
+ "http://example.org/vocab/foo.bar": {"@id": "@foo.bar"},
+ "http://example.org/vocab/ignoreme": {"@id": "@ignoreMe"}
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/0122-out.jsonld b/test/jsonld/1.1/expand/0122-out.jsonld
new file mode 100644
index 000000000..cf6aa365d
--- /dev/null
+++ b/test/jsonld/1.1/expand/0122-out.jsonld
@@ -0,0 +1,5 @@
+[{
+ "http://example.org/vocab/at": [{"@id": "http://example.org/@"}],
+ "http://example.org/vocab/foo.bar": [{"@id": "http://example.org/@foo.bar"}],
+ "http://example.org/vocab/ignoreme": [{"@id": null}]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/0123-in.jsonld b/test/jsonld/1.1/expand/0123-in.jsonld
new file mode 100644
index 000000000..41a7a8b29
--- /dev/null
+++ b/test/jsonld/1.1/expand/0123-in.jsonld
@@ -0,0 +1,4 @@
+{
+ "@id": "http://example.com/foo",
+ "http://example.com/bar": {"@value": "bar", "@type": "http://example.com/baz z"}
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/0124-in.jsonld b/test/jsonld/1.1/expand/0124-in.jsonld
new file mode 100644
index 000000000..ac16aaf24
--- /dev/null
+++ b/test/jsonld/1.1/expand/0124-in.jsonld
@@ -0,0 +1,15 @@
+{
+ "@context": [
+ {
+ "@version": 1.1,
+ "ex": {
+ "@id": "http://example.org/",
+ "@prefix": true
+ }
+ },
+ {
+ "@vocab": "ex:ns/"
+ }
+ ],
+ "foo": "bar"
+}
diff --git a/test/jsonld/1.1/expand/0124-out.jsonld b/test/jsonld/1.1/expand/0124-out.jsonld
new file mode 100644
index 000000000..84f89a4cd
--- /dev/null
+++ b/test/jsonld/1.1/expand/0124-out.jsonld
@@ -0,0 +1,9 @@
+[
+ {
+ "http://example.org/ns/foo": [
+ {
+ "@value": "bar"
+ }
+ ]
+ }
+]
diff --git a/test/jsonld/1.1/expand/0125-in.jsonld b/test/jsonld/1.1/expand/0125-in.jsonld
new file mode 100644
index 000000000..92b3ef617
--- /dev/null
+++ b/test/jsonld/1.1/expand/0125-in.jsonld
@@ -0,0 +1,15 @@
+{
+ "@context": [
+ {
+ "@version": 1.1,
+ "ex": {
+ "@id": "http://example.org/",
+ "@prefix": true
+ }
+ },
+ {
+ "@vocab": "ex"
+ }
+ ],
+ "foo": "bar"
+}
diff --git a/test/jsonld/1.1/expand/0125-out.jsonld b/test/jsonld/1.1/expand/0125-out.jsonld
new file mode 100644
index 000000000..23e2700cb
--- /dev/null
+++ b/test/jsonld/1.1/expand/0125-out.jsonld
@@ -0,0 +1,9 @@
+[
+ {
+ "http://example.org/foo": [
+ {
+ "@value": "bar"
+ }
+ ]
+ }
+]
diff --git a/test/jsonld/1.1/expand/0126-context.jsonld b/test/jsonld/1.1/expand/0126-context.jsonld
new file mode 100644
index 000000000..928397cbc
--- /dev/null
+++ b/test/jsonld/1.1/expand/0126-context.jsonld
@@ -0,0 +1,12 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "prop": {
+ "@id": "ex:prop",
+ "@context": "0126-context.jsonld"
+ },
+ "value": {
+ "@id": "ex:value"
+ }
+ }
+}
diff --git a/test/jsonld/1.1/expand/0126-in.jsonld b/test/jsonld/1.1/expand/0126-in.jsonld
new file mode 100644
index 000000000..b36e10850
--- /dev/null
+++ b/test/jsonld/1.1/expand/0126-in.jsonld
@@ -0,0 +1,7 @@
+{
+ "@context": "0126-context.jsonld",
+ "@id": "ex:id",
+ "prop": {
+ "value": "v"
+ }
+}
diff --git a/test/jsonld/1.1/expand/0126-out.jsonld b/test/jsonld/1.1/expand/0126-out.jsonld
new file mode 100644
index 000000000..bdf762a6f
--- /dev/null
+++ b/test/jsonld/1.1/expand/0126-out.jsonld
@@ -0,0 +1,14 @@
+[
+ {
+ "@id": "ex:id",
+ "ex:prop": [
+ {
+ "ex:value": [
+ {
+ "@value": "v"
+ }
+ ]
+ }
+ ]
+ }
+]
diff --git a/test/jsonld/1.1/expand/0127-context-1.jsonld b/test/jsonld/1.1/expand/0127-context-1.jsonld
new file mode 100644
index 000000000..80615617e
--- /dev/null
+++ b/test/jsonld/1.1/expand/0127-context-1.jsonld
@@ -0,0 +1,12 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "prop": {
+ "@id": "ex:prop",
+ "@context": "0127-context-2.jsonld"
+ },
+ "value": {
+ "@id": "ex:value"
+ }
+ }
+}
diff --git a/test/jsonld/1.1/expand/0127-context-2.jsonld b/test/jsonld/1.1/expand/0127-context-2.jsonld
new file mode 100644
index 000000000..2d23df43b
--- /dev/null
+++ b/test/jsonld/1.1/expand/0127-context-2.jsonld
@@ -0,0 +1,3 @@
+{
+ "@context": "0127-context-1.jsonld"
+}
diff --git a/test/jsonld/1.1/expand/0127-in.jsonld b/test/jsonld/1.1/expand/0127-in.jsonld
new file mode 100644
index 000000000..3b5668fde
--- /dev/null
+++ b/test/jsonld/1.1/expand/0127-in.jsonld
@@ -0,0 +1,7 @@
+{
+ "@context": "0127-context-1.jsonld",
+ "@id": "ex:id",
+ "prop": {
+ "value": "v"
+ }
+}
diff --git a/test/jsonld/1.1/expand/0127-out.jsonld b/test/jsonld/1.1/expand/0127-out.jsonld
new file mode 100644
index 000000000..bdf762a6f
--- /dev/null
+++ b/test/jsonld/1.1/expand/0127-out.jsonld
@@ -0,0 +1,14 @@
+[
+ {
+ "@id": "ex:id",
+ "ex:prop": [
+ {
+ "ex:value": [
+ {
+ "@value": "v"
+ }
+ ]
+ }
+ ]
+ }
+]
diff --git a/test/jsonld/1.1/expand/0128-context-1.jsonld b/test/jsonld/1.1/expand/0128-context-1.jsonld
new file mode 100644
index 000000000..9d520ad85
--- /dev/null
+++ b/test/jsonld/1.1/expand/0128-context-1.jsonld
@@ -0,0 +1,3 @@
+{
+ "@context": "0128-context-3.jsonld"
+}
diff --git a/test/jsonld/1.1/expand/0128-context-2.jsonld b/test/jsonld/1.1/expand/0128-context-2.jsonld
new file mode 100644
index 000000000..9d520ad85
--- /dev/null
+++ b/test/jsonld/1.1/expand/0128-context-2.jsonld
@@ -0,0 +1,3 @@
+{
+ "@context": "0128-context-3.jsonld"
+}
diff --git a/test/jsonld/1.1/expand/0128-context-3.jsonld b/test/jsonld/1.1/expand/0128-context-3.jsonld
new file mode 100644
index 000000000..31bcb7b81
--- /dev/null
+++ b/test/jsonld/1.1/expand/0128-context-3.jsonld
@@ -0,0 +1,12 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "prop": {
+ "@id": "ex:prop",
+ "@context": "0128-context-3.jsonld"
+ },
+ "value": {
+ "@id": "ex:value"
+ }
+ }
+}
diff --git a/test/jsonld/1.1/expand/0128-in.jsonld b/test/jsonld/1.1/expand/0128-in.jsonld
new file mode 100644
index 000000000..8ef7fafac
--- /dev/null
+++ b/test/jsonld/1.1/expand/0128-in.jsonld
@@ -0,0 +1,10 @@
+{
+ "@context": [
+ "0128-context-1.jsonld",
+ "0128-context-2.jsonld"
+ ],
+ "@id": "ex:id",
+ "prop": {
+ "value": "v"
+ }
+}
diff --git a/test/jsonld/1.1/expand/0128-out.jsonld b/test/jsonld/1.1/expand/0128-out.jsonld
new file mode 100644
index 000000000..bdf762a6f
--- /dev/null
+++ b/test/jsonld/1.1/expand/0128-out.jsonld
@@ -0,0 +1,14 @@
+[
+ {
+ "@id": "ex:id",
+ "ex:prop": [
+ {
+ "ex:value": [
+ {
+ "@value": "v"
+ }
+ ]
+ }
+ ]
+ }
+]
diff --git a/test/jsonld/1.1/expand/0129-in.jsonld b/test/jsonld/1.1/expand/0129-in.jsonld
new file mode 100644
index 000000000..f051010b6
--- /dev/null
+++ b/test/jsonld/1.1/expand/0129-in.jsonld
@@ -0,0 +1,5 @@
+{
+ "@context" : {"@base": "http://example"},
+ "@id": "relative-iri",
+ "http://prop": "value"
+}
diff --git a/test/jsonld/1.1/expand/0129-out.jsonld b/test/jsonld/1.1/expand/0129-out.jsonld
new file mode 100644
index 000000000..299385987
--- /dev/null
+++ b/test/jsonld/1.1/expand/0129-out.jsonld
@@ -0,0 +1,4 @@
+[{
+ "@id": "http://example/relative-iri",
+ "http://prop": [{"@value": "value"}]
+}]
diff --git a/test/jsonld/1.1/expand/0130-in.jsonld b/test/jsonld/1.1/expand/0130-in.jsonld
new file mode 100644
index 000000000..4c966040d
--- /dev/null
+++ b/test/jsonld/1.1/expand/0130-in.jsonld
@@ -0,0 +1,5 @@
+{
+ "@context" : {"@base": "http://example/base"},
+ "@id": "relative-iri",
+ "http://prop": "value"
+}
diff --git a/test/jsonld/1.1/expand/0130-out.jsonld b/test/jsonld/1.1/expand/0130-out.jsonld
new file mode 100644
index 000000000..299385987
--- /dev/null
+++ b/test/jsonld/1.1/expand/0130-out.jsonld
@@ -0,0 +1,4 @@
+[{
+ "@id": "http://example/relative-iri",
+ "http://prop": [{"@value": "value"}]
+}]
diff --git a/test/jsonld/1.1/expand/c001-in.jsonld b/test/jsonld/1.1/expand/c001-in.jsonld
new file mode 100644
index 000000000..04c512099
--- /dev/null
+++ b/test/jsonld/1.1/expand/c001-in.jsonld
@@ -0,0 +1,9 @@
+{
+ "@context": {
+ "@vocab": "http://example/",
+ "foo": {"@context": {"bar": "http://example.org/bar"}}
+ },
+ "foo": {
+ "bar": "baz"
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/c001-out.jsonld b/test/jsonld/1.1/expand/c001-out.jsonld
new file mode 100644
index 000000000..122c864ad
--- /dev/null
+++ b/test/jsonld/1.1/expand/c001-out.jsonld
@@ -0,0 +1,5 @@
+[
+ {
+ "http://example/foo": [{"http://example.org/bar": [{"@value": "baz"}]}]
+ }
+]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/c002-in.jsonld b/test/jsonld/1.1/expand/c002-in.jsonld
new file mode 100644
index 000000000..8121cf37a
--- /dev/null
+++ b/test/jsonld/1.1/expand/c002-in.jsonld
@@ -0,0 +1,10 @@
+{
+ "@context": {
+ "@vocab": "http://example/",
+ "foo": {"@context": {"bar": {"@type": "@id"}}},
+ "bar": {"@type": "http://www.w3.org/2001/XMLSchema#string"}
+ },
+ "foo": {
+ "bar": "http://example/baz"
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/c002-out.jsonld b/test/jsonld/1.1/expand/c002-out.jsonld
new file mode 100644
index 000000000..acd651e0d
--- /dev/null
+++ b/test/jsonld/1.1/expand/c002-out.jsonld
@@ -0,0 +1,5 @@
+[
+ {
+ "http://example/foo": [{"http://example/bar": [{"@id": "http://example/baz"}]}]
+ }
+]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/c003-in.jsonld b/test/jsonld/1.1/expand/c003-in.jsonld
new file mode 100644
index 000000000..447ded335
--- /dev/null
+++ b/test/jsonld/1.1/expand/c003-in.jsonld
@@ -0,0 +1,9 @@
+{
+ "@context": {
+ "@vocab": "http://example/",
+ "foo": {"@context": {"Bar": {"@id": "bar"}}}
+ },
+ "foo": {
+ "Bar": "baz"
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/c003-out.jsonld b/test/jsonld/1.1/expand/c003-out.jsonld
new file mode 100644
index 000000000..020f7a7fe
--- /dev/null
+++ b/test/jsonld/1.1/expand/c003-out.jsonld
@@ -0,0 +1,9 @@
+[
+ {
+ "http://example/foo": [{
+ "http://example/bar": [
+ {"@value": "baz"}
+ ]}
+ ]
+ }
+]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/c004-in.jsonld b/test/jsonld/1.1/expand/c004-in.jsonld
new file mode 100644
index 000000000..c9e450bf6
--- /dev/null
+++ b/test/jsonld/1.1/expand/c004-in.jsonld
@@ -0,0 +1,11 @@
+{
+ "@context": {
+ "@vocab": "http://example/",
+ "foo": {"@context": {"baz": {"@type": "@vocab"}}}
+ },
+ "foo": {
+ "bar": {
+ "baz": "buzz"
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/c004-out.jsonld b/test/jsonld/1.1/expand/c004-out.jsonld
new file mode 100644
index 000000000..c5ae41dfc
--- /dev/null
+++ b/test/jsonld/1.1/expand/c004-out.jsonld
@@ -0,0 +1,9 @@
+[
+ {
+ "http://example/foo": [{
+ "http://example/bar": [{
+ "http://example/baz": [{"@id": "http://example/buzz"}]
+ }]
+ }]
+ }
+]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/c005-in.jsonld b/test/jsonld/1.1/expand/c005-in.jsonld
new file mode 100644
index 000000000..faab3202a
--- /dev/null
+++ b/test/jsonld/1.1/expand/c005-in.jsonld
@@ -0,0 +1,15 @@
+{
+ "@context": {
+ "@vocab": "http://example/",
+ "b": {"@context": {"c": "http://example.org/c"}}
+ },
+ "a": {
+ "@context": {"@vocab": "http://example.com/"},
+ "b": {
+ "a": "A in example.com",
+ "c": "C in example.org"
+ },
+ "c": "C in example.com"
+ },
+ "c": "C in example"
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/c005-out.jsonld b/test/jsonld/1.1/expand/c005-out.jsonld
new file mode 100644
index 000000000..b46a9280c
--- /dev/null
+++ b/test/jsonld/1.1/expand/c005-out.jsonld
@@ -0,0 +1,10 @@
+[{
+ "http://example/a": [{
+ "http://example.com/c": [{"@value": "C in example.com"}],
+ "http://example/b": [{
+ "http://example.com/a": [{"@value": "A in example.com"}],
+ "http://example.org/c": [{"@value": "C in example.org"}]
+ }]
+ }],
+ "http://example/c": [{"@value": "C in example"}]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/c006-in.jsonld b/test/jsonld/1.1/expand/c006-in.jsonld
new file mode 100644
index 000000000..757aeaa11
--- /dev/null
+++ b/test/jsonld/1.1/expand/c006-in.jsonld
@@ -0,0 +1,7 @@
+{
+ "@context": {
+ "@vocab": "http://example/",
+ "Foo": {"@context": {"bar": "http://example.org/bar"}}
+ },
+ "a": {"@type": "Foo", "bar": "baz"}
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/c006-out.jsonld b/test/jsonld/1.1/expand/c006-out.jsonld
new file mode 100644
index 000000000..16baea770
--- /dev/null
+++ b/test/jsonld/1.1/expand/c006-out.jsonld
@@ -0,0 +1,8 @@
+[
+ {
+ "http://example/a": [{
+ "@type": ["http://example/Foo"],
+ "http://example.org/bar": [{"@value": "baz"}]
+ }]
+ }
+]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/c007-in.jsonld b/test/jsonld/1.1/expand/c007-in.jsonld
new file mode 100644
index 000000000..05c9f1d61
--- /dev/null
+++ b/test/jsonld/1.1/expand/c007-in.jsonld
@@ -0,0 +1,8 @@
+{
+ "@context": {
+ "@vocab": "http://example/",
+ "Foo": {"@context": {"bar": {"@type": "@id"}}},
+ "bar": {"@type": "http://www.w3.org/2001/XMLSchema#string"}
+ },
+ "a": {"@type": "Foo", "bar": "http://example/baz"}
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/c007-out.jsonld b/test/jsonld/1.1/expand/c007-out.jsonld
new file mode 100644
index 000000000..c173b8948
--- /dev/null
+++ b/test/jsonld/1.1/expand/c007-out.jsonld
@@ -0,0 +1,8 @@
+[
+ {
+ "http://example/a": [{
+ "@type": ["http://example/Foo"],
+ "http://example/bar": [{"@id": "http://example/baz"}]
+ }]
+ }
+]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/c008-in.jsonld b/test/jsonld/1.1/expand/c008-in.jsonld
new file mode 100644
index 000000000..e0b472b16
--- /dev/null
+++ b/test/jsonld/1.1/expand/c008-in.jsonld
@@ -0,0 +1,8 @@
+{
+ "@context": {
+ "@vocab": "http://example/",
+ "type": "@type",
+ "Foo": {"@context": {"bar": "http://example.org/bar"}}
+ },
+ "a": {"type": "Foo", "bar": "baz"}
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/c008-out.jsonld b/test/jsonld/1.1/expand/c008-out.jsonld
new file mode 100644
index 000000000..16baea770
--- /dev/null
+++ b/test/jsonld/1.1/expand/c008-out.jsonld
@@ -0,0 +1,8 @@
+[
+ {
+ "http://example/a": [{
+ "@type": ["http://example/Foo"],
+ "http://example.org/bar": [{"@value": "baz"}]
+ }]
+ }
+]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/c009-in.jsonld b/test/jsonld/1.1/expand/c009-in.jsonld
new file mode 100644
index 000000000..c2b6d1109
--- /dev/null
+++ b/test/jsonld/1.1/expand/c009-in.jsonld
@@ -0,0 +1,8 @@
+{
+ "@context": {
+ "@vocab": "http://example/",
+ "Foo": {"@context": {"baz": {"@type": "@vocab"}}}
+ },
+ "@type": "Foo",
+ "bar": {"baz": "buzz"}
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/c009-out.jsonld b/test/jsonld/1.1/expand/c009-out.jsonld
new file mode 100644
index 000000000..457f891c2
--- /dev/null
+++ b/test/jsonld/1.1/expand/c009-out.jsonld
@@ -0,0 +1,8 @@
+[
+ {
+ "@type": ["http://example/Foo"],
+ "http://example/bar": [{
+ "http://example/baz": [{"@value": "buzz"}]
+ }]
+ }
+]
diff --git a/test/jsonld/1.1/expand/c010-in.jsonld b/test/jsonld/1.1/expand/c010-in.jsonld
new file mode 100644
index 000000000..809997b59
--- /dev/null
+++ b/test/jsonld/1.1/expand/c010-in.jsonld
@@ -0,0 +1,13 @@
+{
+ "@context": {
+ "@vocab": "http://example/",
+ "B": {"@context": {"c": "http://example.org/c"}}
+ },
+ "a": {
+ "@context": {"@vocab": "http://example.com/"},
+ "@type": "B",
+ "a": "A in example.com",
+ "c": "C in example.org"
+ },
+ "c": "C in example"
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/c010-out.jsonld b/test/jsonld/1.1/expand/c010-out.jsonld
new file mode 100644
index 000000000..1057b0ad8
--- /dev/null
+++ b/test/jsonld/1.1/expand/c010-out.jsonld
@@ -0,0 +1,8 @@
+[{
+ "http://example/a": [{
+ "@type": ["http://example/B"],
+ "http://example.com/a": [{"@value": "A in example.com"}],
+ "http://example.org/c": [{"@value": "C in example.org"}]
+ }],
+ "http://example/c": [{"@value": "C in example"}]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/c011-in.jsonld b/test/jsonld/1.1/expand/c011-in.jsonld
new file mode 100644
index 000000000..c57c55ebf
--- /dev/null
+++ b/test/jsonld/1.1/expand/c011-in.jsonld
@@ -0,0 +1,9 @@
+{
+ "@context": {
+ "@vocab": "http://example/",
+ "t1": {"@context": {"foo": {"@id": "http://example.com/foo"}}},
+ "t2": {"@context": {"foo": {"@id": "http://example.org/foo", "@type": "@id"}}}
+ },
+ "@type": ["t2", "t1"],
+ "foo": "urn:bar"
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/c011-out.jsonld b/test/jsonld/1.1/expand/c011-out.jsonld
new file mode 100644
index 000000000..a702942ab
--- /dev/null
+++ b/test/jsonld/1.1/expand/c011-out.jsonld
@@ -0,0 +1,6 @@
+[{
+ "@type": ["http://example/t2", "http://example/t1"],
+ "http://example.org/foo": [
+ {"@id": "urn:bar"}
+ ]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/c012-in.jsonld b/test/jsonld/1.1/expand/c012-in.jsonld
new file mode 100644
index 000000000..bba1c9bfe
--- /dev/null
+++ b/test/jsonld/1.1/expand/c012-in.jsonld
@@ -0,0 +1,16 @@
+{
+ "@context": {
+ "@vocab": "http://example/",
+ "Foo": {
+ "@context": {
+ "bar": {
+ "@context": {
+ "baz": {"@type": "@vocab"}
+ }
+ }
+ }
+ }
+ },
+ "@type": "Foo",
+ "bar": {"baz": "buzz"}
+}
diff --git a/test/jsonld/1.1/expand/c012-out.jsonld b/test/jsonld/1.1/expand/c012-out.jsonld
new file mode 100644
index 000000000..8ff196e6c
--- /dev/null
+++ b/test/jsonld/1.1/expand/c012-out.jsonld
@@ -0,0 +1,8 @@
+[
+ {
+ "@type": ["http://example/Foo"],
+ "http://example/bar": [{
+ "http://example/baz": [{"@id": "http://example/buzz"}]
+ }]
+ }
+]
diff --git a/test/jsonld/1.1/expand/c013-in.jsonld b/test/jsonld/1.1/expand/c013-in.jsonld
new file mode 100644
index 000000000..63c4a0c52
--- /dev/null
+++ b/test/jsonld/1.1/expand/c013-in.jsonld
@@ -0,0 +1,28 @@
+{
+ "@context": {
+ "@vocab": "http://example/",
+ "prop": {"@container": "@index"},
+ "foo": "http://example/base-foo",
+ "Outer": {
+ "@context": {
+ "prop": {
+ "@id": "http://example/outer-prop",
+ "@container": "@type"
+ }
+ }
+ },
+ "Inner": {"@context": {"foo": "http://example/inner-foo"}}
+ },
+ "@type": "Outer",
+ "prop": {
+ "Inner": {
+ "prop": {
+ "index": {
+ "@id": "http://example/inner-with-index",
+ "foo": "inner-foo"
+ }
+ }
+ }
+ },
+ "foo": "base-foo"
+}
diff --git a/test/jsonld/1.1/expand/c013-out.jsonld b/test/jsonld/1.1/expand/c013-out.jsonld
new file mode 100644
index 000000000..a57f9394c
--- /dev/null
+++ b/test/jsonld/1.1/expand/c013-out.jsonld
@@ -0,0 +1,12 @@
+[{
+ "@type": ["http://example/Outer"],
+ "http://example/base-foo": [{"@value": "base-foo"}],
+ "http://example/outer-prop": [{
+ "@type": ["http://example/Inner"],
+ "http://example/prop": [{
+ "@id": "http://example/inner-with-index",
+ "@index": "index",
+ "http://example/inner-foo": [{"@value": "inner-foo"}]
+ }]
+ }]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/c014-in.jsonld b/test/jsonld/1.1/expand/c014-in.jsonld
new file mode 100644
index 000000000..d89e30121
--- /dev/null
+++ b/test/jsonld/1.1/expand/c014-in.jsonld
@@ -0,0 +1,16 @@
+{
+ "@context": {
+ "@vocab": "http://example/",
+ "foo": "http://example/foo",
+ "Type": {
+ "@context": [
+ null
+ ]
+ }
+ },
+ "foo": "will-exist",
+ "p": {
+ "@type": "Type",
+ "foo": "will-not-exist"
+ }
+}
diff --git a/test/jsonld/1.1/expand/c014-out.jsonld b/test/jsonld/1.1/expand/c014-out.jsonld
new file mode 100644
index 000000000..5a68fc26c
--- /dev/null
+++ b/test/jsonld/1.1/expand/c014-out.jsonld
@@ -0,0 +1,8 @@
+[{
+ "http://example/foo": [{
+ "@value": "will-exist"
+ }],
+ "http://example/p": [{
+ "@type": ["http://example/Type"]
+ }]
+}]
diff --git a/test/jsonld/1.1/expand/c015-in.jsonld b/test/jsonld/1.1/expand/c015-in.jsonld
new file mode 100644
index 000000000..83bb63d5b
--- /dev/null
+++ b/test/jsonld/1.1/expand/c015-in.jsonld
@@ -0,0 +1,24 @@
+{
+ "@context": {
+ "@base": "http://example/base-base",
+ "@vocab": "http://example/",
+ "foo": "http://example/foo",
+ "Type": {
+ "@context": {
+ "@base": "http://example/typed-base"
+ }
+ }
+ },
+ "@id": "#base-id",
+ "p": {
+ "@id": "#typed-id",
+ "@type": "Type",
+ "subjectReference": {
+ "@id": "#subject-reference-id"
+ },
+ "nestedNode": {
+ "@id": "#nested-id",
+ "foo": "bar"
+ }
+ }
+}
diff --git a/test/jsonld/1.1/expand/c015-out.jsonld b/test/jsonld/1.1/expand/c015-out.jsonld
new file mode 100644
index 000000000..2f3427a52
--- /dev/null
+++ b/test/jsonld/1.1/expand/c015-out.jsonld
@@ -0,0 +1,16 @@
+[{
+ "@id": "http://example/base-base#base-id",
+ "http://example/p": [{
+ "@id": "http://example/typed-base#typed-id",
+ "@type": ["http://example/Type"],
+ "http://example/subjectReference": [{
+ "@id": "http://example/typed-base#subject-reference-id"
+ }],
+ "http://example/nestedNode": [{
+ "@id": "http://example/base-base#nested-id",
+ "http://example/foo": [{
+ "@value": "bar"
+ }]
+ }]
+ }]
+}]
diff --git a/test/jsonld/1.1/expand/c016-in.jsonld b/test/jsonld/1.1/expand/c016-in.jsonld
new file mode 100644
index 000000000..2f1186ffa
--- /dev/null
+++ b/test/jsonld/1.1/expand/c016-in.jsonld
@@ -0,0 +1,18 @@
+{
+ "@context": {
+ "@vocab": "http://example.org/",
+ "Type": {
+ "@context": {
+ "@vocab": "http://example.com/"
+ }
+ }
+ },
+ "foo": "org",
+ "p": {
+ "@type": "Type",
+ "foo": "com",
+ "nested": {
+ "nested-prop": "org"
+ }
+ }
+}
diff --git a/test/jsonld/1.1/expand/c016-out.jsonld b/test/jsonld/1.1/expand/c016-out.jsonld
new file mode 100644
index 000000000..37bc728ab
--- /dev/null
+++ b/test/jsonld/1.1/expand/c016-out.jsonld
@@ -0,0 +1,16 @@
+[{
+ "http://example.org/foo": [{
+ "@value": "org"
+ }],
+ "http://example.org/p": [{
+ "@type": ["http://example.org/Type"],
+ "http://example.com/foo": [{
+ "@value": "com"
+ }],
+ "http://example.com/nested": [{
+ "http://example.org/nested-prop": [{
+ "@value": "org"
+ }]
+ }]
+ }]
+}]
diff --git a/test/jsonld/1.1/expand/c017-in.jsonld b/test/jsonld/1.1/expand/c017-in.jsonld
new file mode 100644
index 000000000..be32133c4
--- /dev/null
+++ b/test/jsonld/1.1/expand/c017-in.jsonld
@@ -0,0 +1,24 @@
+{
+ "@context": {
+ "@vocab": "http://example/",
+ "Bar": {
+ "@context": [
+ {
+ "prop": "http://example/bar-prop"
+ }
+ ]
+ },
+ "Foo": {
+ "@context": [
+ {
+ "prop": "http://example/foo-prop"
+ }
+ ]
+ }
+ },
+ "@type": ["Foo", "Bar"],
+ "prop": "foo",
+ "nested": {
+ "prop": "vocab"
+ }
+}
diff --git a/test/jsonld/1.1/expand/c017-out.jsonld b/test/jsonld/1.1/expand/c017-out.jsonld
new file mode 100644
index 000000000..7e7e49d9f
--- /dev/null
+++ b/test/jsonld/1.1/expand/c017-out.jsonld
@@ -0,0 +1,14 @@
+[{
+ "@type": [
+ "http://example/Foo",
+ "http://example/Bar"
+ ],
+ "http://example/foo-prop": [{
+ "@value": "foo"
+ }],
+ "http://example/nested": [{
+ "http://example/prop": [{
+ "@value": "vocab"
+ }]
+ }]
+}]
diff --git a/test/jsonld/1.1/expand/c018-in.jsonld b/test/jsonld/1.1/expand/c018-in.jsonld
new file mode 100644
index 000000000..b8fbd43d0
--- /dev/null
+++ b/test/jsonld/1.1/expand/c018-in.jsonld
@@ -0,0 +1,26 @@
+{
+ "@context": {
+ "@vocab": "http://example/",
+ "Bar": {
+ "@context": [
+ null,
+ {
+ "prop": "http://example/bar-prop"
+ }
+ ]
+ },
+ "Foo": {
+ "@context": [
+ null,
+ {
+ "prop": "http://example/foo-prop"
+ }
+ ]
+ }
+ },
+ "@type": ["Foo", "Bar"],
+ "prop": "foo",
+ "nested": {
+ "prop": "will-not-exist"
+ }
+}
diff --git a/test/jsonld/1.1/expand/c018-out.jsonld b/test/jsonld/1.1/expand/c018-out.jsonld
new file mode 100644
index 000000000..ee0c79e18
--- /dev/null
+++ b/test/jsonld/1.1/expand/c018-out.jsonld
@@ -0,0 +1,11 @@
+[{
+ "@type": [
+ "http://example/Foo",
+ "http://example/Bar"
+ ],
+ "http://example/foo-prop": [
+ {
+ "@value": "foo"
+ }
+ ]
+}]
diff --git a/test/jsonld/1.1/expand/c019-in.jsonld b/test/jsonld/1.1/expand/c019-in.jsonld
new file mode 100644
index 000000000..418c9cbee
--- /dev/null
+++ b/test/jsonld/1.1/expand/c019-in.jsonld
@@ -0,0 +1,30 @@
+{
+ "@context": {
+ "@vocab": "http://example/",
+ "prop": "http://example/base-prop",
+ "Type": {
+ "@context": {
+ "foo": {
+ "@context": {
+ "prop": "http://example/foo-prop"
+ }
+ },
+ "bar": {
+ "@context": {
+ "prop": "http://example/bar-prop"
+ }
+ }
+ }
+ }
+ },
+ "@type": "Type",
+ "foo": {
+ "prop": "foo"
+ },
+ "bar": {
+ "prop": "bar"
+ },
+ "baz": {
+ "prop": "baz"
+ }
+}
diff --git a/test/jsonld/1.1/expand/c019-out.jsonld b/test/jsonld/1.1/expand/c019-out.jsonld
new file mode 100644
index 000000000..3d25ead3b
--- /dev/null
+++ b/test/jsonld/1.1/expand/c019-out.jsonld
@@ -0,0 +1,26 @@
+[{
+ "@type": [
+ "http://example/Type"
+ ],
+ "http://example/foo": [{
+ "http://example/foo-prop": [
+ {
+ "@value": "foo"
+ }
+ ]
+ }],
+ "http://example/bar": [{
+ "http://example/bar-prop": [
+ {
+ "@value": "bar"
+ }
+ ]
+ }],
+ "http://example/baz": [{
+ "http://example/base-prop": [
+ {
+ "@value": "baz"
+ }
+ ]
+ }]
+}]
diff --git a/test/jsonld/1.1/expand/c020-in.jsonld b/test/jsonld/1.1/expand/c020-in.jsonld
new file mode 100644
index 000000000..e504c397c
--- /dev/null
+++ b/test/jsonld/1.1/expand/c020-in.jsonld
@@ -0,0 +1,16 @@
+{
+ "@context": {
+ "@vocab": "http://example/",
+ "type": "@type",
+ "Type": {
+ "@context": {
+ "value": "@value"
+ }
+ }
+ },
+ "type": "Type",
+ "v": {
+ "value": "value",
+ "type": "value-type"
+ }
+}
diff --git a/test/jsonld/1.1/expand/c020-out.jsonld b/test/jsonld/1.1/expand/c020-out.jsonld
new file mode 100644
index 000000000..483b9ef0b
--- /dev/null
+++ b/test/jsonld/1.1/expand/c020-out.jsonld
@@ -0,0 +1,7 @@
+[{
+ "@type": ["http://example/Type"],
+ "http://example/v": [{
+ "@type": "http://example/value-type",
+ "@value": "value"
+ }]
+}]
diff --git a/test/jsonld/1.1/expand/c021-in.jsonld b/test/jsonld/1.1/expand/c021-in.jsonld
new file mode 100644
index 000000000..99d78beee
--- /dev/null
+++ b/test/jsonld/1.1/expand/c021-in.jsonld
@@ -0,0 +1,34 @@
+{
+ "@context": {
+ "@vocab": "ex:",
+ "type": "@type",
+ "prop": "ex:untyped",
+ "Type": {
+ "@context": {
+ "prop": "ex:typed",
+ "value": "@value"
+ }
+ }
+ },
+ "prop": {
+ "type": "Type",
+ "prop": [
+ "v1",
+ {
+ "value": "v2"
+ },
+ {
+ "@value": "v3"
+ },
+ {
+ "prop": [
+ "v4",
+ {
+ "type": "Type",
+ "prop": "v5"
+ }
+ ]
+ }
+ ]
+ }
+}
diff --git a/test/jsonld/1.1/expand/c021-out.jsonld b/test/jsonld/1.1/expand/c021-out.jsonld
new file mode 100644
index 000000000..c3f097e8e
--- /dev/null
+++ b/test/jsonld/1.1/expand/c021-out.jsonld
@@ -0,0 +1,19 @@
+[{
+ "ex:untyped": [{
+ "@type": ["ex:Type"],
+ "ex:typed": [{
+ "@value": "v1"
+ }, {
+ "@value": "v2"
+ }, {
+ "@value": "v3"
+ }, {
+ "ex:untyped": [{
+ "@value": "v4"
+ }, {
+ "@type": ["ex:Type"],
+ "ex:typed": [{"@value": "v5"}]
+ }]
+ }]
+ }]
+}]
diff --git a/test/jsonld/1.1/expand/c022-in.jsonld b/test/jsonld/1.1/expand/c022-in.jsonld
new file mode 100644
index 000000000..c5ef4a2e3
--- /dev/null
+++ b/test/jsonld/1.1/expand/c022-in.jsonld
@@ -0,0 +1,20 @@
+{
+ "@context": {
+ "@vocab": "ex:",
+ "Type": {
+ "@context": {
+ "foo": {
+ "@id": "ex:foo",
+ "@type": "@vocab",
+ "@context": {
+ "@version": 1.1,
+ "Foo": "ex:Foo",
+ "Bar": "ex:Bar"
+ }
+ }
+ }
+ }
+ },
+ "@type": "Type",
+ "foo": "Bar"
+}
diff --git a/test/jsonld/1.1/expand/c022-out.jsonld b/test/jsonld/1.1/expand/c022-out.jsonld
new file mode 100644
index 000000000..d77a5f5aa
--- /dev/null
+++ b/test/jsonld/1.1/expand/c022-out.jsonld
@@ -0,0 +1,4 @@
+[{
+ "@type": ["ex:Type"],
+ "ex:foo": [{"@id": "ex:Bar"}]
+}]
diff --git a/test/jsonld/1.1/expand/c023-in.jsonld b/test/jsonld/1.1/expand/c023-in.jsonld
new file mode 100644
index 000000000..94272f959
--- /dev/null
+++ b/test/jsonld/1.1/expand/c023-in.jsonld
@@ -0,0 +1,29 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "Outer": {
+ "@id": "ex:Outer",
+ "@context": {
+ "nested": "ex:nested"
+ }
+ },
+ "Inner": {
+ "@id": "ex:Inner",
+ "@context": {
+ "@version": 1.1,
+ "foo": {
+ "@id": "ex:foo",
+ "@type": "@vocab",
+ "@context": {
+ "Foo": "ex:Foo"
+ }
+ }
+ }
+ }
+ },
+ "@type": "Outer",
+ "nested": {
+ "@type": "Inner",
+ "foo": "Foo"
+ }
+}
diff --git a/test/jsonld/1.1/expand/c023-out.jsonld b/test/jsonld/1.1/expand/c023-out.jsonld
new file mode 100644
index 000000000..3e47445a4
--- /dev/null
+++ b/test/jsonld/1.1/expand/c023-out.jsonld
@@ -0,0 +1,7 @@
+[{
+ "@type": ["ex:Outer"],
+ "ex:nested": [{
+ "@type": ["ex:Inner"],
+ "ex:foo": [{"@id": "ex:Foo"}]
+ }]
+}]
diff --git a/test/jsonld/1.1/expand/c024-in.jsonld b/test/jsonld/1.1/expand/c024-in.jsonld
new file mode 100644
index 000000000..d647c5545
--- /dev/null
+++ b/test/jsonld/1.1/expand/c024-in.jsonld
@@ -0,0 +1,39 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "Outer": {
+ "@id": "ex:Outer",
+ "@context": {
+ "nested": "ex:nested"
+ }
+ },
+ "Inner": {
+ "@id": "ex:Inner",
+ "@context": {
+ "@version": 1.1,
+ "foo": {
+ "@id": "ex:foo",
+ "@container": "@set",
+ "@type": "ex:Number",
+ "@context": {
+ "value": "@value"
+ }
+ },
+ "bar": {
+ "@id": "ex:bar",
+ "@container": "@set",
+ "@type": "@id",
+ "@context": {
+ "@base": "http://example/"
+ }
+ }
+ }
+ }
+ },
+ "@type": "Outer",
+ "nested": {
+ "@type": "Inner",
+ "foo": [{"value": "1"}, "2"],
+ "bar": [{"@id": "a"}, "b"]
+ }
+}
diff --git a/test/jsonld/1.1/expand/c024-out.jsonld b/test/jsonld/1.1/expand/c024-out.jsonld
new file mode 100644
index 000000000..ef901dbd0
--- /dev/null
+++ b/test/jsonld/1.1/expand/c024-out.jsonld
@@ -0,0 +1,14 @@
+[{
+ "@type": ["ex:Outer"],
+ "ex:nested": [{
+ "@type": ["ex:Inner"],
+ "ex:foo": [
+ {"@value": "1"},
+ {"@type": "ex:Number", "@value": "2"}
+ ],
+ "ex:bar": [
+ {"@id": "http://example/a"},
+ {"@id": "http://example/b"}
+ ]
+ }]
+}]
diff --git a/test/jsonld/1.1/expand/c025-in.jsonld b/test/jsonld/1.1/expand/c025-in.jsonld
new file mode 100644
index 000000000..aa9b1fc7a
--- /dev/null
+++ b/test/jsonld/1.1/expand/c025-in.jsonld
@@ -0,0 +1,27 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "type": "@type",
+ "Outer": {
+ "@id": "ex:Outer",
+ "@context": {
+ "nested": {
+ "@id": "ex:nested",
+ "@type": "@id",
+ "@container": "@graph"
+ }
+ }
+ },
+ "Inner": {
+ "@id": "ex:Inner",
+ "@context": {
+ "foo": "ex:foo"
+ }
+ }
+ },
+ "type": "Outer",
+ "nested": {
+ "type": "Inner",
+ "foo": "bar"
+ }
+}
diff --git a/test/jsonld/1.1/expand/c025-out.jsonld b/test/jsonld/1.1/expand/c025-out.jsonld
new file mode 100644
index 000000000..d82464653
--- /dev/null
+++ b/test/jsonld/1.1/expand/c025-out.jsonld
@@ -0,0 +1,9 @@
+[{
+ "@type": ["ex:Outer"],
+ "ex:nested": [{
+ "@graph": [{
+ "@type": ["ex:Inner"],
+ "ex:foo": [{"@value": "bar"}]
+ }]
+ }]
+}]
diff --git a/test/jsonld/1.1/expand/c026-in.jsonld b/test/jsonld/1.1/expand/c026-in.jsonld
new file mode 100644
index 000000000..09f080304
--- /dev/null
+++ b/test/jsonld/1.1/expand/c026-in.jsonld
@@ -0,0 +1,14 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "@vocab": "http://example/",
+ "Foo": {
+ "@context": {
+ "@propagate": true,
+ "baz": {"@type": "@vocab"}
+ }
+ }
+ },
+ "@type": "Foo",
+ "bar": {"baz": "buzz"}
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/c026-out.jsonld b/test/jsonld/1.1/expand/c026-out.jsonld
new file mode 100644
index 000000000..8ff196e6c
--- /dev/null
+++ b/test/jsonld/1.1/expand/c026-out.jsonld
@@ -0,0 +1,8 @@
+[
+ {
+ "@type": ["http://example/Foo"],
+ "http://example/bar": [{
+ "http://example/baz": [{"@id": "http://example/buzz"}]
+ }]
+ }
+]
diff --git a/test/jsonld/1.1/expand/c027-in.jsonld b/test/jsonld/1.1/expand/c027-in.jsonld
new file mode 100644
index 000000000..7937a8ee8
--- /dev/null
+++ b/test/jsonld/1.1/expand/c027-in.jsonld
@@ -0,0 +1,13 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "@vocab": "http://example/",
+ "bar": {
+ "@context": {
+ "@propagate": false,
+ "baz": {"@type": "@id"}
+ }
+ }
+ },
+ "bar": {"baz": {"baz": "buzz"}}
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/c027-out.jsonld b/test/jsonld/1.1/expand/c027-out.jsonld
new file mode 100644
index 000000000..28baae402
--- /dev/null
+++ b/test/jsonld/1.1/expand/c027-out.jsonld
@@ -0,0 +1,7 @@
+[{
+ "http://example/bar": [{
+ "http://example/baz": [{
+ "http://example/baz": [{"@value": "buzz"}]
+ }]
+ }]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/c028-in.jsonld b/test/jsonld/1.1/expand/c028-in.jsonld
new file mode 100644
index 000000000..87792cd06
--- /dev/null
+++ b/test/jsonld/1.1/expand/c028-in.jsonld
@@ -0,0 +1,15 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "@vocab": "http://example/"
+ },
+ "bar": {
+ "@context": {
+ "@propagate": false,
+ "baz": {"@type": "@vocab"}
+ },
+ "baz": {
+ "baz": "buzz"
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/c028-out.jsonld b/test/jsonld/1.1/expand/c028-out.jsonld
new file mode 100644
index 000000000..28baae402
--- /dev/null
+++ b/test/jsonld/1.1/expand/c028-out.jsonld
@@ -0,0 +1,7 @@
+[{
+ "http://example/bar": [{
+ "http://example/baz": [{
+ "http://example/baz": [{"@value": "buzz"}]
+ }]
+ }]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/c029-in.jsonld b/test/jsonld/1.1/expand/c029-in.jsonld
new file mode 100644
index 000000000..cb000cf4c
--- /dev/null
+++ b/test/jsonld/1.1/expand/c029-in.jsonld
@@ -0,0 +1,5 @@
+{
+ "@context": {
+ "@propagate": true
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/c030-in.jsonld b/test/jsonld/1.1/expand/c030-in.jsonld
new file mode 100644
index 000000000..39d91a17d
--- /dev/null
+++ b/test/jsonld/1.1/expand/c030-in.jsonld
@@ -0,0 +1,6 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "@propagate": "not boolean"
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/c031-context.jsonld b/test/jsonld/1.1/expand/c031-context.jsonld
new file mode 100644
index 000000000..edd71cce6
--- /dev/null
+++ b/test/jsonld/1.1/expand/c031-context.jsonld
@@ -0,0 +1,9 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "@base": "http://example.org/c/",
+ "inner": {
+ "@id": "http://a.example/in"
+ }
+ }
+}
diff --git a/test/jsonld/1.1/expand/c031-in.jsonld b/test/jsonld/1.1/expand/c031-in.jsonld
new file mode 100644
index 000000000..82d462c89
--- /dev/null
+++ b/test/jsonld/1.1/expand/c031-in.jsonld
@@ -0,0 +1,9 @@
+{
+ "@context": [
+ {"@base": "http://example.org/a/"},
+ "c031/c031-context.jsonld"
+ ],
+ "outer": {
+ "inner": "ab"
+ }
+}
diff --git a/test/jsonld/1.1/expand/c031-out.jsonld b/test/jsonld/1.1/expand/c031-out.jsonld
new file mode 100644
index 000000000..24c88a6da
--- /dev/null
+++ b/test/jsonld/1.1/expand/c031-out.jsonld
@@ -0,0 +1,9 @@
+[
+ {
+ "http://a.example/out": [{
+ "http://a.example/in": [{
+ "@value":"ab"
+ }]
+ }]
+ }
+]
diff --git a/test/jsonld/1.1/expand/c031/c031-context.jsonld b/test/jsonld/1.1/expand/c031/c031-context.jsonld
new file mode 100644
index 000000000..f1bf22b1a
--- /dev/null
+++ b/test/jsonld/1.1/expand/c031/c031-context.jsonld
@@ -0,0 +1,10 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "@base": "http://example.org/b/",
+ "outer": {
+ "@id": "http://a.example/out",
+ "@context": "../c031-context.jsonld"
+ }
+ }
+}
diff --git a/test/jsonld/1.1/expand/c032-in.jsonld b/test/jsonld/1.1/expand/c032-in.jsonld
new file mode 100644
index 000000000..48b812f95
--- /dev/null
+++ b/test/jsonld/1.1/expand/c032-in.jsonld
@@ -0,0 +1,14 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "t1": {
+ "@id": "ex:t1",
+ "@context": {
+ "t2": {
+ "@context": {"type": null}
+ }
+ }
+ }
+ },
+ "t1": "something"
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/c033-in.jsonld b/test/jsonld/1.1/expand/c033-in.jsonld
new file mode 100644
index 000000000..3628ff4ee
--- /dev/null
+++ b/test/jsonld/1.1/expand/c033-in.jsonld
@@ -0,0 +1,13 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "t1": {
+ "@id": "ex:t1",
+ "@context": {
+ "t2": {
+ "@context": {"type": null}
+ }
+ }
+ }
+ }
+}
diff --git a/test/jsonld/1.1/expand/c034-context.jsonld b/test/jsonld/1.1/expand/c034-context.jsonld
new file mode 100644
index 000000000..7dd9f8719
--- /dev/null
+++ b/test/jsonld/1.1/expand/c034-context.jsonld
@@ -0,0 +1,5 @@
+{
+ "@context": {
+ "bar": "http://example.org/bar"
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/c034-in.jsonld b/test/jsonld/1.1/expand/c034-in.jsonld
new file mode 100644
index 000000000..6655d5207
--- /dev/null
+++ b/test/jsonld/1.1/expand/c034-in.jsonld
@@ -0,0 +1,9 @@
+{
+ "@context": {
+ "@vocab": "http://example/",
+ "foo": {"@context": "c034-context.jsonld"}
+ },
+ "foo": {
+ "bar": "baz"
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/c034-out.jsonld b/test/jsonld/1.1/expand/c034-out.jsonld
new file mode 100644
index 000000000..122c864ad
--- /dev/null
+++ b/test/jsonld/1.1/expand/c034-out.jsonld
@@ -0,0 +1,5 @@
+[
+ {
+ "http://example/foo": [{"http://example.org/bar": [{"@value": "baz"}]}]
+ }
+]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/c035-in.jsonld b/test/jsonld/1.1/expand/c035-in.jsonld
new file mode 100644
index 000000000..f436b93e8
--- /dev/null
+++ b/test/jsonld/1.1/expand/c035-in.jsonld
@@ -0,0 +1,15 @@
+{
+ "@context": {
+ "@vocab": "http://vocab.org/",
+ "prop1": {}
+ },
+ "@id": "ex:outer",
+ "foo": {
+ "@context": {
+ "@vocab": "http://vocab.override.org/"
+ },
+ "@id": "ex:inner",
+ "prop1": "baz1",
+ "prop2": "baz2"
+ }
+}
diff --git a/test/jsonld/1.1/expand/c035-out.jsonld b/test/jsonld/1.1/expand/c035-out.jsonld
new file mode 100644
index 000000000..deee2a020
--- /dev/null
+++ b/test/jsonld/1.1/expand/c035-out.jsonld
@@ -0,0 +1,20 @@
+[
+ {
+ "@id": "ex:outer",
+ "http://vocab.org/foo": [
+ {
+ "@id": "ex:inner",
+ "http://vocab.org/prop1": [
+ {
+ "@value": "baz1"
+ }
+ ],
+ "http://vocab.override.org/prop2": [
+ {
+ "@value": "baz2"
+ }
+ ]
+ }
+ ]
+ }
+]
diff --git a/test/jsonld/1.1/expand/c036-in.jsonld b/test/jsonld/1.1/expand/c036-in.jsonld
new file mode 100644
index 000000000..0248eef42
--- /dev/null
+++ b/test/jsonld/1.1/expand/c036-in.jsonld
@@ -0,0 +1,13 @@
+{
+ "@context": {
+ "thing": {
+ "@id": "ex:thing",
+ "@context": {}
+ },
+ "title": "ex:title"
+ },
+ "title": "top",
+ "thing": {
+ "title": "sub"
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/c036-out.jsonld b/test/jsonld/1.1/expand/c036-out.jsonld
new file mode 100644
index 000000000..c75a98374
--- /dev/null
+++ b/test/jsonld/1.1/expand/c036-out.jsonld
@@ -0,0 +1,7 @@
+[{
+ "ex:title": [{"@value": "top"}
+ ],
+ "ex:thing": [{
+ "ex:title": [{"@value": "sub"}]
+ }]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/c037-in.jsonld b/test/jsonld/1.1/expand/c037-in.jsonld
new file mode 100644
index 000000000..462376b2c
--- /dev/null
+++ b/test/jsonld/1.1/expand/c037-in.jsonld
@@ -0,0 +1,15 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "@vocab": "http://example.org/",
+ "nest": {
+ "@id": "@nest",
+ "@context": {
+ "@vocab": "http://example.org/nest/"
+ }
+ }
+ },
+ "nest": {
+ "property": "should be in /nest"
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/c037-out.jsonld b/test/jsonld/1.1/expand/c037-out.jsonld
new file mode 100644
index 000000000..f100f9733
--- /dev/null
+++ b/test/jsonld/1.1/expand/c037-out.jsonld
@@ -0,0 +1,3 @@
+[{
+ "http://example.org/nest/property": [{"@value": "should be in /nest"}]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/c038-in.jsonld b/test/jsonld/1.1/expand/c038-in.jsonld
new file mode 100644
index 000000000..efc96236d
--- /dev/null
+++ b/test/jsonld/1.1/expand/c038-in.jsonld
@@ -0,0 +1,54 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "@base": "http://example.org/base/",
+ "@vocab": "http://purl.org/dc/terms/",
+ "bibo": "http://purl.org/ontology/bibo/",
+ "Print": "bibo:Book",
+ "name": "http://www.w3.org/2000/01/rdf-schema#label",
+ "instanceOf": "@nest",
+ "contributionByRole": {
+ "@id": "@nest",
+ "@context": {
+ "agent": "@nest",
+ "aut": "creator"
+ }
+ },
+ "provisionActivityByType": {
+ "@id": "@nest",
+ "@context": {
+ "Publication": {
+ "@id": "@nest",
+ "@context": {"date": "published", "agent": "publisher"}
+ }
+ }
+ },
+ "identifiedByType": {
+ "@id": "@nest",
+ "@context": {
+ "Isbn": {"@id": "@nest"},
+ "value": "bibo:isbn"
+ }
+ }
+ },
+ "@id": "book/one",
+ "@type": "Print",
+ "instanceOf": {
+ "contributionByRole": {
+ "aut": {
+ "agent": {"name": "Some Body"}
+ }
+ }
+ },
+ "identifiedByType": {
+ "Isbn": {
+ "value": "1234567890"
+ }
+ },
+ "provisionActivityByType": {
+ "Publication": {
+ "date": "1999",
+ "agent": {"name": "PubCorp"}
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/c038-out.jsonld b/test/jsonld/1.1/expand/c038-out.jsonld
new file mode 100644
index 000000000..de2c1bb05
--- /dev/null
+++ b/test/jsonld/1.1/expand/c038-out.jsonld
@@ -0,0 +1,12 @@
+[{
+ "@id": "http://example.org/base/book/one",
+ "@type": ["http://purl.org/ontology/bibo/Book"],
+ "http://purl.org/dc/terms/creator": [{
+ "http://www.w3.org/2000/01/rdf-schema#label": [{"@value": "Some Body"}]
+ }],
+ "http://purl.org/ontology/bibo/isbn": [{"@value": "1234567890"}],
+ "http://purl.org/dc/terms/published": [{"@value": "1999"}],
+ "http://purl.org/dc/terms/publisher": [{
+ "http://www.w3.org/2000/01/rdf-schema#label": [{"@value": "PubCorp"}]
+ }]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/di01-in.jsonld b/test/jsonld/1.1/expand/di01-in.jsonld
new file mode 100644
index 000000000..ae8217d38
--- /dev/null
+++ b/test/jsonld/1.1/expand/di01-in.jsonld
@@ -0,0 +1,12 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "@direction": "rtl",
+ "ex": "http://example.org/vocab#",
+ "ex:ltr": { "@direction": "ltr" },
+ "ex:none": { "@direction": null }
+ },
+ "ex:rtl": "rtl",
+ "ex:ltr": "ltr",
+ "ex:none": "no direction"
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/di01-out.jsonld b/test/jsonld/1.1/expand/di01-out.jsonld
new file mode 100644
index 000000000..177098344
--- /dev/null
+++ b/test/jsonld/1.1/expand/di01-out.jsonld
@@ -0,0 +1,7 @@
+[
+ {
+ "http://example.org/vocab#rtl": [{"@value": "rtl", "@direction": "rtl"}],
+ "http://example.org/vocab#ltr": [{"@value": "ltr", "@direction": "ltr"}],
+ "http://example.org/vocab#none": [{"@value": "no direction"}]
+ }
+]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/di02-in.jsonld b/test/jsonld/1.1/expand/di02-in.jsonld
new file mode 100644
index 000000000..379362f58
--- /dev/null
+++ b/test/jsonld/1.1/expand/di02-in.jsonld
@@ -0,0 +1,25 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "@language": "en",
+ "@direction": "rtl",
+ "ex": "http://example.org/vocab#",
+ "ex:ltr": { "@direction": "ltr" },
+ "ex:none": { "@direction": null },
+ "ex:german": { "@language": "de" },
+ "ex:nolang": { "@language": null },
+ "ex:german_ltr": { "@language": "de", "@direction": "ltr" },
+ "ex:nolang_ltr": { "@language": null, "@direction": "ltr" },
+ "ex:none_none": { "@language": null, "@direction": null },
+ "ex:german_none": { "@language": "de", "@direction": null }
+ },
+ "ex:rtl": "rtl en",
+ "ex:ltr": "ltr en",
+ "ex:none": "no direction en",
+ "ex:german": "german rtl",
+ "ex:nolang": "no language rtl",
+ "ex:german_ltr": "german ltr",
+ "ex:nolang_ltr": "no language ltr",
+ "ex:none_none": "no language or direction",
+ "ex:german_none": "german no direction"
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/di02-out.jsonld b/test/jsonld/1.1/expand/di02-out.jsonld
new file mode 100644
index 000000000..77d62249b
--- /dev/null
+++ b/test/jsonld/1.1/expand/di02-out.jsonld
@@ -0,0 +1,13 @@
+[
+ {
+ "http://example.org/vocab#rtl": [{"@value": "rtl en", "@language": "en", "@direction": "rtl"}],
+ "http://example.org/vocab#ltr": [{"@value": "ltr en", "@language": "en", "@direction": "ltr"}],
+ "http://example.org/vocab#none": [{"@value": "no direction en", "@language": "en"}],
+ "http://example.org/vocab#german": [{"@value": "german rtl", "@language": "de", "@direction": "rtl"}],
+ "http://example.org/vocab#nolang": [{"@value": "no language rtl", "@direction": "rtl"}],
+ "http://example.org/vocab#german_ltr": [{"@value": "german ltr", "@language": "de", "@direction": "ltr"}],
+ "http://example.org/vocab#nolang_ltr": [{"@value": "no language ltr", "@direction": "ltr"}],
+ "http://example.org/vocab#none_none": [{"@value": "no language or direction"}],
+ "http://example.org/vocab#german_none": [{"@value": "german no direction", "@language": "de"}]
+ }
+]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/di03-in.jsonld b/test/jsonld/1.1/expand/di03-in.jsonld
new file mode 100644
index 000000000..22ca2005d
--- /dev/null
+++ b/test/jsonld/1.1/expand/di03-in.jsonld
@@ -0,0 +1,9 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "foo_ltr": {"@id": "http://example.com/foo", "@container": "@list", "@direction": "ltr"},
+ "foo_rtl": {"@id": "http://example.com/foo", "@container": "@list", "@direction": "rtl"}
+ },
+ "foo_ltr": ["en"],
+ "foo_rtl": ["ar"]
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/di03-out.jsonld b/test/jsonld/1.1/expand/di03-out.jsonld
new file mode 100644
index 000000000..429aa76f9
--- /dev/null
+++ b/test/jsonld/1.1/expand/di03-out.jsonld
@@ -0,0 +1,6 @@
+[{
+ "http://example.com/foo": [
+ {"@list": [{"@value": "en", "@direction": "ltr"}]},
+ {"@list": [{"@value": "ar", "@direction": "rtl"}]}
+ ]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/di04-in.jsonld b/test/jsonld/1.1/expand/di04-in.jsonld
new file mode 100644
index 000000000..b1cf3f4a0
--- /dev/null
+++ b/test/jsonld/1.1/expand/di04-in.jsonld
@@ -0,0 +1,16 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "@direction": "ltr",
+ "vocab": "http://example.com/vocab/",
+ "label": {
+ "@id": "vocab:label",
+ "@container": "@language"
+ }
+ },
+ "@id": "http://example.com/queen",
+ "label": {
+ "en": "The Queen",
+ "de": [ "Die Königin", "Ihre Majestät" ]
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/di04-out.jsonld b/test/jsonld/1.1/expand/di04-out.jsonld
new file mode 100644
index 000000000..a0b9512c8
--- /dev/null
+++ b/test/jsonld/1.1/expand/di04-out.jsonld
@@ -0,0 +1,10 @@
+[
+ {
+ "@id": "http://example.com/queen",
+ "http://example.com/vocab/label": [
+ {"@value": "Die Königin", "@language": "de", "@direction": "ltr"},
+ {"@value": "Ihre Majestät", "@language": "de", "@direction": "ltr"},
+ {"@value": "The Queen", "@language": "en", "@direction": "ltr"}
+ ]
+ }
+]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/di05-in.jsonld b/test/jsonld/1.1/expand/di05-in.jsonld
new file mode 100644
index 000000000..a61d6a939
--- /dev/null
+++ b/test/jsonld/1.1/expand/di05-in.jsonld
@@ -0,0 +1,16 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "vocab": "http://example.com/vocab/",
+ "label": {
+ "@id": "vocab:label",
+ "@direction": "ltr",
+ "@container": "@language"
+ }
+ },
+ "@id": "http://example.com/queen",
+ "label": {
+ "en": "The Queen",
+ "de": [ "Die Königin", "Ihre Majestät" ]
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/di05-out.jsonld b/test/jsonld/1.1/expand/di05-out.jsonld
new file mode 100644
index 000000000..a0b9512c8
--- /dev/null
+++ b/test/jsonld/1.1/expand/di05-out.jsonld
@@ -0,0 +1,10 @@
+[
+ {
+ "@id": "http://example.com/queen",
+ "http://example.com/vocab/label": [
+ {"@value": "Die Königin", "@language": "de", "@direction": "ltr"},
+ {"@value": "Ihre Majestät", "@language": "de", "@direction": "ltr"},
+ {"@value": "The Queen", "@language": "en", "@direction": "ltr"}
+ ]
+ }
+]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/di06-in.jsonld b/test/jsonld/1.1/expand/di06-in.jsonld
new file mode 100644
index 000000000..f8a69db94
--- /dev/null
+++ b/test/jsonld/1.1/expand/di06-in.jsonld
@@ -0,0 +1,17 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "vocab": "http://example.com/vocab/",
+ "@direction": "rtl",
+ "label": {
+ "@id": "vocab:label",
+ "@direction": "ltr",
+ "@container": "@language"
+ }
+ },
+ "@id": "http://example.com/queen",
+ "label": {
+ "en": "The Queen",
+ "de": [ "Die Königin", "Ihre Majestät" ]
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/di06-out.jsonld b/test/jsonld/1.1/expand/di06-out.jsonld
new file mode 100644
index 000000000..a0b9512c8
--- /dev/null
+++ b/test/jsonld/1.1/expand/di06-out.jsonld
@@ -0,0 +1,10 @@
+[
+ {
+ "@id": "http://example.com/queen",
+ "http://example.com/vocab/label": [
+ {"@value": "Die Königin", "@language": "de", "@direction": "ltr"},
+ {"@value": "Ihre Majestät", "@language": "de", "@direction": "ltr"},
+ {"@value": "The Queen", "@language": "en", "@direction": "ltr"}
+ ]
+ }
+]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/di07-in.jsonld b/test/jsonld/1.1/expand/di07-in.jsonld
new file mode 100644
index 000000000..23e90ddd8
--- /dev/null
+++ b/test/jsonld/1.1/expand/di07-in.jsonld
@@ -0,0 +1,17 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "vocab": "http://example.com/vocab/",
+ "@direction": "rtl",
+ "label": {
+ "@id": "vocab:label",
+ "@direction": null,
+ "@container": "@language"
+ }
+ },
+ "@id": "http://example.com/queen",
+ "label": {
+ "en": "The Queen",
+ "de": [ "Die Königin", "Ihre Majestät" ]
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/di07-out.jsonld b/test/jsonld/1.1/expand/di07-out.jsonld
new file mode 100644
index 000000000..2ba565617
--- /dev/null
+++ b/test/jsonld/1.1/expand/di07-out.jsonld
@@ -0,0 +1,10 @@
+[
+ {
+ "@id": "http://example.com/queen",
+ "http://example.com/vocab/label": [
+ {"@value": "Die Königin", "@language": "de"},
+ {"@value": "Ihre Majestät", "@language": "de"},
+ {"@value": "The Queen", "@language": "en"}
+ ]
+ }
+]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/di08-in.jsonld b/test/jsonld/1.1/expand/di08-in.jsonld
new file mode 100644
index 000000000..de8e61c76
--- /dev/null
+++ b/test/jsonld/1.1/expand/di08-in.jsonld
@@ -0,0 +1,7 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "@direction": "foo"
+ },
+ "vocab:term": "bar"
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/di09-in.jsonld b/test/jsonld/1.1/expand/di09-in.jsonld
new file mode 100644
index 000000000..31f21d0d4
--- /dev/null
+++ b/test/jsonld/1.1/expand/di09-in.jsonld
@@ -0,0 +1,7 @@
+{
+ "ex:p": {
+ "@value": "v",
+ "@type": "ex:t",
+ "@direction": "rtl"
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/e003-context.jsonld b/test/jsonld/1.1/expand/e003-context.jsonld
new file mode 100644
index 000000000..8629f9161
--- /dev/null
+++ b/test/jsonld/1.1/expand/e003-context.jsonld
@@ -0,0 +1,3 @@
+{
+ "@context": "e003-in.jsonld"
+}
diff --git a/test/jsonld/1.1/expand/e052-in.jsonld b/test/jsonld/1.1/expand/e052-in.jsonld
new file mode 100644
index 000000000..7e3013c51
--- /dev/null
+++ b/test/jsonld/1.1/expand/e052-in.jsonld
@@ -0,0 +1,4 @@
+{
+ "@context": "e052-in.jsonld",
+ "@id": "http://example/test#example"
+}
diff --git a/test/jsonld/1.1/expand/e053-context.jsonld b/test/jsonld/1.1/expand/e053-context.jsonld
new file mode 100644
index 000000000..2da63c091
--- /dev/null
+++ b/test/jsonld/1.1/expand/e053-context.jsonld
@@ -0,0 +1,3 @@
+{
+ "@context": "e053-in.jsonld"
+}
diff --git a/test/jsonld/1.1/expand/e053-in.jsonld b/test/jsonld/1.1/expand/e053-in.jsonld
new file mode 100644
index 000000000..5f672792e
--- /dev/null
+++ b/test/jsonld/1.1/expand/e053-in.jsonld
@@ -0,0 +1,4 @@
+{
+ "@context": "e053-context.jsonld",
+ "@id": "http://example/test#example"
+}
diff --git a/test/jsonld/1.1/expand/e054-context-1.jsonld b/test/jsonld/1.1/expand/e054-context-1.jsonld
new file mode 100644
index 000000000..5f536da43
--- /dev/null
+++ b/test/jsonld/1.1/expand/e054-context-1.jsonld
@@ -0,0 +1,3 @@
+{
+ "@context": "e054-context-2.jsonld"
+}
diff --git a/test/jsonld/1.1/expand/e054-context-2.jsonld b/test/jsonld/1.1/expand/e054-context-2.jsonld
new file mode 100644
index 000000000..16c05b526
--- /dev/null
+++ b/test/jsonld/1.1/expand/e054-context-2.jsonld
@@ -0,0 +1,3 @@
+{
+ "@context": "e054-context-1.jsonld"
+}
diff --git a/test/jsonld/1.1/expand/e054-in.jsonld b/test/jsonld/1.1/expand/e054-in.jsonld
new file mode 100644
index 000000000..e3ac866e5
--- /dev/null
+++ b/test/jsonld/1.1/expand/e054-in.jsonld
@@ -0,0 +1,7 @@
+{
+ "@context": [
+ "e054-context-1.jsonld",
+ "e054-context-2.jsonld"
+ ],
+ "@id": "ex:id"
+}
diff --git a/test/jsonld/1.1/expand/ec01-in.jsonld b/test/jsonld/1.1/expand/ec01-in.jsonld
new file mode 100644
index 000000000..6ea8d9a11
--- /dev/null
+++ b/test/jsonld/1.1/expand/ec01-in.jsonld
@@ -0,0 +1,6 @@
+{
+ "@context": {
+ "term": {"@id": "http://example/", "@index": true}
+ },
+ "@id": "http://example/test#example"
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/ec02-in.jsonld b/test/jsonld/1.1/expand/ec02-in.jsonld
new file mode 100644
index 000000000..ce20b960c
--- /dev/null
+++ b/test/jsonld/1.1/expand/ec02-in.jsonld
@@ -0,0 +1,5 @@
+{
+ "@context": {
+ "@type": {}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/em01-in.jsonld b/test/jsonld/1.1/expand/em01-in.jsonld
new file mode 100644
index 000000000..ea465394e
--- /dev/null
+++ b/test/jsonld/1.1/expand/em01-in.jsonld
@@ -0,0 +1,6 @@
+{
+ "@context": {
+ "term": {"@id": "http://example/term", "@container": "@context"}
+ },
+ "@id": "http://example/test#example"
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/en01-in.jsonld b/test/jsonld/1.1/expand/en01-in.jsonld
new file mode 100644
index 000000000..81408e661
--- /dev/null
+++ b/test/jsonld/1.1/expand/en01-in.jsonld
@@ -0,0 +1,4 @@
+{
+ "@context": {"@vocab": "http://example.org/"},
+ "@nest": "This should generate an error"
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/en02-in.jsonld b/test/jsonld/1.1/expand/en02-in.jsonld
new file mode 100644
index 000000000..7af5e3b47
--- /dev/null
+++ b/test/jsonld/1.1/expand/en02-in.jsonld
@@ -0,0 +1,4 @@
+{
+ "@context": {"@vocab": "http://example.org/"},
+ "@nest": true
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/en03-in.jsonld b/test/jsonld/1.1/expand/en03-in.jsonld
new file mode 100644
index 000000000..91d338864
--- /dev/null
+++ b/test/jsonld/1.1/expand/en03-in.jsonld
@@ -0,0 +1,4 @@
+{
+ "@context": {"@vocab": "http://example.org/"},
+ "@nest": 1
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/en04-in.jsonld b/test/jsonld/1.1/expand/en04-in.jsonld
new file mode 100644
index 000000000..11e246a32
--- /dev/null
+++ b/test/jsonld/1.1/expand/en04-in.jsonld
@@ -0,0 +1,4 @@
+{
+ "@context": {"@vocab": "http://example.org/"},
+ "@nest": {"@value": "This should generate an error"}
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/en05-in.jsonld b/test/jsonld/1.1/expand/en05-in.jsonld
new file mode 100644
index 000000000..a33791ca4
--- /dev/null
+++ b/test/jsonld/1.1/expand/en05-in.jsonld
@@ -0,0 +1,5 @@
+{
+ "@context": {
+ "term": {"@id": "http://example/term", "@nest": "@id"}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/en06-in.jsonld b/test/jsonld/1.1/expand/en06-in.jsonld
new file mode 100644
index 000000000..3015c7af6
--- /dev/null
+++ b/test/jsonld/1.1/expand/en06-in.jsonld
@@ -0,0 +1,5 @@
+{
+ "@context": {
+ "term": {"@reverse": "http://example/term", "@nest": "@nest"}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/ep02-in.jsonld b/test/jsonld/1.1/expand/ep02-in.jsonld
new file mode 100644
index 000000000..4caa4695e
--- /dev/null
+++ b/test/jsonld/1.1/expand/ep02-in.jsonld
@@ -0,0 +1,5 @@
+{
+ "@context": {
+ "@version": 1.1
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/ep03-in.jsonld b/test/jsonld/1.1/expand/ep03-in.jsonld
new file mode 100644
index 000000000..63c70f63a
--- /dev/null
+++ b/test/jsonld/1.1/expand/ep03-in.jsonld
@@ -0,0 +1,5 @@
+{
+ "@context": {
+ "@version": 1.0
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/er01-in.jsonld b/test/jsonld/1.1/expand/er01-in.jsonld
new file mode 100644
index 000000000..4d295897b
--- /dev/null
+++ b/test/jsonld/1.1/expand/er01-in.jsonld
@@ -0,0 +1,6 @@
+{
+ "@context": {
+ "@type": "@id"
+ },
+ "@type": "http://example.org/type"
+}
diff --git a/test/jsonld/1.1/expand/er02-in.jsonld b/test/jsonld/1.1/expand/er02-in.jsonld
new file mode 100644
index 000000000..64ea58958
--- /dev/null
+++ b/test/jsonld/1.1/expand/er02-in.jsonld
@@ -0,0 +1,4 @@
+{
+ "@context": "er02-in.jsonld",
+ "@id": "http://example/test#example"
+}
diff --git a/test/jsonld/1.1/expand/er03-in.jsonld b/test/jsonld/1.1/expand/er03-in.jsonld
new file mode 100644
index 000000000..524fd18b3
--- /dev/null
+++ b/test/jsonld/1.1/expand/er03-in.jsonld
@@ -0,0 +1,4 @@
+{
+ "@context": "er03-in.jsonld",
+ "@id": "http://example/test#example"
+}
diff --git a/test/jsonld/1.1/expand/er04-in.jsonld b/test/jsonld/1.1/expand/er04-in.jsonld
new file mode 100644
index 000000000..773919154
--- /dev/null
+++ b/test/jsonld/1.1/expand/er04-in.jsonld
@@ -0,0 +1,4 @@
+{
+ "@context": "tag:non-dereferencable-iri",
+ "@id": "http://example/test#example"
+}
diff --git a/test/jsonld/1.1/expand/er05-in.jsonld b/test/jsonld/1.1/expand/er05-in.jsonld
new file mode 100644
index 000000000..c1a1be6c6
--- /dev/null
+++ b/test/jsonld/1.1/expand/er05-in.jsonld
@@ -0,0 +1,4 @@
+[{
+ "@context": "er05-in.jsonld",
+ "@id": "http://example/test#example"
+}]
diff --git a/test/jsonld/1.1/expand/er06-in.jsonld b/test/jsonld/1.1/expand/er06-in.jsonld
new file mode 100644
index 000000000..f30126f04
--- /dev/null
+++ b/test/jsonld/1.1/expand/er06-in.jsonld
@@ -0,0 +1,4 @@
+{
+ "@context": true,
+ "@id": "http://example/test#example"
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/er07-in.jsonld b/test/jsonld/1.1/expand/er07-in.jsonld
new file mode 100644
index 000000000..17033fc08
--- /dev/null
+++ b/test/jsonld/1.1/expand/er07-in.jsonld
@@ -0,0 +1,4 @@
+{
+ "@context": {"@base": true},
+ "@id": "http://example/test#example"
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/er08-in.jsonld b/test/jsonld/1.1/expand/er08-in.jsonld
new file mode 100644
index 000000000..af74aecbb
--- /dev/null
+++ b/test/jsonld/1.1/expand/er08-in.jsonld
@@ -0,0 +1,4 @@
+{
+ "@context": {"@vocab": true},
+ "@id": "http://example/test#example"
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/er09-in.jsonld b/test/jsonld/1.1/expand/er09-in.jsonld
new file mode 100644
index 000000000..d35c63485
--- /dev/null
+++ b/test/jsonld/1.1/expand/er09-in.jsonld
@@ -0,0 +1,4 @@
+{
+ "@context": {"@language": true},
+ "@id": "http://example/test#example"
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/er10-in.jsonld b/test/jsonld/1.1/expand/er10-in.jsonld
new file mode 100644
index 000000000..f686eac91
--- /dev/null
+++ b/test/jsonld/1.1/expand/er10-in.jsonld
@@ -0,0 +1,6 @@
+{
+ "@context": {
+ "term": {"@id": "term:term"}
+ },
+ "@id": "http://example/test#example"
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/er11-in.jsonld b/test/jsonld/1.1/expand/er11-in.jsonld
new file mode 100644
index 000000000..f42f32d78
--- /dev/null
+++ b/test/jsonld/1.1/expand/er11-in.jsonld
@@ -0,0 +1,6 @@
+{
+ "@context": {
+ "term": true
+ },
+ "@id": "http://example/test#example"
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/er12-in.jsonld b/test/jsonld/1.1/expand/er12-in.jsonld
new file mode 100644
index 000000000..5d4295ad2
--- /dev/null
+++ b/test/jsonld/1.1/expand/er12-in.jsonld
@@ -0,0 +1,6 @@
+{
+ "@context": {
+ "term": {"@id": "http://example/term", "@type": true}
+ },
+ "@id": "http://example/test#example"
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/er13-in.jsonld b/test/jsonld/1.1/expand/er13-in.jsonld
new file mode 100644
index 000000000..9a968432d
--- /dev/null
+++ b/test/jsonld/1.1/expand/er13-in.jsonld
@@ -0,0 +1,6 @@
+{
+ "@context": {
+ "term": {"@id": "http://example/term", "@type": "_:not-an-iri"}
+ },
+ "@id": "http://example/test#example"
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/er14-in.jsonld b/test/jsonld/1.1/expand/er14-in.jsonld
new file mode 100644
index 000000000..c6b1007ef
--- /dev/null
+++ b/test/jsonld/1.1/expand/er14-in.jsonld
@@ -0,0 +1,6 @@
+{
+ "@context": {
+ "term": {"@id": "http://example/term", "@reverse": "http://example/reverse"}
+ },
+ "@id": "http://example/test#example"
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/er15-in.jsonld b/test/jsonld/1.1/expand/er15-in.jsonld
new file mode 100644
index 000000000..2a805bc89
--- /dev/null
+++ b/test/jsonld/1.1/expand/er15-in.jsonld
@@ -0,0 +1,6 @@
+{
+ "@context": {
+ "term": {"@reverse": true}
+ },
+ "@id": "http://example/test#example"
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/er17-in.jsonld b/test/jsonld/1.1/expand/er17-in.jsonld
new file mode 100644
index 000000000..403acef9e
--- /dev/null
+++ b/test/jsonld/1.1/expand/er17-in.jsonld
@@ -0,0 +1,6 @@
+{
+ "@context": {
+ "term": {"@reverse": "http://example/reverse", "@container": "@list"}
+ },
+ "@id": "http://example/test#example"
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/er18-in.jsonld b/test/jsonld/1.1/expand/er18-in.jsonld
new file mode 100644
index 000000000..9a9e2afab
--- /dev/null
+++ b/test/jsonld/1.1/expand/er18-in.jsonld
@@ -0,0 +1,6 @@
+{
+ "@context": {
+ "term": {"@id": true}
+ },
+ "@id": "http://example/test#example"
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/er19-in.jsonld b/test/jsonld/1.1/expand/er19-in.jsonld
new file mode 100644
index 000000000..04f67abe4
--- /dev/null
+++ b/test/jsonld/1.1/expand/er19-in.jsonld
@@ -0,0 +1,6 @@
+{
+ "@context": {
+ "term": {"@id": "@context"}
+ },
+ "@id": "http://example/test#example"
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/er20-in.jsonld b/test/jsonld/1.1/expand/er20-in.jsonld
new file mode 100644
index 000000000..dff3ba52b
--- /dev/null
+++ b/test/jsonld/1.1/expand/er20-in.jsonld
@@ -0,0 +1,6 @@
+{
+ "@context": {
+ "term": {"@container": "@set"}
+ },
+ "@id": "http://example/test#example"
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/er21-in.jsonld b/test/jsonld/1.1/expand/er21-in.jsonld
new file mode 100644
index 000000000..8fdc37533
--- /dev/null
+++ b/test/jsonld/1.1/expand/er21-in.jsonld
@@ -0,0 +1,6 @@
+{
+ "@context": {
+ "term": {"@id": "http://example/term", "@container": "@id"}
+ },
+ "@id": "http://example/test#example"
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/er22-in.jsonld b/test/jsonld/1.1/expand/er22-in.jsonld
new file mode 100644
index 000000000..37f0e71c2
--- /dev/null
+++ b/test/jsonld/1.1/expand/er22-in.jsonld
@@ -0,0 +1,6 @@
+{
+ "@context": {
+ "term": {"@id": "http://example/term", "@language": true}
+ },
+ "@id": "http://example/test#example"
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/er23-in.jsonld b/test/jsonld/1.1/expand/er23-in.jsonld
new file mode 100644
index 000000000..3162bb469
--- /dev/null
+++ b/test/jsonld/1.1/expand/er23-in.jsonld
@@ -0,0 +1,6 @@
+{
+ "@context": {
+ "term": {"@id": "http://example/term", "@type": "relative/iri"}
+ },
+ "@id": "http://example/test#example"
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/er24-in.jsonld b/test/jsonld/1.1/expand/er24-in.jsonld
new file mode 100644
index 000000000..f5e78e4dd
--- /dev/null
+++ b/test/jsonld/1.1/expand/er24-in.jsonld
@@ -0,0 +1,4 @@
+{
+ "@context": {"foo": {"@id": "http://example.com/foo", "@container": "@list"}},
+ "foo": [{"@list": ["baz"]}]
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/er25-in.jsonld b/test/jsonld/1.1/expand/er25-in.jsonld
new file mode 100644
index 000000000..0b66e9af1
--- /dev/null
+++ b/test/jsonld/1.1/expand/er25-in.jsonld
@@ -0,0 +1,6 @@
+{
+ "@id": "http://example/foo",
+ "@reverse": {
+ "@id": "http://example/bar"
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/er26-in.jsonld b/test/jsonld/1.1/expand/er26-in.jsonld
new file mode 100644
index 000000000..36a12b8bd
--- /dev/null
+++ b/test/jsonld/1.1/expand/er26-in.jsonld
@@ -0,0 +1,8 @@
+{
+ "@context": {
+ "id": "@id",
+ "ID": "@id"
+ },
+ "id": "http://example/foo",
+ "ID": "http://example/bar"
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/er27-in.jsonld b/test/jsonld/1.1/expand/er27-in.jsonld
new file mode 100644
index 000000000..76d36d5a2
--- /dev/null
+++ b/test/jsonld/1.1/expand/er27-in.jsonld
@@ -0,0 +1,3 @@
+{
+ "@id": true
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/er28-in.jsonld b/test/jsonld/1.1/expand/er28-in.jsonld
new file mode 100644
index 000000000..6c8f77629
--- /dev/null
+++ b/test/jsonld/1.1/expand/er28-in.jsonld
@@ -0,0 +1,3 @@
+{
+ "@type": true
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/er29-in.jsonld b/test/jsonld/1.1/expand/er29-in.jsonld
new file mode 100644
index 000000000..c669c9e52
--- /dev/null
+++ b/test/jsonld/1.1/expand/er29-in.jsonld
@@ -0,0 +1,3 @@
+{
+ "http://example/prop": {"@value": ["foo"]}
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/er30-in.jsonld b/test/jsonld/1.1/expand/er30-in.jsonld
new file mode 100644
index 000000000..abba6ceea
--- /dev/null
+++ b/test/jsonld/1.1/expand/er30-in.jsonld
@@ -0,0 +1,3 @@
+{
+ "http://example/prop": {"@value": "foo", "@language": true}
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/er31-in.jsonld b/test/jsonld/1.1/expand/er31-in.jsonld
new file mode 100644
index 000000000..f0c5c462a
--- /dev/null
+++ b/test/jsonld/1.1/expand/er31-in.jsonld
@@ -0,0 +1,7 @@
+{
+ "http://example.com/vocab/indexMap": {
+ "@value": "simple string",
+ "@language": "en",
+ "@index": true
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/er32-in.jsonld b/test/jsonld/1.1/expand/er32-in.jsonld
new file mode 100644
index 000000000..75ec1a87d
--- /dev/null
+++ b/test/jsonld/1.1/expand/er32-in.jsonld
@@ -0,0 +1,3 @@
+{
+ "http://example.com/foo": {"@list": [{"@list": ["baz"]}]}
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/er33-in.jsonld b/test/jsonld/1.1/expand/er33-in.jsonld
new file mode 100644
index 000000000..a57607fa0
--- /dev/null
+++ b/test/jsonld/1.1/expand/er33-in.jsonld
@@ -0,0 +1,5 @@
+{
+ "http://example/prop": {
+ "@reverse": true
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/er34-in.jsonld b/test/jsonld/1.1/expand/er34-in.jsonld
new file mode 100644
index 000000000..d48c68b85
--- /dev/null
+++ b/test/jsonld/1.1/expand/er34-in.jsonld
@@ -0,0 +1,10 @@
+{
+ "@context": {
+ "name": "http://xmlns.com/foaf/0.1/name"
+ },
+ "@id": "http://example.com/people/markus",
+ "name": "Markus Lanthaler",
+ "@reverse": {
+ "http://xmlns.com/foaf/0.1/knows": "Dave Longley"
+ }
+}
diff --git a/test/jsonld/1.1/expand/er35-in.jsonld b/test/jsonld/1.1/expand/er35-in.jsonld
new file mode 100644
index 000000000..c523c9425
--- /dev/null
+++ b/test/jsonld/1.1/expand/er35-in.jsonld
@@ -0,0 +1,13 @@
+{
+ "@context": {
+ "vocab": "http://example.com/vocab/",
+ "label": {
+ "@id": "vocab:label",
+ "@container": "@language"
+ }
+ },
+ "@id": "http://example.com/queen",
+ "label": {
+ "en": true
+ }
+}
diff --git a/test/jsonld/1.1/expand/er36-in.jsonld b/test/jsonld/1.1/expand/er36-in.jsonld
new file mode 100644
index 000000000..8e9ff8b5f
--- /dev/null
+++ b/test/jsonld/1.1/expand/er36-in.jsonld
@@ -0,0 +1,7 @@
+{
+ "@context": {
+ "term": {"@reverse": "http://example/reverse"}
+ },
+ "@id": "http://example/foo",
+ "term": {"@list": ["http://example/bar"]}
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/er37-in.jsonld b/test/jsonld/1.1/expand/er37-in.jsonld
new file mode 100644
index 000000000..0a2d1750b
--- /dev/null
+++ b/test/jsonld/1.1/expand/er37-in.jsonld
@@ -0,0 +1,3 @@
+{
+ "http://example/foo": {"@value": "bar", "@id": "http://example/baz"}
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/er38-in.jsonld b/test/jsonld/1.1/expand/er38-in.jsonld
new file mode 100644
index 000000000..20d4a7b75
--- /dev/null
+++ b/test/jsonld/1.1/expand/er38-in.jsonld
@@ -0,0 +1,3 @@
+{
+ "http://example/foo": {"@value": "bar", "@language": "en", "@type": "http://example/type"}
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/er39-in.jsonld b/test/jsonld/1.1/expand/er39-in.jsonld
new file mode 100644
index 000000000..0d03781bf
--- /dev/null
+++ b/test/jsonld/1.1/expand/er39-in.jsonld
@@ -0,0 +1,3 @@
+{
+ "http://example/foo": {"@value": true, "@language": "en"}
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/er40-in.jsonld b/test/jsonld/1.1/expand/er40-in.jsonld
new file mode 100644
index 000000000..ea9b6303b
--- /dev/null
+++ b/test/jsonld/1.1/expand/er40-in.jsonld
@@ -0,0 +1,3 @@
+{
+ "http://example/foo": {"@value": "bar", "@type": "_:dt"}
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/er41-in.jsonld b/test/jsonld/1.1/expand/er41-in.jsonld
new file mode 100644
index 000000000..c7ad513cd
--- /dev/null
+++ b/test/jsonld/1.1/expand/er41-in.jsonld
@@ -0,0 +1,3 @@
+{
+ "http://example/prop": {"@list": ["foo"], "@id": "http://example/bar"}
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/er42-in.jsonld b/test/jsonld/1.1/expand/er42-in.jsonld
new file mode 100644
index 000000000..41360255d
--- /dev/null
+++ b/test/jsonld/1.1/expand/er42-in.jsonld
@@ -0,0 +1,6 @@
+{
+ "@context": {
+ "@type": {"@container": "@set"}
+ },
+ "@type": "http://example.org/type"
+}
diff --git a/test/jsonld/1.1/expand/er43-in.jsonld b/test/jsonld/1.1/expand/er43-in.jsonld
new file mode 100644
index 000000000..36d8cac73
--- /dev/null
+++ b/test/jsonld/1.1/expand/er43-in.jsonld
@@ -0,0 +1,20 @@
+{
+ "@context": {
+ "http://www.w3.org/1999/02/22-rdf-syntax-ns#type": {"@id": "@type", "@type": "@id"}
+ },
+ "@graph": [
+ {
+ "@id": "http://example.com/a",
+ "http://www.w3.org/1999/02/22-rdf-syntax-ns#type": "http://example.com/b"
+ }, {
+ "@id": "http://example.com/c",
+ "http://www.w3.org/1999/02/22-rdf-syntax-ns#type": [
+ "http://example.com/d",
+ "http://example.com/e"
+ ]
+ }, {
+ "@id": "http://example.com/f",
+ "http://www.w3.org/1999/02/22-rdf-syntax-ns#type": "http://example.com/g"
+ }
+ ]
+}
diff --git a/test/jsonld/1.1/expand/er44-in.jsonld b/test/jsonld/1.1/expand/er44-in.jsonld
new file mode 100644
index 000000000..257bd312a
--- /dev/null
+++ b/test/jsonld/1.1/expand/er44-in.jsonld
@@ -0,0 +1,11 @@
+{
+ "@context": [
+ {
+ "v": "http://example.com/vocab#",
+ "v:term": "v:somethingElse",
+ "v:termId": { "@id": "v:somethingElseId" }
+ }
+ ],
+ "v:term": "value of v:term",
+ "v:termId": "value of v:termId"
+}
diff --git a/test/jsonld/1.1/expand/er45-in.jsonld b/test/jsonld/1.1/expand/er45-in.jsonld
new file mode 100644
index 000000000..598c43fe6
--- /dev/null
+++ b/test/jsonld/1.1/expand/er45-in.jsonld
@@ -0,0 +1,15 @@
+{
+ "@context": [
+ {
+ "v": "http://example.com/vocab#",
+ "v:term": "v:somethingElse",
+ "v:termId": { "@id": "v:somethingElseId" }
+ },
+ {
+ "v:term": "v:term",
+ "v:termId": { "@id": "v:termId" }
+ }
+ ],
+ "v:term": "value of v:term",
+ "v:termId": "value of v:termId"
+}
diff --git a/test/jsonld/1.1/expand/er48-in.jsonld b/test/jsonld/1.1/expand/er48-in.jsonld
new file mode 100644
index 000000000..c3ad292a1
--- /dev/null
+++ b/test/jsonld/1.1/expand/er48-in.jsonld
@@ -0,0 +1,6 @@
+{
+ "@context": {
+ "./something": "http://example.com/vocab#somethingElse"
+ },
+ "./something": "something"
+}
diff --git a/test/jsonld/1.1/expand/er49-in.jsonld b/test/jsonld/1.1/expand/er49-in.jsonld
new file mode 100644
index 000000000..72c0a72d0
--- /dev/null
+++ b/test/jsonld/1.1/expand/er49-in.jsonld
@@ -0,0 +1,7 @@
+{
+ "@context": {
+ "@vocab": "http:/example.org",
+ "./something": {"@type": "@id", "@prefix": true}
+ },
+ "./something": "something"
+}
diff --git a/test/jsonld/1.1/expand/er50-in.jsonld b/test/jsonld/1.1/expand/er50-in.jsonld
new file mode 100644
index 000000000..a54cc667d
--- /dev/null
+++ b/test/jsonld/1.1/expand/er50-in.jsonld
@@ -0,0 +1,7 @@
+{
+ "@context": {
+ "rev": {"@reverse": "not an IRI"}
+ },
+ "@id": "http://example.org/foo",
+ "rev": {"@id": "http://example.org/bar"}
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/er51-in.jsonld b/test/jsonld/1.1/expand/er51-in.jsonld
new file mode 100644
index 000000000..dc9ace8ec
--- /dev/null
+++ b/test/jsonld/1.1/expand/er51-in.jsonld
@@ -0,0 +1,4 @@
+{
+ "@context": {"value": "@value"},
+ "http://example/prop": {"value": ["foo"]}
+}
diff --git a/test/jsonld/1.1/expand/er52-in.jsonld b/test/jsonld/1.1/expand/er52-in.jsonld
new file mode 100644
index 000000000..3bd32cf35
--- /dev/null
+++ b/test/jsonld/1.1/expand/er52-in.jsonld
@@ -0,0 +1,7 @@
+{
+ "@context": {
+ "term": {"@id": "http://example.org/term"},
+ "": {"@id": "http://example.org/empty"}
+ },
+ "@id": "http://example/test#example"
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/er53-in.jsonld b/test/jsonld/1.1/expand/er53-in.jsonld
new file mode 100644
index 000000000..e8ad3ff56
--- /dev/null
+++ b/test/jsonld/1.1/expand/er53-in.jsonld
@@ -0,0 +1,6 @@
+{
+ "@context": {
+ "term": {"@id": "http://example.org/term", "@prefix": 10}
+ },
+ "@id": "http://example/test#example"
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/er54-in.jsonld b/test/jsonld/1.1/expand/er54-in.jsonld
new file mode 100644
index 000000000..6b440ff2a
--- /dev/null
+++ b/test/jsonld/1.1/expand/er54-in.jsonld
@@ -0,0 +1,6 @@
+{
+ "ex:prop": {
+ "@value": "value",
+ "@type": ["ex:a", "ex:b"]
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/er55-in.jsonld b/test/jsonld/1.1/expand/er55-in.jsonld
new file mode 100644
index 000000000..eb45eeaed
--- /dev/null
+++ b/test/jsonld/1.1/expand/er55-in.jsonld
@@ -0,0 +1,9 @@
+{
+ "@context": {
+ "prop": {
+ "@id": "ex:prop",
+ "@type": ["ex:a", "ex:b"]
+ }
+ },
+ "prop": "value"
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/es01-in.jsonld b/test/jsonld/1.1/expand/es01-in.jsonld
new file mode 100644
index 000000000..d014b4833
--- /dev/null
+++ b/test/jsonld/1.1/expand/es01-in.jsonld
@@ -0,0 +1,7 @@
+{
+ "@context": {
+ "term": {"@id": "http://example/term", "@container": ["@set"]}
+ },
+ "@id": "http://example/test#example",
+ "term": "foo"
+}
diff --git a/test/jsonld/1.1/expand/es02-in.jsonld b/test/jsonld/1.1/expand/es02-in.jsonld
new file mode 100644
index 000000000..d71e3eb6f
--- /dev/null
+++ b/test/jsonld/1.1/expand/es02-in.jsonld
@@ -0,0 +1,7 @@
+{
+ "@context": {
+ "term": {"@id": "http://example/term", "@container": ["@list", "@set"]}
+ },
+ "@id": "http://example/test#example",
+ "term": "foo"
+}
diff --git a/test/jsonld/1.1/expand/in01-in.jsonld b/test/jsonld/1.1/expand/in01-in.jsonld
new file mode 100644
index 000000000..145c36e73
--- /dev/null
+++ b/test/jsonld/1.1/expand/in01-in.jsonld
@@ -0,0 +1,10 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "@vocab": "http://example.org/"
+ },
+ "prop": "value",
+ "@included": [{
+ "prop": "value2"
+ }]
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/in01-out.jsonld b/test/jsonld/1.1/expand/in01-out.jsonld
new file mode 100644
index 000000000..2e2188309
--- /dev/null
+++ b/test/jsonld/1.1/expand/in01-out.jsonld
@@ -0,0 +1,6 @@
+[{
+ "http://example.org/prop": [{"@value": "value"}],
+ "@included": [{
+ "http://example.org/prop": [{"@value": "value2"}]
+ }]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/in02-in.jsonld b/test/jsonld/1.1/expand/in02-in.jsonld
new file mode 100644
index 000000000..a976cce70
--- /dev/null
+++ b/test/jsonld/1.1/expand/in02-in.jsonld
@@ -0,0 +1,10 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "@vocab": "http://example.org/"
+ },
+ "prop": "value",
+ "@included": {
+ "prop": "value2"
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/in02-out.jsonld b/test/jsonld/1.1/expand/in02-out.jsonld
new file mode 100644
index 000000000..2e2188309
--- /dev/null
+++ b/test/jsonld/1.1/expand/in02-out.jsonld
@@ -0,0 +1,6 @@
+[{
+ "http://example.org/prop": [{"@value": "value"}],
+ "@included": [{
+ "http://example.org/prop": [{"@value": "value2"}]
+ }]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/in03-in.jsonld b/test/jsonld/1.1/expand/in03-in.jsonld
new file mode 100644
index 000000000..ed476d436
--- /dev/null
+++ b/test/jsonld/1.1/expand/in03-in.jsonld
@@ -0,0 +1,10 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "@vocab": "http://example.org/",
+ "included1": "@included",
+ "included2": "@included"
+ },
+ "included1": {"prop": "value1"},
+ "included2": {"prop": "value2"}
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/in03-out.jsonld b/test/jsonld/1.1/expand/in03-out.jsonld
new file mode 100644
index 000000000..349be02d2
--- /dev/null
+++ b/test/jsonld/1.1/expand/in03-out.jsonld
@@ -0,0 +1,6 @@
+[{
+ "@included": [
+ {"http://example.org/prop": [{"@value": "value1"}]},
+ {"http://example.org/prop": [{"@value": "value2"}]}
+ ]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/in04-in.jsonld b/test/jsonld/1.1/expand/in04-in.jsonld
new file mode 100644
index 000000000..2436a4541
--- /dev/null
+++ b/test/jsonld/1.1/expand/in04-in.jsonld
@@ -0,0 +1,13 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "@vocab": "http://example.org/"
+ },
+ "prop": "value",
+ "@included": {
+ "prop": "value2",
+ "@included": {
+ "prop": "value3"
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/in04-out.jsonld b/test/jsonld/1.1/expand/in04-out.jsonld
new file mode 100644
index 000000000..766ef215e
--- /dev/null
+++ b/test/jsonld/1.1/expand/in04-out.jsonld
@@ -0,0 +1,9 @@
+[{
+ "http://example.org/prop": [{"@value": "value"}],
+ "@included": [{
+ "http://example.org/prop": [{"@value": "value2"}],
+ "@included": [{
+ "http://example.org/prop": [{"@value": "value3"}]
+ }]
+ }]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/in05-in.jsonld b/test/jsonld/1.1/expand/in05-in.jsonld
new file mode 100644
index 000000000..b94709b4e
--- /dev/null
+++ b/test/jsonld/1.1/expand/in05-in.jsonld
@@ -0,0 +1,12 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "@vocab": "http://example.org/"
+ },
+ "prop": {
+ "@type": "Foo",
+ "@included": {
+ "@type": "Bar"
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/in05-out.jsonld b/test/jsonld/1.1/expand/in05-out.jsonld
new file mode 100644
index 000000000..671224bdc
--- /dev/null
+++ b/test/jsonld/1.1/expand/in05-out.jsonld
@@ -0,0 +1,8 @@
+[{
+ "http://example.org/prop": [{
+ "@type": ["http://example.org/Foo"],
+ "@included": [{
+ "@type": ["http://example.org/Bar"]
+ }]
+ }]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/in06-in.jsonld b/test/jsonld/1.1/expand/in06-in.jsonld
new file mode 100644
index 000000000..2e5339f54
--- /dev/null
+++ b/test/jsonld/1.1/expand/in06-in.jsonld
@@ -0,0 +1,90 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "@vocab": "http://example.org/vocab#",
+ "@base": "http://example.org/base/",
+ "id": "@id",
+ "type": "@type",
+ "data": "@nest",
+ "attributes": "@nest",
+ "links": "@nest",
+ "relationships": "@nest",
+ "included": "@included",
+ "self": {"@type": "@id"},
+ "related": {"@type": "@id"},
+ "comments": {
+ "@context": {
+ "data": null
+ }
+ }
+ },
+ "data": [{
+ "type": "articles",
+ "id": "1",
+ "attributes": {
+ "title": "JSON:API paints my bikeshed!"
+ },
+ "links": {
+ "self": "http://example.com/articles/1"
+ },
+ "relationships": {
+ "author": {
+ "links": {
+ "self": "http://example.com/articles/1/relationships/author",
+ "related": "http://example.com/articles/1/author"
+ },
+ "data": { "type": "people", "id": "9" }
+ },
+ "comments": {
+ "links": {
+ "self": "http://example.com/articles/1/relationships/comments",
+ "related": "http://example.com/articles/1/comments"
+ },
+ "data": [
+ { "type": "comments", "id": "5" },
+ { "type": "comments", "id": "12" }
+ ]
+ }
+ }
+ }],
+ "included": [{
+ "type": "people",
+ "id": "9",
+ "attributes": {
+ "first-name": "Dan",
+ "last-name": "Gebhardt",
+ "twitter": "dgeb"
+ },
+ "links": {
+ "self": "http://example.com/people/9"
+ }
+ }, {
+ "type": "comments",
+ "id": "5",
+ "attributes": {
+ "body": "First!"
+ },
+ "relationships": {
+ "author": {
+ "data": { "type": "people", "id": "2" }
+ }
+ },
+ "links": {
+ "self": "http://example.com/comments/5"
+ }
+ }, {
+ "type": "comments",
+ "id": "12",
+ "attributes": {
+ "body": "I like XML better"
+ },
+ "relationships": {
+ "author": {
+ "data": { "type": "people", "id": "9" }
+ }
+ },
+ "links": {
+ "self": "http://example.com/comments/12"
+ }
+ }]
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/in06-out.jsonld b/test/jsonld/1.1/expand/in06-out.jsonld
new file mode 100644
index 000000000..73ae7b885
--- /dev/null
+++ b/test/jsonld/1.1/expand/in06-out.jsonld
@@ -0,0 +1,42 @@
+[{
+ "@id": "http://example.org/base/1",
+ "@type": ["http://example.org/vocab#articles"],
+ "http://example.org/vocab#title": [{"@value": "JSON:API paints my bikeshed!"}],
+ "http://example.org/vocab#self": [{"@id": "http://example.com/articles/1"}],
+ "http://example.org/vocab#author": [{
+ "@id": "http://example.org/base/9",
+ "@type": ["http://example.org/vocab#people"],
+ "http://example.org/vocab#self": [{"@id": "http://example.com/articles/1/relationships/author"}],
+ "http://example.org/vocab#related": [{"@id": "http://example.com/articles/1/author"}]
+ }],
+ "http://example.org/vocab#comments": [{
+ "http://example.org/vocab#self": [{"@id": "http://example.com/articles/1/relationships/comments"}],
+ "http://example.org/vocab#related": [{"@id": "http://example.com/articles/1/comments"}]
+ }],
+ "@included": [{
+ "@id": "http://example.org/base/9",
+ "@type": ["http://example.org/vocab#people"],
+ "http://example.org/vocab#first-name": [{"@value": "Dan"}],
+ "http://example.org/vocab#last-name": [{"@value": "Gebhardt"}],
+ "http://example.org/vocab#twitter": [{"@value": "dgeb"}],
+ "http://example.org/vocab#self": [{"@id": "http://example.com/people/9"}]
+ }, {
+ "@id": "http://example.org/base/5",
+ "@type": ["http://example.org/vocab#comments"],
+ "http://example.org/vocab#body": [{"@value": "First!"}],
+ "http://example.org/vocab#author": [{
+ "@id": "http://example.org/base/2",
+ "@type": ["http://example.org/vocab#people"]
+ }],
+ "http://example.org/vocab#self": [{"@id": "http://example.com/comments/5"}]
+ }, {
+ "@id": "http://example.org/base/12",
+ "@type": ["http://example.org/vocab#comments"],
+ "http://example.org/vocab#body": [{"@value": "I like XML better"}],
+ "http://example.org/vocab#author": [{
+ "@id": "http://example.org/base/9",
+ "@type": ["http://example.org/vocab#people"]
+ }],
+ "http://example.org/vocab#self": [{"@id": "http://example.com/comments/12"}]
+ }]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/in07-in.jsonld b/test/jsonld/1.1/expand/in07-in.jsonld
new file mode 100644
index 000000000..b7958e506
--- /dev/null
+++ b/test/jsonld/1.1/expand/in07-in.jsonld
@@ -0,0 +1,7 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "@vocab": "http://example.org/"
+ },
+ "@included": "string"
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/in08-in.jsonld b/test/jsonld/1.1/expand/in08-in.jsonld
new file mode 100644
index 000000000..01a245c3b
--- /dev/null
+++ b/test/jsonld/1.1/expand/in08-in.jsonld
@@ -0,0 +1,7 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "@vocab": "http://example.org/"
+ },
+ "@included": {"@value": "value"}
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/in09-in.jsonld b/test/jsonld/1.1/expand/in09-in.jsonld
new file mode 100644
index 000000000..7ef08559f
--- /dev/null
+++ b/test/jsonld/1.1/expand/in09-in.jsonld
@@ -0,0 +1,7 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "@vocab": "http://example.org/"
+ },
+ "@included": {"@list": ["value"]}
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/js01-in.jsonld b/test/jsonld/1.1/expand/js01-in.jsonld
new file mode 100644
index 000000000..ace09383e
--- /dev/null
+++ b/test/jsonld/1.1/expand/js01-in.jsonld
@@ -0,0 +1,7 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "e": {"@id": "http://example.org/vocab#bool", "@type": "@json"}
+ },
+ "e": true
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/js01-out.jsonld b/test/jsonld/1.1/expand/js01-out.jsonld
new file mode 100644
index 000000000..642709fd7
--- /dev/null
+++ b/test/jsonld/1.1/expand/js01-out.jsonld
@@ -0,0 +1,3 @@
+[{
+ "http://example.org/vocab#bool": [{"@value": true, "@type": "@json"}]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/js02-in.jsonld b/test/jsonld/1.1/expand/js02-in.jsonld
new file mode 100644
index 000000000..65f32bf2b
--- /dev/null
+++ b/test/jsonld/1.1/expand/js02-in.jsonld
@@ -0,0 +1,7 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "e": {"@id": "http://example.org/vocab#bool", "@type": "@json"}
+ },
+ "e": false
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/js02-out.jsonld b/test/jsonld/1.1/expand/js02-out.jsonld
new file mode 100644
index 000000000..640d3d298
--- /dev/null
+++ b/test/jsonld/1.1/expand/js02-out.jsonld
@@ -0,0 +1,3 @@
+[{
+ "http://example.org/vocab#bool": [{"@value": false, "@type": "@json"}]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/js03-in.jsonld b/test/jsonld/1.1/expand/js03-in.jsonld
new file mode 100644
index 000000000..3f98c4fca
--- /dev/null
+++ b/test/jsonld/1.1/expand/js03-in.jsonld
@@ -0,0 +1,7 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "e": {"@id": "http://example.org/vocab#double", "@type": "@json"}
+ },
+ "e": 1.23
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/js03-out.jsonld b/test/jsonld/1.1/expand/js03-out.jsonld
new file mode 100644
index 000000000..060691ac7
--- /dev/null
+++ b/test/jsonld/1.1/expand/js03-out.jsonld
@@ -0,0 +1,3 @@
+[{
+ "http://example.org/vocab#double": [{"@value": 1.23, "@type": "@json"}]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/js04-in.jsonld b/test/jsonld/1.1/expand/js04-in.jsonld
new file mode 100644
index 000000000..dfd129c81
--- /dev/null
+++ b/test/jsonld/1.1/expand/js04-in.jsonld
@@ -0,0 +1,7 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "e": {"@id": "http://example.org/vocab#double", "@type": "@json"}
+ },
+ "e": 0.0e0
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/js04-out.jsonld b/test/jsonld/1.1/expand/js04-out.jsonld
new file mode 100644
index 000000000..278b08f0c
--- /dev/null
+++ b/test/jsonld/1.1/expand/js04-out.jsonld
@@ -0,0 +1,3 @@
+[{
+ "http://example.org/vocab#double": [{"@value": 0.0e0, "@type": "@json"}]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/js05-in.jsonld b/test/jsonld/1.1/expand/js05-in.jsonld
new file mode 100644
index 000000000..227024935
--- /dev/null
+++ b/test/jsonld/1.1/expand/js05-in.jsonld
@@ -0,0 +1,7 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "e": {"@id": "http://example.org/vocab#integer", "@type": "@json"}
+ },
+ "e": 123
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/js05-out.jsonld b/test/jsonld/1.1/expand/js05-out.jsonld
new file mode 100644
index 000000000..364fc8ff1
--- /dev/null
+++ b/test/jsonld/1.1/expand/js05-out.jsonld
@@ -0,0 +1,3 @@
+[{
+ "http://example.org/vocab#integer": [{"@value": 123, "@type": "@json"}]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/js06-in.jsonld b/test/jsonld/1.1/expand/js06-in.jsonld
new file mode 100644
index 000000000..b0c57352e
--- /dev/null
+++ b/test/jsonld/1.1/expand/js06-in.jsonld
@@ -0,0 +1,7 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "e": {"@id": "http://example.org/vocab#object", "@type": "@json"}
+ },
+ "e": {"foo": "bar"}
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/js06-out.jsonld b/test/jsonld/1.1/expand/js06-out.jsonld
new file mode 100644
index 000000000..c9df28669
--- /dev/null
+++ b/test/jsonld/1.1/expand/js06-out.jsonld
@@ -0,0 +1,3 @@
+[{
+ "http://example.org/vocab#object": [{"@value": {"foo": "bar"}, "@type": "@json"}]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/js07-in.jsonld b/test/jsonld/1.1/expand/js07-in.jsonld
new file mode 100644
index 000000000..8caa6c9f5
--- /dev/null
+++ b/test/jsonld/1.1/expand/js07-in.jsonld
@@ -0,0 +1,7 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "e": {"@id": "http://example.org/vocab#array", "@type": "@json"}
+ },
+ "e": [{"foo": "bar"}]
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/js07-out.jsonld b/test/jsonld/1.1/expand/js07-out.jsonld
new file mode 100644
index 000000000..d0b1b28e0
--- /dev/null
+++ b/test/jsonld/1.1/expand/js07-out.jsonld
@@ -0,0 +1,3 @@
+[{
+ "http://example.org/vocab#array": [{"@value": [{"foo": "bar"}], "@type": "@json"}]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/js08-in.jsonld b/test/jsonld/1.1/expand/js08-in.jsonld
new file mode 100644
index 000000000..16ae134ff
--- /dev/null
+++ b/test/jsonld/1.1/expand/js08-in.jsonld
@@ -0,0 +1,14 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "e": {"@id": "http://example.org/vocab#c14n", "@type": "@json"}
+ },
+ "e": [
+ 56,
+ {
+ "d": true,
+ "10": null,
+ "1": [ ]
+ }
+ ]
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/js08-out.jsonld b/test/jsonld/1.1/expand/js08-out.jsonld
new file mode 100644
index 000000000..98ecfbd45
--- /dev/null
+++ b/test/jsonld/1.1/expand/js08-out.jsonld
@@ -0,0 +1,17 @@
+[
+ {
+ "http://example.org/vocab#c14n": [
+ {
+ "@type": "@json",
+ "@value": [
+ 56,
+ {
+ "d": true,
+ "10": null,
+ "1": []
+ }
+ ]
+ }
+ ]
+ }
+]
diff --git a/test/jsonld/1.1/expand/js09-in.jsonld b/test/jsonld/1.1/expand/js09-in.jsonld
new file mode 100644
index 000000000..3ade2918d
--- /dev/null
+++ b/test/jsonld/1.1/expand/js09-in.jsonld
@@ -0,0 +1,12 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "e": {"@id": "http://example.org/vocab#c14n", "@type": "@json"}
+ },
+ "e": {
+ "peach": "This sorting order",
+ "péché": "is wrong according to French",
+ "pêche": "but canonicalization MUST",
+ "sin": "ignore locale"
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/js09-out.jsonld b/test/jsonld/1.1/expand/js09-out.jsonld
new file mode 100644
index 000000000..374c3d39b
--- /dev/null
+++ b/test/jsonld/1.1/expand/js09-out.jsonld
@@ -0,0 +1,15 @@
+[
+ {
+ "http://example.org/vocab#c14n": [
+ {
+ "@type": "@json",
+ "@value": {
+ "peach": "This sorting order",
+ "péché": "is wrong according to French",
+ "pêche": "but canonicalization MUST",
+ "sin": "ignore locale"
+ }
+ }
+ ]
+ }
+]
diff --git a/test/jsonld/1.1/expand/js10-in.jsonld b/test/jsonld/1.1/expand/js10-in.jsonld
new file mode 100644
index 000000000..5a34da267
--- /dev/null
+++ b/test/jsonld/1.1/expand/js10-in.jsonld
@@ -0,0 +1,14 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "e": {"@id": "http://example.org/vocab#c14n", "@type": "@json"}
+ },
+ "e": {
+ "1": {"f": {"f": "hi","F": 5} ," ": 56.0},
+ "10": { },
+ "": "empty",
+ "a": { },
+ "111": [ {"e": "yes","E": "no" } ],
+ "A": { }
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/js10-out.jsonld b/test/jsonld/1.1/expand/js10-out.jsonld
new file mode 100644
index 000000000..0e0b95541
--- /dev/null
+++ b/test/jsonld/1.1/expand/js10-out.jsonld
@@ -0,0 +1,17 @@
+[
+ {
+ "http://example.org/vocab#c14n": [
+ {
+ "@type": "@json",
+ "@value": {
+ "1": {"f": {"f": "hi","F": 5} ," ": 56.0},
+ "10": { },
+ "": "empty",
+ "a": { },
+ "111": [ {"e": "yes","E": "no" } ],
+ "A": { }
+ }
+ }
+ ]
+ }
+]
diff --git a/test/jsonld/1.1/expand/js11-in.jsonld b/test/jsonld/1.1/expand/js11-in.jsonld
new file mode 100644
index 000000000..8f6f20b48
--- /dev/null
+++ b/test/jsonld/1.1/expand/js11-in.jsonld
@@ -0,0 +1,9 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "e": {"@id": "http://example.org/vocab#c14n", "@type": "@json"}
+ },
+ "e": {
+ "Unnormalized Unicode":"A\u030a"
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/js11-out.jsonld b/test/jsonld/1.1/expand/js11-out.jsonld
new file mode 100644
index 000000000..002076651
--- /dev/null
+++ b/test/jsonld/1.1/expand/js11-out.jsonld
@@ -0,0 +1,12 @@
+[
+ {
+ "http://example.org/vocab#c14n": [
+ {
+ "@type": "@json",
+ "@value": {
+ "Unnormalized Unicode":"A\u030a"
+ }
+ }
+ ]
+ }
+]
diff --git a/test/jsonld/1.1/expand/js12-in.jsonld b/test/jsonld/1.1/expand/js12-in.jsonld
new file mode 100644
index 000000000..325b874aa
--- /dev/null
+++ b/test/jsonld/1.1/expand/js12-in.jsonld
@@ -0,0 +1,11 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "e": {"@id": "http://example.org/vocab#c14n", "@type": "@json"}
+ },
+ "e": {
+ "numbers": [333333333.33333329, 1E30, 4.50, 2e-3, 0.000000000000000000000000001],
+ "string": "\u20ac$\u000F\u000aA'\u0042\u0022\u005c\\\"\/",
+ "literals": [null, true, false]
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/js12-out.jsonld b/test/jsonld/1.1/expand/js12-out.jsonld
new file mode 100644
index 000000000..a0170d5b3
--- /dev/null
+++ b/test/jsonld/1.1/expand/js12-out.jsonld
@@ -0,0 +1,14 @@
+[
+ {
+ "http://example.org/vocab#c14n": [
+ {
+ "@type": "@json",
+ "@value": {
+ "numbers": [333333333.33333329, 1E30, 4.50, 2e-3, 0.000000000000000000000000001],
+ "string": "\u20ac$\u000F\u000aA'\u0042\u0022\u005c\\\"\/",
+ "literals": [null, true, false]
+ }
+ }
+ ]
+ }
+]
diff --git a/test/jsonld/1.1/expand/js13-in.jsonld b/test/jsonld/1.1/expand/js13-in.jsonld
new file mode 100644
index 000000000..dc476ae9d
--- /dev/null
+++ b/test/jsonld/1.1/expand/js13-in.jsonld
@@ -0,0 +1,16 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "e": {"@id": "http://example.org/vocab#c14n", "@type": "@json"}
+ },
+ "e": {
+ "\u20ac": "Euro Sign",
+ "\r": "Carriage Return",
+ "\u000a": "Newline",
+ "1": "One",
+ "\u0080": "Control\u007f",
+ "\ud83d\ude02": "Smiley",
+ "\u00f6": "Latin Small Letter O With Diaeresis",
+ "": "Browser Challenge"
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/js13-out.jsonld b/test/jsonld/1.1/expand/js13-out.jsonld
new file mode 100644
index 000000000..39c273750
--- /dev/null
+++ b/test/jsonld/1.1/expand/js13-out.jsonld
@@ -0,0 +1,19 @@
+[
+ {
+ "http://example.org/vocab#c14n": [
+ {
+ "@type": "@json",
+ "@value": {
+ "\u20ac": "Euro Sign",
+ "\r": "Carriage Return",
+ "\u000a": "Newline",
+ "1": "One",
+ "\u0080": "Control\u007f",
+ "\ud83d\ude02": "Smiley",
+ "\u00f6": "Latin Small Letter O With Diaeresis",
+ "": "Browser Challenge"
+ }
+ }
+ ]
+ }
+]
diff --git a/test/jsonld/1.1/expand/js14-in.jsonld b/test/jsonld/1.1/expand/js14-in.jsonld
new file mode 100644
index 000000000..837a69a40
--- /dev/null
+++ b/test/jsonld/1.1/expand/js14-in.jsonld
@@ -0,0 +1,7 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "e": {"@id": "http://example.org/vocab#array", "@type": "@json"}
+ },
+ "e": [{"e": "bar"}]
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/js14-out.jsonld b/test/jsonld/1.1/expand/js14-out.jsonld
new file mode 100644
index 000000000..a20f5d8ed
--- /dev/null
+++ b/test/jsonld/1.1/expand/js14-out.jsonld
@@ -0,0 +1,3 @@
+[{
+ "http://example.org/vocab#array": [{"@value": [{"e": "bar"}], "@type": "@json"}]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/js15-in.jsonld b/test/jsonld/1.1/expand/js15-in.jsonld
new file mode 100644
index 000000000..cc9820a52
--- /dev/null
+++ b/test/jsonld/1.1/expand/js15-in.jsonld
@@ -0,0 +1,3 @@
+{
+ "http://example.org/vocab#object": [{"@value": {"foo": "bar"}, "@type": "@json"}]
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/js15-out.jsonld b/test/jsonld/1.1/expand/js15-out.jsonld
new file mode 100644
index 000000000..c9df28669
--- /dev/null
+++ b/test/jsonld/1.1/expand/js15-out.jsonld
@@ -0,0 +1,3 @@
+[{
+ "http://example.org/vocab#object": [{"@value": {"foo": "bar"}, "@type": "@json"}]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/js16-in.jsonld b/test/jsonld/1.1/expand/js16-in.jsonld
new file mode 100644
index 000000000..e40669f37
--- /dev/null
+++ b/test/jsonld/1.1/expand/js16-in.jsonld
@@ -0,0 +1,4 @@
+{
+ "@context": {"@version": 1.1, "value": "@value", "type": "@type", "json": "@json"},
+ "http://example.org/vocab#object": [{"value": {"foo": "bar"}, "type": "json"}]
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/js16-out.jsonld b/test/jsonld/1.1/expand/js16-out.jsonld
new file mode 100644
index 000000000..c9df28669
--- /dev/null
+++ b/test/jsonld/1.1/expand/js16-out.jsonld
@@ -0,0 +1,3 @@
+[{
+ "http://example.org/vocab#object": [{"@value": {"foo": "bar"}, "@type": "@json"}]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/js17-in.jsonld b/test/jsonld/1.1/expand/js17-in.jsonld
new file mode 100644
index 000000000..08fc84f7f
--- /dev/null
+++ b/test/jsonld/1.1/expand/js17-in.jsonld
@@ -0,0 +1,7 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "e": {"@id": "http://example.org/vocab#string", "@type": "@json"}
+ },
+ "e": "string"
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/js17-out.jsonld b/test/jsonld/1.1/expand/js17-out.jsonld
new file mode 100644
index 000000000..56ae74fcb
--- /dev/null
+++ b/test/jsonld/1.1/expand/js17-out.jsonld
@@ -0,0 +1,6 @@
+[{
+ "http://example.org/vocab#string": [{
+ "@value": "string",
+ "@type": "@json"
+ }]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/js18-in.jsonld b/test/jsonld/1.1/expand/js18-in.jsonld
new file mode 100644
index 000000000..564111494
--- /dev/null
+++ b/test/jsonld/1.1/expand/js18-in.jsonld
@@ -0,0 +1,7 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "e": {"@id": "http://example.org/vocab#null", "@type": "@json"}
+ },
+ "e": null
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/js18-out.jsonld b/test/jsonld/1.1/expand/js18-out.jsonld
new file mode 100644
index 000000000..5efe8b140
--- /dev/null
+++ b/test/jsonld/1.1/expand/js18-out.jsonld
@@ -0,0 +1,6 @@
+[{
+ "http://example.org/vocab#null": [{
+ "@value": null,
+ "@type": "@json"
+ }]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/js19-in.jsonld b/test/jsonld/1.1/expand/js19-in.jsonld
new file mode 100644
index 000000000..7da975030
--- /dev/null
+++ b/test/jsonld/1.1/expand/js19-in.jsonld
@@ -0,0 +1,12 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "type": "@type"
+ },
+ "ex:foo": {
+ "type": "@json",
+ "@value": {
+ "test": 1
+ }
+ }
+}
diff --git a/test/jsonld/1.1/expand/js19-out.jsonld b/test/jsonld/1.1/expand/js19-out.jsonld
new file mode 100644
index 000000000..da4939cc4
--- /dev/null
+++ b/test/jsonld/1.1/expand/js19-out.jsonld
@@ -0,0 +1,8 @@
+[{
+ "ex:foo": [{
+ "@type": "@json",
+ "@value": {
+ "test": 1
+ }
+ }]
+}]
diff --git a/test/jsonld/1.1/expand/js20-in.jsonld b/test/jsonld/1.1/expand/js20-in.jsonld
new file mode 100644
index 000000000..f1799a350
--- /dev/null
+++ b/test/jsonld/1.1/expand/js20-in.jsonld
@@ -0,0 +1,12 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "value": "@value"
+ },
+ "ex:foo": {
+ "@type": "@json",
+ "value": {
+ "test": 1
+ }
+ }
+}
diff --git a/test/jsonld/1.1/expand/js20-out.jsonld b/test/jsonld/1.1/expand/js20-out.jsonld
new file mode 100644
index 000000000..da4939cc4
--- /dev/null
+++ b/test/jsonld/1.1/expand/js20-out.jsonld
@@ -0,0 +1,8 @@
+[{
+ "ex:foo": [{
+ "@type": "@json",
+ "@value": {
+ "test": 1
+ }
+ }]
+}]
diff --git a/test/jsonld/1.1/expand/js21-in.jsonld b/test/jsonld/1.1/expand/js21-in.jsonld
new file mode 100644
index 000000000..85ccb0cdd
--- /dev/null
+++ b/test/jsonld/1.1/expand/js21-in.jsonld
@@ -0,0 +1,12 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "ex:foo": {
+ "@type": "@json"
+ }
+ },
+ "ex:foo": {
+ "@context": "ex:not:a:context",
+ "test": 1
+ }
+}
diff --git a/test/jsonld/1.1/expand/js21-out.jsonld b/test/jsonld/1.1/expand/js21-out.jsonld
new file mode 100644
index 000000000..8509c9cf7
--- /dev/null
+++ b/test/jsonld/1.1/expand/js21-out.jsonld
@@ -0,0 +1,9 @@
+[{
+ "ex:foo": [{
+ "@type": "@json",
+ "@value": {
+ "@context": "ex:not:a:context",
+ "test": 1
+ }
+ }]
+}]
diff --git a/test/jsonld/1.1/expand/js22-in.jsonld b/test/jsonld/1.1/expand/js22-in.jsonld
new file mode 100644
index 000000000..7d2d43201
--- /dev/null
+++ b/test/jsonld/1.1/expand/js22-in.jsonld
@@ -0,0 +1,3 @@
+{
+ "http://example.org/vocab#null": {"@value": null, "@type": "@json"}
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/js22-out.jsonld b/test/jsonld/1.1/expand/js22-out.jsonld
new file mode 100644
index 000000000..5efe8b140
--- /dev/null
+++ b/test/jsonld/1.1/expand/js22-out.jsonld
@@ -0,0 +1,6 @@
+[{
+ "http://example.org/vocab#null": [{
+ "@value": null,
+ "@type": "@json"
+ }]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/js23-in.jsonld b/test/jsonld/1.1/expand/js23-in.jsonld
new file mode 100644
index 000000000..d45cd202c
--- /dev/null
+++ b/test/jsonld/1.1/expand/js23-in.jsonld
@@ -0,0 +1,3 @@
+{
+ "http://example.org/vocab#null": {"@value": [], "@type": "@json"}
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/js23-out.jsonld b/test/jsonld/1.1/expand/js23-out.jsonld
new file mode 100644
index 000000000..d08dd980b
--- /dev/null
+++ b/test/jsonld/1.1/expand/js23-out.jsonld
@@ -0,0 +1,6 @@
+[{
+ "http://example.org/vocab#null": [{
+ "@value": [],
+ "@type": "@json"
+ }]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/l001-in.jsonld b/test/jsonld/1.1/expand/l001-in.jsonld
new file mode 100644
index 000000000..6f4bd00ba
--- /dev/null
+++ b/test/jsonld/1.1/expand/l001-in.jsonld
@@ -0,0 +1,14 @@
+{
+ "@context": {
+ "vocab": "http://example.com/vocab/",
+ "label": {
+ "@id": "vocab:label",
+ "@container": "@language"
+ }
+ },
+ "@id": "http://example.com/queen",
+ "label": {
+ "en": null,
+ "de": [ "Die Königin", null ]
+ }
+}
diff --git a/test/jsonld/1.1/expand/l001-out.jsonld b/test/jsonld/1.1/expand/l001-out.jsonld
new file mode 100644
index 000000000..09860adc1
--- /dev/null
+++ b/test/jsonld/1.1/expand/l001-out.jsonld
@@ -0,0 +1,12 @@
+[
+ {
+ "@id": "http://example.com/queen",
+ "http://example.com/vocab/label":
+ [
+ {
+ "@value": "Die Königin",
+ "@language": "de"
+ }
+ ]
+ }
+]
diff --git a/test/jsonld/1.1/expand/li01-in.jsonld b/test/jsonld/1.1/expand/li01-in.jsonld
new file mode 100644
index 000000000..75ec1a87d
--- /dev/null
+++ b/test/jsonld/1.1/expand/li01-in.jsonld
@@ -0,0 +1,3 @@
+{
+ "http://example.com/foo": {"@list": [{"@list": ["baz"]}]}
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/li01-out.jsonld b/test/jsonld/1.1/expand/li01-out.jsonld
new file mode 100644
index 000000000..998c20a6f
--- /dev/null
+++ b/test/jsonld/1.1/expand/li01-out.jsonld
@@ -0,0 +1,3 @@
+[{
+ "http://example.com/foo": [{"@list": [{"@list": [{"@value": "baz"}]}]}]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/li02-in.jsonld b/test/jsonld/1.1/expand/li02-in.jsonld
new file mode 100644
index 000000000..4be9f2e81
--- /dev/null
+++ b/test/jsonld/1.1/expand/li02-in.jsonld
@@ -0,0 +1,3 @@
+{
+ "http://example.com/foo": {"@list": [{"@list": []}]}
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/li02-out.jsonld b/test/jsonld/1.1/expand/li02-out.jsonld
new file mode 100644
index 000000000..e77375043
--- /dev/null
+++ b/test/jsonld/1.1/expand/li02-out.jsonld
@@ -0,0 +1,3 @@
+[{
+ "http://example.com/foo": [{"@list": [{"@list": []}]}]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/li03-in.jsonld b/test/jsonld/1.1/expand/li03-in.jsonld
new file mode 100644
index 000000000..f5e78e4dd
--- /dev/null
+++ b/test/jsonld/1.1/expand/li03-in.jsonld
@@ -0,0 +1,4 @@
+{
+ "@context": {"foo": {"@id": "http://example.com/foo", "@container": "@list"}},
+ "foo": [{"@list": ["baz"]}]
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/li03-out.jsonld b/test/jsonld/1.1/expand/li03-out.jsonld
new file mode 100644
index 000000000..998c20a6f
--- /dev/null
+++ b/test/jsonld/1.1/expand/li03-out.jsonld
@@ -0,0 +1,3 @@
+[{
+ "http://example.com/foo": [{"@list": [{"@list": [{"@value": "baz"}]}]}]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/li04-in.jsonld b/test/jsonld/1.1/expand/li04-in.jsonld
new file mode 100644
index 000000000..437398a97
--- /dev/null
+++ b/test/jsonld/1.1/expand/li04-in.jsonld
@@ -0,0 +1,4 @@
+{
+ "@context": {"foo": {"@id": "http://example.com/foo", "@container": "@list"}},
+ "foo": [{"@list": []}]
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/li04-out.jsonld b/test/jsonld/1.1/expand/li04-out.jsonld
new file mode 100644
index 000000000..e77375043
--- /dev/null
+++ b/test/jsonld/1.1/expand/li04-out.jsonld
@@ -0,0 +1,3 @@
+[{
+ "http://example.com/foo": [{"@list": [{"@list": []}]}]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/li05-in.jsonld b/test/jsonld/1.1/expand/li05-in.jsonld
new file mode 100644
index 000000000..e38ec8ce4
--- /dev/null
+++ b/test/jsonld/1.1/expand/li05-in.jsonld
@@ -0,0 +1,4 @@
+{
+ "@context": {"foo": {"@id": "http://example.com/foo", "@container": "@list"}},
+ "foo": [["baz"]]
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/li05-out.jsonld b/test/jsonld/1.1/expand/li05-out.jsonld
new file mode 100644
index 000000000..998c20a6f
--- /dev/null
+++ b/test/jsonld/1.1/expand/li05-out.jsonld
@@ -0,0 +1,3 @@
+[{
+ "http://example.com/foo": [{"@list": [{"@list": [{"@value": "baz"}]}]}]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/li06-in.jsonld b/test/jsonld/1.1/expand/li06-in.jsonld
new file mode 100644
index 000000000..81c8b23e6
--- /dev/null
+++ b/test/jsonld/1.1/expand/li06-in.jsonld
@@ -0,0 +1,4 @@
+{
+ "@context": {"foo": {"@id": "http://example.com/foo", "@container": "@list"}},
+ "foo": [[]]
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/li06-out.jsonld b/test/jsonld/1.1/expand/li06-out.jsonld
new file mode 100644
index 000000000..e77375043
--- /dev/null
+++ b/test/jsonld/1.1/expand/li06-out.jsonld
@@ -0,0 +1,3 @@
+[{
+ "http://example.com/foo": [{"@list": [{"@list": []}]}]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/li07-in.jsonld b/test/jsonld/1.1/expand/li07-in.jsonld
new file mode 100644
index 000000000..e01353af7
--- /dev/null
+++ b/test/jsonld/1.1/expand/li07-in.jsonld
@@ -0,0 +1,4 @@
+{
+ "@context": {"foo": {"@id": "http://example.com/foo", "@container": "@list"}},
+ "foo": [[["baz"]]]
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/li07-out.jsonld b/test/jsonld/1.1/expand/li07-out.jsonld
new file mode 100644
index 000000000..329a79c9f
--- /dev/null
+++ b/test/jsonld/1.1/expand/li07-out.jsonld
@@ -0,0 +1,3 @@
+[{
+ "http://example.com/foo": [{"@list": [{"@list": [{"@list": [{"@value": "baz"}]}]}]}]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/li08-in.jsonld b/test/jsonld/1.1/expand/li08-in.jsonld
new file mode 100644
index 000000000..b14f5623e
--- /dev/null
+++ b/test/jsonld/1.1/expand/li08-in.jsonld
@@ -0,0 +1,4 @@
+{
+ "@context": {"foo": {"@id": "http://example.com/foo", "@container": "@list"}},
+ "foo": [[[]]]
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/li08-out.jsonld b/test/jsonld/1.1/expand/li08-out.jsonld
new file mode 100644
index 000000000..0b125baf4
--- /dev/null
+++ b/test/jsonld/1.1/expand/li08-out.jsonld
@@ -0,0 +1,3 @@
+[{
+ "http://example.com/foo": [{"@list": [{"@list": [{"@list": []}]}]}]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/li09-in.jsonld b/test/jsonld/1.1/expand/li09-in.jsonld
new file mode 100644
index 000000000..58aea4aae
--- /dev/null
+++ b/test/jsonld/1.1/expand/li09-in.jsonld
@@ -0,0 +1,4 @@
+{
+ "@context": {"foo": {"@id": "http://example.com/foo", "@container": "@list"}},
+ "foo": [["a"], ["b"]]
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/li09-out.jsonld b/test/jsonld/1.1/expand/li09-out.jsonld
new file mode 100644
index 000000000..bb6227d11
--- /dev/null
+++ b/test/jsonld/1.1/expand/li09-out.jsonld
@@ -0,0 +1,6 @@
+[{
+ "http://example.com/foo": [{"@list": [
+ {"@list": [{"@value": "a"}]},
+ {"@list": [{"@value": "b"}]}
+ ]}]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/li10-in.jsonld b/test/jsonld/1.1/expand/li10-in.jsonld
new file mode 100644
index 000000000..b1db13b18
--- /dev/null
+++ b/test/jsonld/1.1/expand/li10-in.jsonld
@@ -0,0 +1,4 @@
+{
+ "@context": {"foo": {"@id": "http://example.com/foo", "@container": "@list"}},
+ "foo": [["a"], "b"]
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/li10-out.jsonld b/test/jsonld/1.1/expand/li10-out.jsonld
new file mode 100644
index 000000000..1d5c3bed1
--- /dev/null
+++ b/test/jsonld/1.1/expand/li10-out.jsonld
@@ -0,0 +1,6 @@
+[{
+ "http://example.com/foo": [{"@list": [
+ {"@list": [{"@value": "a"}]},
+ {"@value": "b"}
+ ]}]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/m001-in.jsonld b/test/jsonld/1.1/expand/m001-in.jsonld
new file mode 100644
index 000000000..81a736c75
--- /dev/null
+++ b/test/jsonld/1.1/expand/m001-in.jsonld
@@ -0,0 +1,10 @@
+{
+ "@context": {
+ "@vocab": "http://example/",
+ "idmap": {"@container": "@id"}
+ },
+ "idmap": {
+ "http://example.org/foo": {"label": "Object with @id "},
+ "_:bar": {"label": "Object with @id _:bar"}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/m001-out.jsonld b/test/jsonld/1.1/expand/m001-out.jsonld
new file mode 100644
index 000000000..c44d5e63e
--- /dev/null
+++ b/test/jsonld/1.1/expand/m001-out.jsonld
@@ -0,0 +1,6 @@
+[{
+ "http://example/idmap": [
+ {"http://example/label": [{"@value": "Object with @id _:bar"}], "@id": "_:bar"},
+ {"http://example/label": [{"@value": "Object with @id "}], "@id": "http://example.org/foo"}
+ ]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/m002-in.jsonld b/test/jsonld/1.1/expand/m002-in.jsonld
new file mode 100644
index 000000000..1134f16b7
--- /dev/null
+++ b/test/jsonld/1.1/expand/m002-in.jsonld
@@ -0,0 +1,10 @@
+{
+ "@context": {
+ "@vocab": "http://example/",
+ "idmap": {"@container": "@id"}
+ },
+ "idmap": {
+ "http://example.org/foo": {"@id": "http://example.org/bar", "label": "Object with @id "},
+ "_:bar": {"@id": "_:foo", "label": "Object with @id _:bar"}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/m002-out.jsonld b/test/jsonld/1.1/expand/m002-out.jsonld
new file mode 100644
index 000000000..274bb8c73
--- /dev/null
+++ b/test/jsonld/1.1/expand/m002-out.jsonld
@@ -0,0 +1,6 @@
+[{
+ "http://example/idmap": [
+ {"@id": "_:foo", "http://example/label": [{"@value": "Object with @id _:bar"}]},
+ {"@id": "http://example.org/bar", "http://example/label": [{"@value": "Object with @id "}]}
+ ]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/m003-in.jsonld b/test/jsonld/1.1/expand/m003-in.jsonld
new file mode 100644
index 000000000..f79d87a63
--- /dev/null
+++ b/test/jsonld/1.1/expand/m003-in.jsonld
@@ -0,0 +1,10 @@
+{
+ "@context": {
+ "@vocab": "http://example/",
+ "typemap": {"@container": "@type"}
+ },
+ "typemap": {
+ "http://example.org/foo": {"label": "Object with @type "},
+ "_:bar": {"label": "Object with @type _:bar"}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/m003-out.jsonld b/test/jsonld/1.1/expand/m003-out.jsonld
new file mode 100644
index 000000000..ecdfc4498
--- /dev/null
+++ b/test/jsonld/1.1/expand/m003-out.jsonld
@@ -0,0 +1,6 @@
+[{
+ "http://example/typemap": [
+ {"http://example/label": [{"@value": "Object with @type _:bar"}], "@type": ["_:bar"]},
+ {"http://example/label": [{"@value": "Object with @type "}], "@type": ["http://example.org/foo"]}
+ ]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/m004-in.jsonld b/test/jsonld/1.1/expand/m004-in.jsonld
new file mode 100644
index 000000000..b75a0ff84
--- /dev/null
+++ b/test/jsonld/1.1/expand/m004-in.jsonld
@@ -0,0 +1,10 @@
+{
+ "@context": {
+ "@vocab": "http://example/",
+ "typemap": {"@container": "@type"}
+ },
+ "typemap": {
+ "http://example.org/foo": {"@type": "http://example.org/bar", "label": "Object with @type "},
+ "_:bar": {"@type": "_:foo", "label": "Object with @type _:bar"}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/m004-out.jsonld b/test/jsonld/1.1/expand/m004-out.jsonld
new file mode 100644
index 000000000..f35a9a884
--- /dev/null
+++ b/test/jsonld/1.1/expand/m004-out.jsonld
@@ -0,0 +1,12 @@
+[{
+ "http://example/typemap": [
+ {
+ "@type": ["_:bar", "_:foo"],
+ "http://example/label": [{"@value": "Object with @type _:bar"}]
+ },
+ {
+ "@type": ["http://example.org/foo", "http://example.org/bar"],
+ "http://example/label": [{"@value": "Object with @type "}]
+ }
+ ]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/m005-in.jsonld b/test/jsonld/1.1/expand/m005-in.jsonld
new file mode 100644
index 000000000..e7de76b9b
--- /dev/null
+++ b/test/jsonld/1.1/expand/m005-in.jsonld
@@ -0,0 +1,9 @@
+{
+ "@context": {
+ "@vocab": "http://example/",
+ "idmap": {"@container": "@id"}
+ },
+ "idmap": {
+ "foo": {"label": "Object with @id "}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/m005-out.jsonld b/test/jsonld/1.1/expand/m005-out.jsonld
new file mode 100644
index 000000000..fe15d6377
--- /dev/null
+++ b/test/jsonld/1.1/expand/m005-out.jsonld
@@ -0,0 +1,5 @@
+[{
+ "http://example/idmap": [
+ {"http://example/label": [{"@value": "Object with @id "}], "@id": "http://example.org/foo"}
+ ]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/m006-in.jsonld b/test/jsonld/1.1/expand/m006-in.jsonld
new file mode 100644
index 000000000..ce359b452
--- /dev/null
+++ b/test/jsonld/1.1/expand/m006-in.jsonld
@@ -0,0 +1,9 @@
+{
+ "@context": {
+ "@vocab": "http://example/",
+ "typemap": {"@container": "@type"}
+ },
+ "typemap": {
+ "Foo": {"label": "Object with @type "}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/m006-out.jsonld b/test/jsonld/1.1/expand/m006-out.jsonld
new file mode 100644
index 000000000..a6cfccfeb
--- /dev/null
+++ b/test/jsonld/1.1/expand/m006-out.jsonld
@@ -0,0 +1,5 @@
+[{
+ "http://example/typemap": [
+ {"http://example/label": [{"@value": "Object with @type "}], "@type": ["http://example/Foo"]}
+ ]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/m007-in.jsonld b/test/jsonld/1.1/expand/m007-in.jsonld
new file mode 100644
index 000000000..a660b7293
--- /dev/null
+++ b/test/jsonld/1.1/expand/m007-in.jsonld
@@ -0,0 +1,10 @@
+{
+ "@context": {
+ "@vocab": "http://example/",
+ "typemap": {"@container": "@type"},
+ "label": "http://example/label"
+ },
+ "typemap": {
+ "Foo": {"label": "Object with @type "}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/m007-out.jsonld b/test/jsonld/1.1/expand/m007-out.jsonld
new file mode 100644
index 000000000..a6cfccfeb
--- /dev/null
+++ b/test/jsonld/1.1/expand/m007-out.jsonld
@@ -0,0 +1,5 @@
+[{
+ "http://example/typemap": [
+ {"http://example/label": [{"@value": "Object with @type "}], "@type": ["http://example/Foo"]}
+ ]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/m008-in.jsonld b/test/jsonld/1.1/expand/m008-in.jsonld
new file mode 100644
index 000000000..3e48d6e63
--- /dev/null
+++ b/test/jsonld/1.1/expand/m008-in.jsonld
@@ -0,0 +1,10 @@
+{
+ "@context": {
+ "@vocab": "http://example/",
+ "typemap": {"@container": "@type"},
+ "Type": {"@context": {"a": "http://example.org/a"}}
+ },
+ "typemap": {
+ "Type": {"a": "Object with @type "}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/m008-out.jsonld b/test/jsonld/1.1/expand/m008-out.jsonld
new file mode 100644
index 000000000..e1da44ee2
--- /dev/null
+++ b/test/jsonld/1.1/expand/m008-out.jsonld
@@ -0,0 +1,5 @@
+[{
+ "http://example/typemap": [
+ {"http://example.org/a": [{"@value": "Object with @type "}], "@type": ["http://example/Type"]}
+ ]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/m009-in.jsonld b/test/jsonld/1.1/expand/m009-in.jsonld
new file mode 100644
index 000000000..510a5700b
--- /dev/null
+++ b/test/jsonld/1.1/expand/m009-in.jsonld
@@ -0,0 +1,15 @@
+{
+ "@context": {
+ "vocab": "http://example.com/vocab/",
+ "label": {
+ "@id": "vocab:label",
+ "@container": "@language"
+ }
+ },
+ "@id": "http://example.com/queen",
+ "label": {
+ "en": "The Queen",
+ "de": [ "Die Königin", "Ihre Majestät" ],
+ "@none": "The Queen"
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/m009-out.jsonld b/test/jsonld/1.1/expand/m009-out.jsonld
new file mode 100644
index 000000000..94293f575
--- /dev/null
+++ b/test/jsonld/1.1/expand/m009-out.jsonld
@@ -0,0 +1,11 @@
+[
+ {
+ "@id": "http://example.com/queen",
+ "http://example.com/vocab/label": [
+ {"@value": "The Queen"},
+ {"@value": "Die Königin", "@language": "de"},
+ {"@value": "Ihre Majestät", "@language": "de"},
+ {"@value": "The Queen", "@language": "en"}
+ ]
+ }
+]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/m010-in.jsonld b/test/jsonld/1.1/expand/m010-in.jsonld
new file mode 100644
index 000000000..adc8cac36
--- /dev/null
+++ b/test/jsonld/1.1/expand/m010-in.jsonld
@@ -0,0 +1,16 @@
+{
+ "@context": {
+ "vocab": "http://example.com/vocab/",
+ "label": {
+ "@id": "vocab:label",
+ "@container": "@language"
+ },
+ "none": "@none"
+ },
+ "@id": "http://example.com/queen",
+ "label": {
+ "en": "The Queen",
+ "de": [ "Die Königin", "Ihre Majestät" ],
+ "none": "The Queen"
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/m010-out.jsonld b/test/jsonld/1.1/expand/m010-out.jsonld
new file mode 100644
index 000000000..9295bdb42
--- /dev/null
+++ b/test/jsonld/1.1/expand/m010-out.jsonld
@@ -0,0 +1,11 @@
+[
+ {
+ "@id": "http://example.com/queen",
+ "http://example.com/vocab/label": [
+ {"@value": "Die Königin", "@language": "de"},
+ {"@value": "Ihre Majestät", "@language": "de"},
+ {"@value": "The Queen", "@language": "en"},
+ {"@value": "The Queen"}
+ ]
+ }
+]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/m011-in.jsonld b/test/jsonld/1.1/expand/m011-in.jsonld
new file mode 100644
index 000000000..a8ba37235
--- /dev/null
+++ b/test/jsonld/1.1/expand/m011-in.jsonld
@@ -0,0 +1,11 @@
+{
+ "@context": {
+ "@vocab": "http://example/",
+ "idmap": {"@container": "@id"},
+ "none": "@none"
+ },
+ "idmap": {
+ "@none": {"label": "Object with no @id"},
+ "none": {"label": "Another object with no @id"}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/m011-out.jsonld b/test/jsonld/1.1/expand/m011-out.jsonld
new file mode 100644
index 000000000..1e0160ea0
--- /dev/null
+++ b/test/jsonld/1.1/expand/m011-out.jsonld
@@ -0,0 +1,6 @@
+[{
+ "http://example/idmap": [
+ {"http://example/label": [{"@value": "Object with no @id"}]},
+ {"http://example/label": [{"@value": "Another object with no @id"}]}
+ ]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/m012-in.jsonld b/test/jsonld/1.1/expand/m012-in.jsonld
new file mode 100644
index 000000000..c8bbe0f7c
--- /dev/null
+++ b/test/jsonld/1.1/expand/m012-in.jsonld
@@ -0,0 +1,11 @@
+{
+ "@context": {
+ "@vocab": "http://example/",
+ "typemap": {"@container": "@type"},
+ "none": "@none"
+ },
+ "typemap": {
+ "@none": {"label": "Object with no @type"},
+ "none": {"label": "Another object with no @type"}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/m012-out.jsonld b/test/jsonld/1.1/expand/m012-out.jsonld
new file mode 100644
index 000000000..2c62979f3
--- /dev/null
+++ b/test/jsonld/1.1/expand/m012-out.jsonld
@@ -0,0 +1,6 @@
+[{
+ "http://example/typemap": [
+ {"http://example/label": [{"@value": "Object with no @type"}]},
+ {"http://example/label": [{"@value": "Another object with no @type"}]}
+ ]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/m013-in.jsonld b/test/jsonld/1.1/expand/m013-in.jsonld
new file mode 100644
index 000000000..545c8c307
--- /dev/null
+++ b/test/jsonld/1.1/expand/m013-in.jsonld
@@ -0,0 +1,9 @@
+{
+ "@context": {
+ "@vocab": "http://example.org/",
+ "input": {"@container": ["@graph", "@index"]}
+ },
+ "input": {
+ "@none": {"value": "x"}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/m013-out.jsonld b/test/jsonld/1.1/expand/m013-out.jsonld
new file mode 100644
index 000000000..e01c12ee5
--- /dev/null
+++ b/test/jsonld/1.1/expand/m013-out.jsonld
@@ -0,0 +1,7 @@
+[{
+ "http://example.org/input": [{
+ "@graph": [{
+ "http://example.org/value": [{"@value": "x"}]
+ }]
+ }]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/m014-in.jsonld b/test/jsonld/1.1/expand/m014-in.jsonld
new file mode 100644
index 000000000..a1e454b28
--- /dev/null
+++ b/test/jsonld/1.1/expand/m014-in.jsonld
@@ -0,0 +1,10 @@
+{
+ "@context": {
+ "@vocab": "http://example.org/",
+ "input": {"@container": ["@graph", "@index"]},
+ "none": "@none"
+ },
+ "input": {
+ "none": {"value": "x"}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/m014-out.jsonld b/test/jsonld/1.1/expand/m014-out.jsonld
new file mode 100644
index 000000000..e01c12ee5
--- /dev/null
+++ b/test/jsonld/1.1/expand/m014-out.jsonld
@@ -0,0 +1,7 @@
+[{
+ "http://example.org/input": [{
+ "@graph": [{
+ "http://example.org/value": [{"@value": "x"}]
+ }]
+ }]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/m015-in.jsonld b/test/jsonld/1.1/expand/m015-in.jsonld
new file mode 100644
index 000000000..6594c8d68
--- /dev/null
+++ b/test/jsonld/1.1/expand/m015-in.jsonld
@@ -0,0 +1,9 @@
+{
+ "@context": {
+ "@vocab": "http://example.org/",
+ "input": {"@container": ["@graph", "@id"]}
+ },
+ "input": {
+ "@none": {"value": "x"}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/m015-out.jsonld b/test/jsonld/1.1/expand/m015-out.jsonld
new file mode 100644
index 000000000..e01c12ee5
--- /dev/null
+++ b/test/jsonld/1.1/expand/m015-out.jsonld
@@ -0,0 +1,7 @@
+[{
+ "http://example.org/input": [{
+ "@graph": [{
+ "http://example.org/value": [{"@value": "x"}]
+ }]
+ }]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/m016-in.jsonld b/test/jsonld/1.1/expand/m016-in.jsonld
new file mode 100644
index 000000000..13234db1a
--- /dev/null
+++ b/test/jsonld/1.1/expand/m016-in.jsonld
@@ -0,0 +1,10 @@
+{
+ "@context": {
+ "@vocab": "http://example.org/",
+ "input": {"@container": ["@graph", "@id"]},
+ "none": "@none"
+ },
+ "input": {
+ "none": {"value": "x"}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/m016-out.jsonld b/test/jsonld/1.1/expand/m016-out.jsonld
new file mode 100644
index 000000000..e01c12ee5
--- /dev/null
+++ b/test/jsonld/1.1/expand/m016-out.jsonld
@@ -0,0 +1,7 @@
+[{
+ "http://example.org/input": [{
+ "@graph": [{
+ "http://example.org/value": [{"@value": "x"}]
+ }]
+ }]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/m017-in.jsonld b/test/jsonld/1.1/expand/m017-in.jsonld
new file mode 100644
index 000000000..d571678d1
--- /dev/null
+++ b/test/jsonld/1.1/expand/m017-in.jsonld
@@ -0,0 +1,9 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "@vocab": "http://example.org/ns/",
+ "@base": "http://example.org/base/",
+ "foo": { "@container": "@type" }
+ },
+ "foo": {"bar": "baz"}
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/m017-out.jsonld b/test/jsonld/1.1/expand/m017-out.jsonld
new file mode 100644
index 000000000..b1076fd6d
--- /dev/null
+++ b/test/jsonld/1.1/expand/m017-out.jsonld
@@ -0,0 +1,6 @@
+[{
+ "http://example.org/ns/foo": [{
+ "@id": "http://example.org/base/baz",
+ "@type": [ "http://example.org/ns/bar" ]
+ }]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/m018-in.jsonld b/test/jsonld/1.1/expand/m018-in.jsonld
new file mode 100644
index 000000000..7acaba291
--- /dev/null
+++ b/test/jsonld/1.1/expand/m018-in.jsonld
@@ -0,0 +1,9 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "@vocab": "http://example.org/ns/",
+ "@base": "http://example.org/base/",
+ "foo": { "@type": "@id", "@container": "@type" }
+ },
+ "foo": {"bar": "baz"}
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/m018-out.jsonld b/test/jsonld/1.1/expand/m018-out.jsonld
new file mode 100644
index 000000000..b1076fd6d
--- /dev/null
+++ b/test/jsonld/1.1/expand/m018-out.jsonld
@@ -0,0 +1,6 @@
+[{
+ "http://example.org/ns/foo": [{
+ "@id": "http://example.org/base/baz",
+ "@type": [ "http://example.org/ns/bar" ]
+ }]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/m019-in.jsonld b/test/jsonld/1.1/expand/m019-in.jsonld
new file mode 100644
index 000000000..81386dfe5
--- /dev/null
+++ b/test/jsonld/1.1/expand/m019-in.jsonld
@@ -0,0 +1,9 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "@vocab": "http://example.org/ns/",
+ "@base": "http://example.org/base/",
+ "foo": { "@type": "@vocab", "@container": "@type" }
+ },
+ "foo": {"bar": "baz"}
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/m019-out.jsonld b/test/jsonld/1.1/expand/m019-out.jsonld
new file mode 100644
index 000000000..29e72e9fa
--- /dev/null
+++ b/test/jsonld/1.1/expand/m019-out.jsonld
@@ -0,0 +1,6 @@
+[{
+ "http://example.org/ns/foo": [{
+ "@id": "http://example.org/ns/baz",
+ "@type": [ "http://example.org/ns/bar" ]
+ }]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/m020-in.jsonld b/test/jsonld/1.1/expand/m020-in.jsonld
new file mode 100644
index 000000000..4b1a8319a
--- /dev/null
+++ b/test/jsonld/1.1/expand/m020-in.jsonld
@@ -0,0 +1,9 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "@vocab": "http://example.org/ns/",
+ "@base": "http://example.org/base/",
+ "foo": { "@type": "literal", "@container": "@type" }
+ },
+ "foo": {"bar": "baz"}
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/n001-in.jsonld b/test/jsonld/1.1/expand/n001-in.jsonld
new file mode 100644
index 000000000..f07430585
--- /dev/null
+++ b/test/jsonld/1.1/expand/n001-in.jsonld
@@ -0,0 +1,7 @@
+{
+ "@context": {"@vocab": "http://example.org/"},
+ "p1": "v1",
+ "@nest": {
+ "p2": "v2"
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/n001-out.jsonld b/test/jsonld/1.1/expand/n001-out.jsonld
new file mode 100644
index 000000000..c03734564
--- /dev/null
+++ b/test/jsonld/1.1/expand/n001-out.jsonld
@@ -0,0 +1,4 @@
+[{
+ "http://example.org/p1": [{"@value": "v1"}],
+ "http://example.org/p2": [{"@value": "v2"}]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/n002-in.jsonld b/test/jsonld/1.1/expand/n002-in.jsonld
new file mode 100644
index 000000000..36e57b95d
--- /dev/null
+++ b/test/jsonld/1.1/expand/n002-in.jsonld
@@ -0,0 +1,10 @@
+{
+ "@context": {
+ "@vocab": "http://example.org/",
+ "nest": "@nest"
+ },
+ "p1": "v1",
+ "nest": {
+ "p2": "v2"
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/n002-out.jsonld b/test/jsonld/1.1/expand/n002-out.jsonld
new file mode 100644
index 000000000..c03734564
--- /dev/null
+++ b/test/jsonld/1.1/expand/n002-out.jsonld
@@ -0,0 +1,4 @@
+[{
+ "http://example.org/p1": [{"@value": "v1"}],
+ "http://example.org/p2": [{"@value": "v2"}]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/n003-in.jsonld b/test/jsonld/1.1/expand/n003-in.jsonld
new file mode 100644
index 000000000..c1ec90227
--- /dev/null
+++ b/test/jsonld/1.1/expand/n003-in.jsonld
@@ -0,0 +1,11 @@
+{
+ "@context": {
+ "@vocab": "http://example.org/",
+ "nest": "@nest"
+ },
+ "p1": "v1",
+ "nest": {
+ "p2": "v3"
+ },
+ "p2": "v2"
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/n003-out.jsonld b/test/jsonld/1.1/expand/n003-out.jsonld
new file mode 100644
index 000000000..c8fc8de29
--- /dev/null
+++ b/test/jsonld/1.1/expand/n003-out.jsonld
@@ -0,0 +1,7 @@
+[{
+ "http://example.org/p1": [{"@value": "v1"}],
+ "http://example.org/p2": [
+ {"@value": "v2"},
+ {"@value": "v3"}
+ ]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/n004-in.jsonld b/test/jsonld/1.1/expand/n004-in.jsonld
new file mode 100644
index 000000000..eeffff0a6
--- /dev/null
+++ b/test/jsonld/1.1/expand/n004-in.jsonld
@@ -0,0 +1,15 @@
+{
+ "@context": {
+ "@vocab": "http://example.org/",
+ "nest1": "@nest",
+ "nest2": "@nest"
+ },
+ "p1": "v1",
+ "nest2": {
+ "p2": "v4"
+ },
+ "p2": "v2",
+ "nest1": {
+ "p2": "v3"
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/n004-out.jsonld b/test/jsonld/1.1/expand/n004-out.jsonld
new file mode 100644
index 000000000..90e1950b1
--- /dev/null
+++ b/test/jsonld/1.1/expand/n004-out.jsonld
@@ -0,0 +1,8 @@
+[{
+ "http://example.org/p1": [{"@value": "v1"}],
+ "http://example.org/p2": [
+ {"@value": "v2"},
+ {"@value": "v3"},
+ {"@value": "v4"}
+ ]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/n005-in.jsonld b/test/jsonld/1.1/expand/n005-in.jsonld
new file mode 100644
index 000000000..a9f394978
--- /dev/null
+++ b/test/jsonld/1.1/expand/n005-in.jsonld
@@ -0,0 +1,13 @@
+{
+ "@context": {
+ "@vocab": "http://example.org/"
+ },
+ "p1": "v1",
+ "@nest": {
+ "p2": "v3",
+ "@nest": {
+ "p2": "v4"
+ }
+ },
+ "p2": "v2"
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/n005-out.jsonld b/test/jsonld/1.1/expand/n005-out.jsonld
new file mode 100644
index 000000000..90e1950b1
--- /dev/null
+++ b/test/jsonld/1.1/expand/n005-out.jsonld
@@ -0,0 +1,8 @@
+[{
+ "http://example.org/p1": [{"@value": "v1"}],
+ "http://example.org/p2": [
+ {"@value": "v2"},
+ {"@value": "v3"},
+ {"@value": "v4"}
+ ]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/n006-in.jsonld b/test/jsonld/1.1/expand/n006-in.jsonld
new file mode 100644
index 000000000..9b02d605d
--- /dev/null
+++ b/test/jsonld/1.1/expand/n006-in.jsonld
@@ -0,0 +1,11 @@
+{
+ "@context": {
+ "@vocab": "http://example.org/",
+ "nest": "@nest"
+ },
+ "p1": "v1",
+ "nest": {
+ "p2": ["v4", "v5"]
+ },
+ "p2": ["v2", "v3"]
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/n006-out.jsonld b/test/jsonld/1.1/expand/n006-out.jsonld
new file mode 100644
index 000000000..d5c104074
--- /dev/null
+++ b/test/jsonld/1.1/expand/n006-out.jsonld
@@ -0,0 +1,9 @@
+[{
+ "http://example.org/p1": [{"@value": "v1"}],
+ "http://example.org/p2": [
+ {"@value": "v2"},
+ {"@value": "v3"},
+ {"@value": "v4"},
+ {"@value": "v5"}
+ ]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/n007-in.jsonld b/test/jsonld/1.1/expand/n007-in.jsonld
new file mode 100644
index 000000000..aa9e84681
--- /dev/null
+++ b/test/jsonld/1.1/expand/n007-in.jsonld
@@ -0,0 +1,13 @@
+{
+ "@context": {
+ "@vocab": "http://example.org/",
+ "nest": "@nest"
+ },
+ "p1": "v1",
+ "nest": [{
+ "p2": "v4"
+ }, {
+ "p2": "v5"
+ }],
+ "p2": ["v2", "v3"]
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/n007-out.jsonld b/test/jsonld/1.1/expand/n007-out.jsonld
new file mode 100644
index 000000000..d5c104074
--- /dev/null
+++ b/test/jsonld/1.1/expand/n007-out.jsonld
@@ -0,0 +1,9 @@
+[{
+ "http://example.org/p1": [{"@value": "v1"}],
+ "http://example.org/p2": [
+ {"@value": "v2"},
+ {"@value": "v3"},
+ {"@value": "v4"},
+ {"@value": "v5"}
+ ]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/n008-in.jsonld b/test/jsonld/1.1/expand/n008-in.jsonld
new file mode 100644
index 000000000..c598df0f7
--- /dev/null
+++ b/test/jsonld/1.1/expand/n008-in.jsonld
@@ -0,0 +1,11 @@
+{
+ "@context": {
+ "@vocab": "http://example.org/",
+ "nest": "@nest"
+ },
+ "p1": "v1",
+ "nest": [
+ {"@type": "T1"},
+ {"@type": "T2"}
+ ]
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/n008-out.jsonld b/test/jsonld/1.1/expand/n008-out.jsonld
new file mode 100644
index 000000000..c1bb1e0a8
--- /dev/null
+++ b/test/jsonld/1.1/expand/n008-out.jsonld
@@ -0,0 +1,4 @@
+[{
+ "@type": ["http://example.org/T1", "http://example.org/T2"],
+ "http://example.org/p1": [{"@value": "v1"}]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/p001-in.jsonld b/test/jsonld/1.1/expand/p001-in.jsonld
new file mode 100644
index 000000000..5820b1c8a
--- /dev/null
+++ b/test/jsonld/1.1/expand/p001-in.jsonld
@@ -0,0 +1,7 @@
+{
+ "@context": [
+ {"@vocab": "http://example/"},
+ {"@version": 1.1, "a": {"@type": "@id"}}
+ ],
+ "a": "http://example.org/foo"
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/p001-out.jsonld b/test/jsonld/1.1/expand/p001-out.jsonld
new file mode 100644
index 000000000..d6a85b74a
--- /dev/null
+++ b/test/jsonld/1.1/expand/p001-out.jsonld
@@ -0,0 +1,3 @@
+[{
+ "http://example/a": [{"@id": "http://example.org/foo"}]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/p002-in.jsonld b/test/jsonld/1.1/expand/p002-in.jsonld
new file mode 100644
index 000000000..c221cf91f
--- /dev/null
+++ b/test/jsonld/1.1/expand/p002-in.jsonld
@@ -0,0 +1,9 @@
+{
+ "@context": [
+ {"@vocab": "http://example/"},
+ {"@version": 1.1, "a": {"@type": "@id"}},
+ {"b": {"@type": "@id"}}
+ ],
+ "a": "http://example.org/foo",
+ "b": "http://example.org/bar"
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/p002-out.jsonld b/test/jsonld/1.1/expand/p002-out.jsonld
new file mode 100644
index 000000000..e38a93bb1
--- /dev/null
+++ b/test/jsonld/1.1/expand/p002-out.jsonld
@@ -0,0 +1,4 @@
+[{
+ "http://example/a": [{"@id": "http://example.org/foo"}],
+ "http://example/b": [{"@id": "http://example.org/bar"}]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/p003-in.jsonld b/test/jsonld/1.1/expand/p003-in.jsonld
new file mode 100644
index 000000000..e50ad3c4d
--- /dev/null
+++ b/test/jsonld/1.1/expand/p003-in.jsonld
@@ -0,0 +1,8 @@
+{
+ "@context": [
+ {"@version": 1.1, "a": {"@id": "http://example/a", "@type": "@id"}},
+ {"@vocab": "http://example/", "b": {"@type": "@id"}}
+ ],
+ "a": "http://example.org/foo",
+ "b": "http://example.org/bar"
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/p003-out.jsonld b/test/jsonld/1.1/expand/p003-out.jsonld
new file mode 100644
index 000000000..e38a93bb1
--- /dev/null
+++ b/test/jsonld/1.1/expand/p003-out.jsonld
@@ -0,0 +1,4 @@
+[{
+ "http://example/a": [{"@id": "http://example.org/foo"}],
+ "http://example/b": [{"@id": "http://example.org/bar"}]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/p004-in.jsonld b/test/jsonld/1.1/expand/p004-in.jsonld
new file mode 100644
index 000000000..f458decf6
--- /dev/null
+++ b/test/jsonld/1.1/expand/p004-in.jsonld
@@ -0,0 +1,9 @@
+{
+ "@context": [
+ {"@version": 1.1, "a": {"@id": "http://example/a", "@type": "@id"}},
+ {"@vocab": "http://example/"},
+ {"@version": 1.1, "b": {"@type": "@id"}}
+ ],
+ "a": "http://example.org/foo",
+ "b": "http://example.org/bar"
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/p004-out.jsonld b/test/jsonld/1.1/expand/p004-out.jsonld
new file mode 100644
index 000000000..e38a93bb1
--- /dev/null
+++ b/test/jsonld/1.1/expand/p004-out.jsonld
@@ -0,0 +1,4 @@
+[{
+ "http://example/a": [{"@id": "http://example.org/foo"}],
+ "http://example/b": [{"@id": "http://example.org/bar"}]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/pi01-in.jsonld b/test/jsonld/1.1/expand/pi01-in.jsonld
new file mode 100644
index 000000000..50e861178
--- /dev/null
+++ b/test/jsonld/1.1/expand/pi01-in.jsonld
@@ -0,0 +1,11 @@
+{
+ "@context": {
+ "@vocab": "http://example.com/",
+ "container": {"@container": "@index", "@index": "prop"}
+ },
+ "@id": "http://example.com/annotationsTest",
+ "container": {
+ "en": "The Queen",
+ "de": [ "Die Königin", "Ihre Majestät" ]
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/pi02-in.jsonld b/test/jsonld/1.1/expand/pi02-in.jsonld
new file mode 100644
index 000000000..45f7b9654
--- /dev/null
+++ b/test/jsonld/1.1/expand/pi02-in.jsonld
@@ -0,0 +1,12 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "@vocab": "http://example.com/",
+ "container": {"@index": "prop"}
+ },
+ "@id": "http://example.com/annotationsTest",
+ "container": {
+ "en": "The Queen",
+ "de": [ "Die Königin", "Ihre Majestät" ]
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/pi03-in.jsonld b/test/jsonld/1.1/expand/pi03-in.jsonld
new file mode 100644
index 000000000..d0803e111
--- /dev/null
+++ b/test/jsonld/1.1/expand/pi03-in.jsonld
@@ -0,0 +1,16 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "@vocab": "http://example.com/",
+ "container": {
+ "@id": "http://example.com/container",
+ "@container": "@index",
+ "@index": "@index"
+ }
+ },
+ "@id": "http://example.com/annotationsTest",
+ "container": {
+ "en": "The Queen",
+ "de": [ "Die Königin", "Ihre Majestät" ]
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/pi04-in.jsonld b/test/jsonld/1.1/expand/pi04-in.jsonld
new file mode 100644
index 000000000..e30adb379
--- /dev/null
+++ b/test/jsonld/1.1/expand/pi04-in.jsonld
@@ -0,0 +1,16 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "@vocab": "http://example.com/",
+ "container": {
+ "@id": "http://example.com/container",
+ "@container": "@index",
+ "@index": true
+ }
+ },
+ "@id": "http://example.com/annotationsTest",
+ "container": {
+ "en": "The Queen",
+ "de": [ "Die Königin", "Ihre Majestät" ]
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/pi05-in.jsonld b/test/jsonld/1.1/expand/pi05-in.jsonld
new file mode 100644
index 000000000..e9325a449
--- /dev/null
+++ b/test/jsonld/1.1/expand/pi05-in.jsonld
@@ -0,0 +1,16 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "@vocab": "http://example.com/",
+ "container": {
+ "@id": "http://example.com/container",
+ "@container": "@index",
+ "@index": "prop"
+ }
+ },
+ "@id": "http://example.com/annotationsTest",
+ "container": {
+ "en": "The Queen",
+ "de": [ "Die Königin", "Ihre Majestät" ]
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/pi06-in.jsonld b/test/jsonld/1.1/expand/pi06-in.jsonld
new file mode 100644
index 000000000..c57f93827
--- /dev/null
+++ b/test/jsonld/1.1/expand/pi06-in.jsonld
@@ -0,0 +1,13 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "@base": "http://example.com/",
+ "@vocab": "http://example.com/",
+ "author": {"@type": "@id", "@container": "@index", "@index": "prop"}
+ },
+ "@id": "article",
+ "author": {
+ "regular": "person/1",
+ "guest": ["person/2", "person/3"]
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/pi06-out.jsonld b/test/jsonld/1.1/expand/pi06-out.jsonld
new file mode 100644
index 000000000..7bd1df813
--- /dev/null
+++ b/test/jsonld/1.1/expand/pi06-out.jsonld
@@ -0,0 +1,8 @@
+[{
+ "@id": "http://example.com/article",
+ "http://example.com/author": [
+ {"@id": "http://example.com/person/2", "http://example.com/prop": [{"@value": "guest"}]},
+ {"@id": "http://example.com/person/3", "http://example.com/prop": [{"@value": "guest"}]},
+ {"@id": "http://example.com/person/1", "http://example.com/prop": [{"@value": "regular"}]}
+ ]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/pi07-in.jsonld b/test/jsonld/1.1/expand/pi07-in.jsonld
new file mode 100644
index 000000000..e05de77ca
--- /dev/null
+++ b/test/jsonld/1.1/expand/pi07-in.jsonld
@@ -0,0 +1,16 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "@base": "http://example.com/",
+ "@vocab": "http://example.com/",
+ "author": {"@type": "@id", "@container": "@index", "@index": "prop"}
+ },
+ "@id": "article",
+ "author": {
+ "regular": {"@id": "person/1", "http://example.com/prop": "foo"},
+ "guest": [
+ {"@id": "person/2", "prop": "foo"},
+ {"@id": "person/3", "prop": "foo"}
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/pi07-out.jsonld b/test/jsonld/1.1/expand/pi07-out.jsonld
new file mode 100644
index 000000000..b8fb6b170
--- /dev/null
+++ b/test/jsonld/1.1/expand/pi07-out.jsonld
@@ -0,0 +1,8 @@
+[{
+ "@id": "http://example.com/article",
+ "http://example.com/author": [
+ {"@id": "http://example.com/person/2", "http://example.com/prop": [{"@value": "guest"}, {"@value": "foo"}]},
+ {"@id": "http://example.com/person/3", "http://example.com/prop": [{"@value": "guest"}, {"@value": "foo"}]},
+ {"@id": "http://example.com/person/1", "http://example.com/prop": [{"@value": "regular"}, {"@value": "foo"}]}
+ ]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/pi08-in.jsonld b/test/jsonld/1.1/expand/pi08-in.jsonld
new file mode 100644
index 000000000..17b42dddc
--- /dev/null
+++ b/test/jsonld/1.1/expand/pi08-in.jsonld
@@ -0,0 +1,14 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "@base": "http://example.com/",
+ "@vocab": "http://example.com/",
+ "author": {"@type": "@id", "@container": "@index", "@index": "prop"},
+ "prop": {"@type": "@vocab"}
+ },
+ "@id": "http://example.com/article",
+ "author": {
+ "regular": "person/1",
+ "guest": ["person/2", "person/3"]
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/pi08-out.jsonld b/test/jsonld/1.1/expand/pi08-out.jsonld
new file mode 100644
index 000000000..ed4bb030c
--- /dev/null
+++ b/test/jsonld/1.1/expand/pi08-out.jsonld
@@ -0,0 +1,8 @@
+[{
+ "@id": "http://example.com/article",
+ "http://example.com/author": [
+ {"@id": "http://example.com/person/2", "http://example.com/prop": [{"@id": "http://example.com/guest"}]},
+ {"@id": "http://example.com/person/3", "http://example.com/prop": [{"@id": "http://example.com/guest"}]},
+ {"@id": "http://example.com/person/1", "http://example.com/prop": [{"@id": "http://example.com/regular"}]}
+ ]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/pi09-in.jsonld b/test/jsonld/1.1/expand/pi09-in.jsonld
new file mode 100644
index 000000000..5811c345d
--- /dev/null
+++ b/test/jsonld/1.1/expand/pi09-in.jsonld
@@ -0,0 +1,17 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "@base": "http://example.com/",
+ "@vocab": "http://example.com/",
+ "author": {"@type": "@id", "@container": "@index", "@index": "prop"},
+ "prop": {"@type": "@vocab"}
+ },
+ "@id": "http://example.com/article",
+ "author": {
+ "regular": {"@id": "person/1", "prop": "foo"},
+ "guest": [
+ {"@id": "person/2", "prop": "foo"},
+ {"@id": "person/3", "prop": "foo"}
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/pi09-out.jsonld b/test/jsonld/1.1/expand/pi09-out.jsonld
new file mode 100644
index 000000000..a4556ede4
--- /dev/null
+++ b/test/jsonld/1.1/expand/pi09-out.jsonld
@@ -0,0 +1,8 @@
+[{
+ "@id": "http://example.com/article",
+ "http://example.com/author": [
+ {"@id": "http://example.com/person/2", "http://example.com/prop": [{"@id": "http://example.com/guest"}, {"@id": "http://example.com/foo"}]},
+ {"@id": "http://example.com/person/3", "http://example.com/prop": [{"@id": "http://example.com/guest"}, {"@id": "http://example.com/foo"}]},
+ {"@id": "http://example.com/person/1", "http://example.com/prop": [{"@id": "http://example.com/regular"}, {"@id": "http://example.com/foo"}]}
+ ]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/pi10-in.jsonld b/test/jsonld/1.1/expand/pi10-in.jsonld
new file mode 100644
index 000000000..a62aba22b
--- /dev/null
+++ b/test/jsonld/1.1/expand/pi10-in.jsonld
@@ -0,0 +1,17 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "@base": "http://example.com/",
+ "@vocab": "http://example.com/",
+ "author": {"@type": "@id", "@container": "@index", "@index": "prop"},
+ "prop": {"@type": "@vocab"}
+ },
+ "@id": "http://example.com/article",
+ "author": {
+ "@none": {"@id": "person/1"},
+ "guest": [
+ {"@id": "person/2"},
+ {"@id": "person/3"}
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/pi10-out.jsonld b/test/jsonld/1.1/expand/pi10-out.jsonld
new file mode 100644
index 000000000..22faa3686
--- /dev/null
+++ b/test/jsonld/1.1/expand/pi10-out.jsonld
@@ -0,0 +1,8 @@
+[{
+ "@id": "http://example.com/article",
+ "http://example.com/author": [
+ {"@id": "http://example.com/person/1"},
+ {"@id": "http://example.com/person/2", "http://example.com/prop": [{"@id": "http://example.com/guest"}]},
+ {"@id": "http://example.com/person/3", "http://example.com/prop": [{"@id": "http://example.com/guest"}]}
+ ]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/pi11-in.jsonld b/test/jsonld/1.1/expand/pi11-in.jsonld
new file mode 100644
index 000000000..e3dd902a2
--- /dev/null
+++ b/test/jsonld/1.1/expand/pi11-in.jsonld
@@ -0,0 +1,10 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "@vocab": "http://example.org/",
+ "input": {"@container": ["@graph", "@index"], "@index": "prop"}
+ },
+ "input": {
+ "g1": {"value": "x"}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/pi11-out.jsonld b/test/jsonld/1.1/expand/pi11-out.jsonld
new file mode 100644
index 000000000..c67c64bd7
--- /dev/null
+++ b/test/jsonld/1.1/expand/pi11-out.jsonld
@@ -0,0 +1,8 @@
+[{
+ "http://example.org/input": [{
+ "http://example.org/prop": [{"@value": "g1"}],
+ "@graph": [{
+ "http://example.org/value": [{"@value": "x"}]
+ }]
+ }]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/pr01-in.jsonld b/test/jsonld/1.1/expand/pr01-in.jsonld
new file mode 100644
index 000000000..049d4cf61
--- /dev/null
+++ b/test/jsonld/1.1/expand/pr01-in.jsonld
@@ -0,0 +1,15 @@
+{
+ "@context": {
+ "@vocab": "http://example.com/",
+ "@version": 1.1,
+ "protected": {
+ "@protected": true
+ }
+ },
+ "protected": {
+ "@context": {
+ "protected": "http://example.com/something-else"
+ },
+ "protected": "error / property http://example.com/protected"
+ }
+}
diff --git a/test/jsonld/1.1/expand/pr02-in.jsonld b/test/jsonld/1.1/expand/pr02-in.jsonld
new file mode 100644
index 000000000..22fe4a86a
--- /dev/null
+++ b/test/jsonld/1.1/expand/pr02-in.jsonld
@@ -0,0 +1,20 @@
+{
+ "@context": {
+ "@vocab": "http://example.com/",
+ "@version": 1.1,
+ "protected": {
+ "@protected": true
+ },
+ "unprotected": {
+ "@protected": false
+ }
+ },
+ "protected": true,
+ "unprotected": true,
+ "scope": {
+ "@context": {
+ "unprotected": "http://example.com/something-else"
+ },
+ "unprotected": "property http://example.com/something-else"
+ }
+}
diff --git a/test/jsonld/1.1/expand/pr02-out.jsonld b/test/jsonld/1.1/expand/pr02-out.jsonld
new file mode 100644
index 000000000..bb4984952
--- /dev/null
+++ b/test/jsonld/1.1/expand/pr02-out.jsonld
@@ -0,0 +1,9 @@
+[
+ {
+ "http://example.com/protected": [{"@value": true}],
+ "http://example.com/unprotected": [{"@value": true}],
+ "http://example.com/scope": [{
+ "http://example.com/something-else": [{"@value": "property http://example.com/something-else"}]
+ }]
+ }
+]
diff --git a/test/jsonld/1.1/expand/pr03-in.jsonld b/test/jsonld/1.1/expand/pr03-in.jsonld
new file mode 100644
index 000000000..c0a8aa2ab
--- /dev/null
+++ b/test/jsonld/1.1/expand/pr03-in.jsonld
@@ -0,0 +1,21 @@
+{
+ "@context": {
+ "@vocab": "http://example.com/",
+ "@version": 1.1,
+ "@protected": true,
+ "protected1": {
+ "@id": "http://example.com/protected1"
+ },
+ "protected2": {
+ "@id": "http://example.com/protected2"
+ }
+ },
+ "protected1": {
+ "@context": {
+ "protected1": "http://example.com/something-else",
+ "protected2": "http://example.com/something-else"
+ },
+ "protected1": "error / property http://example.com/protected1",
+ "protected2": "error / property http://example.com/protected2"
+ }
+}
diff --git a/test/jsonld/1.1/expand/pr04-in.jsonld b/test/jsonld/1.1/expand/pr04-in.jsonld
new file mode 100644
index 000000000..5adc52285
--- /dev/null
+++ b/test/jsonld/1.1/expand/pr04-in.jsonld
@@ -0,0 +1,21 @@
+{
+ "@context": {
+ "@vocab": "http://example.com/",
+ "@version": 1.1,
+ "@protected": true,
+ "protected": {
+ "@id": "http://example.com/protected"
+ },
+ "unprotected": {
+ "@id": "http://example.com/unprotected", "@protected": false
+ }
+ },
+ "protected": {
+ "@context": {
+ "protected": "http://example.com/something-else1",
+ "unprotected": "http://example.com/something-else2"
+ },
+ "protected": "error / property http://example.com/protected",
+ "unprotected": "property http://example.com/something-else2"
+ }
+}
diff --git a/test/jsonld/1.1/expand/pr05-in.jsonld b/test/jsonld/1.1/expand/pr05-in.jsonld
new file mode 100644
index 000000000..a7ccf05d0
--- /dev/null
+++ b/test/jsonld/1.1/expand/pr05-in.jsonld
@@ -0,0 +1,17 @@
+{
+ "@context": {
+ "@vocab": "http://example.com/",
+ "@version": 1.1,
+ "@protected": true,
+ "protected": {"@language": null}
+ },
+ "protected": {
+ "@context": [
+ null,
+ {
+ "@vocab": "http://something-else/"
+ }
+ ],
+ "protected": "error / property http://example.com/protected"
+ }
+}
diff --git a/test/jsonld/1.1/expand/pr06-in.jsonld b/test/jsonld/1.1/expand/pr06-in.jsonld
new file mode 100644
index 000000000..df8945943
--- /dev/null
+++ b/test/jsonld/1.1/expand/pr06-in.jsonld
@@ -0,0 +1,17 @@
+{
+ "@context": {
+ "@vocab": "http://example.com/",
+ "@version": 1.1,
+ "@protected": true,
+ "protected": {
+ "@type": "@id"
+ },
+ "unprotected": {
+ "@protected": false,
+ "@context": null
+ }
+ },
+ "unprotected": {
+ "protected": "not expanded, as protected is not a defined term"
+ }
+}
diff --git a/test/jsonld/1.1/expand/pr06-out.jsonld b/test/jsonld/1.1/expand/pr06-out.jsonld
new file mode 100644
index 000000000..121aee430
--- /dev/null
+++ b/test/jsonld/1.1/expand/pr06-out.jsonld
@@ -0,0 +1,5 @@
+[
+ {
+ "http://example.com/unprotected": [{}]
+ }
+]
diff --git a/test/jsonld/1.1/expand/pr08-in.jsonld b/test/jsonld/1.1/expand/pr08-in.jsonld
new file mode 100644
index 000000000..357c5cee1
--- /dev/null
+++ b/test/jsonld/1.1/expand/pr08-in.jsonld
@@ -0,0 +1,38 @@
+{
+ "@context": {
+ "@vocab": "http://example.com/",
+ "@version": 1.1,
+ "protected": {
+ "@protected": false
+ },
+ "scope1": {
+ "@protected": false,
+ "@context": {
+ "protected": {
+ "@id": "http://example.com/something-else"
+ }
+ }
+ },
+ "scope2": {
+ "@protected": true,
+ "@context": {
+ "protected": {
+ "@protected": true
+ }
+ }
+ }
+ },
+ "protected": false,
+ "scope1": {
+ "@context": {
+ "protected": "http://example.com/another-thing"
+ },
+ "protected": "property http://example.com/another-thing"
+ },
+ "scope2": {
+ "@context": {
+ "protected": "http://example.com/another-thing"
+ },
+ "protected": "error / property http://example.com/protected"
+ }
+}
diff --git a/test/jsonld/1.1/expand/pr09-in.jsonld b/test/jsonld/1.1/expand/pr09-in.jsonld
new file mode 100644
index 000000000..29895ff3a
--- /dev/null
+++ b/test/jsonld/1.1/expand/pr09-in.jsonld
@@ -0,0 +1,14 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "@protected": true,
+ "protected1": "http://example.org/protected1",
+ "protected2": "http://example.org/protected2"
+ },
+ "protected2": {
+ "@context": {
+ "protected1": "http://example.org/something-else"
+ },
+ "protected1": "error / property http://example.org/protected1"
+ }
+}
diff --git a/test/jsonld/1.1/expand/pr10-in.jsonld b/test/jsonld/1.1/expand/pr10-in.jsonld
new file mode 100644
index 000000000..a8933fe3e
--- /dev/null
+++ b/test/jsonld/1.1/expand/pr10-in.jsonld
@@ -0,0 +1,14 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "protected": {
+ "@id": "ex:protected",
+ "@protected": true
+ },
+ "unprotected": "ex:unprotected"
+ },
+ "protected": "p === ex:protected",
+ "unprotected": {
+ "protected": "p === ex:protected"
+ }
+}
diff --git a/test/jsonld/1.1/expand/pr10-out.jsonld b/test/jsonld/1.1/expand/pr10-out.jsonld
new file mode 100644
index 000000000..3f10151e9
--- /dev/null
+++ b/test/jsonld/1.1/expand/pr10-out.jsonld
@@ -0,0 +1,18 @@
+[
+ {
+ "ex:protected": [
+ {
+ "@value": "p === ex:protected"
+ }
+ ],
+ "ex:unprotected": [
+ {
+ "ex:protected": [
+ {
+ "@value": "p === ex:protected"
+ }
+ ]
+ }
+ ]
+ }
+]
diff --git a/test/jsonld/1.1/expand/pr11-in.jsonld b/test/jsonld/1.1/expand/pr11-in.jsonld
new file mode 100644
index 000000000..de1856301
--- /dev/null
+++ b/test/jsonld/1.1/expand/pr11-in.jsonld
@@ -0,0 +1,17 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "protected": {
+ "@id": "ex:protected",
+ "@protected": true
+ },
+ "unprotected": "ex:unprotected"
+ },
+ "protected": "p === ex:protected",
+ "unprotected": {
+ "@context": {
+ "protected": "ex:protected2"
+ },
+ "protected": "p === ex:protected"
+ }
+}
diff --git a/test/jsonld/1.1/expand/pr12-in.jsonld b/test/jsonld/1.1/expand/pr12-in.jsonld
new file mode 100644
index 000000000..2dc30da6f
--- /dev/null
+++ b/test/jsonld/1.1/expand/pr12-in.jsonld
@@ -0,0 +1,15 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "@protected": true,
+ "protected1": "ex:protected1",
+ "protected2": "ex:protected2"
+ },
+ "protected1": "p === ex:protected1",
+ "protected2": {
+ "@context": {
+ "protected1": "ex:protected1:error"
+ },
+ "protected1": "error / p === ex:protected1"
+ }
+}
diff --git a/test/jsonld/1.1/expand/pr13-in.jsonld b/test/jsonld/1.1/expand/pr13-in.jsonld
new file mode 100644
index 000000000..6f8ff0067
--- /dev/null
+++ b/test/jsonld/1.1/expand/pr13-in.jsonld
@@ -0,0 +1,18 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "@protected": true,
+ "protected": "ex:protected",
+ "unprotected": {
+ "@id": "ex:unprotected1",
+ "@protected": false
+ }
+ },
+ "protected": {
+ "@context": {
+ "unprotected": "ex:unprotected2"
+ },
+ "unprotected": "p === ex:unprotected2"
+ },
+ "unprotected": "p === ex:unprotected1"
+}
diff --git a/test/jsonld/1.1/expand/pr13-out.jsonld b/test/jsonld/1.1/expand/pr13-out.jsonld
new file mode 100644
index 000000000..256cc41a1
--- /dev/null
+++ b/test/jsonld/1.1/expand/pr13-out.jsonld
@@ -0,0 +1,18 @@
+[
+ {
+ "ex:protected": [
+ {
+ "ex:unprotected2": [
+ {
+ "@value": "p === ex:unprotected2"
+ }
+ ]
+ }
+ ],
+ "ex:unprotected1": [
+ {
+ "@value": "p === ex:unprotected1"
+ }
+ ]
+ }
+]
diff --git a/test/jsonld/1.1/expand/pr14-in.jsonld b/test/jsonld/1.1/expand/pr14-in.jsonld
new file mode 100644
index 000000000..e88b9ef2c
--- /dev/null
+++ b/test/jsonld/1.1/expand/pr14-in.jsonld
@@ -0,0 +1,18 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "@protected": true,
+ "protected1": "ex:protected1",
+ "protected2": {
+ "@id": "ex:protected2",
+ "@context": null
+ }
+ },
+ "protected1": "p === ex:protected1",
+ "protected2": {
+ "@context": {
+ "protected1": "ex:protected3"
+ },
+ "protected1": "p === ex:protected3"
+ }
+}
diff --git a/test/jsonld/1.1/expand/pr14-out.jsonld b/test/jsonld/1.1/expand/pr14-out.jsonld
new file mode 100644
index 000000000..52c399e9a
--- /dev/null
+++ b/test/jsonld/1.1/expand/pr14-out.jsonld
@@ -0,0 +1,18 @@
+[
+ {
+ "ex:protected1": [
+ {
+ "@value": "p === ex:protected1"
+ }
+ ],
+ "ex:protected2": [
+ {
+ "ex:protected3": [
+ {
+ "@value": "p === ex:protected3"
+ }
+ ]
+ }
+ ]
+ }
+]
diff --git a/test/jsonld/1.1/expand/pr15-in.jsonld b/test/jsonld/1.1/expand/pr15-in.jsonld
new file mode 100644
index 000000000..d0cf99b1c
--- /dev/null
+++ b/test/jsonld/1.1/expand/pr15-in.jsonld
@@ -0,0 +1,20 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "@protected": true,
+ "protected1": "ex:protected1",
+ "protected2": {
+ "@id": "ex:protected2",
+ "@context": [
+ null
+ ]
+ }
+ },
+ "protected1": "p === ex:protected1",
+ "protected2": {
+ "@context": {
+ "protected1": "ex:protected3"
+ },
+ "protected1": "p === ex:protected3"
+ }
+}
diff --git a/test/jsonld/1.1/expand/pr15-out.jsonld b/test/jsonld/1.1/expand/pr15-out.jsonld
new file mode 100644
index 000000000..52c399e9a
--- /dev/null
+++ b/test/jsonld/1.1/expand/pr15-out.jsonld
@@ -0,0 +1,18 @@
+[
+ {
+ "ex:protected1": [
+ {
+ "@value": "p === ex:protected1"
+ }
+ ],
+ "ex:protected2": [
+ {
+ "ex:protected3": [
+ {
+ "@value": "p === ex:protected3"
+ }
+ ]
+ }
+ ]
+ }
+]
diff --git a/test/jsonld/1.1/expand/pr16-in.jsonld b/test/jsonld/1.1/expand/pr16-in.jsonld
new file mode 100644
index 000000000..61946e019
--- /dev/null
+++ b/test/jsonld/1.1/expand/pr16-in.jsonld
@@ -0,0 +1,30 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "@protected": true,
+ "protected1": "ex:protected1",
+ "protected2": {
+ "@id": "ex:protected2",
+ "@context": [
+ null,
+ {
+ "protected1": "ex:protected3",
+ "unprotected": "ex:unprotected2"
+ }
+ ]
+ },
+ "unprotected": {
+ "@protected": false,
+ "@id": "ex:unprotected1"
+ }
+ },
+ "protected1": "p === ex:protected1",
+ "protected2": {
+ "@context": {
+ "protected1": "ex:protected3"
+ },
+ "protected1": "p === ex:protected3",
+ "unprotected": "p === ex:unprotected2"
+ },
+ "unprotected": "p === ex:unprotected1"
+}
diff --git a/test/jsonld/1.1/expand/pr16-out.jsonld b/test/jsonld/1.1/expand/pr16-out.jsonld
new file mode 100644
index 000000000..264b8360b
--- /dev/null
+++ b/test/jsonld/1.1/expand/pr16-out.jsonld
@@ -0,0 +1,28 @@
+[
+ {
+ "ex:protected1": [
+ {
+ "@value": "p === ex:protected1"
+ }
+ ],
+ "ex:protected2": [
+ {
+ "ex:protected3": [
+ {
+ "@value": "p === ex:protected3"
+ }
+ ],
+ "ex:unprotected2": [
+ {
+ "@value": "p === ex:unprotected2"
+ }
+ ]
+ }
+ ],
+ "ex:unprotected1": [
+ {
+ "@value": "p === ex:unprotected1"
+ }
+ ]
+ }
+]
diff --git a/test/jsonld/1.1/expand/pr17-in.jsonld b/test/jsonld/1.1/expand/pr17-in.jsonld
new file mode 100644
index 000000000..e23003543
--- /dev/null
+++ b/test/jsonld/1.1/expand/pr17-in.jsonld
@@ -0,0 +1,22 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "@protected": true,
+ "protected1": "ex:protected1",
+ "protected2": "ex:protected2",
+ "Protected": {
+ "@id": "ex:Protected",
+ "@context": [
+ null
+ ]
+ }
+ },
+ "protected1": "p === protected1",
+ "protected2": {
+ "@context": {
+ "unprotected": "ex:unprotected"
+ },
+ "@type": "Protected",
+ "unprotected": "error / omitted"
+ }
+}
diff --git a/test/jsonld/1.1/expand/pr18-in.jsonld b/test/jsonld/1.1/expand/pr18-in.jsonld
new file mode 100644
index 000000000..a6648cd6f
--- /dev/null
+++ b/test/jsonld/1.1/expand/pr18-in.jsonld
@@ -0,0 +1,18 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "@protected": true,
+ "protected": "ex:protected1",
+ "Protected": {
+ "@id": "ex:Protected",
+ "@context": [
+ null,
+ {
+ "protected": "ex:protected2"
+ }
+ ]
+ }
+ },
+ "@type": "Protected",
+ "protected": "error / p === ex:protected1"
+}
diff --git a/test/jsonld/1.1/expand/pr19-in.jsonld b/test/jsonld/1.1/expand/pr19-in.jsonld
new file mode 100644
index 000000000..e418cb12f
--- /dev/null
+++ b/test/jsonld/1.1/expand/pr19-in.jsonld
@@ -0,0 +1,29 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "@protected": true,
+ "protected1": "ex:protected1",
+ "protected2": {
+ "@id": "ex:protected2",
+ "@context": [
+ null,
+ {
+ "protected1": "ex:protected3"
+ }
+ ]
+ },
+ "unprotected": {
+ "@protected": false,
+ "@id": "ex:unprotected1"
+ }
+ },
+ "protected1": "p === ex:protected1",
+ "protected2": {
+ "@context": {
+ "protected1": "ex:protected3"
+ },
+ "protected1": "p === ex:protected3",
+ "unprotected": "p === ex:unprotected2"
+ },
+ "unprotected": "p === ex:unprotected1"
+}
diff --git a/test/jsonld/1.1/expand/pr19-out.jsonld b/test/jsonld/1.1/expand/pr19-out.jsonld
new file mode 100644
index 000000000..0bca9e1bd
--- /dev/null
+++ b/test/jsonld/1.1/expand/pr19-out.jsonld
@@ -0,0 +1,23 @@
+[
+ {
+ "ex:protected1": [
+ {
+ "@value": "p === ex:protected1"
+ }
+ ],
+ "ex:protected2": [
+ {
+ "ex:protected3": [
+ {
+ "@value": "p === ex:protected3"
+ }
+ ]
+ }
+ ],
+ "ex:unprotected1": [
+ {
+ "@value": "p === ex:unprotected1"
+ }
+ ]
+ }
+]
diff --git a/test/jsonld/1.1/expand/pr20-in.jsonld b/test/jsonld/1.1/expand/pr20-in.jsonld
new file mode 100644
index 000000000..69edf670e
--- /dev/null
+++ b/test/jsonld/1.1/expand/pr20-in.jsonld
@@ -0,0 +1,24 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "@protected": true,
+ "protected1": "ex:protected1",
+ "Protected": {
+ "@id": "ex:Protected",
+ "@context": [
+ null,
+ {
+ "protected1": "ex:protected2",
+ "unprotected": "ex:unprotected2"
+ }
+ ]
+ },
+ "unprotected": {
+ "@protected": false,
+ "@id": "ex:unprotected1"
+ }
+ },
+ "@type": "Protected",
+ "protected1": "error / p === ex:protected1",
+ "unprotected": "p === ex:unprotected2"
+}
diff --git a/test/jsonld/1.1/expand/pr21-in.jsonld b/test/jsonld/1.1/expand/pr21-in.jsonld
new file mode 100644
index 000000000..3be7f54fc
--- /dev/null
+++ b/test/jsonld/1.1/expand/pr21-in.jsonld
@@ -0,0 +1,20 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "@protected": true,
+ "protected": "ex:protected",
+ "Protected": {
+ "@id": "ex:Protected",
+ "@context": [
+ null
+ ]
+ },
+ "unprotected": {
+ "@protected": false,
+ "@id": "ex:unprotected"
+ }
+ },
+ "@type": "Protected",
+ "protected": "error / p === ex:protected",
+ "unprotected": "missing"
+}
diff --git a/test/jsonld/1.1/expand/pr22-in.jsonld b/test/jsonld/1.1/expand/pr22-in.jsonld
new file mode 100644
index 000000000..7cd17cb8a
--- /dev/null
+++ b/test/jsonld/1.1/expand/pr22-in.jsonld
@@ -0,0 +1,17 @@
+{
+ "@context": [{
+ "@version": 1.1,
+ "@protected": true,
+ "@vocab": "http://example.com/",
+ "Parent": {"@context": {"@protected": true, "foo": {"@type": "@id"}}}
+ }, {
+ "@version": 1.1,
+ "@protected": true,
+ "Child": {"@context": {"@protected": true, "foo": {"@type": "@id"}}}
+ }],
+ "@type": "Parent",
+ "foo": {
+ "@type": "Child",
+ "foo": "http://example.com/test"
+ }
+}
diff --git a/test/jsonld/1.1/expand/pr22-out.jsonld b/test/jsonld/1.1/expand/pr22-out.jsonld
new file mode 100644
index 000000000..4e97b905f
--- /dev/null
+++ b/test/jsonld/1.1/expand/pr22-out.jsonld
@@ -0,0 +1,20 @@
+[
+ {
+ "@type": [
+ "http://example.com/Parent"
+ ],
+ "http://example.com/foo": [
+ {
+ "@type": [
+ "http://example.com/Child"
+ ],
+ "http://example.com/foo": [
+ {
+ "@id": "http://example.com/test"
+ }
+ ]
+ }
+ ]
+ }
+]
+
diff --git a/test/jsonld/1.1/expand/pr23-in.jsonld b/test/jsonld/1.1/expand/pr23-in.jsonld
new file mode 100644
index 000000000..23f525f33
--- /dev/null
+++ b/test/jsonld/1.1/expand/pr23-in.jsonld
@@ -0,0 +1,15 @@
+{
+ "@context": [{
+ "@version": 1.1,
+ "@protected": true,
+ "id": "@id",
+ "type": "@type"
+ }, {
+ "@version": 1.1,
+ "@protected": true,
+ "id": "@id",
+ "type": "@type"
+ }],
+ "id": "http://example/id",
+ "type": "http://example/type"
+}
diff --git a/test/jsonld/1.1/expand/pr23-out.jsonld b/test/jsonld/1.1/expand/pr23-out.jsonld
new file mode 100644
index 000000000..b8fdbb806
--- /dev/null
+++ b/test/jsonld/1.1/expand/pr23-out.jsonld
@@ -0,0 +1,9 @@
+[
+ {
+ "@id": "http://example/id",
+ "@type": [
+ "http://example/type"
+ ]
+ }
+]
+
diff --git a/test/jsonld/1.1/expand/pr24-in.jsonld b/test/jsonld/1.1/expand/pr24-in.jsonld
new file mode 100644
index 000000000..ed5af3b35
--- /dev/null
+++ b/test/jsonld/1.1/expand/pr24-in.jsonld
@@ -0,0 +1,12 @@
+{
+ "@context": [{
+ "@version": 1.1,
+ "@protected": true,
+ "foo": "http://example/foo#"
+ }, {
+ "@version": 1.1,
+ "@protected": true,
+ "foo": "http://example/foo#"
+ }],
+ "foo:bar": "foobar"
+}
diff --git a/test/jsonld/1.1/expand/pr24-out.jsonld b/test/jsonld/1.1/expand/pr24-out.jsonld
new file mode 100644
index 000000000..0698413cc
--- /dev/null
+++ b/test/jsonld/1.1/expand/pr24-out.jsonld
@@ -0,0 +1,8 @@
+[
+ {
+ "http://example/foo#bar": [{
+ "@value": "foobar"
+ }]
+ }
+]
+
diff --git a/test/jsonld/1.1/expand/pr25-in.jsonld b/test/jsonld/1.1/expand/pr25-in.jsonld
new file mode 100644
index 000000000..02fffd685
--- /dev/null
+++ b/test/jsonld/1.1/expand/pr25-in.jsonld
@@ -0,0 +1,141 @@
+{
+ "@context": [{
+ "@version": 1.1,
+ "@protected": true,
+ "id": "@id",
+ "type": "@type",
+ "foo": {
+ "@id": "http://example/foo",
+ "@container": ["@graph", "@set"]
+ },
+ "bar": {
+ "@id": "http://example/bar",
+ "@type": "@id",
+ "@context": {
+ "@version": 1.1,
+ "@protected": true,
+ "bar-1": {
+ "@id": "http://example/bar-1",
+ "@context": {
+ "@version": 1.1,
+ "@protected": true,
+ "bar-2": "http://example/bar-2",
+ "Foo": {
+ "@id": "http://example/Foo",
+ "@context": {
+ "@version": 1.1,
+ "@protected": true,
+ "bar-2": "http://example/bar-2"
+ }
+ }
+ }
+ }
+ }
+ },
+ "Bar": {
+ "@id": "http://example/Bar",
+ "@context": {
+ "@version": 1.1,
+ "@protected": true,
+ "bar-1": {
+ "@id": "http://example/bar-1",
+ "@context": {
+ "@version": 1.1,
+ "@protected": true,
+ "bar-2": "http://example/bar-2",
+ "Foo": {
+ "@id": "http://example/Foo",
+ "@context": {
+ "@version": 1.1,
+ "@protected": true,
+ "bar-2": "http://example/bar-2"
+ }
+ }
+ }
+ }
+ }
+ },
+ "Foo": {
+ "@id": "http://example/Foo",
+ "@context": {
+ "@version": 1.1,
+ "@protected": true,
+ "bar-2": "http://example/bar-2"
+ }
+ }
+ }, {
+ "@version": 1.1,
+ "@protected": true,
+ "id": "@id",
+ "type": "@type",
+ "foo": {
+ "@id": "http://example/foo",
+ "@container": ["@graph", "@set"]
+ },
+ "bar": {
+ "@id": "http://example/bar",
+ "@type": "@id",
+ "@context": {
+ "@version": 1.1,
+ "@protected": true,
+ "bar-1": {
+ "@id": "http://example/bar-1",
+ "@context": {
+ "@version": 1.1,
+ "@protected": true,
+ "bar-2": "http://example/bar-2",
+ "Foo": {
+ "@id": "http://example/Foo",
+ "@context": {
+ "@version": 1.1,
+ "@protected": true,
+ "bar-2": "http://example/bar-2"
+ }
+ }
+ }
+ }
+ }
+ },
+ "Bar": {
+ "@id": "http://example/Bar",
+ "@context": {
+ "@version": 1.1,
+ "@protected": true,
+ "bar-1": {
+ "@id": "http://example/bar-1",
+ "@context": {
+ "@version": 1.1,
+ "@protected": true,
+ "bar-2": "http://example/bar-2",
+ "Foo": {
+ "@id": "http://example/Foo",
+ "@context": {
+ "@version": 1.1,
+ "@protected": true,
+ "bar-2": "http://example/bar-2"
+ }
+ }
+ }
+ }
+ }
+ },
+ "Foo": {
+ "@id": "http://example/Foo",
+ "@context": {
+ "@version": 1.1,
+ "@protected": true,
+ "bar-2": "http://example/bar-2"
+ }
+ }
+ }],
+ "type": "Bar",
+ "foo": [{
+ "bar": "http://example/"
+ }],
+ "bar-1": {
+ "bar-2": {
+ "type": "Foo",
+ "bar-2": "bar-2"
+ }
+ }
+}
diff --git a/test/jsonld/1.1/expand/pr25-out.jsonld b/test/jsonld/1.1/expand/pr25-out.jsonld
new file mode 100644
index 000000000..0eff6facf
--- /dev/null
+++ b/test/jsonld/1.1/expand/pr25-out.jsonld
@@ -0,0 +1,23 @@
+[
+ {
+ "@type": [
+ "http://example/Bar"
+ ],
+ "http://example/foo": [{
+ "@graph": [{
+ "http://example/bar": [{
+ "@id": "http://example/"
+ }]
+ }]
+ }],
+ "http://example/bar-1": [{
+ "http://example/bar-2": [{
+ "@type": ["http://example/Foo"],
+ "http://example/bar-2": [{
+ "@value": "bar-2"
+ }]
+ }]
+ }]
+ }
+]
+
diff --git a/test/jsonld/1.1/expand/pr26-in.jsonld b/test/jsonld/1.1/expand/pr26-in.jsonld
new file mode 100644
index 000000000..28f02147a
--- /dev/null
+++ b/test/jsonld/1.1/expand/pr26-in.jsonld
@@ -0,0 +1,136 @@
+{
+ "@context": [{
+ "@version": 1.1,
+ "@protected": true,
+ "id": "@id",
+ "type": "@type",
+ "foo": {
+ "@id": "http://example/foo",
+ "@container": ["@graph", "@set"]
+ },
+ "bar": {
+ "@id": "http://example/bar",
+ "@type": "@id",
+ "@context": {
+ "@version": 1.1,
+ "@protected": true,
+ "bar-1": {
+ "@id": "http://example/bar-1",
+ "@context": {
+ "@version": 1.1,
+ "@protected": true,
+ "bar-2": "http://example/bar-2",
+ "Foo": {
+ "@id": "http://example/Foo",
+ "@context": {
+ "@version": 1.1,
+ "@protected": true,
+ "bar-2": "http://example/bar-2"
+ }
+ }
+ }
+ }
+ }
+ },
+ "Bar": {
+ "@id": "http://example/Bar",
+ "@context": {
+ "@version": 1.1,
+ "@protected": true,
+ "bar-1": {
+ "@id": "http://example/bar-1",
+ "@context": {
+ "@version": 1.1,
+ "@protected": true,
+ "bar-2": "http://example/bar-2",
+ "Foo": {
+ "@id": "http://example/Foo",
+ "@context": {
+ "@version": 1.1,
+ "@protected": true,
+ "bar-2": "http://example/bar-2"
+ }
+ }
+ }
+ }
+ }
+ },
+ "Foo": {
+ "@id": "http://example/Foo",
+ "@context": {
+ "@version": 1.1,
+ "@protected": true,
+ "bar-2": "http://example/bar-2"
+ }
+ }
+ }, {
+ "@version": 1.1,
+ "@protected": true,
+ "id": "@id",
+ "type": "@type",
+ "foo": {
+ "@id": "http://example/foo",
+ "@container": ["@graph", "@set"]
+ },
+ "bar": {
+ "@id": "http://example/bar",
+ "@type": "@id",
+ "@context": {
+ "@version": 1.1,
+ "@protected": true,
+ "bar-1": {
+ "@id": "http://example/bar-1",
+ "@context": {
+ "@version": 1.1,
+ "@protected": true,
+ "bar-2": "http://example/bar-2",
+ "Foo": {
+ "@id": "http://example/Foo",
+ "@context": {
+ "@version": 1.1,
+ "@protected": true,
+ "bar-2": "http://example/bar-2"
+ }
+ }
+ }
+ }
+ }
+ },
+ "Bar": {
+ "@id": "http://example/Bar",
+ "@context": {
+ "@version": 1.1,
+ "@protected": true,
+ "bar-1": {
+ "@id": "http://example/bar-1",
+ "@context": {
+ "@version": 1.1,
+ "@protected": true,
+ "bar-2": "http://example/bar-2",
+ "Foo": {
+ "@id": "http://example/Foo",
+ "@context": {
+ "@version": 1.1,
+ "@protected": true,
+ "bar-2": "http://example/bar-2"
+ }
+ }
+ }
+ }
+ }
+ },
+ "Foo": {
+ "@id": "http://example/Foo"
+ }
+ }],
+ "type": "Bar",
+ "foo": [{
+ "bar": "http://example/"
+ }],
+ "bar-1": {
+ "bar-2": {
+ "type": "Foo",
+ "bar-2": "bar-2"
+ }
+ }
+}
diff --git a/test/jsonld/1.1/expand/pr27-in.jsonld b/test/jsonld/1.1/expand/pr27-in.jsonld
new file mode 100644
index 000000000..27d54470a
--- /dev/null
+++ b/test/jsonld/1.1/expand/pr27-in.jsonld
@@ -0,0 +1,14 @@
+{
+ "@context": [{
+ "@version": 1.1,
+ "@protected": true,
+ "id": "@id",
+ "type": "@type"
+ }, {
+ "@version": 1.1,
+ "id": "@id",
+ "type": "@type"
+ }],
+ "id": "http://example/id",
+ "type": "http://example/type"
+}
diff --git a/test/jsonld/1.1/expand/pr27-out.jsonld b/test/jsonld/1.1/expand/pr27-out.jsonld
new file mode 100644
index 000000000..b8fdbb806
--- /dev/null
+++ b/test/jsonld/1.1/expand/pr27-out.jsonld
@@ -0,0 +1,9 @@
+[
+ {
+ "@id": "http://example/id",
+ "@type": [
+ "http://example/type"
+ ]
+ }
+]
+
diff --git a/test/jsonld/1.1/expand/pr28-in.jsonld b/test/jsonld/1.1/expand/pr28-in.jsonld
new file mode 100644
index 000000000..f883af3b3
--- /dev/null
+++ b/test/jsonld/1.1/expand/pr28-in.jsonld
@@ -0,0 +1,11 @@
+{
+ "@context": [{
+ "@version": 1.1,
+ "@protected": true,
+ "term": null
+ }, {
+ "@version": 1.1,
+ "term": {"@id": "http://example.com/term"}
+ }],
+ "term": "undefined"
+}
diff --git a/test/jsonld/1.1/expand/pr29-in.jsonld b/test/jsonld/1.1/expand/pr29-in.jsonld
new file mode 100644
index 000000000..e49e6c69a
--- /dev/null
+++ b/test/jsonld/1.1/expand/pr29-in.jsonld
@@ -0,0 +1,8 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "tag": {"@id": "http://example.org/ns/tag/", "@prefix": false}
+ },
+ "tag:champin.net,2019:prop": "This is not treated as a Compact IRI",
+ "tag": "tricky"
+}
diff --git a/test/jsonld/1.1/expand/pr29-out.jsonld b/test/jsonld/1.1/expand/pr29-out.jsonld
new file mode 100644
index 000000000..edc7f4318
--- /dev/null
+++ b/test/jsonld/1.1/expand/pr29-out.jsonld
@@ -0,0 +1,14 @@
+[
+ {
+ "http://example.org/ns/tag/": [
+ {
+ "@value": "tricky"
+ }
+ ],
+ "tag:champin.net,2019:prop": [
+ {
+ "@value": "This is not treated as a Compact IRI"
+ }
+ ]
+ }
+]
diff --git a/test/jsonld/1.1/expand/pr30-in.jsonld b/test/jsonld/1.1/expand/pr30-in.jsonld
new file mode 100644
index 000000000..5744284d8
--- /dev/null
+++ b/test/jsonld/1.1/expand/pr30-in.jsonld
@@ -0,0 +1,11 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "id": {"@id": "@id", "@protected": true},
+ "type": {"@id" : "@type", "@container": "@set", "@protected" : true},
+ "@type": {"@container": "@set", "@protected": true}
+ },
+ "id": "http://example.com/1",
+ "type": "http://example.org/ns/Foo",
+ "@type": "http://example.org/ns/Bar"
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/pr30-out.jsonld b/test/jsonld/1.1/expand/pr30-out.jsonld
new file mode 100644
index 000000000..caa90d7e9
--- /dev/null
+++ b/test/jsonld/1.1/expand/pr30-out.jsonld
@@ -0,0 +1,9 @@
+[
+ {
+ "@id": "http://example.com/1",
+ "@type": [
+ "http://example.org/ns/Bar",
+ "http://example.org/ns/Foo"
+ ]
+ }
+]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/pr31-in.jsonld b/test/jsonld/1.1/expand/pr31-in.jsonld
new file mode 100644
index 000000000..459d335a2
--- /dev/null
+++ b/test/jsonld/1.1/expand/pr31-in.jsonld
@@ -0,0 +1,13 @@
+{
+ "@context": [{
+ "@version": 1.1,
+ "id": {"@id": "@id", "@protected": true},
+ "type": {"@id" : "@type", "@container": "@set", "@protected" : true},
+ "@type": {"@container": "@set", "@protected": true}
+ }, {
+ "@version": 1.1,
+ "id": "http://example.com/id"
+ }],
+ "id": "http://example.com/1",
+ "type": ["http://example.org/ns/Foo"]
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/pr32-in.jsonld b/test/jsonld/1.1/expand/pr32-in.jsonld
new file mode 100644
index 000000000..3f287c013
--- /dev/null
+++ b/test/jsonld/1.1/expand/pr32-in.jsonld
@@ -0,0 +1,13 @@
+{
+ "@context": [{
+ "@version": 1.1,
+ "id": {"@id": "@id", "@protected": true},
+ "type": {"@id" : "@type", "@container": "@set", "@protected" : true},
+ "@type": {"@container": "@set", "@protected": true}
+ }, {
+ "@version": 1.1,
+ "@type": {"@protected": true}
+ }],
+ "id": "http://example.com/1",
+ "type": ["http://example.org/ns/Foo"]
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/pr33-in.jsonld b/test/jsonld/1.1/expand/pr33-in.jsonld
new file mode 100644
index 000000000..ac9b9e5ae
--- /dev/null
+++ b/test/jsonld/1.1/expand/pr33-in.jsonld
@@ -0,0 +1,10 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "foo": {
+ "@id": "@type",
+ "@prefix": true
+ }
+ },
+ "foo:bar": "http://example.org/baz"
+}
diff --git a/test/jsonld/1.1/expand/pr34-in.jsonld b/test/jsonld/1.1/expand/pr34-in.jsonld
new file mode 100644
index 000000000..18bbf1c72
--- /dev/null
+++ b/test/jsonld/1.1/expand/pr34-in.jsonld
@@ -0,0 +1,7 @@
+{
+ "@context": {
+ "@ignoreMe": "http://example.org/should-ignore"
+ },
+ "@type": "http://example.com/IgnoreTest",
+ "@ignoreMe": "should not be here"
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/pr34-out.jsonld b/test/jsonld/1.1/expand/pr34-out.jsonld
new file mode 100644
index 000000000..38735bb66
--- /dev/null
+++ b/test/jsonld/1.1/expand/pr34-out.jsonld
@@ -0,0 +1,3 @@
+[{
+ "@type": ["http://example.com/IgnoreTest"]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/pr35-in.jsonld b/test/jsonld/1.1/expand/pr35-in.jsonld
new file mode 100644
index 000000000..0145697eb
--- /dev/null
+++ b/test/jsonld/1.1/expand/pr35-in.jsonld
@@ -0,0 +1,8 @@
+{
+ "@context": {
+ "@vocab": "http://example.org/",
+ "@ignoreMe": "http://example.org/should-ignore"
+ },
+ "@type": "http://example.com/IgnoreTest",
+ "@ignoreMe": "should not be here"
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/pr35-out.jsonld b/test/jsonld/1.1/expand/pr35-out.jsonld
new file mode 100644
index 000000000..38735bb66
--- /dev/null
+++ b/test/jsonld/1.1/expand/pr35-out.jsonld
@@ -0,0 +1,3 @@
+[{
+ "@type": ["http://example.com/IgnoreTest"]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/pr36-in.jsonld b/test/jsonld/1.1/expand/pr36-in.jsonld
new file mode 100644
index 000000000..bf8fe6cc2
--- /dev/null
+++ b/test/jsonld/1.1/expand/pr36-in.jsonld
@@ -0,0 +1,7 @@
+{
+ "@context": {
+ "ignoreMe": "@ignoreMe"
+ },
+ "@type": "http://example.com/IgnoreTest",
+ "ignoreMe": "should not be here"
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/pr36-out.jsonld b/test/jsonld/1.1/expand/pr36-out.jsonld
new file mode 100644
index 000000000..38735bb66
--- /dev/null
+++ b/test/jsonld/1.1/expand/pr36-out.jsonld
@@ -0,0 +1,3 @@
+[{
+ "@type": ["http://example.com/IgnoreTest"]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/pr37-in.jsonld b/test/jsonld/1.1/expand/pr37-in.jsonld
new file mode 100644
index 000000000..b1820a1a5
--- /dev/null
+++ b/test/jsonld/1.1/expand/pr37-in.jsonld
@@ -0,0 +1,8 @@
+{
+ "@context": {
+ "@vocab": "http://example.org/",
+ "ignoreMe": "@ignoreMe"
+ },
+ "@type": "http://example.com/IgnoreTest",
+ "ignoreMe": "vocabulary relative"
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/pr37-out.jsonld b/test/jsonld/1.1/expand/pr37-out.jsonld
new file mode 100644
index 000000000..f6dfa5508
--- /dev/null
+++ b/test/jsonld/1.1/expand/pr37-out.jsonld
@@ -0,0 +1,4 @@
+[{
+ "@type": ["http://example.com/IgnoreTest"],
+ "http://example.org/ignoreMe": [{"@value": "vocabulary relative"}]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/pr38-in.jsonld b/test/jsonld/1.1/expand/pr38-in.jsonld
new file mode 100644
index 000000000..9f4ac1af3
--- /dev/null
+++ b/test/jsonld/1.1/expand/pr38-in.jsonld
@@ -0,0 +1,7 @@
+{
+ "@context": {
+ "ignoreMe": {"@reverse": "@ignoreMe"}
+ },
+ "@type": "http://example.com/IgnoreTest",
+ "ignoreMe": {"http://example.org/text": "should not be here"}
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/pr38-out.jsonld b/test/jsonld/1.1/expand/pr38-out.jsonld
new file mode 100644
index 000000000..38735bb66
--- /dev/null
+++ b/test/jsonld/1.1/expand/pr38-out.jsonld
@@ -0,0 +1,3 @@
+[{
+ "@type": ["http://example.com/IgnoreTest"]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/pr39-in.jsonld b/test/jsonld/1.1/expand/pr39-in.jsonld
new file mode 100644
index 000000000..1ea54f7d4
--- /dev/null
+++ b/test/jsonld/1.1/expand/pr39-in.jsonld
@@ -0,0 +1,8 @@
+{
+ "@context": {
+ "@vocab": "http://example.org/",
+ "ignoreMe": {"@reverse": "@ignoreMe"}
+ },
+ "@type": "http://example.com/IgnoreTest",
+ "ignoreMe": {"text": "not reversed"}
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/pr39-out.jsonld b/test/jsonld/1.1/expand/pr39-out.jsonld
new file mode 100644
index 000000000..aa51f6622
--- /dev/null
+++ b/test/jsonld/1.1/expand/pr39-out.jsonld
@@ -0,0 +1,6 @@
+[{
+ "@type": ["http://example.com/IgnoreTest"],
+ "http://example.org/ignoreMe": [{
+ "http://example.org/text": [{"@value": "not reversed"}]
+ }]
+}]
diff --git a/test/jsonld/1.1/expand/pr40-in.jsonld b/test/jsonld/1.1/expand/pr40-in.jsonld
new file mode 100644
index 000000000..52c7b6422
--- /dev/null
+++ b/test/jsonld/1.1/expand/pr40-in.jsonld
@@ -0,0 +1,17 @@
+{
+ "@context": {
+ "@vocab": "http://vocab.org/",
+ "@protected": true,
+ "bar": "http://ignored.org/bar",
+ "foo": {
+ "@context": {
+ "bar": "http://example.org/other"
+ }
+ }
+ },
+ "@id": "ex:outer",
+ "foo": {
+ "@id": "ex:inner",
+ "bar": "baz"
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/pr40-out.jsonld b/test/jsonld/1.1/expand/pr40-out.jsonld
new file mode 100644
index 000000000..bba43a5f9
--- /dev/null
+++ b/test/jsonld/1.1/expand/pr40-out.jsonld
@@ -0,0 +1,7 @@
+[{
+ "@id": "ex:outer",
+ "http://vocab.org/foo": [{
+ "@id": "ex:inner",
+ "http://example.org/other": [{"@value": "baz"}]
+ }]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/so01-in.jsonld b/test/jsonld/1.1/expand/so01-in.jsonld
new file mode 100644
index 000000000..7423c4257
--- /dev/null
+++ b/test/jsonld/1.1/expand/so01-in.jsonld
@@ -0,0 +1,5 @@
+{
+ "@context": {
+ "@import": "so01-in.jsonld"
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/so02-in.jsonld b/test/jsonld/1.1/expand/so02-in.jsonld
new file mode 100644
index 000000000..a46da56fd
--- /dev/null
+++ b/test/jsonld/1.1/expand/so02-in.jsonld
@@ -0,0 +1,6 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "@import": {}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/so03-in.jsonld b/test/jsonld/1.1/expand/so03-in.jsonld
new file mode 100644
index 000000000..9b615289f
--- /dev/null
+++ b/test/jsonld/1.1/expand/so03-in.jsonld
@@ -0,0 +1,6 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "@import": "so03-in.jsonld"
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/so05-context.jsonld b/test/jsonld/1.1/expand/so05-context.jsonld
new file mode 100644
index 000000000..902a38702
--- /dev/null
+++ b/test/jsonld/1.1/expand/so05-context.jsonld
@@ -0,0 +1,5 @@
+{
+ "@context": {
+ "baz": {"@id": "http://example.org/baz", "@type": "@vocab"}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/so05-in.jsonld b/test/jsonld/1.1/expand/so05-in.jsonld
new file mode 100644
index 000000000..664c82db7
--- /dev/null
+++ b/test/jsonld/1.1/expand/so05-in.jsonld
@@ -0,0 +1,14 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "@vocab": "http://example/",
+ "Foo": {
+ "@context": {
+ "@import": "so05-context.jsonld",
+ "@propagate": true
+ }
+ }
+ },
+ "@type": "Foo",
+ "bar": {"baz": "buzz"}
+}
diff --git a/test/jsonld/1.1/expand/so05-out.jsonld b/test/jsonld/1.1/expand/so05-out.jsonld
new file mode 100644
index 000000000..d4e93f657
--- /dev/null
+++ b/test/jsonld/1.1/expand/so05-out.jsonld
@@ -0,0 +1,8 @@
+[
+ {
+ "@type": ["http://example/Foo"],
+ "http://example/bar": [{
+ "http://example.org/baz": [{"@id": "http://example/buzz"}]
+ }]
+ }
+]
diff --git a/test/jsonld/1.1/expand/so06-context.jsonld b/test/jsonld/1.1/expand/so06-context.jsonld
new file mode 100644
index 000000000..5da1e53f2
--- /dev/null
+++ b/test/jsonld/1.1/expand/so06-context.jsonld
@@ -0,0 +1,5 @@
+{
+ "@context": {
+ "baz": {"@id": "http://example.com/baz", "@type": "@id"}
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/so06-in.jsonld b/test/jsonld/1.1/expand/so06-in.jsonld
new file mode 100644
index 000000000..3b664b9b6
--- /dev/null
+++ b/test/jsonld/1.1/expand/so06-in.jsonld
@@ -0,0 +1,13 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "@vocab": "http://example/",
+ "bar": {
+ "@context": {
+ "@import": "so06-context.jsonld",
+ "@propagate": false
+ }
+ }
+ },
+ "bar": {"baz": {"baz": "buzz"}}
+}
diff --git a/test/jsonld/1.1/expand/so06-out.jsonld b/test/jsonld/1.1/expand/so06-out.jsonld
new file mode 100644
index 000000000..7ee0ec71c
--- /dev/null
+++ b/test/jsonld/1.1/expand/so06-out.jsonld
@@ -0,0 +1,7 @@
+[{
+ "http://example/bar": [{
+ "http://example.com/baz": [{
+ "http://example/baz": [{"@value": "buzz"}]
+ }]
+ }]
+}]
diff --git a/test/jsonld/1.1/expand/so07-context.jsonld b/test/jsonld/1.1/expand/so07-context.jsonld
new file mode 100644
index 000000000..7ddb66da1
--- /dev/null
+++ b/test/jsonld/1.1/expand/so07-context.jsonld
@@ -0,0 +1,10 @@
+{
+ "@context": {
+ "protected1": {
+ "@id": "http://example.com/protected1"
+ },
+ "protected2": {
+ "@id": "http://example.com/protected2"
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/so07-in.jsonld b/test/jsonld/1.1/expand/so07-in.jsonld
new file mode 100644
index 000000000..1d8d5aaa0
--- /dev/null
+++ b/test/jsonld/1.1/expand/so07-in.jsonld
@@ -0,0 +1,16 @@
+{
+ "@context": {
+ "@vocab": "http://example.com/",
+ "@version": 1.1,
+ "@protected": true,
+ "@import": "so07-context.jsonld"
+ },
+ "protected1": {
+ "@context": {
+ "protected1": "http://example.com/something-else",
+ "protected2": "http://example.com/something-else"
+ },
+ "protected1": "error / property http://example.com/protected1",
+ "protected2": "error / property http://example.com/protected2"
+ }
+}
diff --git a/test/jsonld/1.1/expand/so08-context.jsonld b/test/jsonld/1.1/expand/so08-context.jsonld
new file mode 100644
index 000000000..3e6660a86
--- /dev/null
+++ b/test/jsonld/1.1/expand/so08-context.jsonld
@@ -0,0 +1,5 @@
+{
+ "@context": {
+ "term": "http://example.org/sourced"
+ }
+}
diff --git a/test/jsonld/1.1/expand/so08-in.jsonld b/test/jsonld/1.1/expand/so08-in.jsonld
new file mode 100644
index 000000000..bfb50b89c
--- /dev/null
+++ b/test/jsonld/1.1/expand/so08-in.jsonld
@@ -0,0 +1,8 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "@import": "so08-context.jsonld",
+ "term": "http://example.org/redefined"
+ },
+ "term": "value"
+}
diff --git a/test/jsonld/1.1/expand/so08-out.jsonld b/test/jsonld/1.1/expand/so08-out.jsonld
new file mode 100644
index 000000000..bb1a9f84d
--- /dev/null
+++ b/test/jsonld/1.1/expand/so08-out.jsonld
@@ -0,0 +1,3 @@
+[{
+ "http://example.org/redefined": [{"@value": "value"}]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/so09-context.jsonld b/test/jsonld/1.1/expand/so09-context.jsonld
new file mode 100644
index 000000000..45334dcb2
--- /dev/null
+++ b/test/jsonld/1.1/expand/so09-context.jsonld
@@ -0,0 +1,6 @@
+{
+ "@context": {
+ "@vocab": "http://example.org/source/",
+ "term": {"@id": "term"}
+ }
+}
diff --git a/test/jsonld/1.1/expand/so09-in.jsonld b/test/jsonld/1.1/expand/so09-in.jsonld
new file mode 100644
index 000000000..f6b52160a
--- /dev/null
+++ b/test/jsonld/1.1/expand/so09-in.jsonld
@@ -0,0 +1,8 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "@import": "so09-context.jsonld",
+ "@vocab": "http://example.org/redefined/"
+ },
+ "term": "value"
+}
diff --git a/test/jsonld/1.1/expand/so09-out.jsonld b/test/jsonld/1.1/expand/so09-out.jsonld
new file mode 100644
index 000000000..6a83f156d
--- /dev/null
+++ b/test/jsonld/1.1/expand/so09-out.jsonld
@@ -0,0 +1,3 @@
+[{
+ "http://example.org/redefined/term": [{"@value": "value"}]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/so10-context.jsonld b/test/jsonld/1.1/expand/so10-context.jsonld
new file mode 100644
index 000000000..d36bc5c68
--- /dev/null
+++ b/test/jsonld/1.1/expand/so10-context.jsonld
@@ -0,0 +1,5 @@
+{
+ "@context": {
+ "term": "http://example.org/protected"
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/so10-in.jsonld b/test/jsonld/1.1/expand/so10-in.jsonld
new file mode 100644
index 000000000..ec45ada1d
--- /dev/null
+++ b/test/jsonld/1.1/expand/so10-in.jsonld
@@ -0,0 +1,11 @@
+{
+ "@context": [{
+ "@version": 1.1,
+ "@protected": true,
+ "@import": "so10-context.jsonld"
+ }, {
+ "term": "http://example.org/unprotected"
+ }],
+ "term": "value"
+}
+
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/so11-context.jsonld b/test/jsonld/1.1/expand/so11-context.jsonld
new file mode 100644
index 000000000..3e6660a86
--- /dev/null
+++ b/test/jsonld/1.1/expand/so11-context.jsonld
@@ -0,0 +1,5 @@
+{
+ "@context": {
+ "term": "http://example.org/sourced"
+ }
+}
diff --git a/test/jsonld/1.1/expand/so11-in.jsonld b/test/jsonld/1.1/expand/so11-in.jsonld
new file mode 100644
index 000000000..a63f15906
--- /dev/null
+++ b/test/jsonld/1.1/expand/so11-in.jsonld
@@ -0,0 +1,9 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "@protected": true,
+ "@import": "so08-context.jsonld",
+ "term": "http://example.org/redefined"
+ },
+ "term": "value"
+}
diff --git a/test/jsonld/1.1/expand/so11-out.jsonld b/test/jsonld/1.1/expand/so11-out.jsonld
new file mode 100644
index 000000000..bb1a9f84d
--- /dev/null
+++ b/test/jsonld/1.1/expand/so11-out.jsonld
@@ -0,0 +1,3 @@
+[{
+ "http://example.org/redefined": [{"@value": "value"}]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/so12-in.jsonld b/test/jsonld/1.1/expand/so12-in.jsonld
new file mode 100644
index 000000000..00432d2f5
--- /dev/null
+++ b/test/jsonld/1.1/expand/so12-in.jsonld
@@ -0,0 +1,5 @@
+{
+ "@context": {
+ "@import": "so12-in.jsonld"
+ }
+}
diff --git a/test/jsonld/1.1/expand/so13-context.jsonld b/test/jsonld/1.1/expand/so13-context.jsonld
new file mode 100644
index 000000000..7c984d7c2
--- /dev/null
+++ b/test/jsonld/1.1/expand/so13-context.jsonld
@@ -0,0 +1,7 @@
+{
+ "@context": [{
+ "term": "http://example.org/term"
+ }, {
+ "term2": "http://example.org/term2"
+ }]
+}
diff --git a/test/jsonld/1.1/expand/so13-in.jsonld b/test/jsonld/1.1/expand/so13-in.jsonld
new file mode 100644
index 000000000..ce04701e9
--- /dev/null
+++ b/test/jsonld/1.1/expand/so13-in.jsonld
@@ -0,0 +1,7 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "@import": "so13-context.jsonld"
+ },
+ "term": "value"
+}
diff --git a/test/jsonld/1.1/expand/tn01-in.jsonld b/test/jsonld/1.1/expand/tn01-in.jsonld
new file mode 100644
index 000000000..5e83158e8
--- /dev/null
+++ b/test/jsonld/1.1/expand/tn01-in.jsonld
@@ -0,0 +1,18 @@
+{
+ "@context": {
+ "xsd": "http://www.w3.org/2001/XMLSchema#",
+ "notype": {"@id": "http://example.com/notype", "@type": "@none"}
+ },
+ "notype": [
+ "string",
+ true,
+ false,
+ 1,
+ 10.0,
+ {"@value": "plain"},
+ {"@value": true, "@type": "xsd:boolean"},
+ {"@value": "english", "@language": "en"},
+ {"@value": "2018-02-17", "@type": "xsd:date"},
+ {"@id": "http://example.com/iri"}
+ ]
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/tn02-in.jsonld b/test/jsonld/1.1/expand/tn02-in.jsonld
new file mode 100644
index 000000000..79c407612
--- /dev/null
+++ b/test/jsonld/1.1/expand/tn02-in.jsonld
@@ -0,0 +1,19 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "xsd": "http://www.w3.org/2001/XMLSchema#",
+ "notype": {"@id": "http://example.com/notype", "@type": "@none"}
+ },
+ "notype": [
+ "string",
+ true,
+ false,
+ 1,
+ 10.0,
+ {"@value": "plain"},
+ {"@value": true, "@type": "xsd:boolean"},
+ {"@value": "english", "@language": "en"},
+ {"@value": "2018-02-17", "@type": "xsd:date"},
+ {"@id": "http://example.com/iri"}
+ ]
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/expand/tn02-out.jsonld b/test/jsonld/1.1/expand/tn02-out.jsonld
new file mode 100644
index 000000000..2398cf628
--- /dev/null
+++ b/test/jsonld/1.1/expand/tn02-out.jsonld
@@ -0,0 +1,14 @@
+[{
+ "http://example.com/notype": [
+ {"@value": "string"},
+ {"@value": true},
+ {"@value": false},
+ {"@value": 1},
+ {"@value": 10.0},
+ {"@value": "plain"},
+ {"@value": true, "@type": "http://www.w3.org/2001/XMLSchema#boolean"},
+ {"@value": "english", "@language": "en"},
+ {"@value": "2018-02-17", "@type": "http://www.w3.org/2001/XMLSchema#date"},
+ {"@id": "http://example.com/iri"}
+ ]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/flatten-manifest.jsonld b/test/jsonld/1.1/flatten-manifest.jsonld
new file mode 100644
index 000000000..f627d8ed3
--- /dev/null
+++ b/test/jsonld/1.1/flatten-manifest.jsonld
@@ -0,0 +1,435 @@
+{
+ "@context": ["context.jsonld", {"@base": "flatten-manifest"}],
+ "@id": "",
+ "@type": "mf:Manifest",
+ "name": "Flattening",
+ "description": "These tests implement the requirements for the JSON-LD [Flattening Algorithm](https://www.w3.org/TR/json-ld11-api/#flattening-algorithm).",
+ "baseIri": "https://w3c.github.io/json-ld-api/tests/",
+ "sequence": [
+ {
+ "@id": "#t0001",
+ "@type": ["jld:PositiveEvaluationTest", "jld:FlattenTest"],
+ "name": "drop free-floating nodes",
+ "purpose": "Flattening drops unreferenced nodes having only @id",
+ "input": "flatten/0001-in.jsonld",
+ "expect": "flatten/0001-out.jsonld"
+ }, {
+ "@id": "#t0002",
+ "@type": ["jld:PositiveEvaluationTest", "jld:FlattenTest"],
+ "name": "basic",
+ "purpose": "Flattening terms with different types of values",
+ "input": "flatten/0002-in.jsonld",
+ "expect": "flatten/0002-out.jsonld"
+ }, {
+ "@id": "#t0003",
+ "@type": ["jld:PositiveEvaluationTest", "jld:FlattenTest"],
+ "name": "drop null and unmapped properties",
+ "purpose": "Verifies that null values and unmapped properties are removed from expanded output",
+ "input": "flatten/0003-in.jsonld",
+ "expect": "flatten/0003-out.jsonld"
+ }, {
+ "@id": "#t0004",
+ "@type": ["jld:PositiveEvaluationTest", "jld:FlattenTest"],
+ "name": "optimize @set, keep empty arrays",
+ "purpose": "Uses of @set are removed in expansion; values of @set, or just plain values which are empty arrays are retained",
+ "input": "flatten/0004-in.jsonld",
+ "expect": "flatten/0004-out.jsonld"
+ }, {
+ "@id": "#t0005",
+ "@type": ["jld:PositiveEvaluationTest", "jld:FlattenTest"],
+ "name": "do not expand aliased @id/@type",
+ "purpose": "If a keyword is aliased, it is not used when flattening",
+ "input": "flatten/0005-in.jsonld",
+ "expect": "flatten/0005-out.jsonld"
+ }, {
+ "@id": "#t0006",
+ "@type": ["jld:PositiveEvaluationTest", "jld:FlattenTest"],
+ "name": "alias keywords",
+ "purpose": "Aliased keywords expand in resulting document",
+ "input": "flatten/0006-in.jsonld",
+ "expect": "flatten/0006-out.jsonld"
+ }, {
+ "@id": "#t0007",
+ "@type": ["jld:PositiveEvaluationTest", "jld:FlattenTest"],
+ "name": "date type-coercion",
+ "purpose": "Expand strings to expanded value with @type: xsd:dateTime",
+ "input": "flatten/0007-in.jsonld",
+ "expect": "flatten/0007-out.jsonld"
+ }, {
+ "@id": "#t0008",
+ "@type": ["jld:PositiveEvaluationTest", "jld:FlattenTest"],
+ "name": "@value with @language",
+ "purpose": "Keep expanded values with @language, drop non-conforming value objects containing just @language",
+ "input": "flatten/0008-in.jsonld",
+ "expect": "flatten/0008-out.jsonld"
+ }, {
+ "@id": "#t0009",
+ "@type": ["jld:PositiveEvaluationTest", "jld:FlattenTest"],
+ "name": "@graph with terms",
+ "purpose": "Use of @graph to contain multiple nodes within array",
+ "input": "flatten/0009-in.jsonld",
+ "expect": "flatten/0009-out.jsonld"
+ }, {
+ "@id": "#t0010",
+ "@type": ["jld:PositiveEvaluationTest", "jld:FlattenTest"],
+ "name": "native types",
+ "purpose": "Flattening native scalar retains native scalar within expanded value",
+ "input": "flatten/0010-in.jsonld",
+ "expect": "flatten/0010-out.jsonld"
+ }, {
+ "@id": "#t0011",
+ "@type": ["jld:PositiveEvaluationTest", "jld:FlattenTest"],
+ "name": "coerced @id",
+ "purpose": "A value of a property with @type: @id coercion expands to a node reference",
+ "input": "flatten/0011-in.jsonld",
+ "expect": "flatten/0011-out.jsonld"
+ }, {
+ "@id": "#t0012",
+ "@type": ["jld:PositiveEvaluationTest", "jld:FlattenTest"],
+ "name": "@graph with embed",
+ "purpose": "Flattening objects containing chained objects flattens all objects",
+ "input": "flatten/0012-in.jsonld",
+ "expect": "flatten/0012-out.jsonld"
+ }, {
+ "@id": "#t0013",
+ "@type": ["jld:PositiveEvaluationTest", "jld:FlattenTest"],
+ "name": "flatten already expanded",
+ "purpose": "Flattening an expanded/flattened document maintains input document",
+ "input": "flatten/0013-in.jsonld",
+ "expect": "flatten/0013-out.jsonld"
+ }, {
+ "@id": "#t0014",
+ "@type": ["jld:PositiveEvaluationTest", "jld:FlattenTest"],
+ "name": "@set of @value objects with keyword aliases",
+ "purpose": "Flattening aliased @set and @value",
+ "input": "flatten/0014-in.jsonld",
+ "expect": "flatten/0014-out.jsonld",
+ "option": {"specVersion": "json-ld-1.0"}
+ }, {
+ "@id": "#t0015",
+ "@type": ["jld:PositiveEvaluationTest", "jld:FlattenTest"],
+ "name": "collapse set of sets, keep empty lists",
+ "purpose": "An array of multiple @set nodes are collapsed into a single array",
+ "input": "flatten/0015-in.jsonld",
+ "expect": "flatten/0015-out.jsonld"
+ }, {
+ "@id": "#t0016",
+ "@type": ["jld:PositiveEvaluationTest", "jld:FlattenTest"],
+ "name": "context reset",
+ "purpose": "Setting @context to null within an embedded object resets back to initial context state",
+ "input": "flatten/0016-in.jsonld",
+ "expect": "flatten/0016-out.jsonld"
+ }, {
+ "@id": "#t0017",
+ "@type": ["jld:PositiveEvaluationTest", "jld:FlattenTest"],
+ "name": "@graph and @id aliased",
+ "purpose": "Flattening with @graph and @id aliases",
+ "input": "flatten/0017-in.jsonld",
+ "expect": "flatten/0017-out.jsonld"
+ }, {
+ "@id": "#t0018",
+ "@type": ["jld:PositiveEvaluationTest", "jld:FlattenTest"],
+ "name": "override default @language",
+ "purpose": "override default @language in terms; only language-tag strings",
+ "input": "flatten/0018-in.jsonld",
+ "expect": "flatten/0018-out.jsonld"
+ }, {
+ "@id": "#t0019",
+ "@type": ["jld:PositiveEvaluationTest", "jld:FlattenTest"],
+ "name": "remove @value = null",
+ "purpose": "Flattening a value of null removes the value",
+ "input": "flatten/0019-in.jsonld",
+ "expect": "flatten/0019-out.jsonld"
+ }, {
+ "@id": "#t0020",
+ "@type": ["jld:PositiveEvaluationTest", "jld:FlattenTest"],
+ "name": "do not remove @graph if not at top-level",
+ "purpose": "@graph used under a node is retained",
+ "input": "flatten/0020-in.jsonld",
+ "expect": "flatten/0020-out.jsonld"
+ }, {
+ "@id": "#t0021",
+ "@type": ["jld:PositiveEvaluationTest", "jld:FlattenTest"],
+ "name": "do not remove @graph at top-level if not only property",
+ "purpose": "@graph used at the top level is retained if there are other properties",
+ "input": "flatten/0021-in.jsonld",
+ "expect": "flatten/0021-out.jsonld"
+ }, {
+ "@id": "#t0022",
+ "@type": ["jld:PositiveEvaluationTest", "jld:FlattenTest"],
+ "name": "flatten value with default language",
+ "purpose": "Flattening with a default language applies that language to string values",
+ "input": "flatten/0022-in.jsonld",
+ "expect": "flatten/0022-out.jsonld"
+ }, {
+ "@id": "#t0023",
+ "@type": ["jld:PositiveEvaluationTest", "jld:FlattenTest"],
+ "name": "Flattening list/set with coercion",
+ "purpose": "Flattening lists and sets with properties having coercion coerces list/set values",
+ "input": "flatten/0023-in.jsonld",
+ "expect": "flatten/0023-out.jsonld"
+ }, {
+ "@id": "#t0024",
+ "@type": ["jld:PositiveEvaluationTest", "jld:FlattenTest"],
+ "name": "Multiple contexts",
+ "purpose": "Tests that contexts in an array are merged",
+ "input": "flatten/0024-in.jsonld",
+ "expect": "flatten/0024-out.jsonld"
+ }, {
+ "@id": "#t0025",
+ "@type": ["jld:PositiveEvaluationTest", "jld:FlattenTest"],
+ "name": "Problematic IRI flattening tests",
+ "purpose": "Flattening different kinds of terms and Compact IRIs",
+ "input": "flatten/0025-in.jsonld",
+ "expect": "flatten/0025-out.jsonld"
+ }, {
+ "@id": "#t0026",
+ "@type": ["jld:PositiveEvaluationTest", "jld:FlattenTest"],
+ "name": "Term definition with @id: @type",
+ "purpose": "Flattening term mapping to @type uses @type syntax",
+ "input": "flatten/0026-in.jsonld",
+ "expect": "flatten/0026-out.jsonld",
+ "option": {"specVersion": "json-ld-1.0"}
+ }, {
+ "@id": "#t0027",
+ "@type": ["jld:PositiveEvaluationTest", "jld:FlattenTest"],
+ "name": "Duplicate values in @list and @set",
+ "purpose": "Duplicate values in @list and @set are not merged",
+ "input": "flatten/0027-in.jsonld",
+ "expect": "flatten/0027-out.jsonld"
+ }, {
+ "@id": "#t0028",
+ "@type": ["jld:PositiveEvaluationTest", "jld:FlattenTest"],
+ "name": "Use @vocab in properties and @type but not in @id",
+ "purpose": "@vocab is used to compact properties and @type, but is not used for @id",
+ "input": "flatten/0028-in.jsonld",
+ "expect": "flatten/0028-out.jsonld"
+ }, {
+ "@id": "#t0030",
+ "@type": ["jld:PositiveEvaluationTest", "jld:FlattenTest"],
+ "name": "Language maps",
+ "purpose": "Language Maps expand values to include @language",
+ "input": "flatten/0030-in.jsonld",
+ "expect": "flatten/0030-out.jsonld"
+ }, {
+ "@id": "#t0031",
+ "@type": ["jld:PositiveEvaluationTest", "jld:FlattenTest"],
+ "name": "type-coercion of native types",
+ "purpose": "Flattening native types with type coercion adds the coerced type to an expanded value representation and retains the native value representation",
+ "input": "flatten/0031-in.jsonld",
+ "expect": "flatten/0031-out.jsonld"
+ }, {
+ "@id": "#t0032",
+ "@type": ["jld:PositiveEvaluationTest", "jld:FlattenTest"],
+ "name": "Null term and @vocab",
+ "purpose": "Mapping a term to null decouples it from @vocab",
+ "input": "flatten/0032-in.jsonld",
+ "expect": "flatten/0032-out.jsonld"
+ }, {
+ "@id": "#t0033",
+ "@type": ["jld:PositiveEvaluationTest", "jld:FlattenTest"],
+ "name": "Using @vocab with with type-coercion",
+ "purpose": "Verifies that terms can be defined using @vocab",
+ "input": "flatten/0033-in.jsonld",
+ "expect": "flatten/0033-out.jsonld"
+ }, {
+ "@id": "#t0034",
+ "@type": ["jld:PositiveEvaluationTest", "jld:FlattenTest"],
+ "name": "Multiple properties expanding to the same IRI",
+ "purpose": "Verifies multiple values from separate terms are deterministically made multiple values of the IRI associated with the terms",
+ "input": "flatten/0034-in.jsonld",
+ "expect": "flatten/0034-out.jsonld"
+ }, {
+ "@id": "#t0035",
+ "@type": ["jld:PositiveEvaluationTest", "jld:FlattenTest"],
+ "name": "Language maps with @vocab, default language, and colliding property",
+ "purpose": "Pathological tests of language maps",
+ "input": "flatten/0035-in.jsonld",
+ "expect": "flatten/0035-out.jsonld"
+ }, {
+ "@id": "#t0036",
+ "@type": ["jld:PositiveEvaluationTest", "jld:FlattenTest"],
+ "name": "Flattening @index",
+ "purpose": "Flattening index maps for terms defined with @container: @index",
+ "input": "flatten/0036-in.jsonld",
+ "expect": "flatten/0036-out.jsonld"
+ }, {
+ "@id": "#t0037",
+ "@type": ["jld:PositiveEvaluationTest", "jld:FlattenTest"],
+ "name": "Flattening reverse properties",
+ "purpose": "Flattening @reverse keeps @reverse",
+ "input": "flatten/0037-in.jsonld",
+ "expect": "flatten/0037-out.jsonld"
+ }, {
+ "@id": "#t0038",
+ "@type": ["jld:PositiveEvaluationTest", "jld:FlattenTest"],
+ "name": "Flattening blank node labels",
+ "purpose": "Blank nodes are not relabeled during expansion",
+ "option": {"specVersion": "json-ld-1.0"},
+ "input": "flatten/0038-in.jsonld",
+ "expect": "flatten/0038-out.jsonld"
+ }, {
+ "@id": "#t0039",
+ "@type": ["jld:PositiveEvaluationTest", "jld:FlattenTest"],
+ "name": "Using terms in a reverse-maps",
+ "purpose": "Terms within @reverse are expanded",
+ "input": "flatten/0039-in.jsonld",
+ "expect": "flatten/0039-out.jsonld"
+ }, {
+ "@id": "#t0040",
+ "@type": ["jld:PositiveEvaluationTest", "jld:FlattenTest"],
+ "name": "language and index expansion on non-objects",
+ "purpose": "Only invoke language and index map expansion if the value is a JSON object",
+ "input": "flatten/0040-in.jsonld",
+ "expect": "flatten/0040-out.jsonld"
+ }, {
+ "@id": "#t0041",
+ "@type": ["jld:PositiveEvaluationTest", "jld:FlattenTest"],
+ "name": "Free-floating sets and lists",
+ "purpose": "Free-floating values in sets are removed, free-floating lists are removed completely",
+ "input": "flatten/0041-in.jsonld",
+ "expect": "flatten/0041-out.jsonld"
+ }, {
+ "@id": "#t0042",
+ "@type": ["jld:PositiveEvaluationTest", "jld:FlattenTest"],
+ "name": "List objects not equivalent",
+ "purpose": "Lists objects are implicit unlabeled blank nodes and thus never equivalent",
+ "input": "flatten/0042-in.jsonld",
+ "expect": "flatten/0042-out.jsonld"
+ }, {
+ "@id": "#t0043",
+ "@type": ["jld:PositiveEvaluationTest", "jld:FlattenTest"],
+ "name": "Sample test manifest extract",
+ "purpose": "Flatten a test manifest",
+ "input": "flatten/0043-in.jsonld",
+ "expect": "flatten/0043-out.jsonld"
+ }, {
+ "@id": "#t0044",
+ "@type": ["jld:PositiveEvaluationTest", "jld:FlattenTest"],
+ "name": "compactArrays option",
+ "purpose": "Setting compactArrays to false causes single element arrays to be retained",
+ "option": {
+ "compactArrays": false
+ },
+ "input": "flatten/0044-in.jsonld",
+ "context": "flatten/0044-context.jsonld",
+ "expect": "flatten/0044-out.jsonld"
+ }, {
+ "@id": "#t0045",
+ "@type": ["jld:PositiveEvaluationTest", "jld:FlattenTest"],
+ "name": "Blank nodes with reverse properties",
+ "purpose": "Proper (re-)labeling of blank nodes if used with reverse properties.",
+ "input": "flatten/0045-in.jsonld",
+ "expect": "flatten/0045-out.jsonld"
+ }, {
+ "@id": "#t0046",
+ "@type": ["jld:PositiveEvaluationTest", "jld:FlattenTest"],
+ "name": "Empty string as identifier",
+ "purpose": "Usage of empty strings in identifiers needs special care when constructing the node map.",
+ "input": "flatten/0046-in.jsonld",
+ "expect": "flatten/0046-out.jsonld"
+ }, {
+ "@id": "#t0047",
+ "@type": ["jld:PositiveEvaluationTest", "jld:FlattenTest"],
+ "name": "Flatten using relative fragment identifier properly joins to base",
+ "purpose": "Compacting a relative round-trips",
+ "option": {"base": "http://example.org/"},
+ "input": "flatten/0047-in.jsonld",
+ "expect": "flatten/0047-out.jsonld"
+ }, {
+ "@id": "#t0048",
+ "@type": ["jld:PositiveEvaluationTest", "jld:FlattenTest"],
+ "name": "@list with embedded object",
+ "purpose": "Node definitions contained within lists are flattend to top level.",
+ "input": "flatten/0048-in.jsonld",
+ "expect": "flatten/0048-out.jsonld"
+ }, {
+ "@id": "#t0049",
+ "@type": ["jld:PositiveEvaluationTest", "jld:FlattenTest"],
+ "name": "context with JavaScript Object property names",
+ "purpose": "Flatten with context including JavaScript Object property names",
+ "input": "flatten/0049-in.jsonld",
+ "expect": "flatten/0049-out.jsonld"
+ }, {
+ "@id": "#te001",
+ "@type": [ "jld:NegativeEvaluationTest", "jld:FlattenTest" ],
+ "name": "Conflicting indexes",
+ "purpose": "Verifies that an exception is raised in Flattening when conflicting indexes are found",
+ "option": {"specVersion": "json-ld-1.1"},
+ "input": "flatten/e001-in.jsonld",
+ "expectErrorCode": "conflicting indexes"
+ }, {
+ "@id": "#tin01",
+ "@type": ["jld:PositiveEvaluationTest", "jld:FlattenTest"],
+ "name": "Basic Included array",
+ "purpose": "Tests included blocks.",
+ "input": "flatten/in01-in.jsonld",
+ "expect": "flatten/in01-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tin02",
+ "@type": ["jld:PositiveEvaluationTest", "jld:FlattenTest"],
+ "name": "Basic Included object",
+ "purpose": "Tests included blocks.",
+ "input": "flatten/in02-in.jsonld",
+ "expect": "flatten/in02-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tin03",
+ "@type": ["jld:PositiveEvaluationTest", "jld:FlattenTest"],
+ "name": "Multiple properties mapping to @included are folded together",
+ "purpose": "Tests included blocks.",
+ "input": "flatten/in03-in.jsonld",
+ "expect": "flatten/in03-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tin04",
+ "@type": ["jld:PositiveEvaluationTest", "jld:FlattenTest"],
+ "name": "Included containing @included",
+ "purpose": "Tests included blocks.",
+ "input": "flatten/in04-in.jsonld",
+ "expect": "flatten/in04-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tin05",
+ "@type": ["jld:PositiveEvaluationTest", "jld:FlattenTest"],
+ "name": "Property value with @included",
+ "purpose": "Tests included blocks.",
+ "input": "flatten/in05-in.jsonld",
+ "expect": "flatten/in05-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tin06",
+ "@type": ["jld:PositiveEvaluationTest", "jld:FlattenTest"],
+ "name": "json.api example",
+ "purpose": "Tests included blocks.",
+ "input": "flatten/in06-in.jsonld",
+ "expect": "flatten/in06-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tli01",
+ "@type": [ "jld:PositiveEvaluationTest", "jld:FlattenTest" ],
+ "name": "@list containing an deep list",
+ "purpose": "Lists of lists",
+ "option": {"specVersion": "json-ld-1.1"},
+ "input": "flatten/li01-in.jsonld",
+ "expect": "flatten/li01-out.jsonld"
+ }, {
+ "@id": "#tli02",
+ "@type": [ "jld:PositiveEvaluationTest", "jld:FlattenTest" ],
+ "name": "@list containing empty @list",
+ "purpose": "Lists of lists",
+ "option": {"specVersion": "json-ld-1.1"},
+ "input": "flatten/li02-in.jsonld",
+ "expect": "flatten/li02-out.jsonld"
+ }, {
+ "@id": "#tli03",
+ "@type": [ "jld:PositiveEvaluationTest", "jld:FlattenTest" ],
+ "name": "@list containing mixed list values",
+ "purpose": "Lists of lists",
+ "option": {"specVersion": "json-ld-1.1"},
+ "input": "flatten/li03-in.jsonld",
+ "expect": "flatten/li03-out.jsonld"
+ }
+ ]
+}
diff --git a/test/jsonld/1.1/flatten/0001-in.jsonld b/test/jsonld/1.1/flatten/0001-in.jsonld
new file mode 100644
index 000000000..0bfd26f07
--- /dev/null
+++ b/test/jsonld/1.1/flatten/0001-in.jsonld
@@ -0,0 +1 @@
+{"@id": "http://example.org/test#example"}
\ No newline at end of file
diff --git a/test/jsonld/1.1/flatten/0001-out.jsonld b/test/jsonld/1.1/flatten/0001-out.jsonld
new file mode 100644
index 000000000..1e3ec7217
--- /dev/null
+++ b/test/jsonld/1.1/flatten/0001-out.jsonld
@@ -0,0 +1 @@
+[ ]
diff --git a/test/jsonld/1.1/flatten/0002-in.jsonld b/test/jsonld/1.1/flatten/0002-in.jsonld
new file mode 100644
index 000000000..e4598e552
--- /dev/null
+++ b/test/jsonld/1.1/flatten/0002-in.jsonld
@@ -0,0 +1,18 @@
+{
+ "@context": {
+ "t1": "http://example.com/t1",
+ "t2": "http://example.com/t2",
+ "term1": "http://example.com/term1",
+ "term2": "http://example.com/term2",
+ "term3": "http://example.com/term3",
+ "term4": "http://example.com/term4",
+ "term5": "http://example.com/term5"
+ },
+ "@id": "http://example.com/id1",
+ "@type": "t1",
+ "term1": "v1",
+ "term2": {"@value": "v2", "@type": "t2"},
+ "term3": {"@value": "v3", "@language": "en"},
+ "term4": 4,
+ "term5": [50, 51]
+}
diff --git a/test/jsonld/1.1/flatten/0002-out.jsonld b/test/jsonld/1.1/flatten/0002-out.jsonld
new file mode 100644
index 000000000..6c72e2d58
--- /dev/null
+++ b/test/jsonld/1.1/flatten/0002-out.jsonld
@@ -0,0 +1,38 @@
+[
+ {
+ "@id": "http://example.com/id1",
+ "@type": [
+ "http://example.com/t1"
+ ],
+ "http://example.com/term1": [
+ {
+ "@value": "v1"
+ }
+ ],
+ "http://example.com/term2": [
+ {
+ "@type": "http://example.com/t2",
+ "@value": "v2"
+ }
+ ],
+ "http://example.com/term3": [
+ {
+ "@language": "en",
+ "@value": "v3"
+ }
+ ],
+ "http://example.com/term4": [
+ {
+ "@value": 4
+ }
+ ],
+ "http://example.com/term5": [
+ {
+ "@value": 50
+ },
+ {
+ "@value": 51
+ }
+ ]
+ }
+]
diff --git a/test/jsonld/1.1/flatten/0003-in.jsonld b/test/jsonld/1.1/flatten/0003-in.jsonld
new file mode 100644
index 000000000..2007f363d
--- /dev/null
+++ b/test/jsonld/1.1/flatten/0003-in.jsonld
@@ -0,0 +1,12 @@
+{
+ "@id": "http://example.org/id",
+ "http://example.org/property": null,
+ "regularJson": {
+ "nonJsonLd": "property",
+ "deep": [{
+ "foo": "bar"
+ }, {
+ "bar": "foo"
+ }]
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/flatten/0003-out.jsonld b/test/jsonld/1.1/flatten/0003-out.jsonld
new file mode 100644
index 000000000..1e3ec7217
--- /dev/null
+++ b/test/jsonld/1.1/flatten/0003-out.jsonld
@@ -0,0 +1 @@
+[ ]
diff --git a/test/jsonld/1.1/flatten/0004-in.jsonld b/test/jsonld/1.1/flatten/0004-in.jsonld
new file mode 100644
index 000000000..8499bfa08
--- /dev/null
+++ b/test/jsonld/1.1/flatten/0004-in.jsonld
@@ -0,0 +1,21 @@
+{
+ "@context": {
+ "mylist1": {"@id": "http://example.com/mylist1", "@container": "@list"},
+ "mylist2": {"@id": "http://example.com/mylist2", "@container": "@list"},
+ "myset2": {"@id": "http://example.com/myset2", "@container": "@set"},
+ "myset3": {"@id": "http://example.com/myset3", "@container": "@set"}
+ },
+ "@id": "http://example.org/id",
+ "mylist1": { "@list": [ ] },
+ "mylist2": "one item",
+ "myset2": { "@set": [ ] },
+ "myset3": [ "v1" ],
+ "http://example.org/list1": { "@list": [ null ] },
+ "http://example.org/list2": { "@list": [ {"@value": null} ] },
+ "http://example.org/set1": { "@set": [ ] },
+ "http://example.org/set2": { "@set": [ null ] },
+ "http://example.org/set3": [ ],
+ "http://example.org/set4": [ null ],
+ "http://example.org/set5": "one item",
+ "http://example.org/property": { "@list": "one item" }
+}
diff --git a/test/jsonld/1.1/flatten/0004-out.jsonld b/test/jsonld/1.1/flatten/0004-out.jsonld
new file mode 100644
index 000000000..3e7c99476
--- /dev/null
+++ b/test/jsonld/1.1/flatten/0004-out.jsonld
@@ -0,0 +1,25 @@
+[
+ {
+ "@id": "http://example.org/id",
+ "http://example.com/mylist1": [{"@list": []}],
+ "http://example.com/mylist2": [
+ {
+ "@list": [{"@value": "one item"}]
+ }
+ ],
+ "http://example.com/myset2": [],
+ "http://example.com/myset3": [{"@value": "v1"}],
+ "http://example.org/list1": [{"@list": []}],
+ "http://example.org/list2": [{"@list": []}],
+ "http://example.org/property": [
+ {
+ "@list": [{"@value": "one item"}]
+ }
+ ],
+ "http://example.org/set1": [],
+ "http://example.org/set2": [],
+ "http://example.org/set3": [],
+ "http://example.org/set4": [],
+ "http://example.org/set5": [{"@value": "one item"}]
+ }
+]
\ No newline at end of file
diff --git a/test/jsonld/1.1/flatten/0005-in.jsonld b/test/jsonld/1.1/flatten/0005-in.jsonld
new file mode 100644
index 000000000..33622d538
--- /dev/null
+++ b/test/jsonld/1.1/flatten/0005-in.jsonld
@@ -0,0 +1,23 @@
+{
+ "@context": {
+ "name": "http://xmlns.com/foaf/0.1/name",
+ "homepage": {
+ "@id": "http://xmlns.com/foaf/0.1/homepage",
+ "@type": "@id"
+ },
+ "know": "http://xmlns.com/foaf/0.1/knows",
+ "@iri": "@id"
+ },
+ "@id": "#me",
+ "know": [
+ {
+ "@id": "http://example.com/bob#me",
+ "name": "Bob",
+ "homepage": "http://example.com/bob"
+ }, {
+ "@id": "http://example.com/alice#me",
+ "name": "Alice",
+ "homepage": "http://example.com/alice"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/flatten/0005-out.jsonld b/test/jsonld/1.1/flatten/0005-out.jsonld
new file mode 100644
index 000000000..07b0bd482
--- /dev/null
+++ b/test/jsonld/1.1/flatten/0005-out.jsonld
@@ -0,0 +1,39 @@
+[
+ {
+ "@id": "http://example.com/alice#me",
+ "http://xmlns.com/foaf/0.1/homepage": [
+ {
+ "@id": "http://example.com/alice"
+ }
+ ],
+ "http://xmlns.com/foaf/0.1/name": [
+ {
+ "@value": "Alice"
+ }
+ ]
+ },
+ {
+ "@id": "http://example.com/bob#me",
+ "http://xmlns.com/foaf/0.1/homepage": [
+ {
+ "@id": "http://example.com/bob"
+ }
+ ],
+ "http://xmlns.com/foaf/0.1/name": [
+ {
+ "@value": "Bob"
+ }
+ ]
+ },
+ {
+ "@id": "https://w3c.github.io/json-ld-api/tests/flatten/0005-in.jsonld#me",
+ "http://xmlns.com/foaf/0.1/knows": [
+ {
+ "@id": "http://example.com/bob#me"
+ },
+ {
+ "@id": "http://example.com/alice#me"
+ }
+ ]
+ }
+]
diff --git a/test/jsonld/1.1/flatten/0006-in.jsonld b/test/jsonld/1.1/flatten/0006-in.jsonld
new file mode 100644
index 000000000..045e2a2a8
--- /dev/null
+++ b/test/jsonld/1.1/flatten/0006-in.jsonld
@@ -0,0 +1,20 @@
+{
+ "@context": {
+ "http://example.org/test#property1": {
+ "@type": "@id"
+ },
+ "http://example.org/test#property2": {
+ "@type": "@id"
+ },
+ "uri": "@id"
+ },
+ "http://example.org/test#property1": {
+ "http://example.org/test#property4": "foo",
+ "uri": "http://example.org/test#example2"
+ },
+ "http://example.org/test#property2": "http://example.org/test#example3",
+ "http://example.org/test#property3": {
+ "uri": "http://example.org/test#example4"
+ },
+ "uri": "http://example.org/test#example1"
+}
diff --git a/test/jsonld/1.1/flatten/0006-out.jsonld b/test/jsonld/1.1/flatten/0006-out.jsonld
new file mode 100644
index 000000000..ed4c0b0ca
--- /dev/null
+++ b/test/jsonld/1.1/flatten/0006-out.jsonld
@@ -0,0 +1,28 @@
+[
+ {
+ "@id": "http://example.org/test#example1",
+ "http://example.org/test#property1": [
+ {
+ "@id": "http://example.org/test#example2"
+ }
+ ],
+ "http://example.org/test#property2": [
+ {
+ "@id": "http://example.org/test#example3"
+ }
+ ],
+ "http://example.org/test#property3": [
+ {
+ "@id": "http://example.org/test#example4"
+ }
+ ]
+ },
+ {
+ "@id": "http://example.org/test#example2",
+ "http://example.org/test#property4": [
+ {
+ "@value": "foo"
+ }
+ ]
+ }
+]
diff --git a/test/jsonld/1.1/flatten/0007-in.jsonld b/test/jsonld/1.1/flatten/0007-in.jsonld
new file mode 100644
index 000000000..b49fac4e2
--- /dev/null
+++ b/test/jsonld/1.1/flatten/0007-in.jsonld
@@ -0,0 +1,18 @@
+{
+ "@context": {
+ "ex": "http://example.org/vocab#",
+ "ex:date": {
+ "@type": "xsd:dateTime"
+ },
+ "ex:parent": {
+ "@type": "@id"
+ },
+ "xsd": "http://www.w3.org/2001/XMLSchema#"
+ },
+ "@id": "http://example.org/test#example1",
+ "ex:date": "2011-01-25T00:00:00Z",
+ "ex:embed": {
+ "@id": "http://example.org/test#example2",
+ "ex:parent": "http://example.org/test#example1"
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/flatten/0007-out.jsonld b/test/jsonld/1.1/flatten/0007-out.jsonld
new file mode 100644
index 000000000..34ab58471
--- /dev/null
+++ b/test/jsonld/1.1/flatten/0007-out.jsonld
@@ -0,0 +1,24 @@
+[
+ {
+ "@id": "http://example.org/test#example1",
+ "http://example.org/vocab#date": [
+ {
+ "@value": "2011-01-25T00:00:00Z",
+ "@type": "http://www.w3.org/2001/XMLSchema#dateTime"
+ }
+ ],
+ "http://example.org/vocab#embed": [
+ {
+ "@id": "http://example.org/test#example2"
+ }
+ ]
+ },
+ {
+ "@id": "http://example.org/test#example2",
+ "http://example.org/vocab#parent": [
+ {
+ "@id": "http://example.org/test#example1"
+ }
+ ]
+ }
+]
diff --git a/test/jsonld/1.1/flatten/0008-in.jsonld b/test/jsonld/1.1/flatten/0008-in.jsonld
new file mode 100644
index 000000000..a17b94930
--- /dev/null
+++ b/test/jsonld/1.1/flatten/0008-in.jsonld
@@ -0,0 +1,9 @@
+{
+ "@context": {
+ "ex": "http://example.org/vocab#"
+ },
+ "@id": "http://example.org/test",
+ "ex:test": { "@value": "test", "@language": "en" },
+ "ex:drop-lang-only": { "@language": "en" },
+ "ex:keep-full-value": { "@value": "only value" }
+}
diff --git a/test/jsonld/1.1/flatten/0008-out.jsonld b/test/jsonld/1.1/flatten/0008-out.jsonld
new file mode 100644
index 000000000..9d155e37e
--- /dev/null
+++ b/test/jsonld/1.1/flatten/0008-out.jsonld
@@ -0,0 +1,16 @@
+[
+ {
+ "@id": "http://example.org/test",
+ "http://example.org/vocab#keep-full-value": [
+ {
+ "@value": "only value"
+ }
+ ],
+ "http://example.org/vocab#test": [
+ {
+ "@language": "en",
+ "@value": "test"
+ }
+ ]
+ }
+]
\ No newline at end of file
diff --git a/test/jsonld/1.1/flatten/0009-in.jsonld b/test/jsonld/1.1/flatten/0009-in.jsonld
new file mode 100644
index 000000000..6acef5c56
--- /dev/null
+++ b/test/jsonld/1.1/flatten/0009-in.jsonld
@@ -0,0 +1,43 @@
+{
+ "@context": {
+ "authored": {
+ "@id": "http://example.org/vocab#authored",
+ "@type": "@id"
+ },
+ "contains": {
+ "@id": "http://example.org/vocab#contains",
+ "@type": "@id"
+ },
+ "contributor": "http://purl.org/dc/elements/1.1/contributor",
+ "description": "http://purl.org/dc/elements/1.1/description",
+ "name": "http://xmlns.com/foaf/0.1/name",
+ "title": {
+ "@id": "http://purl.org/dc/elements/1.1/title"
+ }
+ },
+ "@graph": [
+ {
+ "@id": "http://example.org/test#chapter",
+ "description": "Fun",
+ "title": "Chapter One"
+ },
+ {
+ "@id": "http://example.org/test#jane",
+ "authored": "http://example.org/test#chapter",
+ "name": "Jane"
+ },
+ {
+ "@id": "http://example.org/test#john",
+ "name": "John"
+ },
+ {
+ "@id": "http://example.org/test#library",
+ "contains": {
+ "@id": "http://example.org/test#book",
+ "contains": "http://example.org/test#chapter",
+ "contributor": "Writer",
+ "title": "My Book"
+ }
+ }
+ ]
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/flatten/0009-out.jsonld b/test/jsonld/1.1/flatten/0009-out.jsonld
new file mode 100644
index 000000000..0d773a1c7
--- /dev/null
+++ b/test/jsonld/1.1/flatten/0009-out.jsonld
@@ -0,0 +1,62 @@
+[
+ {
+ "@id": "http://example.org/test#book",
+ "http://example.org/vocab#contains": [
+ {
+ "@id": "http://example.org/test#chapter"
+ }
+ ],
+ "http://purl.org/dc/elements/1.1/contributor": [
+ {
+ "@value": "Writer"
+ }
+ ],
+ "http://purl.org/dc/elements/1.1/title": [
+ {
+ "@value": "My Book"
+ }
+ ]
+ },
+ {
+ "@id": "http://example.org/test#chapter",
+ "http://purl.org/dc/elements/1.1/description": [
+ {
+ "@value": "Fun"
+ }
+ ],
+ "http://purl.org/dc/elements/1.1/title": [
+ {
+ "@value": "Chapter One"
+ }
+ ]
+ },
+ {
+ "@id": "http://example.org/test#jane",
+ "http://example.org/vocab#authored": [
+ {
+ "@id": "http://example.org/test#chapter"
+ }
+ ],
+ "http://xmlns.com/foaf/0.1/name": [
+ {
+ "@value": "Jane"
+ }
+ ]
+ },
+ {
+ "@id": "http://example.org/test#john",
+ "http://xmlns.com/foaf/0.1/name": [
+ {
+ "@value": "John"
+ }
+ ]
+ },
+ {
+ "@id": "http://example.org/test#library",
+ "http://example.org/vocab#contains": [
+ {
+ "@id": "http://example.org/test#book"
+ }
+ ]
+ }
+]
\ No newline at end of file
diff --git a/test/jsonld/1.1/flatten/0010-in.jsonld b/test/jsonld/1.1/flatten/0010-in.jsonld
new file mode 100644
index 000000000..f2d0a3847
--- /dev/null
+++ b/test/jsonld/1.1/flatten/0010-in.jsonld
@@ -0,0 +1,11 @@
+{
+ "@context": {
+ "d": "http://purl.org/dc/elements/1.1/",
+ "e": "http://example.org/vocab#",
+ "f": "http://xmlns.com/foaf/0.1/",
+ "xsd": "http://www.w3.org/2001/XMLSchema#"
+ },
+ "@id": "http://example.org/test",
+ "e:bool": true,
+ "e:int": 123
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/flatten/0010-out.jsonld b/test/jsonld/1.1/flatten/0010-out.jsonld
new file mode 100644
index 000000000..c42d47019
--- /dev/null
+++ b/test/jsonld/1.1/flatten/0010-out.jsonld
@@ -0,0 +1,15 @@
+[
+ {
+ "@id": "http://example.org/test",
+ "http://example.org/vocab#bool": [
+ {
+ "@value": true
+ }
+ ],
+ "http://example.org/vocab#int": [
+ {
+ "@value": 123
+ }
+ ]
+ }
+]
\ No newline at end of file
diff --git a/test/jsonld/1.1/flatten/0011-in.jsonld b/test/jsonld/1.1/flatten/0011-in.jsonld
new file mode 100644
index 000000000..fa90d97d0
--- /dev/null
+++ b/test/jsonld/1.1/flatten/0011-in.jsonld
@@ -0,0 +1,13 @@
+{
+ "@context": {
+ "dc11": "http://purl.org/dc/elements/1.1/",
+ "ex": "http://example.org/vocab#",
+ "ex:contains": {
+ "@type": "@id"
+ },
+ "xsd": "http://www.w3.org/2001/XMLSchema#"
+ },
+ "@id": "http://example.org/test#book",
+ "dc11:title": "Title",
+ "ex:contains": "http://example.org/test#chapter"
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/flatten/0011-out.jsonld b/test/jsonld/1.1/flatten/0011-out.jsonld
new file mode 100644
index 000000000..641638f7c
--- /dev/null
+++ b/test/jsonld/1.1/flatten/0011-out.jsonld
@@ -0,0 +1,15 @@
+[
+ {
+ "@id": "http://example.org/test#book",
+ "http://example.org/vocab#contains": [
+ {
+ "@id": "http://example.org/test#chapter"
+ }
+ ],
+ "http://purl.org/dc/elements/1.1/title": [
+ {
+ "@value": "Title"
+ }
+ ]
+ }
+]
diff --git a/test/jsonld/1.1/flatten/0012-in.jsonld b/test/jsonld/1.1/flatten/0012-in.jsonld
new file mode 100644
index 000000000..ebda57326
--- /dev/null
+++ b/test/jsonld/1.1/flatten/0012-in.jsonld
@@ -0,0 +1,39 @@
+{
+ "@context": {
+ "dc11": "http://purl.org/dc/elements/1.1/",
+ "ex": "http://example.org/vocab#",
+ "ex:authored": {
+ "@type": "@id"
+ },
+ "ex:contains": {
+ "@type": "@id"
+ },
+ "foaf": "http://xmlns.com/foaf/0.1/",
+ "xsd": "http://www.w3.org/2001/XMLSchema#"
+ },
+ "@graph": [
+ {
+ "@id": "http://example.org/test#chapter",
+ "dc11:description": "Fun",
+ "dc11:title": "Chapter One"
+ },
+ {
+ "@id": "http://example.org/test#jane",
+ "ex:authored": "http://example.org/test#chapter",
+ "foaf:name": "Jane"
+ },
+ {
+ "@id": "http://example.org/test#john",
+ "foaf:name": "John"
+ },
+ {
+ "@id": "http://example.org/test#library",
+ "ex:contains": {
+ "@id": "http://example.org/test#book",
+ "dc11:contributor": "Writer",
+ "dc11:title": "My Book",
+ "ex:contains": "http://example.org/test#chapter"
+ }
+ }
+ ]
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/flatten/0012-out.jsonld b/test/jsonld/1.1/flatten/0012-out.jsonld
new file mode 100644
index 000000000..0d773a1c7
--- /dev/null
+++ b/test/jsonld/1.1/flatten/0012-out.jsonld
@@ -0,0 +1,62 @@
+[
+ {
+ "@id": "http://example.org/test#book",
+ "http://example.org/vocab#contains": [
+ {
+ "@id": "http://example.org/test#chapter"
+ }
+ ],
+ "http://purl.org/dc/elements/1.1/contributor": [
+ {
+ "@value": "Writer"
+ }
+ ],
+ "http://purl.org/dc/elements/1.1/title": [
+ {
+ "@value": "My Book"
+ }
+ ]
+ },
+ {
+ "@id": "http://example.org/test#chapter",
+ "http://purl.org/dc/elements/1.1/description": [
+ {
+ "@value": "Fun"
+ }
+ ],
+ "http://purl.org/dc/elements/1.1/title": [
+ {
+ "@value": "Chapter One"
+ }
+ ]
+ },
+ {
+ "@id": "http://example.org/test#jane",
+ "http://example.org/vocab#authored": [
+ {
+ "@id": "http://example.org/test#chapter"
+ }
+ ],
+ "http://xmlns.com/foaf/0.1/name": [
+ {
+ "@value": "Jane"
+ }
+ ]
+ },
+ {
+ "@id": "http://example.org/test#john",
+ "http://xmlns.com/foaf/0.1/name": [
+ {
+ "@value": "John"
+ }
+ ]
+ },
+ {
+ "@id": "http://example.org/test#library",
+ "http://example.org/vocab#contains": [
+ {
+ "@id": "http://example.org/test#book"
+ }
+ ]
+ }
+]
\ No newline at end of file
diff --git a/test/jsonld/1.1/flatten/0013-in.jsonld b/test/jsonld/1.1/flatten/0013-in.jsonld
new file mode 100644
index 000000000..7795576fe
--- /dev/null
+++ b/test/jsonld/1.1/flatten/0013-in.jsonld
@@ -0,0 +1,9 @@
+[{
+ "@id": "http://example.com/id1",
+ "@type": ["http://example.com/t1"],
+ "http://example.com/term1": ["v1"],
+ "http://example.com/term2": [{"@value": "v2", "@type": "http://example.com/t2"}],
+ "http://example.com/term3": [{"@value": "v3", "@language": "en"}],
+ "http://example.com/term4": [4],
+ "http://example.com/term5": [50, 51]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/flatten/0013-out.jsonld b/test/jsonld/1.1/flatten/0013-out.jsonld
new file mode 100644
index 000000000..6c72e2d58
--- /dev/null
+++ b/test/jsonld/1.1/flatten/0013-out.jsonld
@@ -0,0 +1,38 @@
+[
+ {
+ "@id": "http://example.com/id1",
+ "@type": [
+ "http://example.com/t1"
+ ],
+ "http://example.com/term1": [
+ {
+ "@value": "v1"
+ }
+ ],
+ "http://example.com/term2": [
+ {
+ "@type": "http://example.com/t2",
+ "@value": "v2"
+ }
+ ],
+ "http://example.com/term3": [
+ {
+ "@language": "en",
+ "@value": "v3"
+ }
+ ],
+ "http://example.com/term4": [
+ {
+ "@value": 4
+ }
+ ],
+ "http://example.com/term5": [
+ {
+ "@value": 50
+ },
+ {
+ "@value": 51
+ }
+ ]
+ }
+]
diff --git a/test/jsonld/1.1/flatten/0014-in.jsonld b/test/jsonld/1.1/flatten/0014-in.jsonld
new file mode 100644
index 000000000..ba913ff2d
--- /dev/null
+++ b/test/jsonld/1.1/flatten/0014-in.jsonld
@@ -0,0 +1,50 @@
+{
+ "@context": {
+ "ex": "http://example.org/test#",
+ "property1": {
+ "@id": "http://example.org/test#property1",
+ "@type": "@id"
+ },
+ "property2": {
+ "@id": "ex:property2",
+ "@type": "@id"
+ },
+ "uri": "@id",
+ "set": "@set",
+ "value": "@value",
+ "type": "@type",
+ "xsd": { "@id": "http://www.w3.org/2001/XMLSchema#" }
+ },
+ "property1": {
+ "uri": "ex:example2",
+ "http://example.org/test#property4": "foo"
+ },
+ "property2": "http://example.org/test#example3",
+ "http://example.org/test#property3": {
+ "uri": "http://example.org/test#example4"
+ },
+ "ex:property4": {
+ "uri": "ex:example4",
+ "ex:property5": [
+ {
+ "set": [
+ {
+ "value": "2012-03-31",
+ "type": "xsd:date"
+ }
+ ]
+ }
+ ]
+ },
+ "ex:property6": [
+ {
+ "set": [
+ {
+ "value": null,
+ "type": "xsd:date"
+ }
+ ]
+ }
+ ],
+ "uri": "http://example.org/test#example1"
+}
diff --git a/test/jsonld/1.1/flatten/0014-out.jsonld b/test/jsonld/1.1/flatten/0014-out.jsonld
new file mode 100644
index 000000000..0ffd67106
--- /dev/null
+++ b/test/jsonld/1.1/flatten/0014-out.jsonld
@@ -0,0 +1,45 @@
+[
+ {
+ "@id": "http://example.org/test#example1",
+ "http://example.org/test#property1": [
+ {
+ "@id": "http://example.org/test#example2"
+ }
+ ],
+ "http://example.org/test#property2": [
+ {
+ "@id": "http://example.org/test#example3"
+ }
+ ],
+ "http://example.org/test#property3": [
+ {
+ "@id": "http://example.org/test#example4"
+ }
+ ],
+ "http://example.org/test#property4": [
+ {
+ "@id": "http://example.org/test#example4"
+ }
+ ],
+ "http://example.org/test#property6": [
+
+ ]
+ },
+ {
+ "@id": "http://example.org/test#example2",
+ "http://example.org/test#property4": [
+ {
+ "@value": "foo"
+ }
+ ]
+ },
+ {
+ "@id": "http://example.org/test#example4",
+ "http://example.org/test#property5": [
+ {
+ "@type": "http://www.w3.org/2001/XMLSchema#date",
+ "@value": "2012-03-31"
+ }
+ ]
+ }
+]
diff --git a/test/jsonld/1.1/flatten/0015-in.jsonld b/test/jsonld/1.1/flatten/0015-in.jsonld
new file mode 100644
index 000000000..ae60d7314
--- /dev/null
+++ b/test/jsonld/1.1/flatten/0015-in.jsonld
@@ -0,0 +1,14 @@
+{
+ "@context": {
+ "mylist1": {"@id": "http://example.com/mylist1", "@container": "@list"},
+ "mylist2": {"@id": "http://example.com/mylist2", "@container": "@list"},
+ "myset1": {"@id": "http://example.com/myset1", "@container": "@set" },
+ "myset2": {"@id": "http://example.com/myset2", "@container": "@set" },
+ "myset3": {"@id": "http://example.com/myset3", "@container": "@set" }
+ },
+ "@id": "http://example.org/id",
+ "mylist1": [],
+ "myset1": { "@set": [] },
+ "myset2": [ { "@set": [] }, [], { "@set": [ null ] }, [ null ] ],
+ "myset3": [ { "@set": [ "hello", "this" ] }, "will", { "@set": [ "be", "collapsed" ] } ]
+}
diff --git a/test/jsonld/1.1/flatten/0015-out.jsonld b/test/jsonld/1.1/flatten/0015-out.jsonld
new file mode 100644
index 000000000..a69271bfc
--- /dev/null
+++ b/test/jsonld/1.1/flatten/0015-out.jsonld
@@ -0,0 +1,35 @@
+[
+ {
+ "@id": "http://example.org/id",
+ "http://example.com/mylist1": [
+ {
+ "@list": [
+
+ ]
+ }
+ ],
+ "http://example.com/myset1": [
+
+ ],
+ "http://example.com/myset2": [
+
+ ],
+ "http://example.com/myset3": [
+ {
+ "@value": "hello"
+ },
+ {
+ "@value": "this"
+ },
+ {
+ "@value": "will"
+ },
+ {
+ "@value": "be"
+ },
+ {
+ "@value": "collapsed"
+ }
+ ]
+ }
+]
\ No newline at end of file
diff --git a/test/jsonld/1.1/flatten/0016-in.jsonld b/test/jsonld/1.1/flatten/0016-in.jsonld
new file mode 100644
index 000000000..c151040a6
--- /dev/null
+++ b/test/jsonld/1.1/flatten/0016-in.jsonld
@@ -0,0 +1,30 @@
+{
+ "@context": {
+ "myproperty": { "@id": "http://example.com/myproperty" },
+ "mylist1": {"@id": "http://example.com/mylist1", "@container": "@list"},
+ "mylist2": {"@id": "http://example.com/mylist2", "@container": "@list"},
+ "myset1": {"@id": "http://example.com/myset1", "@container": "@set" },
+ "myset2": {"@id": "http://example.com/myset2", "@container": "@set" }
+ },
+ "@id": "http://example.org/id1",
+ "mylist1": [],
+ "mylist2": [ 2, "hi" ],
+ "myset1": { "@set": [] },
+ "myset2": [ { "@set": [] }, [], { "@set": [ null ] }, [ null ] ],
+ "myproperty": {
+ "@context": null,
+ "@id": "http://example.org/id2",
+ "mylist1": [],
+ "mylist2": [ 2, "hi" ],
+ "myset1": { "@set": [] },
+ "myset2": [ { "@set": [] }, [], { "@set": [ null ] }, [ null ] ],
+ "http://example.org/myproperty2": "ok"
+ },
+ "http://example.com/emptyobj": {
+ "@context": null,
+ "mylist1": [],
+ "mylist2": [ 2, "hi" ],
+ "myset1": { "@set": [] },
+ "myset2": [ { "@set": [] }, [], { "@set": [ null ] }, [ null ] ]
+ }
+}
diff --git a/test/jsonld/1.1/flatten/0016-out.jsonld b/test/jsonld/1.1/flatten/0016-out.jsonld
new file mode 100644
index 000000000..ffb3983a1
--- /dev/null
+++ b/test/jsonld/1.1/flatten/0016-out.jsonld
@@ -0,0 +1,48 @@
+[
+ {
+ "@id": "http://example.org/id1",
+ "http://example.com/emptyobj": [
+ {
+ "@id": "_:b0"
+ }
+ ],
+ "http://example.com/mylist1": [
+ {
+ "@list": [
+
+ ]
+ }
+ ],
+ "http://example.com/mylist2": [
+ {
+ "@list": [
+ {
+ "@value": 2
+ },
+ {
+ "@value": "hi"
+ }
+ ]
+ }
+ ],
+ "http://example.com/myproperty": [
+ {
+ "@id": "http://example.org/id2"
+ }
+ ],
+ "http://example.com/myset1": [
+
+ ],
+ "http://example.com/myset2": [
+
+ ]
+ },
+ {
+ "@id": "http://example.org/id2",
+ "http://example.org/myproperty2": [
+ {
+ "@value": "ok"
+ }
+ ]
+ }
+]
diff --git a/test/jsonld/1.1/flatten/0017-in.jsonld b/test/jsonld/1.1/flatten/0017-in.jsonld
new file mode 100644
index 000000000..dea8bf808
--- /dev/null
+++ b/test/jsonld/1.1/flatten/0017-in.jsonld
@@ -0,0 +1,45 @@
+{
+ "@context": {
+ "authored": {
+ "@id": "http://example.org/vocab#authored",
+ "@type": "@id"
+ },
+ "contains": {
+ "@id": "http://example.org/vocab#contains",
+ "@type": "@id"
+ },
+ "contributor": "http://purl.org/dc/elements/1.1/contributor",
+ "description": "http://purl.org/dc/elements/1.1/description",
+ "name": "http://xmlns.com/foaf/0.1/name",
+ "title": {
+ "@id": "http://purl.org/dc/elements/1.1/title"
+ },
+ "id": "@id",
+ "data": "@graph"
+ },
+ "data": [
+ {
+ "id": "http://example.org/test#chapter",
+ "description": "Fun",
+ "title": "Chapter One"
+ },
+ {
+ "@id": "http://example.org/test#jane",
+ "authored": "http://example.org/test#chapter",
+ "name": "Jane"
+ },
+ {
+ "id": "http://example.org/test#john",
+ "name": "John"
+ },
+ {
+ "id": "http://example.org/test#library",
+ "contains": {
+ "@id": "http://example.org/test#book",
+ "contains": "http://example.org/test#chapter",
+ "contributor": "Writer",
+ "title": "My Book"
+ }
+ }
+ ]
+}
diff --git a/test/jsonld/1.1/flatten/0017-out.jsonld b/test/jsonld/1.1/flatten/0017-out.jsonld
new file mode 100644
index 000000000..0d773a1c7
--- /dev/null
+++ b/test/jsonld/1.1/flatten/0017-out.jsonld
@@ -0,0 +1,62 @@
+[
+ {
+ "@id": "http://example.org/test#book",
+ "http://example.org/vocab#contains": [
+ {
+ "@id": "http://example.org/test#chapter"
+ }
+ ],
+ "http://purl.org/dc/elements/1.1/contributor": [
+ {
+ "@value": "Writer"
+ }
+ ],
+ "http://purl.org/dc/elements/1.1/title": [
+ {
+ "@value": "My Book"
+ }
+ ]
+ },
+ {
+ "@id": "http://example.org/test#chapter",
+ "http://purl.org/dc/elements/1.1/description": [
+ {
+ "@value": "Fun"
+ }
+ ],
+ "http://purl.org/dc/elements/1.1/title": [
+ {
+ "@value": "Chapter One"
+ }
+ ]
+ },
+ {
+ "@id": "http://example.org/test#jane",
+ "http://example.org/vocab#authored": [
+ {
+ "@id": "http://example.org/test#chapter"
+ }
+ ],
+ "http://xmlns.com/foaf/0.1/name": [
+ {
+ "@value": "Jane"
+ }
+ ]
+ },
+ {
+ "@id": "http://example.org/test#john",
+ "http://xmlns.com/foaf/0.1/name": [
+ {
+ "@value": "John"
+ }
+ ]
+ },
+ {
+ "@id": "http://example.org/test#library",
+ "http://example.org/vocab#contains": [
+ {
+ "@id": "http://example.org/test#book"
+ }
+ ]
+ }
+]
\ No newline at end of file
diff --git a/test/jsonld/1.1/flatten/0018-in.jsonld b/test/jsonld/1.1/flatten/0018-in.jsonld
new file mode 100644
index 000000000..21933fdac
--- /dev/null
+++ b/test/jsonld/1.1/flatten/0018-in.jsonld
@@ -0,0 +1,24 @@
+{
+ "@context": {
+ "ex": "http://example.org/vocab#",
+ "@language": "en",
+ "de": { "@id": "ex:german", "@language": "de" },
+ "nolang": { "@id": "ex:nolang", "@language": null }
+ },
+ "@id": "http://example.org/test",
+ "ex:test-default": [
+ "hello",
+ 1,
+ true
+ ],
+ "de": [
+ "hallo",
+ 2,
+ true
+ ],
+ "nolang": [
+ "no language",
+ 3,
+ false
+ ]
+}
diff --git a/test/jsonld/1.1/flatten/0018-out.jsonld b/test/jsonld/1.1/flatten/0018-out.jsonld
new file mode 100644
index 000000000..2297bc26e
--- /dev/null
+++ b/test/jsonld/1.1/flatten/0018-out.jsonld
@@ -0,0 +1,40 @@
+[
+ {
+ "@id": "http://example.org/test",
+ "http://example.org/vocab#german": [
+ {
+ "@value": "hallo",
+ "@language": "de"
+ },
+ {
+ "@value": 2
+ },
+ {
+ "@value": true
+ }
+ ],
+ "http://example.org/vocab#nolang": [
+ {
+ "@value": "no language"
+ },
+ {
+ "@value": 3
+ },
+ {
+ "@value": false
+ }
+ ],
+ "http://example.org/vocab#test-default": [
+ {
+ "@value": "hello",
+ "@language": "en"
+ },
+ {
+ "@value": 1
+ },
+ {
+ "@value": true
+ }
+ ]
+ }
+]
\ No newline at end of file
diff --git a/test/jsonld/1.1/flatten/0019-in.jsonld b/test/jsonld/1.1/flatten/0019-in.jsonld
new file mode 100644
index 000000000..b91f88606
--- /dev/null
+++ b/test/jsonld/1.1/flatten/0019-in.jsonld
@@ -0,0 +1,6 @@
+{
+ "@context": {
+ "myproperty": "http://example.com/myproperty"
+ },
+ "myproperty": { "@value" : null }
+}
diff --git a/test/jsonld/1.1/flatten/0019-out.jsonld b/test/jsonld/1.1/flatten/0019-out.jsonld
new file mode 100644
index 000000000..1e3ec7217
--- /dev/null
+++ b/test/jsonld/1.1/flatten/0019-out.jsonld
@@ -0,0 +1 @@
+[ ]
diff --git a/test/jsonld/1.1/flatten/0020-in.jsonld b/test/jsonld/1.1/flatten/0020-in.jsonld
new file mode 100644
index 000000000..989e1192d
--- /dev/null
+++ b/test/jsonld/1.1/flatten/0020-in.jsonld
@@ -0,0 +1,51 @@
+{
+ "@context": {
+ "authored": {
+ "@id": "http://example.org/vocab#authored",
+ "@type": "@id"
+ },
+ "contains": {
+ "@id": "http://example.org/vocab#contains",
+ "@type": "@id"
+ },
+ "contributor": "http://purl.org/dc/elements/1.1/contributor",
+ "description": "http://purl.org/dc/elements/1.1/description",
+ "name": "http://xmlns.com/foaf/0.1/name",
+ "title": {
+ "@id": "http://purl.org/dc/elements/1.1/title"
+ }
+ },
+ "@graph": [
+ {
+ "@id": "http://example.org/test#jane",
+ "name": "Jane",
+ "authored": {
+ "@graph": [
+ {
+ "@id": "http://example.org/test#chapter1",
+ "description": "Fun",
+ "title": "Chapter One"
+ },
+ {
+ "@id": "http://example.org/test#chapter2",
+ "description": "More fun",
+ "title": "Chapter Two"
+ }
+ ]
+ }
+ },
+ {
+ "@id": "http://example.org/test#john",
+ "name": "John"
+ },
+ {
+ "@id": "http://example.org/test#library",
+ "contains": {
+ "@id": "http://example.org/test#book",
+ "contains": "http://example.org/test#chapter",
+ "contributor": "Writer",
+ "title": "My Book"
+ }
+ }
+ ]
+}
diff --git a/test/jsonld/1.1/flatten/0020-out.jsonld b/test/jsonld/1.1/flatten/0020-out.jsonld
new file mode 100644
index 000000000..9ce7303bb
--- /dev/null
+++ b/test/jsonld/1.1/flatten/0020-out.jsonld
@@ -0,0 +1,80 @@
+[
+ {
+ "@id": "_:b0",
+ "@graph": [
+ {
+ "@id": "http://example.org/test#chapter1",
+ "http://purl.org/dc/elements/1.1/description": [
+ {
+ "@value": "Fun"
+ }
+ ],
+ "http://purl.org/dc/elements/1.1/title": [
+ {
+ "@value": "Chapter One"
+ }
+ ]
+ },
+ {
+ "@id": "http://example.org/test#chapter2",
+ "http://purl.org/dc/elements/1.1/description": [
+ {
+ "@value": "More fun"
+ }
+ ],
+ "http://purl.org/dc/elements/1.1/title": [
+ {
+ "@value": "Chapter Two"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "@id": "http://example.org/test#book",
+ "http://example.org/vocab#contains": [
+ {
+ "@id": "http://example.org/test#chapter"
+ }
+ ],
+ "http://purl.org/dc/elements/1.1/contributor": [
+ {
+ "@value": "Writer"
+ }
+ ],
+ "http://purl.org/dc/elements/1.1/title": [
+ {
+ "@value": "My Book"
+ }
+ ]
+ },
+ {
+ "@id": "http://example.org/test#jane",
+ "http://example.org/vocab#authored": [
+ {
+ "@id": "_:b0"
+ }
+ ],
+ "http://xmlns.com/foaf/0.1/name": [
+ {
+ "@value": "Jane"
+ }
+ ]
+ },
+ {
+ "@id": "http://example.org/test#john",
+ "http://xmlns.com/foaf/0.1/name": [
+ {
+ "@value": "John"
+ }
+ ]
+ },
+ {
+ "@id": "http://example.org/test#library",
+ "http://example.org/vocab#contains": [
+ {
+ "@id": "http://example.org/test#book"
+ }
+ ]
+ }
+]
diff --git a/test/jsonld/1.1/flatten/0021-in.jsonld b/test/jsonld/1.1/flatten/0021-in.jsonld
new file mode 100644
index 000000000..e52fd1b8f
--- /dev/null
+++ b/test/jsonld/1.1/flatten/0021-in.jsonld
@@ -0,0 +1,56 @@
+{
+ "@context": {
+ "authored": {
+ "@id": "http://example.org/vocab#authored",
+ "@type": "@id"
+ },
+ "contains": {
+ "@id": "http://example.org/vocab#contains",
+ "@type": "@id"
+ },
+ "contributor": "http://purl.org/dc/elements/1.1/contributor",
+ "description": "http://purl.org/dc/elements/1.1/description",
+ "name": "http://xmlns.com/foaf/0.1/name",
+ "title": {
+ "@id": "http://purl.org/dc/elements/1.1/title"
+ }
+ },
+ "title": "My first graph",
+ "@graph": [
+ {
+ "@id": "http://example.org/test#jane",
+ "name": "Jane",
+ "authored": {
+ "@graph": [
+ {
+ "@id": "http://example.org/test#chapter1",
+ "description": "Fun",
+ "title": "Chapter One"
+ },
+ {
+ "@id": "http://example.org/test#chapter2",
+ "description": "More fun",
+ "title": "Chapter Two"
+ },
+ {
+ "@id": "http://example.org/test#chapter3",
+ "title": "Chapter Three"
+ }
+ ]
+ }
+ },
+ {
+ "@id": "http://example.org/test#john",
+ "name": "John"
+ },
+ {
+ "@id": "http://example.org/test#library",
+ "contains": {
+ "@id": "http://example.org/test#book",
+ "contains": "http://example.org/test#chapter",
+ "contributor": "Writer",
+ "title": "My Book"
+ }
+ }
+ ]
+}
diff --git a/test/jsonld/1.1/flatten/0021-out.jsonld b/test/jsonld/1.1/flatten/0021-out.jsonld
new file mode 100644
index 000000000..1b9868be1
--- /dev/null
+++ b/test/jsonld/1.1/flatten/0021-out.jsonld
@@ -0,0 +1,98 @@
+[
+ {
+ "@id": "_:b0",
+ "http://purl.org/dc/elements/1.1/title": [
+ {
+ "@value": "My first graph"
+ }
+ ],
+ "@graph": [
+ {
+ "@id": "http://example.org/test#book",
+ "http://example.org/vocab#contains": [
+ {
+ "@id": "http://example.org/test#chapter"
+ }
+ ],
+ "http://purl.org/dc/elements/1.1/contributor": [
+ {
+ "@value": "Writer"
+ }
+ ],
+ "http://purl.org/dc/elements/1.1/title": [
+ {
+ "@value": "My Book"
+ }
+ ]
+ },
+ {
+ "@id": "http://example.org/test#jane",
+ "http://example.org/vocab#authored": [
+ {
+ "@id": "_:b1"
+ }
+ ],
+ "http://xmlns.com/foaf/0.1/name": [
+ {
+ "@value": "Jane"
+ }
+ ]
+ },
+ {
+ "@id": "http://example.org/test#john",
+ "http://xmlns.com/foaf/0.1/name": [
+ {
+ "@value": "John"
+ }
+ ]
+ },
+ {
+ "@id": "http://example.org/test#library",
+ "http://example.org/vocab#contains": [
+ {
+ "@id": "http://example.org/test#book"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "@id": "_:b1",
+ "@graph": [
+ {
+ "@id": "http://example.org/test#chapter1",
+ "http://purl.org/dc/elements/1.1/description": [
+ {
+ "@value": "Fun"
+ }
+ ],
+ "http://purl.org/dc/elements/1.1/title": [
+ {
+ "@value": "Chapter One"
+ }
+ ]
+ },
+ {
+ "@id": "http://example.org/test#chapter2",
+ "http://purl.org/dc/elements/1.1/description": [
+ {
+ "@value": "More fun"
+ }
+ ],
+ "http://purl.org/dc/elements/1.1/title": [
+ {
+ "@value": "Chapter Two"
+ }
+ ]
+ },
+ {
+ "@id": "http://example.org/test#chapter3",
+ "http://purl.org/dc/elements/1.1/title": [
+ {
+ "@value": "Chapter Three"
+ }
+ ]
+ }
+ ]
+ }
+]
diff --git a/test/jsonld/1.1/flatten/0022-in.jsonld b/test/jsonld/1.1/flatten/0022-in.jsonld
new file mode 100644
index 000000000..e7f938ae1
--- /dev/null
+++ b/test/jsonld/1.1/flatten/0022-in.jsonld
@@ -0,0 +1,7 @@
+{
+ "@context": {
+ "term": "http://example.com/term",
+ "@language": "en"
+ },
+ "term": "v"
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/flatten/0022-out.jsonld b/test/jsonld/1.1/flatten/0022-out.jsonld
new file mode 100644
index 000000000..1de1e9b69
--- /dev/null
+++ b/test/jsonld/1.1/flatten/0022-out.jsonld
@@ -0,0 +1,11 @@
+[
+ {
+ "@id": "_:b0",
+ "http://example.com/term": [
+ {
+ "@value": "v",
+ "@language": "en"
+ }
+ ]
+ }
+]
diff --git a/test/jsonld/1.1/flatten/0023-in.jsonld b/test/jsonld/1.1/flatten/0023-in.jsonld
new file mode 100644
index 000000000..2a33783d5
--- /dev/null
+++ b/test/jsonld/1.1/flatten/0023-in.jsonld
@@ -0,0 +1,21 @@
+{
+ "@context": {
+ "xsd": "http://www.w3.org/2001/XMLSchema#",
+ "idlist": {"@id": "http://example.com/idlist", "@container": "@list", "@type": "@id"},
+ "datelist": {"@id": "http://example.com/datelist", "@container": "@list", "@type": "xsd:date"},
+ "idset": {"@id": "http://example.com/idset", "@container": "@set", "@type": "@id"},
+ "dateset": {"@id": "http://example.com/dateset", "@container": "@set", "@type": "xsd:date"},
+ "idprop": {"@id": "http://example.com/idprop", "@type": "@id" },
+ "dateprop": {"@id": "http://example.com/dateprop", "@type": "xsd:date" },
+ "idprop2": {"@id": "http://example.com/idprop2", "@type": "@id" },
+ "dateprop2": {"@id": "http://example.com/dateprop2", "@type": "xsd:date" }
+ },
+ "idlist": ["http://example.org/id"],
+ "datelist": ["2012-04-12"],
+ "idprop": {"@list": ["http://example.org/id"]},
+ "dateprop": {"@list": ["2012-04-12"]},
+ "idset": ["http://example.org/id"],
+ "dateset": ["2012-04-12"],
+ "idprop2": {"@set": ["http://example.org/id"]},
+ "dateprop2": {"@set": ["2012-04-12"]}
+}
diff --git a/test/jsonld/1.1/flatten/0023-out.jsonld b/test/jsonld/1.1/flatten/0023-out.jsonld
new file mode 100644
index 000000000..b93183401
--- /dev/null
+++ b/test/jsonld/1.1/flatten/0023-out.jsonld
@@ -0,0 +1,65 @@
+[
+ {
+ "@id": "_:b0",
+ "http://example.com/datelist": [
+ {
+ "@list": [
+ {
+ "@value": "2012-04-12",
+ "@type": "http://www.w3.org/2001/XMLSchema#date"
+ }
+ ]
+ }
+ ],
+ "http://example.com/dateprop": [
+ {
+ "@list": [
+ {
+ "@value": "2012-04-12",
+ "@type": "http://www.w3.org/2001/XMLSchema#date"
+ }
+ ]
+ }
+ ],
+ "http://example.com/dateprop2": [
+ {
+ "@value": "2012-04-12",
+ "@type": "http://www.w3.org/2001/XMLSchema#date"
+ }
+ ],
+ "http://example.com/dateset": [
+ {
+ "@value": "2012-04-12",
+ "@type": "http://www.w3.org/2001/XMLSchema#date"
+ }
+ ],
+ "http://example.com/idlist": [
+ {
+ "@list": [
+ {
+ "@id": "http://example.org/id"
+ }
+ ]
+ }
+ ],
+ "http://example.com/idprop": [
+ {
+ "@list": [
+ {
+ "@id": "http://example.org/id"
+ }
+ ]
+ }
+ ],
+ "http://example.com/idprop2": [
+ {
+ "@id": "http://example.org/id"
+ }
+ ],
+ "http://example.com/idset": [
+ {
+ "@id": "http://example.org/id"
+ }
+ ]
+ }
+]
diff --git a/test/jsonld/1.1/flatten/0024-in.jsonld b/test/jsonld/1.1/flatten/0024-in.jsonld
new file mode 100644
index 000000000..fcf010c40
--- /dev/null
+++ b/test/jsonld/1.1/flatten/0024-in.jsonld
@@ -0,0 +1,14 @@
+{
+ "@context": [
+ {
+ "name": "http://xmlns.com/foaf/0.1/name",
+ "homepage": {"@id": "http://xmlns.com/foaf/0.1/homepage","@type": "@id"}
+ },
+ {"ical": "http://www.w3.org/2002/12/cal/ical#"}
+ ],
+ "@id": "http://example.com/speakers#Alice",
+ "name": "Alice",
+ "homepage": "http://xkcd.com/177/",
+ "ical:summary": "Alice Talk",
+ "ical:location": "Lyon Convention Centre, Lyon, France"
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/flatten/0024-out.jsonld b/test/jsonld/1.1/flatten/0024-out.jsonld
new file mode 100644
index 000000000..8c0a7c6dd
--- /dev/null
+++ b/test/jsonld/1.1/flatten/0024-out.jsonld
@@ -0,0 +1,25 @@
+[
+ {
+ "@id": "http://example.com/speakers#Alice",
+ "http://www.w3.org/2002/12/cal/ical#location": [
+ {
+ "@value": "Lyon Convention Centre, Lyon, France"
+ }
+ ],
+ "http://www.w3.org/2002/12/cal/ical#summary": [
+ {
+ "@value": "Alice Talk"
+ }
+ ],
+ "http://xmlns.com/foaf/0.1/homepage": [
+ {
+ "@id": "http://xkcd.com/177/"
+ }
+ ],
+ "http://xmlns.com/foaf/0.1/name": [
+ {
+ "@value": "Alice"
+ }
+ ]
+ }
+]
diff --git a/test/jsonld/1.1/flatten/0025-in.jsonld b/test/jsonld/1.1/flatten/0025-in.jsonld
new file mode 100644
index 000000000..276851f60
--- /dev/null
+++ b/test/jsonld/1.1/flatten/0025-in.jsonld
@@ -0,0 +1,9 @@
+{
+ "@context": {
+ "foo": "http://example.com/foo/",
+ "foo:bar": "http://example.com/foo/bar",
+ "bar": {"@id": "foo:bar", "@type": "@id"},
+ "_": "http://example.com/underscore/"
+ },
+ "@type": ["foo", "foo:bar", "_"]
+}
diff --git a/test/jsonld/1.1/flatten/0025-out.jsonld b/test/jsonld/1.1/flatten/0025-out.jsonld
new file mode 100644
index 000000000..cc9881d95
--- /dev/null
+++ b/test/jsonld/1.1/flatten/0025-out.jsonld
@@ -0,0 +1,10 @@
+[
+ {
+ "@id": "_:b0",
+ "@type": [
+ "http://example.com/foo/",
+ "http://example.com/foo/bar",
+ "http://example.com/underscore/"
+ ]
+ }
+]
diff --git a/test/jsonld/1.1/flatten/0026-in.jsonld b/test/jsonld/1.1/flatten/0026-in.jsonld
new file mode 100644
index 000000000..36d8cac73
--- /dev/null
+++ b/test/jsonld/1.1/flatten/0026-in.jsonld
@@ -0,0 +1,20 @@
+{
+ "@context": {
+ "http://www.w3.org/1999/02/22-rdf-syntax-ns#type": {"@id": "@type", "@type": "@id"}
+ },
+ "@graph": [
+ {
+ "@id": "http://example.com/a",
+ "http://www.w3.org/1999/02/22-rdf-syntax-ns#type": "http://example.com/b"
+ }, {
+ "@id": "http://example.com/c",
+ "http://www.w3.org/1999/02/22-rdf-syntax-ns#type": [
+ "http://example.com/d",
+ "http://example.com/e"
+ ]
+ }, {
+ "@id": "http://example.com/f",
+ "http://www.w3.org/1999/02/22-rdf-syntax-ns#type": "http://example.com/g"
+ }
+ ]
+}
diff --git a/test/jsonld/1.1/flatten/0026-out.jsonld b/test/jsonld/1.1/flatten/0026-out.jsonld
new file mode 100644
index 000000000..9104544c9
--- /dev/null
+++ b/test/jsonld/1.1/flatten/0026-out.jsonld
@@ -0,0 +1,21 @@
+[
+ {
+ "@id": "http://example.com/a",
+ "@type": [
+ "http://example.com/b"
+ ]
+ },
+ {
+ "@id": "http://example.com/c",
+ "@type": [
+ "http://example.com/d",
+ "http://example.com/e"
+ ]
+ },
+ {
+ "@id": "http://example.com/f",
+ "@type": [
+ "http://example.com/g"
+ ]
+ }
+]
diff --git a/test/jsonld/1.1/flatten/0027-in.jsonld b/test/jsonld/1.1/flatten/0027-in.jsonld
new file mode 100644
index 000000000..6c47cfb75
--- /dev/null
+++ b/test/jsonld/1.1/flatten/0027-in.jsonld
@@ -0,0 +1,9 @@
+{
+ "@context": {
+ "mylist": {"@id": "http://example.com/mylist", "@container": "@list"},
+ "myset": {"@id": "http://example.com/myset", "@container": "@set"}
+ },
+ "@id": "http://example.org/id",
+ "mylist": [1, 2, 2, 3],
+ "myset": [1, 2, 2, 3]
+}
diff --git a/test/jsonld/1.1/flatten/0027-out.jsonld b/test/jsonld/1.1/flatten/0027-out.jsonld
new file mode 100644
index 000000000..ba237d634
--- /dev/null
+++ b/test/jsonld/1.1/flatten/0027-out.jsonld
@@ -0,0 +1,34 @@
+[
+ {
+ "@id": "http://example.org/id",
+ "http://example.com/mylist": [
+ {
+ "@list": [
+ {
+ "@value": 1
+ },
+ {
+ "@value": 2
+ },
+ {
+ "@value": 2
+ },
+ {
+ "@value": 3
+ }
+ ]
+ }
+ ],
+ "http://example.com/myset": [
+ {
+ "@value": 1
+ },
+ {
+ "@value": 2
+ },
+ {
+ "@value": 3
+ }
+ ]
+ }
+]
\ No newline at end of file
diff --git a/test/jsonld/1.1/flatten/0028-in.jsonld b/test/jsonld/1.1/flatten/0028-in.jsonld
new file mode 100644
index 000000000..4f05d0e4f
--- /dev/null
+++ b/test/jsonld/1.1/flatten/0028-in.jsonld
@@ -0,0 +1,13 @@
+{
+ "@context": {
+ "@vocab": "http://example.org/vocab#",
+ "date": { "@type": "dateTime" }
+ },
+ "@id": "example1",
+ "@type": "test",
+ "date": "2011-01-25T00:00:00Z",
+ "embed": {
+ "@id": "example2",
+ "expandedDate": { "@value": "2012-08-01T00:00:00Z", "@type": "dateTime" }
+ }
+}
diff --git a/test/jsonld/1.1/flatten/0028-out.jsonld b/test/jsonld/1.1/flatten/0028-out.jsonld
new file mode 100644
index 000000000..8e4cab76e
--- /dev/null
+++ b/test/jsonld/1.1/flatten/0028-out.jsonld
@@ -0,0 +1,28 @@
+[
+ {
+ "@id": "https://w3c.github.io/json-ld-api/tests/flatten/example1",
+ "@type": [
+ "http://example.org/vocab#test"
+ ],
+ "http://example.org/vocab#date": [
+ {
+ "@value": "2011-01-25T00:00:00Z",
+ "@type": "http://example.org/vocab#dateTime"
+ }
+ ],
+ "http://example.org/vocab#embed": [
+ {
+ "@id": "https://w3c.github.io/json-ld-api/tests/flatten/example2"
+ }
+ ]
+ },
+ {
+ "@id": "https://w3c.github.io/json-ld-api/tests/flatten/example2",
+ "http://example.org/vocab#expandedDate": [
+ {
+ "@type": "http://example.org/vocab#dateTime",
+ "@value": "2012-08-01T00:00:00Z"
+ }
+ ]
+ }
+]
diff --git a/test/jsonld/1.1/flatten/0030-in.jsonld b/test/jsonld/1.1/flatten/0030-in.jsonld
new file mode 100644
index 000000000..ca7116733
--- /dev/null
+++ b/test/jsonld/1.1/flatten/0030-in.jsonld
@@ -0,0 +1,14 @@
+{
+ "@context": {
+ "vocab": "http://example.com/vocab/",
+ "label": {
+ "@id": "vocab:label",
+ "@container": "@language"
+ }
+ },
+ "@id": "http://example.com/queen",
+ "label": {
+ "en": "The Queen",
+ "de": [ "Die Königin", "Ihre Majestät" ]
+ }
+}
diff --git a/test/jsonld/1.1/flatten/0030-out.jsonld b/test/jsonld/1.1/flatten/0030-out.jsonld
new file mode 100644
index 000000000..0907ec148
--- /dev/null
+++ b/test/jsonld/1.1/flatten/0030-out.jsonld
@@ -0,0 +1,19 @@
+[
+ {
+ "@id": "http://example.com/queen",
+ "http://example.com/vocab/label": [
+ {
+ "@value": "Die Königin",
+ "@language": "de"
+ },
+ {
+ "@value": "Ihre Majestät",
+ "@language": "de"
+ },
+ {
+ "@value": "The Queen",
+ "@language": "en"
+ }
+ ]
+ }
+]
\ No newline at end of file
diff --git a/test/jsonld/1.1/flatten/0031-in.jsonld b/test/jsonld/1.1/flatten/0031-in.jsonld
new file mode 100644
index 000000000..192ff27c8
--- /dev/null
+++ b/test/jsonld/1.1/flatten/0031-in.jsonld
@@ -0,0 +1,13 @@
+{
+ "@context": {
+ "ex": "http://example.org/vocab#",
+ "xsd": "http://www.w3.org/2001/XMLSchema#",
+ "ex:integer": { "@type": "xsd:integer" },
+ "ex:double": { "@type": "xsd:double" },
+ "ex:boolean": { "@type": "xsd:boolean" }
+ },
+ "@id": "http://example.org/test#example1",
+ "ex:integer": 1,
+ "ex:double": 123.45,
+ "ex:boolean": true
+}
diff --git a/test/jsonld/1.1/flatten/0031-out.jsonld b/test/jsonld/1.1/flatten/0031-out.jsonld
new file mode 100644
index 000000000..57906bfa0
--- /dev/null
+++ b/test/jsonld/1.1/flatten/0031-out.jsonld
@@ -0,0 +1,23 @@
+[
+ {
+ "@id": "http://example.org/test#example1",
+ "http://example.org/vocab#boolean": [
+ {
+ "@value": true,
+ "@type": "http://www.w3.org/2001/XMLSchema#boolean"
+ }
+ ],
+ "http://example.org/vocab#double": [
+ {
+ "@value": 123.45,
+ "@type": "http://www.w3.org/2001/XMLSchema#double"
+ }
+ ],
+ "http://example.org/vocab#integer": [
+ {
+ "@value": 1,
+ "@type": "http://www.w3.org/2001/XMLSchema#integer"
+ }
+ ]
+ }
+]
diff --git a/test/jsonld/1.1/flatten/0032-in.jsonld b/test/jsonld/1.1/flatten/0032-in.jsonld
new file mode 100644
index 000000000..920554fcd
--- /dev/null
+++ b/test/jsonld/1.1/flatten/0032-in.jsonld
@@ -0,0 +1,11 @@
+{
+ "@context": {
+ "@vocab": "http://xmlns.com/foaf/0.1/",
+ "from": null,
+ "university": { "@id": null }
+ },
+ "@id": "http://me.markus-lanthaler.com/",
+ "name": "Markus Lanthaler",
+ "from": "Italy",
+ "university": "TU Graz"
+}
diff --git a/test/jsonld/1.1/flatten/0032-out.jsonld b/test/jsonld/1.1/flatten/0032-out.jsonld
new file mode 100644
index 000000000..fbe9a1560
--- /dev/null
+++ b/test/jsonld/1.1/flatten/0032-out.jsonld
@@ -0,0 +1,10 @@
+[
+ {
+ "@id": "http://me.markus-lanthaler.com/",
+ "http://xmlns.com/foaf/0.1/name": [
+ {
+ "@value": "Markus Lanthaler"
+ }
+ ]
+ }
+]
\ No newline at end of file
diff --git a/test/jsonld/1.1/flatten/0033-in.jsonld b/test/jsonld/1.1/flatten/0033-in.jsonld
new file mode 100644
index 000000000..abf6feed2
--- /dev/null
+++ b/test/jsonld/1.1/flatten/0033-in.jsonld
@@ -0,0 +1,14 @@
+{
+ "@context": {
+ "@vocab": "http://example.com/vocab#",
+ "homepage": {
+ "@type": "@id"
+ },
+ "created_at": {
+ "@type": "http://www.w3.org/2001/XMLSchema#date"
+ }
+ },
+ "name": "Markus Lanthaler",
+ "homepage": "http://www.markus-lanthaler.com/",
+ "created_at": "2012-10-28"
+}
diff --git a/test/jsonld/1.1/flatten/0033-out.jsonld b/test/jsonld/1.1/flatten/0033-out.jsonld
new file mode 100644
index 000000000..ad4046a7b
--- /dev/null
+++ b/test/jsonld/1.1/flatten/0033-out.jsonld
@@ -0,0 +1,21 @@
+[
+ {
+ "@id": "_:b0",
+ "http://example.com/vocab#created_at": [
+ {
+ "@value": "2012-10-28",
+ "@type": "http://www.w3.org/2001/XMLSchema#date"
+ }
+ ],
+ "http://example.com/vocab#homepage": [
+ {
+ "@id": "http://www.markus-lanthaler.com/"
+ }
+ ],
+ "http://example.com/vocab#name": [
+ {
+ "@value": "Markus Lanthaler"
+ }
+ ]
+ }
+]
diff --git a/test/jsonld/1.1/flatten/0034-in.jsonld b/test/jsonld/1.1/flatten/0034-in.jsonld
new file mode 100644
index 000000000..22bb60399
--- /dev/null
+++ b/test/jsonld/1.1/flatten/0034-in.jsonld
@@ -0,0 +1,16 @@
+{
+ "@context": {
+ "@vocab": "http://example.com/vocab/",
+ "colliding": "http://example.com/vocab/collidingTerm"
+ },
+ "@id": "http://example.com/IriCollissions",
+ "colliding": [
+ "value 1",
+ 2
+ ],
+ "collidingTerm": [
+ 3,
+ "four"
+ ],
+ "http://example.com/vocab/collidingTerm": 5
+}
diff --git a/test/jsonld/1.1/flatten/0034-out.jsonld b/test/jsonld/1.1/flatten/0034-out.jsonld
new file mode 100644
index 000000000..cdc4df49a
--- /dev/null
+++ b/test/jsonld/1.1/flatten/0034-out.jsonld
@@ -0,0 +1,22 @@
+[
+ {
+ "@id": "http://example.com/IriCollissions",
+ "http://example.com/vocab/collidingTerm": [
+ {
+ "@value": "value 1"
+ },
+ {
+ "@value": 2
+ },
+ {
+ "@value": 3
+ },
+ {
+ "@value": "four"
+ },
+ {
+ "@value": 5
+ }
+ ]
+ }
+]
\ No newline at end of file
diff --git a/test/jsonld/1.1/flatten/0035-in.jsonld b/test/jsonld/1.1/flatten/0035-in.jsonld
new file mode 100644
index 000000000..7bf591127
--- /dev/null
+++ b/test/jsonld/1.1/flatten/0035-in.jsonld
@@ -0,0 +1,18 @@
+{
+ "@context": {
+ "@vocab": "http://example.com/vocab/",
+ "@language": "it",
+ "label": {
+ "@container": "@language"
+ }
+ },
+ "@id": "http://example.com/queen",
+ "label": {
+ "en": "The Queen",
+ "de": [ "Die Königin", "Ihre Majestät" ]
+ },
+ "http://example.com/vocab/label": [
+ "Il re",
+ { "@value": "The king", "@language": "en" }
+ ]
+}
diff --git a/test/jsonld/1.1/flatten/0035-out.jsonld b/test/jsonld/1.1/flatten/0035-out.jsonld
new file mode 100644
index 000000000..c35097629
--- /dev/null
+++ b/test/jsonld/1.1/flatten/0035-out.jsonld
@@ -0,0 +1,27 @@
+[
+ {
+ "@id": "http://example.com/queen",
+ "http://example.com/vocab/label": [
+ {
+ "@value": "Il re",
+ "@language": "it"
+ },
+ {
+ "@language": "en",
+ "@value": "The king"
+ },
+ {
+ "@value": "Die Königin",
+ "@language": "de"
+ },
+ {
+ "@value": "Ihre Majestät",
+ "@language": "de"
+ },
+ {
+ "@value": "The Queen",
+ "@language": "en"
+ }
+ ]
+ }
+]
\ No newline at end of file
diff --git a/test/jsonld/1.1/flatten/0036-in.jsonld b/test/jsonld/1.1/flatten/0036-in.jsonld
new file mode 100644
index 000000000..23c99b559
--- /dev/null
+++ b/test/jsonld/1.1/flatten/0036-in.jsonld
@@ -0,0 +1,90 @@
+{
+ "@context": {
+ "property": "http://example.com/property",
+ "indexContainer": { "@id": "http://example.com/container", "@container": "@index" }
+ },
+ "@id": "http://example.org/indexTest",
+ "indexContainer": {
+ "A": [
+ {
+ "@id": "http://example.org/nodeWithoutIndexA"
+ },
+ {
+ "@id": "http://example.org/nodeWithIndexA",
+ "@index": "this overrides the 'A' index from the container"
+ },
+ 1,
+ true,
+ false,
+ null,
+ "simple string A",
+ {
+ "@value": "typed literal A",
+ "@type": "http://example.org/type"
+ },
+ {
+ "@value": "language-tagged string A",
+ "@language": "en"
+ }
+ ],
+ "B": "simple string B",
+ "C": [
+ {
+ "@id": "http://example.org/nodeWithoutIndexC"
+ },
+ {
+ "@id": "http://example.org/nodeWithIndexC",
+ "@index": "this overrides the 'C' index from the container"
+ },
+ 3,
+ true,
+ false,
+ null,
+ "simple string C",
+ {
+ "@value": "typed literal C",
+ "@type": "http://example.org/type"
+ },
+ {
+ "@value": "language-tagged string C",
+ "@language": "en"
+ }
+ ]
+ },
+ "property": [
+ {
+ "@id": "http://example.org/nodeWithoutIndexProp"
+ },
+ {
+ "@id": "http://example.org/nodeWithIndexProp",
+ "@index": "prop"
+ },
+ {
+ "@value": 3,
+ "@index": "prop"
+ },
+ {
+ "@value": true,
+ "@index": "prop"
+ },
+ {
+ "@value": false,
+ "@index": "prop"
+ },
+ {
+ "@value": null,
+ "@index": "prop"
+ },
+ "simple string no index",
+ {
+ "@value": "typed literal Prop",
+ "@type": "http://example.org/type",
+ "@index": "prop"
+ },
+ {
+ "@value": "language-tagged string Prop",
+ "@language": "en",
+ "@index": "prop"
+ }
+ ]
+}
diff --git a/test/jsonld/1.1/flatten/0036-out.jsonld b/test/jsonld/1.1/flatten/0036-out.jsonld
new file mode 100644
index 000000000..c4392f9a3
--- /dev/null
+++ b/test/jsonld/1.1/flatten/0036-out.jsonld
@@ -0,0 +1,128 @@
+[
+ {
+ "@id": "http://example.org/indexTest",
+ "http://example.com/container": [
+ {
+ "@id": "http://example.org/nodeWithoutIndexA"
+ },
+ {
+ "@id": "http://example.org/nodeWithIndexA"
+ },
+ {
+ "@value": 1,
+ "@index": "A"
+ },
+ {
+ "@value": true,
+ "@index": "A"
+ },
+ {
+ "@value": false,
+ "@index": "A"
+ },
+ {
+ "@value": "simple string A",
+ "@index": "A"
+ },
+ {
+ "@type": "http://example.org/type",
+ "@value": "typed literal A",
+ "@index": "A"
+ },
+ {
+ "@language": "en",
+ "@value": "language-tagged string A",
+ "@index": "A"
+ },
+ {
+ "@value": "simple string B",
+ "@index": "B"
+ },
+ {
+ "@id": "http://example.org/nodeWithoutIndexC"
+ },
+ {
+ "@id": "http://example.org/nodeWithIndexC"
+ },
+ {
+ "@value": 3,
+ "@index": "C"
+ },
+ {
+ "@value": true,
+ "@index": "C"
+ },
+ {
+ "@value": false,
+ "@index": "C"
+ },
+ {
+ "@value": "simple string C",
+ "@index": "C"
+ },
+ {
+ "@type": "http://example.org/type",
+ "@value": "typed literal C",
+ "@index": "C"
+ },
+ {
+ "@language": "en",
+ "@value": "language-tagged string C",
+ "@index": "C"
+ }
+ ],
+ "http://example.com/property": [
+ {
+ "@id": "http://example.org/nodeWithoutIndexProp"
+ },
+ {
+ "@id": "http://example.org/nodeWithIndexProp"
+ },
+ {
+ "@index": "prop",
+ "@value": 3
+ },
+ {
+ "@index": "prop",
+ "@value": true
+ },
+ {
+ "@index": "prop",
+ "@value": false
+ },
+ {
+ "@value": "simple string no index"
+ },
+ {
+ "@index": "prop",
+ "@type": "http://example.org/type",
+ "@value": "typed literal Prop"
+ },
+ {
+ "@index": "prop",
+ "@language": "en",
+ "@value": "language-tagged string Prop"
+ }
+ ]
+ },
+ {
+ "@id": "http://example.org/nodeWithIndexA",
+ "@index": "this overrides the 'A' index from the container"
+ },
+ {
+ "@id": "http://example.org/nodeWithIndexC",
+ "@index": "this overrides the 'C' index from the container"
+ },
+ {
+ "@id": "http://example.org/nodeWithIndexProp",
+ "@index": "prop"
+ },
+ {
+ "@id": "http://example.org/nodeWithoutIndexA",
+ "@index": "A"
+ },
+ {
+ "@id": "http://example.org/nodeWithoutIndexC",
+ "@index": "C"
+ }
+]
diff --git a/test/jsonld/1.1/flatten/0037-in.jsonld b/test/jsonld/1.1/flatten/0037-in.jsonld
new file mode 100644
index 000000000..f63e141a9
--- /dev/null
+++ b/test/jsonld/1.1/flatten/0037-in.jsonld
@@ -0,0 +1,16 @@
+[
+ {
+ "@id": "http://example.com/people/markus",
+ "@reverse": {
+ "http://xmlns.com/foaf/0.1/knows": [
+ {
+ "@id": "http://example.com/people/dave"
+ },
+ {
+ "@id": "http://example.com/people/gregg"
+ }
+ ]
+ },
+ "http://xmlns.com/foaf/0.1/name": [ { "@value": "Markus Lanthaler" } ]
+ }
+]
diff --git a/test/jsonld/1.1/flatten/0037-out.jsonld b/test/jsonld/1.1/flatten/0037-out.jsonld
new file mode 100644
index 000000000..486a1c472
--- /dev/null
+++ b/test/jsonld/1.1/flatten/0037-out.jsonld
@@ -0,0 +1,14 @@
+[
+ {
+ "@id": "http://example.com/people/dave",
+ "http://xmlns.com/foaf/0.1/knows": [ { "@id": "http://example.com/people/markus" } ]
+ },
+ {
+ "@id": "http://example.com/people/gregg",
+ "http://xmlns.com/foaf/0.1/knows": [ { "@id": "http://example.com/people/markus" } ]
+ },
+ {
+ "@id": "http://example.com/people/markus",
+ "http://xmlns.com/foaf/0.1/name": [ { "@value": "Markus Lanthaler" } ]
+ }
+]
diff --git a/test/jsonld/1.1/flatten/0038-in.jsonld b/test/jsonld/1.1/flatten/0038-in.jsonld
new file mode 100644
index 000000000..17071294d
--- /dev/null
+++ b/test/jsonld/1.1/flatten/0038-in.jsonld
@@ -0,0 +1,38 @@
+{
+ "@context": {
+ "term": "_:term",
+ "termId": { "@id": "term", "@type": "@id" }
+ },
+ "@id": "_:term",
+ "@type": "_:term",
+ "term": [
+ {
+ "@id": "_:term",
+ "@type": "term"
+ },
+ {
+ "@id": "_:Bx",
+ "term": "term"
+ },
+ "plain value",
+ {
+ "@id": "_:term"
+ }
+ ],
+ "termId": [
+ {
+ "@id": "_:term",
+ "@type": "term"
+ },
+ {
+ "@id": "_:Cx",
+ "term": "termId"
+ },
+ "term:AppendedToBlankNode",
+ "_:termAppendedToBlankNode",
+ "relativeIri",
+ {
+ "@id": "_:term"
+ }
+ ]
+}
diff --git a/test/jsonld/1.1/flatten/0038-out.jsonld b/test/jsonld/1.1/flatten/0038-out.jsonld
new file mode 100644
index 000000000..c473598ee
--- /dev/null
+++ b/test/jsonld/1.1/flatten/0038-out.jsonld
@@ -0,0 +1,44 @@
+[
+ {
+ "@id": "_:b0",
+ "@type": [
+ "_:b0"
+ ],
+ "_:b0": [
+ {
+ "@id": "_:b0"
+ },
+ {
+ "@id": "_:b1"
+ },
+ {
+ "@value": "plain value"
+ },
+ {
+ "@id": "_:b2"
+ },
+ {
+ "@id": "_:b3"
+ },
+ {
+ "@id": "https://w3c.github.io/json-ld-api/tests/flatten/relativeIri"
+ }
+ ]
+ },
+ {
+ "@id": "_:b1",
+ "_:b0": [
+ {
+ "@value": "term"
+ }
+ ]
+ },
+ {
+ "@id": "_:b2",
+ "_:b0": [
+ {
+ "@value": "termId"
+ }
+ ]
+ }
+]
diff --git a/test/jsonld/1.1/flatten/0039-in.jsonld b/test/jsonld/1.1/flatten/0039-in.jsonld
new file mode 100644
index 000000000..9fa976253
--- /dev/null
+++ b/test/jsonld/1.1/flatten/0039-in.jsonld
@@ -0,0 +1,16 @@
+[
+ {
+ "@id": "http://example.com/people/markus",
+ "@reverse": {
+ "http://xmlns.com/foaf/0.1/knows": [
+ {
+ "http://xmlns.com/foaf/0.1/name": "Dave Longley"
+ },
+ {
+ "http://xmlns.com/foaf/0.1/name": "Gregg Kellogg"
+ }
+ ]
+ },
+ "http://xmlns.com/foaf/0.1/name": [ { "@value": "Markus Lanthaler" } ]
+ }
+]
diff --git a/test/jsonld/1.1/flatten/0039-out.jsonld b/test/jsonld/1.1/flatten/0039-out.jsonld
new file mode 100644
index 000000000..a5fa10be1
--- /dev/null
+++ b/test/jsonld/1.1/flatten/0039-out.jsonld
@@ -0,0 +1,16 @@
+[
+ {
+ "@id": "_:b0",
+ "http://xmlns.com/foaf/0.1/name": [ { "@value": "Dave Longley" } ],
+ "http://xmlns.com/foaf/0.1/knows": [ { "@id": "http://example.com/people/markus" } ]
+ },
+ {
+ "@id": "_:b1",
+ "http://xmlns.com/foaf/0.1/name": [ { "@value": "Gregg Kellogg" } ],
+ "http://xmlns.com/foaf/0.1/knows": [ { "@id": "http://example.com/people/markus" } ]
+ },
+ {
+ "@id": "http://example.com/people/markus",
+ "http://xmlns.com/foaf/0.1/name": [ { "@value": "Markus Lanthaler" } ]
+ }
+]
diff --git a/test/jsonld/1.1/flatten/0040-in.jsonld b/test/jsonld/1.1/flatten/0040-in.jsonld
new file mode 100644
index 000000000..2d02e0ad0
--- /dev/null
+++ b/test/jsonld/1.1/flatten/0040-in.jsonld
@@ -0,0 +1,23 @@
+{
+ "@context": {
+ "vocab": "http://example.com/vocab/",
+ "label": {
+ "@id": "vocab:label",
+ "@container": "@language"
+ },
+ "indexes": {
+ "@id": "vocab:index",
+ "@container": "@index"
+ }
+ },
+ "@id": "http://example.com/queen",
+ "label": [
+ "The Queen"
+ ],
+ "indexes":
+ [
+ "No",
+ "indexes",
+ { "@id": "asTheValueIsntAnObject" }
+ ]
+}
diff --git a/test/jsonld/1.1/flatten/0040-out.jsonld b/test/jsonld/1.1/flatten/0040-out.jsonld
new file mode 100644
index 000000000..bea4691d7
--- /dev/null
+++ b/test/jsonld/1.1/flatten/0040-out.jsonld
@@ -0,0 +1,21 @@
+[
+ {
+ "@id": "http://example.com/queen",
+ "http://example.com/vocab/index": [
+ {
+ "@value": "No"
+ },
+ {
+ "@value": "indexes"
+ },
+ {
+ "@id": "https://w3c.github.io/json-ld-api/tests/flatten/asTheValueIsntAnObject"
+ }
+ ],
+ "http://example.com/vocab/label": [
+ {
+ "@value": "The Queen"
+ }
+ ]
+ }
+]
diff --git a/test/jsonld/1.1/flatten/0041-in.jsonld b/test/jsonld/1.1/flatten/0041-in.jsonld
new file mode 100644
index 000000000..9eece68db
--- /dev/null
+++ b/test/jsonld/1.1/flatten/0041-in.jsonld
@@ -0,0 +1,24 @@
+{
+ "@context": {
+ "property": "http://example.com/property"
+ },
+ "@graph": [
+ {
+ "@set": [
+ "free-floating strings in set objects are removed",
+ {
+ "@id": "http://example.com/free-floating-node"
+ },
+ {
+ "@id": "http://example.com/node",
+ "property": "nodes with properties are not removed"
+ }
+ ]
+ },
+ {
+ "@list": [
+ "lists are removed even though they represent an invisible linked structure, they have no real meaning"
+ ]
+ }
+ ]
+}
diff --git a/test/jsonld/1.1/flatten/0041-out.jsonld b/test/jsonld/1.1/flatten/0041-out.jsonld
new file mode 100644
index 000000000..dba2d8ef6
--- /dev/null
+++ b/test/jsonld/1.1/flatten/0041-out.jsonld
@@ -0,0 +1,10 @@
+[
+ {
+ "@id": "http://example.com/node",
+ "http://example.com/property": [
+ {
+ "@value": "nodes with properties are not removed"
+ }
+ ]
+ }
+]
diff --git a/test/jsonld/1.1/flatten/0042-in.jsonld b/test/jsonld/1.1/flatten/0042-in.jsonld
new file mode 100644
index 000000000..2ac94d4f7
--- /dev/null
+++ b/test/jsonld/1.1/flatten/0042-in.jsonld
@@ -0,0 +1,10 @@
+{
+ "@context": {
+ "test": "http://example.com/list"
+ },
+ "@id": "list-equivalence-test",
+ "test": [
+ { "@list": [ "1", "2" ] },
+ { "@list": [ "1", "2" ] }
+ ]
+}
diff --git a/test/jsonld/1.1/flatten/0042-out.jsonld b/test/jsonld/1.1/flatten/0042-out.jsonld
new file mode 100644
index 000000000..6d0c41f6b
--- /dev/null
+++ b/test/jsonld/1.1/flatten/0042-out.jsonld
@@ -0,0 +1,13 @@
+[
+ {
+ "@id": "https://w3c.github.io/json-ld-api/tests/flatten/list-equivalence-test",
+ "http://example.com/list": [
+ {
+ "@list": [ { "@value": "1" }, { "@value": "2" } ]
+ },
+ {
+ "@list": [ { "@value": "1" }, { "@value": "2" } ]
+ }
+ ]
+ }
+]
diff --git a/test/jsonld/1.1/flatten/0043-in.jsonld b/test/jsonld/1.1/flatten/0043-in.jsonld
new file mode 100644
index 000000000..bdcb3ebd3
--- /dev/null
+++ b/test/jsonld/1.1/flatten/0043-in.jsonld
@@ -0,0 +1,10 @@
+{
+ "@id": "",
+ "http://example/sequence": {"@list": [
+ {
+ "@id": "#t0001",
+ "http://example/name": "Keywords cannot be aliased to other keywords",
+ "http://example/input": {"@id": "0001-in.jsonld"}
+ }
+ ]}
+}
diff --git a/test/jsonld/1.1/flatten/0043-out.jsonld b/test/jsonld/1.1/flatten/0043-out.jsonld
new file mode 100644
index 000000000..bcaacf8a8
--- /dev/null
+++ b/test/jsonld/1.1/flatten/0043-out.jsonld
@@ -0,0 +1,17 @@
+[
+ {
+ "@id": "https://w3c.github.io/json-ld-api/tests/flatten/0043-in.jsonld",
+ "http://example/sequence": [
+ {"@list": [{"@id": "https://w3c.github.io/json-ld-api/tests/flatten/0043-in.jsonld#t0001"}]}
+ ]
+ },
+ {
+ "@id": "https://w3c.github.io/json-ld-api/tests/flatten/0043-in.jsonld#t0001",
+ "http://example/input": [
+ {"@id": "https://w3c.github.io/json-ld-api/tests/flatten/0001-in.jsonld"}
+ ],
+ "http://example/name": [
+ {"@value": "Keywords cannot be aliased to other keywords"}
+ ]
+ }
+]
diff --git a/test/jsonld/1.1/flatten/0044-context.jsonld b/test/jsonld/1.1/flatten/0044-context.jsonld
new file mode 100644
index 000000000..b1fde0c02
--- /dev/null
+++ b/test/jsonld/1.1/flatten/0044-context.jsonld
@@ -0,0 +1,5 @@
+{
+ "@context": {
+ "term": "http://example/term"
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/flatten/0044-in.jsonld b/test/jsonld/1.1/flatten/0044-in.jsonld
new file mode 100644
index 000000000..94e6d6a6f
--- /dev/null
+++ b/test/jsonld/1.1/flatten/0044-in.jsonld
@@ -0,0 +1,4 @@
+[{
+ "@id": "http://example/foo",
+ "http://example/term": [{"@value": "value"}]
+}]
diff --git a/test/jsonld/1.1/flatten/0044-out.jsonld b/test/jsonld/1.1/flatten/0044-out.jsonld
new file mode 100644
index 000000000..136cb3a72
--- /dev/null
+++ b/test/jsonld/1.1/flatten/0044-out.jsonld
@@ -0,0 +1,9 @@
+{
+ "@context": {
+ "term": "http://example/term"
+ },
+ "@graph": [{
+ "@id": "http://example/foo",
+ "term": ["value"]
+ }]
+}
diff --git a/test/jsonld/1.1/flatten/0045-in.jsonld b/test/jsonld/1.1/flatten/0045-in.jsonld
new file mode 100644
index 000000000..088bb2ffc
--- /dev/null
+++ b/test/jsonld/1.1/flatten/0045-in.jsonld
@@ -0,0 +1,8 @@
+{
+ "@context": {
+ "foo": "http://example.org/foo",
+ "bar": { "@reverse": "http://example.org/bar", "@type": "@id" }
+ },
+ "foo": "Foo",
+ "bar": [ "http://example.org/origin", "_:b0" ]
+}
diff --git a/test/jsonld/1.1/flatten/0045-out.jsonld b/test/jsonld/1.1/flatten/0045-out.jsonld
new file mode 100644
index 000000000..abd9a00f3
--- /dev/null
+++ b/test/jsonld/1.1/flatten/0045-out.jsonld
@@ -0,0 +1,14 @@
+[
+ {
+ "@id": "_:b0",
+ "http://example.org/foo": [ { "@value": "Foo" } ]
+ },
+ {
+ "@id": "_:b1",
+ "http://example.org/bar": [ { "@id": "_:b0" } ]
+ },
+ {
+ "@id": "http://example.org/origin",
+ "http://example.org/bar": [ { "@id": "_:b0" } ]
+ }
+]
diff --git a/test/jsonld/1.1/flatten/0046-in.jsonld b/test/jsonld/1.1/flatten/0046-in.jsonld
new file mode 100644
index 000000000..87b32f492
--- /dev/null
+++ b/test/jsonld/1.1/flatten/0046-in.jsonld
@@ -0,0 +1,17 @@
+{
+ "@context": {
+ "@base": null
+ },
+ "@id": "",
+ "http://example.com/foo": "bar",
+ "@graph": [
+ {
+ "@id": "",
+ "http://example.com/baz": "bam"
+ },
+ {
+ "@id": "0",
+ "http://example.com/baaaaaz": "baaaam"
+ }
+ ]
+}
diff --git a/test/jsonld/1.1/flatten/0046-out.jsonld b/test/jsonld/1.1/flatten/0046-out.jsonld
new file mode 100644
index 000000000..6268e047d
--- /dev/null
+++ b/test/jsonld/1.1/flatten/0046-out.jsonld
@@ -0,0 +1,16 @@
+[
+ {
+ "@id": "",
+ "http://example.com/foo": [ { "@value": "bar" } ],
+ "@graph": [
+ {
+ "@id": "",
+ "http://example.com/baz": [ { "@value": "bam" } ]
+ },
+ {
+ "@id": "0",
+ "http://example.com/baaaaaz": [ { "@value": "baaaam" } ]
+ }
+ ]
+ }
+]
diff --git a/test/jsonld/1.1/flatten/0047-in.jsonld b/test/jsonld/1.1/flatten/0047-in.jsonld
new file mode 100644
index 000000000..c81b98420
--- /dev/null
+++ b/test/jsonld/1.1/flatten/0047-in.jsonld
@@ -0,0 +1,7 @@
+{
+ "@context": {
+ "@base": "http://example.com/",
+ "iot": "http://example.com/core/#"
+ },
+ "iot:associated": { "@id": "#Light" }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/flatten/0047-out.jsonld b/test/jsonld/1.1/flatten/0047-out.jsonld
new file mode 100644
index 000000000..461d7fe3e
--- /dev/null
+++ b/test/jsonld/1.1/flatten/0047-out.jsonld
@@ -0,0 +1,10 @@
+[
+ {
+ "@id": "_:b0",
+ "http://example.com/core/#associated": [
+ {
+ "@id": "http://example.com/#Light"
+ }
+ ]
+ }
+]
\ No newline at end of file
diff --git a/test/jsonld/1.1/flatten/0048-in.jsonld b/test/jsonld/1.1/flatten/0048-in.jsonld
new file mode 100644
index 000000000..26b142496
--- /dev/null
+++ b/test/jsonld/1.1/flatten/0048-in.jsonld
@@ -0,0 +1,8 @@
+[{
+ "http://example.com/foo": [{
+ "@list": [{
+ "@id": "http://example.com/baz",
+ "http://example.com/bar": "buz"}
+ ]}
+ ]}
+]
\ No newline at end of file
diff --git a/test/jsonld/1.1/flatten/0048-out.jsonld b/test/jsonld/1.1/flatten/0048-out.jsonld
new file mode 100644
index 000000000..f3ede2efb
--- /dev/null
+++ b/test/jsonld/1.1/flatten/0048-out.jsonld
@@ -0,0 +1,16 @@
+[
+ {
+ "@id": "_:b0",
+ "http://example.com/foo": [{
+ "@list": [
+ {
+ "@id": "http://example.com/baz"
+ }
+ ]
+ }]
+ },
+ {
+ "@id": "http://example.com/baz",
+ "http://example.com/bar": [{"@value": "buz"}]
+ }
+]
\ No newline at end of file
diff --git a/test/jsonld/1.1/flatten/0049-in.jsonld b/test/jsonld/1.1/flatten/0049-in.jsonld
new file mode 100644
index 000000000..4f679fd3a
--- /dev/null
+++ b/test/jsonld/1.1/flatten/0049-in.jsonld
@@ -0,0 +1,9 @@
+{
+ "@context": {
+ "valueOf": "http://example.org/valueOf",
+ "toString": "http://example.org/toString"
+ },
+ "@id": "ex:test",
+ "valueOf": "first",
+ "toString": "second"
+}
diff --git a/test/jsonld/1.1/flatten/0049-out.jsonld b/test/jsonld/1.1/flatten/0049-out.jsonld
new file mode 100644
index 000000000..af6d36de4
--- /dev/null
+++ b/test/jsonld/1.1/flatten/0049-out.jsonld
@@ -0,0 +1,15 @@
+[
+ {
+ "@id": "ex:test",
+ "http://example.org/valueOf": [
+ {
+ "@value": "first"
+ }
+ ],
+ "http://example.org/toString": [
+ {
+ "@value": "second"
+ }
+ ]
+ }
+]
diff --git a/test/jsonld/1.1/flatten/e001-in.jsonld b/test/jsonld/1.1/flatten/e001-in.jsonld
new file mode 100644
index 000000000..d2e4b8bc5
--- /dev/null
+++ b/test/jsonld/1.1/flatten/e001-in.jsonld
@@ -0,0 +1,10 @@
+[
+ {
+ "@id": "http://example/foo",
+ "@index": "bar"
+ },
+ {
+ "@id": "http://example/foo",
+ "@index": "baz"
+ }
+]
\ No newline at end of file
diff --git a/test/jsonld/1.1/flatten/in01-in.jsonld b/test/jsonld/1.1/flatten/in01-in.jsonld
new file mode 100644
index 000000000..145c36e73
--- /dev/null
+++ b/test/jsonld/1.1/flatten/in01-in.jsonld
@@ -0,0 +1,10 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "@vocab": "http://example.org/"
+ },
+ "prop": "value",
+ "@included": [{
+ "prop": "value2"
+ }]
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/flatten/in01-out.jsonld b/test/jsonld/1.1/flatten/in01-out.jsonld
new file mode 100644
index 000000000..8bb515731
--- /dev/null
+++ b/test/jsonld/1.1/flatten/in01-out.jsonld
@@ -0,0 +1,7 @@
+[{
+ "@id": "_:b0",
+ "http://example.org/prop": [{"@value": "value"}]
+}, {
+ "@id": "_:b1",
+ "http://example.org/prop": [{"@value": "value2"}]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/flatten/in02-in.jsonld b/test/jsonld/1.1/flatten/in02-in.jsonld
new file mode 100644
index 000000000..a976cce70
--- /dev/null
+++ b/test/jsonld/1.1/flatten/in02-in.jsonld
@@ -0,0 +1,10 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "@vocab": "http://example.org/"
+ },
+ "prop": "value",
+ "@included": {
+ "prop": "value2"
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/flatten/in02-out.jsonld b/test/jsonld/1.1/flatten/in02-out.jsonld
new file mode 100644
index 000000000..8bb515731
--- /dev/null
+++ b/test/jsonld/1.1/flatten/in02-out.jsonld
@@ -0,0 +1,7 @@
+[{
+ "@id": "_:b0",
+ "http://example.org/prop": [{"@value": "value"}]
+}, {
+ "@id": "_:b1",
+ "http://example.org/prop": [{"@value": "value2"}]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/flatten/in03-in.jsonld b/test/jsonld/1.1/flatten/in03-in.jsonld
new file mode 100644
index 000000000..ed476d436
--- /dev/null
+++ b/test/jsonld/1.1/flatten/in03-in.jsonld
@@ -0,0 +1,10 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "@vocab": "http://example.org/",
+ "included1": "@included",
+ "included2": "@included"
+ },
+ "included1": {"prop": "value1"},
+ "included2": {"prop": "value2"}
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/flatten/in03-out.jsonld b/test/jsonld/1.1/flatten/in03-out.jsonld
new file mode 100644
index 000000000..6b9e8e667
--- /dev/null
+++ b/test/jsonld/1.1/flatten/in03-out.jsonld
@@ -0,0 +1,7 @@
+[{
+ "@id": "_:b1",
+ "http://example.org/prop": [{"@value": "value1"}]
+}, {
+ "@id": "_:b2",
+ "http://example.org/prop": [{"@value": "value2"}]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/flatten/in04-in.jsonld b/test/jsonld/1.1/flatten/in04-in.jsonld
new file mode 100644
index 000000000..2436a4541
--- /dev/null
+++ b/test/jsonld/1.1/flatten/in04-in.jsonld
@@ -0,0 +1,13 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "@vocab": "http://example.org/"
+ },
+ "prop": "value",
+ "@included": {
+ "prop": "value2",
+ "@included": {
+ "prop": "value3"
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/flatten/in04-out.jsonld b/test/jsonld/1.1/flatten/in04-out.jsonld
new file mode 100644
index 000000000..efb9a424b
--- /dev/null
+++ b/test/jsonld/1.1/flatten/in04-out.jsonld
@@ -0,0 +1,10 @@
+[{
+ "@id": "_:b0",
+ "http://example.org/prop": [{"@value": "value"}]
+}, {
+ "@id": "_:b1",
+ "http://example.org/prop": [{"@value": "value2"}]
+}, {
+ "@id": "_:b2",
+ "http://example.org/prop": [{"@value": "value3"}]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/flatten/in05-in.jsonld b/test/jsonld/1.1/flatten/in05-in.jsonld
new file mode 100644
index 000000000..b94709b4e
--- /dev/null
+++ b/test/jsonld/1.1/flatten/in05-in.jsonld
@@ -0,0 +1,12 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "@vocab": "http://example.org/"
+ },
+ "prop": {
+ "@type": "Foo",
+ "@included": {
+ "@type": "Bar"
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/flatten/in05-out.jsonld b/test/jsonld/1.1/flatten/in05-out.jsonld
new file mode 100644
index 000000000..9e6fb442d
--- /dev/null
+++ b/test/jsonld/1.1/flatten/in05-out.jsonld
@@ -0,0 +1,10 @@
+[{
+ "@id": "_:b0",
+ "http://example.org/prop": [{"@id": "_:b1"}]
+}, {
+ "@id": "_:b1",
+ "@type": ["http://example.org/Foo"]
+}, {
+ "@id": "_:b2",
+ "@type": ["http://example.org/Bar"]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/flatten/in06-in.jsonld b/test/jsonld/1.1/flatten/in06-in.jsonld
new file mode 100644
index 000000000..2e5339f54
--- /dev/null
+++ b/test/jsonld/1.1/flatten/in06-in.jsonld
@@ -0,0 +1,90 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "@vocab": "http://example.org/vocab#",
+ "@base": "http://example.org/base/",
+ "id": "@id",
+ "type": "@type",
+ "data": "@nest",
+ "attributes": "@nest",
+ "links": "@nest",
+ "relationships": "@nest",
+ "included": "@included",
+ "self": {"@type": "@id"},
+ "related": {"@type": "@id"},
+ "comments": {
+ "@context": {
+ "data": null
+ }
+ }
+ },
+ "data": [{
+ "type": "articles",
+ "id": "1",
+ "attributes": {
+ "title": "JSON:API paints my bikeshed!"
+ },
+ "links": {
+ "self": "http://example.com/articles/1"
+ },
+ "relationships": {
+ "author": {
+ "links": {
+ "self": "http://example.com/articles/1/relationships/author",
+ "related": "http://example.com/articles/1/author"
+ },
+ "data": { "type": "people", "id": "9" }
+ },
+ "comments": {
+ "links": {
+ "self": "http://example.com/articles/1/relationships/comments",
+ "related": "http://example.com/articles/1/comments"
+ },
+ "data": [
+ { "type": "comments", "id": "5" },
+ { "type": "comments", "id": "12" }
+ ]
+ }
+ }
+ }],
+ "included": [{
+ "type": "people",
+ "id": "9",
+ "attributes": {
+ "first-name": "Dan",
+ "last-name": "Gebhardt",
+ "twitter": "dgeb"
+ },
+ "links": {
+ "self": "http://example.com/people/9"
+ }
+ }, {
+ "type": "comments",
+ "id": "5",
+ "attributes": {
+ "body": "First!"
+ },
+ "relationships": {
+ "author": {
+ "data": { "type": "people", "id": "2" }
+ }
+ },
+ "links": {
+ "self": "http://example.com/comments/5"
+ }
+ }, {
+ "type": "comments",
+ "id": "12",
+ "attributes": {
+ "body": "I like XML better"
+ },
+ "relationships": {
+ "author": {
+ "data": { "type": "people", "id": "9" }
+ }
+ },
+ "links": {
+ "self": "http://example.com/comments/12"
+ }
+ }]
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/flatten/in06-out.jsonld b/test/jsonld/1.1/flatten/in06-out.jsonld
new file mode 100644
index 000000000..d846c2bf6
--- /dev/null
+++ b/test/jsonld/1.1/flatten/in06-out.jsonld
@@ -0,0 +1,40 @@
+[{
+ "@id": "_:b0",
+ "http://example.org/vocab#self": [{"@id": "http://example.com/articles/1/relationships/comments"}
+ ],
+ "http://example.org/vocab#related": [{"@id": "http://example.com/articles/1/comments"}]
+ }, {
+ "@id": "http://example.org/base/1",
+ "@type": ["http://example.org/vocab#articles"],
+ "http://example.org/vocab#title": [{"@value": "JSON:API paints my bikeshed!"}],
+ "http://example.org/vocab#self": [{"@id": "http://example.com/articles/1"}],
+ "http://example.org/vocab#author": [{"@id": "http://example.org/base/9"}],
+ "http://example.org/vocab#comments": [{"@id": "_:b0"}]
+}, {
+ "@id": "http://example.org/base/12",
+ "@type": ["http://example.org/vocab#comments"],
+ "http://example.org/vocab#body": [{"@value": "I like XML better"}],
+ "http://example.org/vocab#author": [{"@id": "http://example.org/base/9"}],
+ "http://example.org/vocab#self": [{"@id": "http://example.com/comments/12"}]
+}, {
+ "@id": "http://example.org/base/2",
+ "@type": ["http://example.org/vocab#people"]
+}, {
+ "@id": "http://example.org/base/5",
+ "@type": ["http://example.org/vocab#comments"],
+ "http://example.org/vocab#body": [{"@value": "First!"}
+ ],
+ "http://example.org/vocab#author": [{"@id": "http://example.org/base/2"}],
+ "http://example.org/vocab#self": [{"@id": "http://example.com/comments/5"}]
+}, {
+ "@id": "http://example.org/base/9",
+ "@type": ["http://example.org/vocab#people"],
+ "http://example.org/vocab#first-name": [{"@value": "Dan"}],
+ "http://example.org/vocab#last-name": [{"@value": "Gebhardt"}],
+ "http://example.org/vocab#twitter": [{"@value": "dgeb"}],
+ "http://example.org/vocab#self": [
+ {"@id": "http://example.com/people/9"},
+ {"@id": "http://example.com/articles/1/relationships/author"}
+ ],
+ "http://example.org/vocab#related": [{"@id": "http://example.com/articles/1/author"}]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/flatten/li01-in.jsonld b/test/jsonld/1.1/flatten/li01-in.jsonld
new file mode 100644
index 000000000..329a79c9f
--- /dev/null
+++ b/test/jsonld/1.1/flatten/li01-in.jsonld
@@ -0,0 +1,3 @@
+[{
+ "http://example.com/foo": [{"@list": [{"@list": [{"@list": [{"@value": "baz"}]}]}]}]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/flatten/li01-out.jsonld b/test/jsonld/1.1/flatten/li01-out.jsonld
new file mode 100644
index 000000000..131f9b3a8
--- /dev/null
+++ b/test/jsonld/1.1/flatten/li01-out.jsonld
@@ -0,0 +1,4 @@
+[{
+ "@id": "_:b0",
+ "http://example.com/foo": [{"@list": [{"@list": [{"@list": [{"@value": "baz"}]}]}]}]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/flatten/li02-in.jsonld b/test/jsonld/1.1/flatten/li02-in.jsonld
new file mode 100644
index 000000000..4be9f2e81
--- /dev/null
+++ b/test/jsonld/1.1/flatten/li02-in.jsonld
@@ -0,0 +1,3 @@
+{
+ "http://example.com/foo": {"@list": [{"@list": []}]}
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/flatten/li02-out.jsonld b/test/jsonld/1.1/flatten/li02-out.jsonld
new file mode 100644
index 000000000..80abdac08
--- /dev/null
+++ b/test/jsonld/1.1/flatten/li02-out.jsonld
@@ -0,0 +1,4 @@
+[{
+ "@id": "_:b0",
+ "http://example.com/foo": [{"@list": [{"@list": []}]}]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/flatten/li03-in.jsonld b/test/jsonld/1.1/flatten/li03-in.jsonld
new file mode 100644
index 000000000..96afcbaa5
--- /dev/null
+++ b/test/jsonld/1.1/flatten/li03-in.jsonld
@@ -0,0 +1,6 @@
+{
+ "@context": {"foo": {"@id": "http://example.com/foo", "@container": "@list"}},
+ "foo": [
+ [{"@id": "http://example/a", "@type": "http://example/Bar"}],
+ {"@id": "http://example/b", "@type": "http://example/Baz"}]
+}
\ No newline at end of file
diff --git a/test/jsonld/1.1/flatten/li03-out.jsonld b/test/jsonld/1.1/flatten/li03-out.jsonld
new file mode 100644
index 000000000..155ccd8ca
--- /dev/null
+++ b/test/jsonld/1.1/flatten/li03-out.jsonld
@@ -0,0 +1,19 @@
+[{
+ "@id": "_:b0",
+ "http://example.com/foo": [{"@list": [
+ {"@list": [{"@id": "http://example/a"}]},
+ {"@id": "http://example/b"}
+ ]}]
+},
+{
+ "@id": "http://example/a",
+ "@type": [
+ "http://example/Bar"
+ ]
+},
+{
+ "@id": "http://example/b",
+ "@type": [
+ "http://example/Baz"
+ ]
+}]
\ No newline at end of file
diff --git a/test/jsonld/1.1/fromRdf-manifest.jsonld b/test/jsonld/1.1/fromRdf-manifest.jsonld
new file mode 100644
index 000000000..1764a6826
--- /dev/null
+++ b/test/jsonld/1.1/fromRdf-manifest.jsonld
@@ -0,0 +1,408 @@
+{
+ "@context": ["context.jsonld", {"@base": "fromRdf-manifest"}],
+ "@id": "",
+ "@type": "mf:Manifest",
+ "name": "Transform RDF to JSON-LD",
+ "description": "These tests implement the requirements for the JSON-LD [Serialize RDF as JSON-LD Algorithm](https://www.w3.org/TR/json-ld11-api/#serialize-rdf-as-json-ld-algorithm).",
+ "baseIri": "https://w3c.github.io/json-ld-api/tests/",
+ "sequence": [
+ {
+ "@id": "#t0001",
+ "@type": ["jld:PositiveEvaluationTest", "jld:FromRDFTest"],
+ "name": "Object Lists",
+ "purpose": "Tests generation using different types of objects.",
+ "input": "fromRdf/0001-in.nq",
+ "expect": "fromRdf/0001-out.jsonld"
+ }, {
+ "@id": "#t0002",
+ "@type": ["jld:PositiveEvaluationTest", "jld:FromRDFTest"],
+ "name": "Native Types",
+ "purpose": "Do not use native datatypes for xsd:boolean, xsd:integer, and xsd:double by default.",
+ "input": "fromRdf/0002-in.nq",
+ "expect": "fromRdf/0002-out.jsonld"
+ }, {
+ "@id": "#t0003",
+ "@type": ["jld:PositiveEvaluationTest", "jld:FromRDFTest"],
+ "name": "BNodes and references",
+ "purpose": "BNode name generation and references between resources.",
+ "input": "fromRdf/0003-in.nq",
+ "expect": "fromRdf/0003-out.jsonld"
+ }, {
+ "@id": "#t0004",
+ "@type": ["jld:PositiveEvaluationTest", "jld:FromRDFTest"],
+ "name": "Lists",
+ "purpose": "Multiple lists with different types of element.",
+ "input": "fromRdf/0004-in.nq",
+ "expect": "fromRdf/0004-out.jsonld"
+ }, {
+ "@id": "#t0005",
+ "@type": ["jld:PositiveEvaluationTest", "jld:FromRDFTest"],
+ "name": "Document with list",
+ "purpose": "Uses a named graph containing a list.",
+ "input": "fromRdf/0005-in.nq",
+ "expect": "fromRdf/0005-out.jsonld"
+ }, {
+ "@id": "#t0006",
+ "@type": ["jld:PositiveEvaluationTest", "jld:FromRDFTest"],
+ "name": "Two graphs having same subject but different values",
+ "purpose": "Ensure that properties and list elements aren't confused between graphs.",
+ "input": "fromRdf/0006-in.nq",
+ "expect": "fromRdf/0006-out.jsonld"
+ }, {
+ "@id": "#t0007",
+ "@type": ["jld:PositiveEvaluationTest", "jld:FromRDFTest"],
+ "name": "Graph with multiple named graphs",
+ "purpose": "Testing @graph recursion.",
+ "input": "fromRdf/0007-in.nq",
+ "expect": "fromRdf/0007-out.jsonld"
+ }, {
+ "@id": "#t0008",
+ "@type": ["jld:PositiveEvaluationTest", "jld:FromRDFTest"],
+ "name": "List conversion",
+ "purpose": "Conversion of lists of lists (the triples in the input are only partially ordered on purpose (1.0 semantics)",
+ "input": "fromRdf/0008-in.nq",
+ "expect": "fromRdf/0008-out.jsonld",
+ "option": {"specVersion": "json-ld-1.0"}
+ }, {
+ "@id": "#t0009",
+ "@type": ["jld:PositiveEvaluationTest", "jld:FromRDFTest"],
+ "name": "List conversion with IRI nodes",
+ "purpose": "Preserve IRI list nodes (i.e., not blank nodes) when converting to @list",
+ "input": "fromRdf/0009-in.nq",
+ "expect": "fromRdf/0009-out.jsonld"
+ }, {
+ "@id": "#t0010",
+ "@type": ["jld:PositiveEvaluationTest", "jld:FromRDFTest"],
+ "name": "List pattern without rdf:nil",
+ "purpose": "Do not convert lists that are not terminated by rdf:nil to @list.",
+ "input": "fromRdf/0010-in.nq",
+ "expect": "fromRdf/0010-out.jsonld"
+ }, {
+ "@id": "#t0011",
+ "@type": ["jld:PositiveEvaluationTest", "jld:FromRDFTest"],
+ "name": "List pattern with extra properties",
+ "purpose": "If additional properties are associated to a list node, the list is only partially converted to @list.",
+ "input": "fromRdf/0011-in.nq",
+ "expect": "fromRdf/0011-out.jsonld"
+ }, {
+ "@id": "#t0012",
+ "@type": ["jld:PositiveEvaluationTest", "jld:FromRDFTest"],
+ "name": "List pattern with cycles",
+ "purpose": "Detect lists containing cycles and do not convert them to @list.",
+ "input": "fromRdf/0012-in.nq",
+ "expect": "fromRdf/0012-out.jsonld"
+ }, {
+ "@id": "#t0013",
+ "@type": ["jld:PositiveEvaluationTest", "jld:FromRDFTest"],
+ "name": "List pattern with multiple values of rdf:first",
+ "purpose": "Do not convert list nodes to @list if nodes contain more than one value for rdf:first.",
+ "input": "fromRdf/0013-in.nq",
+ "expect": "fromRdf/0013-out.jsonld"
+ }, {
+ "@id": "#t0014",
+ "@type": ["jld:PositiveEvaluationTest", "jld:FromRDFTest"],
+ "name": "List pattern with multiple values of rdf:rest",
+ "purpose": "Do not convert list nodes to @list if nodes contain more than one value for rdf:rest.",
+ "input": "fromRdf/0014-in.nq",
+ "expect": "fromRdf/0014-out.jsonld"
+ }, {
+ "@id": "#t0015",
+ "@type": ["jld:PositiveEvaluationTest", "jld:FromRDFTest"],
+ "name": "List pattern with IRI rdf:rest",
+ "purpose": "Do not convert lists to @list if a list node's rdf:rest is an IRI.",
+ "input": "fromRdf/0015-in.nq",
+ "expect": "fromRdf/0015-out.jsonld"
+ }, {
+ "@id": "#t0016",
+ "@type": ["jld:PositiveEvaluationTest", "jld:FromRDFTest"],
+ "name": "List pattern with type rdf:List",
+ "purpose": "List nodes may have a rdf:type rdf:List.",
+ "input": "fromRdf/0016-in.nq",
+ "expect": "fromRdf/0016-out.jsonld"
+ }, {
+ "@id": "#t0017",
+ "@type": ["jld:PositiveEvaluationTest", "jld:FromRDFTest"],
+ "name": "Remove duplicate triples",
+ "purpose": "Equivalent triples are used only once",
+ "input": "fromRdf/0017-in.nq",
+ "expect": "fromRdf/0017-out.jsonld"
+ }, {
+ "@id": "#t0018",
+ "@type": ["jld:PositiveEvaluationTest", "jld:FromRDFTest"],
+ "name": "use native types flag set to true",
+ "purpose": "Literals with datatype xsd:boolean, xsd:integer, and xsd:double are serialized using native scalar values",
+ "option": {
+ "useNativeTypes": true
+ },
+ "input": "fromRdf/0018-in.nq",
+ "expect": "fromRdf/0018-out.jsonld"
+ }, {
+ "@id": "#t0019",
+ "@type": ["jld:PositiveEvaluationTest", "jld:FromRDFTest"],
+ "name": "use rdf:type flag set to false",
+ "purpose": "Setting useRdfType to true causes an rdf:type predicate to be treated like a normal property, not @type",
+ "option": {
+ "useRdfType": true
+ },
+ "input": "fromRdf/0019-in.nq",
+ "expect": "fromRdf/0019-out.jsonld"
+ }, {
+ "@id": "#t0020",
+ "@type": ["jld:PositiveEvaluationTest", "jld:FromRDFTest"],
+ "name": "list with node shared across graphs",
+ "purpose": "An otherwise conformant list with a node shared across different lists does not serialize using @list",
+ "input": "fromRdf/0020-in.nq",
+ "expect": "fromRdf/0020-out.jsonld"
+ }, {
+ "@id": "#t0021",
+ "@type": ["jld:PositiveEvaluationTest", "jld:FromRDFTest"],
+ "name": "list with node shared across graphs (same triple in different graphs)",
+ "purpose": "If a list node is used in different graphs, it isn't removed and converted to @list",
+ "input": "fromRdf/0021-in.nq",
+ "expect": "fromRdf/0021-out.jsonld"
+ }, {
+ "@id": "#t0022",
+ "@type": ["jld:PositiveEvaluationTest", "jld:FromRDFTest"],
+ "name": "list from duplicate triples",
+ "purpose": "Duplicate triples for a list node will not prevent @list from being properly generated",
+ "input": "fromRdf/0022-in.nq",
+ "expect": "fromRdf/0022-out.jsonld"
+ }, {
+ "@id": "#t0023",
+ "@type": ["jld:PositiveEvaluationTest", "jld:FromRDFTest"],
+ "name": "triple with RDF nil subject",
+ "purpose": "Test triple with RDF nil subject",
+ "input": "fromRdf/0023-in.nq",
+ "expect": "fromRdf/0023-out.jsonld"
+ }, {
+ "@id": "#t0024",
+ "@type": ["jld:PositiveEvaluationTest", "jld:FromRDFTest"],
+ "name": "multiple languages for same subject+property+value",
+ "purpose": "Uniqness of triples should include the value language",
+ "input": "fromRdf/0024-in.nq",
+ "expect": "fromRdf/0024-out.jsonld"
+ }, {
+ "@id": "#t0025",
+ "@type": ["jld:PositiveEvaluationTest", "jld:FromRDFTest"],
+ "name": "multiple types for same subject+property+value",
+ "purpose": "Uniqness of triples should include the value type",
+ "input": "fromRdf/0025-in.nq",
+ "expect": "fromRdf/0025-out.jsonld"
+ }, {
+ "@id": "#t0026",
+ "@type": ["jld:PositiveEvaluationTest", "jld:FromRDFTest"],
+ "name": "triple with rdf:first property and rdf:nil value",
+ "purpose": "Check list generation with rdf:first property and rdf:nil value.",
+ "input": "fromRdf/0026-in.nq",
+ "expect": "fromRdf/0026-out.jsonld"
+ }, {
+ "@id": "#tdi01",
+ "@type": [ "jld:PositiveEvaluationTest", "jld:FromRDFTest" ],
+ "name": "rdfDirection: null with i18n literal with direction and no language",
+ "purpose": "Does not parse i18n datatype without proper option.",
+ "option": {"specVersion": "json-ld-1.1"},
+ "input": "fromRdf/di01-in.nq",
+ "expect": "fromRdf/di01-out.jsonld"
+ }, {
+ "@id": "#tdi02",
+ "@type": [ "jld:PositiveEvaluationTest", "jld:FromRDFTest" ],
+ "name": "rdfDirection: null with i18n literal with direction and language",
+ "purpose": "Does not parse i18n datatype without proper option.",
+ "option": {"specVersion": "json-ld-1.1"},
+ "input": "fromRdf/di02-in.nq",
+ "expect": "fromRdf/di02-out.jsonld"
+ }, {
+ "@id": "#tdi03",
+ "@type": [ "jld:PositiveEvaluationTest", "jld:FromRDFTest" ],
+ "name": "rdfDirection: null with compound literal with direction and no language",
+ "purpose": "Does not parse compound literal without proper option.",
+ "option": {"specVersion": "json-ld-1.1"},
+ "input": "fromRdf/di03-in.nq",
+ "expect": "fromRdf/di03-out.jsonld"
+ }, {
+ "@id": "#tdi04",
+ "@type": [ "jld:PositiveEvaluationTest", "jld:FromRDFTest" ],
+ "name": "rdfDirection: null with compound literal with direction and language",
+ "purpose": "Does not parse compound literal without proper option.",
+ "option": {"specVersion": "json-ld-1.1"},
+ "input": "fromRdf/di04-in.nq",
+ "expect": "fromRdf/di04-out.jsonld"
+ }, {
+ "@id": "#tdi05",
+ "@type": [ "jld:PositiveEvaluationTest", "jld:FromRDFTest" ],
+ "name": "rdfDirection: i18n-datatype with i18n literal with direction and no language",
+ "purpose": "Parses i18n datatype with proper option.",
+ "option": {"specVersion": "json-ld-1.1", "rdfDirection": "i18n-datatype", "normative": false},
+ "input": "fromRdf/di05-in.nq",
+ "expect": "fromRdf/di05-out.jsonld"
+ }, {
+ "@id": "#tdi06",
+ "@type": [ "jld:PositiveEvaluationTest", "jld:FromRDFTest" ],
+ "name": "rdfDirection: i18n-datatype with i18n literal with direction and language",
+ "purpose": "Parses i18n datatype with proper option.",
+ "option": {"specVersion": "json-ld-1.1", "rdfDirection": "i18n-datatype", "normative": false},
+ "input": "fromRdf/di06-in.nq",
+ "expect": "fromRdf/di06-out.jsonld"
+ }, {
+ "@id": "#tdi07",
+ "@type": [ "jld:PositiveEvaluationTest", "jld:FromRDFTest" ],
+ "name": "rdfDirection: i18n-datatype with compound literal with direction and no language",
+ "purpose": "Does not parse compound literal without proper option.",
+ "option": {"specVersion": "json-ld-1.1", "rdfDirection": "i18n-datatype", "normative": false},
+ "input": "fromRdf/di07-in.nq",
+ "expect": "fromRdf/di07-out.jsonld"
+ }, {
+ "@id": "#tdi08",
+ "@type": [ "jld:PositiveEvaluationTest", "jld:FromRDFTest" ],
+ "name": "rdfDirection: i18n-datatype with compound literal with direction and language",
+ "purpose": "Does not parse compound literal without proper option.",
+ "option": {"specVersion": "json-ld-1.1", "rdfDirection": "i18n-datatype", "normative": false},
+ "input": "fromRdf/di08-in.nq",
+ "expect": "fromRdf/di08-out.jsonld"
+ }, {
+ "@id": "#tdi09",
+ "@type": [ "jld:PositiveEvaluationTest", "jld:FromRDFTest" ],
+ "name": "rdfDirection: compound-literal with i18n literal with direction and no language",
+ "purpose": "Does not parse i18n datatype without proper option.",
+ "option": {"specVersion": "json-ld-1.1", "rdfDirection": "compound-literal", "normative": false},
+ "input": "fromRdf/di09-in.nq",
+ "expect": "fromRdf/di09-out.jsonld"
+ }, {
+ "@id": "#tdi10",
+ "@type": [ "jld:PositiveEvaluationTest", "jld:FromRDFTest" ],
+ "name": "rdfDirection: compound-literal with i18n literal with direction and language",
+ "purpose": "Does not parse i18n datatype without proper option.",
+ "option": {"specVersion": "json-ld-1.1", "rdfDirection": "compound-literal", "normative": false},
+ "input": "fromRdf/di10-in.nq",
+ "expect": "fromRdf/di10-out.jsonld"
+ }, {
+ "@id": "#tdi11",
+ "@type": [ "jld:PositiveEvaluationTest", "jld:FromRDFTest" ],
+ "name": "rdfDirection: compound-literal with compound literal with direction and no language",
+ "purpose": "Parses compound literal with proper option.",
+ "option": {"specVersion": "json-ld-1.1", "rdfDirection": "compound-literal", "normative": false},
+ "input": "fromRdf/di11-in.nq",
+ "expect": "fromRdf/di11-out.jsonld"
+ }, {
+ "@id": "#tdi12",
+ "@type": [ "jld:PositiveEvaluationTest", "jld:FromRDFTest" ],
+ "name": "rdfDirection: compound-literal with compound literal with direction and language",
+ "purpose": "Parses compound literal with proper option.",
+ "option": {"specVersion": "json-ld-1.1", "rdfDirection": "compound-literal", "normative": false},
+ "input": "fromRdf/di12-in.nq",
+ "expect": "fromRdf/di12-out.jsonld"
+ }, {
+ "@id": "#tjs01",
+ "@type": ["jld:PositiveEvaluationTest", "jld:FromRDFTest"],
+ "name": "JSON literal (boolean true)",
+ "purpose": "Tests creating property with rdf:type rdf:JSON to a JSON literal (boolean true).",
+ "input": "fromRdf/js01-in.nq",
+ "expect": "fromRdf/js01-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tjs02",
+ "@type": ["jld:PositiveEvaluationTest", "jld:FromRDFTest"],
+ "name": "JSON literal (boolean false)",
+ "purpose": "Tests creating property with rdf:type rdf:JSON to a JSON literal (boolean false).",
+ "input": "fromRdf/js02-in.nq",
+ "expect": "fromRdf/js02-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tjs03",
+ "@type": ["jld:PositiveEvaluationTest", "jld:FromRDFTest"],
+ "name": "JSON literal (double)",
+ "purpose": "Tests creating property with rdf:type rdf:JSON to a JSON literal (double).",
+ "input": "fromRdf/js03-in.nq",
+ "expect": "fromRdf/js03-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tjs04",
+ "@type": ["jld:PositiveEvaluationTest", "jld:FromRDFTest"],
+ "name": "JSON literal (double-zero)",
+ "purpose": "Tests creating property with rdf:type rdf:JSON to a JSON literal (double-zero).",
+ "input": "fromRdf/js04-in.nq",
+ "expect": "fromRdf/js04-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tjs05",
+ "@type": ["jld:PositiveEvaluationTest", "jld:FromRDFTest"],
+ "name": "JSON literal (integer)",
+ "purpose": "Tests creating property with rdf:type rdf:JSON to a JSON literal (integer).",
+ "input": "fromRdf/js05-in.nq",
+ "expect": "fromRdf/js05-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tjs06",
+ "@type": ["jld:PositiveEvaluationTest", "jld:FromRDFTest"],
+ "name": "JSON literal (object)",
+ "purpose": "Tests creating property with rdf:type rdf:JSON to a JSON literal (object).",
+ "input": "fromRdf/js06-in.nq",
+ "expect": "fromRdf/js06-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tjs07",
+ "@type": ["jld:PositiveEvaluationTest", "jld:FromRDFTest"],
+ "name": "JSON literal (array)",
+ "purpose": "Tests creating property with rdf:type rdf:JSON to a JSON literal (array).",
+ "input": "fromRdf/js07-in.nq",
+ "expect": "fromRdf/js07-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tjs08",
+ "@type": ["jld:NegativeEvaluationTest", "jld:FromRDFTest"],
+ "name": "Invalid JSON literal (bare-word)",
+ "purpose": "Processors must generate an error when deserializing an invalid JSON literal.",
+ "input": "fromRdf/js08-in.nq",
+ "expectErrorCode": "invalid JSON literal",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tjs09",
+ "@type": ["jld:NegativeEvaluationTest", "jld:FromRDFTest"],
+ "name": "Invalid JSON literal (invalid structure)",
+ "purpose": "Processors must generate an error when deserializing an invalid JSON literal.",
+ "input": "fromRdf/js09-in.nq",
+ "expectErrorCode": "invalid JSON literal",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tjs10",
+ "@type": ["jld:PositiveEvaluationTest", "jld:FromRDFTest"],
+ "name": "JSON literal (string)",
+ "purpose": "Tests creating property with rdf:type rdf:JSON to a JSON literal (string).",
+ "input": "fromRdf/js10-in.nq",
+ "expect": "fromRdf/js10-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tjs11",
+ "@type": ["jld:PositiveEvaluationTest", "jld:FromRDFTest"],
+ "name": "JSON literal (null)",
+ "purpose": "Tests creating property with rdf:type rdf:JSON to a JSON literal (null).",
+ "input": "fromRdf/js11-in.nq",
+ "expect": "fromRdf/js11-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tli01",
+ "@type": ["jld:PositiveEvaluationTest", "jld:FromRDFTest"],
+ "name": "@list containing empty @list",
+ "purpose": "List of lists",
+ "input": "fromRdf/li01-in.nq",
+ "expect": "fromRdf/li01-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tli02",
+ "@type": ["jld:PositiveEvaluationTest", "jld:FromRDFTest"],
+ "name": "@list containing multiple lists",
+ "purpose": "List of lists",
+ "input": "fromRdf/li02-in.nq",
+ "expect": "fromRdf/li02-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }, {
+ "@id": "#tli03",
+ "@type": ["jld:PositiveEvaluationTest", "jld:FromRDFTest"],
+ "name": "t0008 as interpreted for 1.1. ",
+ "purpose": "List of lists",
+ "input": "fromRdf/li02-in.nq",
+ "expect": "fromRdf/li02-out.jsonld",
+ "option": {"specVersion": "json-ld-1.1"}
+ }
+ ]
+}
diff --git a/test/jsonld/1.1/fromRdf/0001-in.nq b/test/jsonld/1.1/fromRdf/0001-in.nq
new file mode 100644
index 000000000..d2a4a3a60
--- /dev/null
+++ b/test/jsonld/1.1/fromRdf/0001-in.nq
@@ -0,0 +1,5 @@
+ .
+ .
+ "Plain" .
+ "2012-05-12"^^ .
+ "English"@en .
diff --git a/test/jsonld/1.1/fromRdf/0001-out.jsonld b/test/jsonld/1.1/fromRdf/0001-out.jsonld
new file mode 100644
index 000000000..c498d2b1b
--- /dev/null
+++ b/test/jsonld/1.1/fromRdf/0001-out.jsonld
@@ -0,0 +1,12 @@
+[
+ {
+ "@id": "http://example.com/Subj1",
+ "@type": ["http://example.com/Type"],
+ "http://example.com/prop1": [{"@id": "http://example.com/Obj1"}],
+ "http://example.com/prop2": [
+ {"@value": "Plain"},
+ {"@value": "2012-05-12", "@type": "http://www.w3.org/2001/XMLSchema#date"},
+ {"@value": "English", "@language": "en"}
+ ]
+ }
+]
diff --git a/test/jsonld/1.1/fromRdf/0002-in.nq b/test/jsonld/1.1/fromRdf/0002-in.nq
new file mode 100644
index 000000000..9ec666d26
--- /dev/null
+++ b/test/jsonld/1.1/fromRdf/0002-in.nq
@@ -0,0 +1,5 @@
+ "true"^^ .
+ "false"^^ .
+ "1"^^ .
+ "1.1"^^ .
+ "1.1E-1"^^ .
diff --git a/test/jsonld/1.1/fromRdf/0002-out.jsonld b/test/jsonld/1.1/fromRdf/0002-out.jsonld
new file mode 100644
index 000000000..5fc21685a
--- /dev/null
+++ b/test/jsonld/1.1/fromRdf/0002-out.jsonld
@@ -0,0 +1,27 @@
+[
+ {
+ "@id": "http://example.com/Subj1",
+ "http://example.com/prop": [
+ {
+ "@value": "true",
+ "@type": "http://www.w3.org/2001/XMLSchema#boolean"
+ },
+ {
+ "@value": "false",
+ "@type": "http://www.w3.org/2001/XMLSchema#boolean"
+ },
+ {
+ "@value": "1",
+ "@type": "http://www.w3.org/2001/XMLSchema#integer"
+ },
+ {
+ "@value": "1.1",
+ "@type": "http://www.w3.org/2001/XMLSchema#decimal"
+ },
+ {
+ "@value": "1.1E-1",
+ "@type": "http://www.w3.org/2001/XMLSchema#double"
+ }
+ ]
+ }
+]
diff --git a/test/jsonld/1.1/fromRdf/0003-in.nq b/test/jsonld/1.1/fromRdf/0003-in.nq
new file mode 100644
index 000000000..90054b2cb
--- /dev/null
+++ b/test/jsonld/1.1/fromRdf/0003-in.nq
@@ -0,0 +1,6 @@
+ .
+_:a .
+ _:a .
+ .
+ .
+ .
diff --git a/test/jsonld/1.1/fromRdf/0003-out.jsonld b/test/jsonld/1.1/fromRdf/0003-out.jsonld
new file mode 100644
index 000000000..ce60daef4
--- /dev/null
+++ b/test/jsonld/1.1/fromRdf/0003-out.jsonld
@@ -0,0 +1,19 @@
+[
+ {
+ "@id": "_:a",
+ "@type": ["http://example.com/SubType"]
+ },
+ {
+ "@id": "http://example.com/Subj1",
+ "@type": ["http://example.com/Type"],
+ "http://example.com/ref": [
+ {"@id": "_:a"},
+ {"@id": "http://example.com/Subj2"}
+ ]
+ },
+ {
+ "@id": "http://example.com/Subj2",
+ "@type": ["http://example.com/Type"],
+ "http://example.com/ref": [{"@id": "http://example.com/Subj1"}]
+ }
+]
diff --git a/test/jsonld/1.1/fromRdf/0004-in.nq b/test/jsonld/1.1/fromRdf/0004-in.nq
new file mode 100644
index 000000000..6e88e659b
--- /dev/null
+++ b/test/jsonld/1.1/fromRdf/0004-in.nq
@@ -0,0 +1,10 @@
+ .
+_:a "apple" .
+_:a _:b .
+_:b "bananna" .
+_:b .
+ _:a .
+ .
+_:c .
+_:c .
+ _:c .
diff --git a/test/jsonld/1.1/fromRdf/0004-out.jsonld b/test/jsonld/1.1/fromRdf/0004-out.jsonld
new file mode 100644
index 000000000..2dd24731a
--- /dev/null
+++ b/test/jsonld/1.1/fromRdf/0004-out.jsonld
@@ -0,0 +1,18 @@
+[
+ {
+ "@id": "http://example.com/Subj1",
+ "@type": ["http://example.com/Type"],
+ "http://example.com/literalList": [{
+ "@list": [
+ {"@value": "apple"},
+ {"@value": "bananna"}
+ ]
+ }],
+ "http://example.com/emptyList": [{
+ "@list": []
+ }],
+ "http://example.com/iriList": [{
+ "@list": [{"@id": "http://example.com/iri"}]
+ }]
+ }
+]
diff --git a/test/jsonld/1.1/fromRdf/0005-in.nq b/test/jsonld/1.1/fromRdf/0005-in.nq
new file mode 100644
index 000000000..d99820ecb
--- /dev/null
+++ b/test/jsonld/1.1/fromRdf/0005-in.nq
@@ -0,0 +1,9 @@
+ .
+ .
+_:a "a" .
+_:a _:b .
+_:b "b" .
+_:b .
+ _:a .
+ .
+ "Graph" .
diff --git a/test/jsonld/1.1/fromRdf/0005-out.jsonld b/test/jsonld/1.1/fromRdf/0005-out.jsonld
new file mode 100644
index 000000000..a87ac2ea7
--- /dev/null
+++ b/test/jsonld/1.1/fromRdf/0005-out.jsonld
@@ -0,0 +1,20 @@
+[
+ {
+ "@id": "http://example.com/U",
+ "@graph": [
+ {
+ "@id": "http://example.com/Subj1",
+ "@type": ["http://example.com/Type"],
+ "http://example.com/ref": [{"@id": "http://example.com/U"}],
+ "http://example.com/list": [{
+ "@list": [
+ {"@value": "a"},
+ {"@value": "b"}
+ ]
+ }]
+ }
+ ],
+ "@type": ["http://example.com/Graph"],
+ "http://example.com/name": [{"@value": "Graph"}]
+ }
+]
diff --git a/test/jsonld/1.1/fromRdf/0006-in.nq b/test/jsonld/1.1/fromRdf/0006-in.nq
new file mode 100644
index 000000000..0f3f0281c
--- /dev/null
+++ b/test/jsonld/1.1/fromRdf/0006-in.nq
@@ -0,0 +1,14 @@
+ .
+ .
+ _:a .
+_:a "a" .
+_:a _:b .
+_:b "b" .
+_:b .
+ .
+ .
+ _:c .
+_:c "c" .
+_:c _:d .
+_:d "d" .
+_:d .
diff --git a/test/jsonld/1.1/fromRdf/0006-out.jsonld b/test/jsonld/1.1/fromRdf/0006-out.jsonld
new file mode 100644
index 000000000..9bbdbaa63
--- /dev/null
+++ b/test/jsonld/1.1/fromRdf/0006-out.jsonld
@@ -0,0 +1,34 @@
+[
+ {
+ "@id": "http://example.com/U",
+ "@graph": [
+ {
+ "@id": "http://example.com/Subj1",
+ "@type": ["http://example.com/Type"],
+ "http://example.com/ref": [{"@id": "http://example.com/U"}],
+ "http://example.com/list": [{
+ "@list": [
+ {"@value": "a"},
+ {"@value": "b"}
+ ]
+ }]
+ }
+ ]
+ },
+ {
+ "@id": "http://example.com/V",
+ "@graph": [
+ {
+ "@id": "http://example.com/Subj1",
+ "@type": ["http://example.com/Type2"],
+ "http://example.com/ref": [{"@id": "http://example.com/V"}],
+ "http://example.com/list": [{
+ "@list": [
+ {"@value": "c"},
+ {"@value": "d"}
+ ]
+ }]
+ }
+ ]
+ }
+]
diff --git a/test/jsonld/1.1/fromRdf/0007-in.nq b/test/jsonld/1.1/fromRdf/0007-in.nq
new file mode 100644
index 000000000..ad8557af0
--- /dev/null
+++ b/test/jsonld/1.1/fromRdf/0007-in.nq
@@ -0,0 +1,5 @@
+ .
+ "http://gregkellogg.net/foaf#me" .
+ .
+ "http://www.statistik-berlin-brandenburg.de/" .
+ "3499879"^^ .
diff --git a/test/jsonld/1.1/fromRdf/0007-out.jsonld b/test/jsonld/1.1/fromRdf/0007-out.jsonld
new file mode 100644
index 000000000..e837c6d40
--- /dev/null
+++ b/test/jsonld/1.1/fromRdf/0007-out.jsonld
@@ -0,0 +1,27 @@
+[
+ {
+ "@id": "http://data.wikipedia.org/snaks/Assertions",
+ "@type": ["http://data.wikipedia.org/vocab#SnakSet"],
+ "http://data.wikipedia.org/vocab#assertedBy": [{"@value": "http://gregkellogg.net/foaf#me"}
+ ],
+ "@graph": [
+ {
+ "@id": "http://data.wikipedia.org/snaks/BerlinFact",
+ "@type": ["http://data.wikipedia.org/vocab#Snak"],
+ "http://data.wikipedia.org/vocab#assertedBy": [{"@value": "http://www.statistik-berlin-brandenburg.de/"}]
+ }
+ ]
+ },
+ {
+ "@id": "http://data.wikipedia.org/snaks/BerlinFact",
+ "@graph": [
+ {
+ "@id": "http://en.wikipedia.org/wiki/Berlin",
+ "http://data.wikipedia.org/vocab#population": [{
+ "@value": "3499879",
+ "@type": "http://www.w3.org/2001/XMLSchema#integer"
+ }]
+ }
+ ]
+ }
+]
diff --git a/test/jsonld/1.1/fromRdf/0008-in.nq b/test/jsonld/1.1/fromRdf/0008-in.nq
new file mode 100644
index 000000000..878e33edd
--- /dev/null
+++ b/test/jsonld/1.1/fromRdf/0008-in.nq
@@ -0,0 +1,28 @@
+ _:outerlist .
+_:outerlist _:lista .
+_:outerlist _:b0 .
+
+_:lista "a1" .
+_:lista _:a2 .
+_:a2 "a2" .
+_:a2 _:a3 .
+_:a3 "a3" .
+_:a3 .
+
+_:c0 _:c1 .
+_:c0 .
+_:c1 "c1" .
+_:c1 _:c2 .
+_:c2 "c2" .
+_:c2 _:c3 .
+_:c3 "c3" .
+_:c3 .
+
+_:b0 _:b1 .
+_:b0 _:c0 .
+_:b1 "b1" .
+_:b1 _:b2 .
+_:b2 "b2" .
+_:b2 _:b3 .
+_:b3 "b3" .
+_:b3 .
diff --git a/test/jsonld/1.1/fromRdf/0008-out.jsonld b/test/jsonld/1.1/fromRdf/0008-out.jsonld
new file mode 100644
index 000000000..ce6e1822a
--- /dev/null
+++ b/test/jsonld/1.1/fromRdf/0008-out.jsonld
@@ -0,0 +1,50 @@
+[
+ {
+ "@id": "_:b1",
+ "http://www.w3.org/1999/02/22-rdf-syntax-ns#first": [ { "@value": "b1" } ],
+ "http://www.w3.org/1999/02/22-rdf-syntax-ns#rest": [
+ {
+ "@list": [
+ { "@value": "b2" },
+ { "@value": "b3" }
+ ]
+ }
+ ]
+ },
+ {
+ "@id": "_:c1",
+ "http://www.w3.org/1999/02/22-rdf-syntax-ns#first": [ { "@value": "c1" } ],
+ "http://www.w3.org/1999/02/22-rdf-syntax-ns#rest": [
+ {
+ "@list": [
+ { "@value": "c2" },
+ { "@value": "c3" }
+ ]
+ }
+ ]
+ },
+ {
+ "@id": "_:lista",
+ "http://www.w3.org/1999/02/22-rdf-syntax-ns#first": [ { "@value": "a1" } ],
+ "http://www.w3.org/1999/02/22-rdf-syntax-ns#rest": [
+ {
+ "@list": [
+ { "@value": "a2" },
+ { "@value": "a3" }
+ ]
+ }
+ ]
+ },
+ {
+ "@id": "http://example.com",
+ "http://example.com/property": [
+ {
+ "@list": [
+ { "@id": "_:lista" },
+ { "@id": "_:b1" },
+ { "@id": "_:c1" }
+ ]
+ }
+ ]
+ }
+]
diff --git a/test/jsonld/1.1/fromRdf/0009-in.nq b/test/jsonld/1.1/fromRdf/0009-in.nq
new file mode 100644
index 000000000..91fff6bdc
--- /dev/null
+++ b/test/jsonld/1.1/fromRdf/0009-in.nq
@@ -0,0 +1,7 @@
+ .
+ "a" .
+ _:b .
+_:b "b" .
+_:b _:c .
+_:c "c" .
+_:c .
diff --git a/test/jsonld/1.1/fromRdf/0009-out.jsonld b/test/jsonld/1.1/fromRdf/0009-out.jsonld
new file mode 100644
index 000000000..e58e75635
--- /dev/null
+++ b/test/jsonld/1.1/fromRdf/0009-out.jsonld
@@ -0,0 +1,18 @@
+[
+ {
+ "@id": "http://example.com",
+ "http://example.com/property": [ { "@id": "http://example.com/list" } ]
+ },
+ {
+ "@id": "http://example.com/list",
+ "http://www.w3.org/1999/02/22-rdf-syntax-ns#first": [ { "@value": "a" } ],
+ "http://www.w3.org/1999/02/22-rdf-syntax-ns#rest": [
+ {
+ "@list": [
+ { "@value": "b" },
+ { "@value": "c" }
+ ]
+ }
+ ]
+ }
+]
diff --git a/test/jsonld/1.1/fromRdf/0010-in.nq b/test/jsonld/1.1/fromRdf/0010-in.nq
new file mode 100644
index 000000000..be9e012d6
--- /dev/null
+++ b/test/jsonld/1.1/fromRdf/0010-in.nq
@@ -0,0 +1,6 @@
+ _:a .
+_:a "a" .
+_:a _:b .
+_:b "b" .
+_:b _:c .
+_:c "c" .
diff --git a/test/jsonld/1.1/fromRdf/0010-out.jsonld b/test/jsonld/1.1/fromRdf/0010-out.jsonld
new file mode 100644
index 000000000..54036dd6f
--- /dev/null
+++ b/test/jsonld/1.1/fromRdf/0010-out.jsonld
@@ -0,0 +1,20 @@
+[
+ {
+ "@id": "_:a",
+ "http://www.w3.org/1999/02/22-rdf-syntax-ns#first": [ { "@value": "a" } ],
+ "http://www.w3.org/1999/02/22-rdf-syntax-ns#rest": [ { "@id": "_:b" } ]
+ },
+ {
+ "@id": "_:b",
+ "http://www.w3.org/1999/02/22-rdf-syntax-ns#first": [ { "@value": "b" } ],
+ "http://www.w3.org/1999/02/22-rdf-syntax-ns#rest": [ { "@id": "_:c" } ]
+ },
+ {
+ "@id": "_:c",
+ "http://www.w3.org/1999/02/22-rdf-syntax-ns#first": [ { "@value": "c" } ]
+ },
+ {
+ "@id": "http://example.com",
+ "http://example.com/property": [ { "@id": "_:a" } ]
+ }
+]
diff --git a/test/jsonld/1.1/fromRdf/0011-in.nq b/test/jsonld/1.1/fromRdf/0011-in.nq
new file mode 100644
index 000000000..ef5257101
--- /dev/null
+++ b/test/jsonld/1.1/fromRdf/0011-in.nq
@@ -0,0 +1,8 @@
+ _:a .
+_:a "a" .
+_:a _:b .
+_:b "b" .
+_:b "This list node has also properties other than rdf:first and rdf:rest" .
+_:b _:c .
+_:c "c" .
+_:c .
diff --git a/test/jsonld/1.1/fromRdf/0011-out.jsonld b/test/jsonld/1.1/fromRdf/0011-out.jsonld
new file mode 100644
index 000000000..811e31c2e
--- /dev/null
+++ b/test/jsonld/1.1/fromRdf/0011-out.jsonld
@@ -0,0 +1,25 @@
+[
+ {
+ "@id": "_:a",
+ "http://www.w3.org/1999/02/22-rdf-syntax-ns#first": [ { "@value": "a" } ],
+ "http://www.w3.org/1999/02/22-rdf-syntax-ns#rest": [ { "@id": "_:b" } ]
+ },
+ {
+ "@id": "_:b",
+ "http://example.com/other-property": [
+ { "@value": "This list node has also properties other than rdf:first and rdf:rest" }
+ ],
+ "http://www.w3.org/1999/02/22-rdf-syntax-ns#first": [ { "@value": "b" } ],
+ "http://www.w3.org/1999/02/22-rdf-syntax-ns#rest": [
+ {
+ "@list": [
+ { "@value": "c" }
+ ]
+ }
+ ]
+ },
+ {
+ "@id": "http://example.com",
+ "http://example.com/property": [ { "@id": "_:a" } ]
+ }
+]
diff --git a/test/jsonld/1.1/fromRdf/0012-in.nq b/test/jsonld/1.1/fromRdf/0012-in.nq
new file mode 100644
index 000000000..d8edbdc1e
--- /dev/null
+++ b/test/jsonld/1.1/fromRdf/0012-in.nq
@@ -0,0 +1,7 @@
+ _:a .
+_:a "a" .
+_:a _:b .
+_:b "b" .
+_:b _:c .
+_:c "c" .
+_:c _:b .
diff --git a/test/jsonld/1.1/fromRdf/0012-out.jsonld b/test/jsonld/1.1/fromRdf/0012-out.jsonld
new file mode 100644
index 000000000..b33cc8ef9
--- /dev/null
+++ b/test/jsonld/1.1/fromRdf/0012-out.jsonld
@@ -0,0 +1,21 @@
+[
+ {
+ "@id": "_:a",
+ "http://www.w3.org/1999/02/22-rdf-syntax-ns#first": [ { "@value": "a" } ],
+ "http://www.w3.org/1999/02/22-rdf-syntax-ns#rest": [ { "@id": "_:b" } ]
+ },
+ {
+ "@id": "_:b",
+ "http://www.w3.org/1999/02/22-rdf-syntax-ns#first": [ { "@value": "b" } ],
+ "http://www.w3.org/1999/02/22-rdf-syntax-ns#rest": [ { "@id": "_:c" } ]
+ },
+ {
+ "@id": "_:c",
+ "http://www.w3.org/1999/02/22-rdf-syntax-ns#first": [ { "@value": "c" } ],
+ "http://www.w3.org/1999/02/22-rdf-syntax-ns#rest": [ { "@id": "_:b" } ]
+ },
+ {
+ "@id": "http://example.com",
+ "http://example.com/property": [ { "@id": "_:a" } ]
+ }
+]
diff --git a/test/jsonld/1.1/fromRdf/0013-in.nq b/test/jsonld/1.1/fromRdf/0013-in.nq
new file mode 100644
index 000000000..45ac1caba
--- /dev/null
+++ b/test/jsonld/1.1/fromRdf/0013-in.nq
@@ -0,0 +1,8 @@
+ _:a .
+_:a "a" .
+_:a _:b .
+_:b "b1" .
+_:b