Skip to content

Commit 73bf2cf

Browse files
committed
Finish 3.1.4
2 parents a48d756 + 655075c commit 73bf2cf

28 files changed

+49376
-37086
lines changed

Gemfile

+1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ group :development do
3434
gem 'sxp', git: "https://github.com/dryruby/sxp.rb", branch: "develop"
3535
gem 'fasterer'
3636
gem 'earl-report'
37+
gem 'ruby-prof', platforms: :mri
3738
end
3839

3940
group :development, :test do

README.md

+7-1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@ JSON::LD can now be used to create a _context_ from an RDFS/OWL definition, and
1919

2020
Install with `gem install json-ld`
2121

22+
### JSON-LD Streaming Profile
23+
This gem implements an optimized streaming reader used for generating RDF from large dataset dumps formatted as JSON-LD. Such documents must correspond to the [JSON-LD Streaming Profile](https://w3c.github.io/json-ld-streaming/):
24+
25+
* Keys in JSON objects must be ordered with any of `@context`, and/or `@type` coming before any other keys, in that order. This includes aliases of those keys. It is strongly encouraged that `@id` be present, and come immediately after.
26+
* JSON-LD documents can be signaled or requested in [streaming document form](https://w3c.github.io/json-ld-streaming/#dfn-streaming-document-form). The profile URI identifying the [streaming document form](https://w3c.github.io/json-ld-streaming/#dfn-streaming-document-form) is `http://www.w3.org/ns/json-ld#streaming`.
27+
2228
### MultiJson parser
2329
The [MultiJson](https://rubygems.org/gems/multi_json) gem is used for parsing JSON; this defaults to the native JSON parser, but will use a more performant parser if one is available. A specific parser can be specified by adding the `:adapter` option to any API call. See [MultiJson](https://rubygems.org/gems/multi_json) for more information.
2430

@@ -230,7 +236,7 @@ In some cases, the built-in document loader {JSON::LD::API.documentLoader} is in
230236

231237
All entries into the {JSON::LD::API} accept a `:documentLoader` option, which can be used to provide an alternative method to use when loading remote documents. For example:
232238
```ruby
233-
def load_document_local(url, options={}, &block)
239+
load_document_local = Proc.new do |url, **options, &block|
234240
if RDF::URI(url, canonicalize: true) == RDF::URI('http://schema.org/')
235241
remote_document = JSON::LD::API::RemoteDocument.new(url, File.read("etc/schema.org.jsonld"))
236242
return block_given? ? yield(remote_document) : remote_document

VERSION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.1.3
1+
3.1.4

0 commit comments

Comments
 (0)