Module: JSON::LD
- Defined in:
- lib/json/ld.rb,
lib/json/ld/api.rb,
lib/json/ld/frame.rb,
lib/json/ld/utils.rb,
lib/json/ld/expand.rb,
lib/json/ld/format.rb,
lib/json/ld/reader.rb,
lib/json/ld/to_rdf.rb,
lib/json/ld/writer.rb,
lib/json/ld/compact.rb,
lib/json/ld/context.rb,
lib/json/ld/flatten.rb,
lib/json/ld/from_rdf.rb,
lib/json/ld/resource.rb,
lib/json/ld/streaming_writer.rb
Overview
**‘JSON::LD`** is a JSON-LD extension for RDF.rb.
Defined Under Namespace
Modules: Compact, Expand, Flatten, Frame, FromRDF, StreamingWriter, ToRDF, Utils, VERSION Classes: API, BlankNodeMapper, BlankNodeNamer, BlankNodeUniqer, Context, Format, InvalidFrame, JsonLdError, Reader, Resource, Writer
Constant Summary collapse
- INITIAL_CONTEXT =
Initial context
{ RDF.type.to_s => {"@type" => "@id"} }.freeze
- KEYWORDS =
%w( @base @container @context @default @embed @embedChildren @explicit @id @index @graph @language @list @omitDefault @reverse @set @type @value @vocab ).freeze
- NC_REGEXP =
Regexp matching an NCName.
Regexp.new( %{^ (?!\\\\u0301) # ́ is a non-spacing acute accent. # It is legal within an XML Name, but not as the first character. ( [a-zA-Z_] | \\\\u[0-9a-fA-F] ) ( [0-9a-zA-Z_\.-] | \\\\u([0-9a-fA-F]{4}) )* $}, Regexp::EXTENDED)
- NATIVE_DATATYPES =
Datatypes that are expressed in a native form and don’t expand or compact
[RDF::XSD.integer.to_s, RDF::XSD.boolean.to_s, RDF::XSD.double.to_s]
- JSON_STATE =
JSON::State.new( indent: " ", space: " ", space_before: "", object_nl: "\n", array_nl: "\n" )