Skip to content

Releases: ruby-rdf/json-ld

Release 2.2.0

13 Dec 23:11
Compare
Choose a tag to compare
  • Relax dependencies for 3.0 release.
  • Support expansion and compaction of simple named graphs (i.e., without an @id).
  • Support containers with both @graph and @id or @index.
  • Don't expand native types as IRIs.
  • Improve exception messages on invalid framing values when expanding.

Release 2.1.7

06 Oct 00:34
Compare
Choose a tag to compare

Performance optimizations (thanks to @jperville.

Release 2.1.5

10 Jul 22:20
Compare
Choose a tag to compare
  • Add support for compactToRelative flag.
  • Make simple_compact_iris the default (remove the option).
  • Terms to map to IRIs ending with a gen-delim (/ . [ ] @ :) may be used as prefixes (in processingMode 1.1, only for simple term definitions).
  • Add @prefix keyword to expanded term definition in 1.1 processing mode.
  • Allow empty lists to be compacted using a term with type @list.

Release 2.1.3

29 Apr 22:12
Compare
Choose a tag to compare

Release 2.1.2

31 Dec 19:59
Compare
Choose a tag to compare
  • Prep for RDF.rb 2.2 release.
  • Include more options in jsonld exe.
  • Use Numeric or Integer instead of Fixnum for Ruby 2.4.
  • Use RDF::URI instead of RDF::URI.new to avoid automatically turning URIs into hashes during parse.

Release 2.1.1

27 Dec 23:25
Compare
Choose a tag to compare

Updates matching work-in-progress on updated JSON-LD Framing Spec.

  • Change processing mode default to json-ld-1.1.
  • Special expansion code when mode is json-ld-1.1-frame-expansion.
  • Fix subject matching when @type: {}.
  • Deep frame matching.
  • Support for named graph framing.
  • Support list properties when framing.

Also:

  • Added Context.parse which brings together Context.new.parse.

Release 2.1.0

27 Dec 23:21
Compare
Choose a tag to compare

Version 2.1.0, requires RDF.rb ~> 2.1.

Release 2.0.1

14 Aug 19:01
Compare
Choose a tag to compare

Changes for Framing:

  • Add support for @reverse in frames.
  • Add framing and keep_free_floating_nodes option to expand and use when expanding frame.

Support for pre-loaded contexts

In many cases, for small documents, processing time can be dominated by loading and parsing remote contexts. In particular, a small schema.org example may need to download a large context and turn it into an internal representation, before the actual document can be expanded for processing. Using JSON::LD::Context.add_preloaded, an implementation can perform this loading up-front, and make it available to the processor.

ctx = JSON::LD::Context.new().parse('http://schema.org/')
JSON::LD::Context.add_preloaded('http://schema.org/', ctx)

On lookup, URIs with an https prefix are normalized to http.

A context may be serialized to Ruby to speed this process using Context#to_rb. When loaded, this generated file will add entries to the JSON::LD::Context::PRELOADED.

Use json-ld-preloaded gem to have popular contexts preloaded (note, this freezes these contexts at the time the gem is built).

  • Add Context::PRELOADED, and Context.add_preloaded. When parsing an otherwise loaded context, if it exists in PRELOADED, use that instead of remotely loading it. Avoids potentially expensive context parsing for common cases.
  • Generate lazy-loaded Ruby for defining a context from a loaded context. Initializes Context::PRELOADED for the context base.

General

  • Remove a lot of expensive debugging statements.
  • Use frozen string literals
  • Minimum Ruby version 2.2.2.

Release 2.0.0

14 Aug 18:55
Compare
Choose a tag to compare

Updates for RDF.rb 2.0

  • Add support for :logger option for doing debug output and use in specs.
  • Use RDF::Util::Logger.
  • Add expand, compact, flatten and format CLI commands. This duplicates the functionality of the jsonld command in the rdf command.

2.0 Beta Release

23 Feb 21:11
Compare
Choose a tag to compare
2.0 Beta Release Pre-release
Pre-release

Updates for RDF.rb 2.0 Beta release

  • Add support for :logger option for doing debug output and use in specs.
  • Use RDF::Util::Logger.
  • Add expand, compact, flatten and format CLI commands. This duplicates the functionality of the jsonld command in the rdf command.