You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+4-5
Original file line number
Diff line number
Diff line change
@@ -32,10 +32,10 @@ This gem also implements an optimized streaming writer used for generating JSON-
32
32
* Each statement written as a separate node in expanded/flattened form.
33
33
*`RDF List`s are written as separate nodes using `rdf:first` and `rdf:rest` properties.
34
34
35
-
The order of triples retrieved from the `RDF::Enumerable` dataset determines the way that JSON-LD node objects are written; for best results, statements should be ordered by _graph name_, _subect_, _predicate_ and _object_.
35
+
The order of triples retrieved from the `RDF::Enumerable` dataset determines the way that JSON-LD node objects are written; for best results, statements should be ordered by _graph name_, _subject_, _predicate_ and _object_.
36
36
37
37
### MultiJson parser
38
-
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.
38
+
The [MultiJson](https://rubygems.org/gems/multi_json) gem is used for parsing and serializing JSON; this defaults to the native JSON parser/serializer, 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. Additionally, a custom serialilzer may be specified by passing the `:serializer` option to {JSON::LD::Writer} or methods of {JSON::LD::API}. See [MultiJson](https://rubygems.org/gems/multi_json) for more information.
39
39
40
40
### JSON-LD-star (RDFStar)
41
41
@@ -624,8 +624,7 @@ To get a local working copy of the development repository, do:
624
624
which you will be asked to agree to on the first commit to a repo within the organization.
625
625
Note that the agreement applies to all repos in the [Ruby RDF](https://github.com/ruby-rdf/) organization.
626
626
627
-
License
628
-
-------
627
+
## License
629
628
630
629
This is free and unencumbered public domain software. For more information,
631
630
see <https://unlicense.org/> or the accompanying {file:UNLICENSE} file.
@@ -641,7 +640,7 @@ see <https://unlicense.org/> or the accompanying {file:UNLICENSE} file.
# The JSON-LD object to copy and perform the expansion upon.
159
+
# @param [Proc] serializer (nil)
160
+
# A Serializer method used for generating the JSON serialization of the result. If absent, the internal Ruby objects are returned, which can be transformed to JSON externally via `#to_json`.
# The base context to use when compacting the input.
212
+
# @param [Proc] serializer (nil)
213
+
# A Serializer instance used for generating the JSON serialization of the result. If absent, the internal Ruby objects are returned, which can be transformed to JSON externally via `#to_json`.
214
+
# See {JSON::LD::API.serializer}.
207
215
# @param [Boolean] expanded (false) Input is already expanded
# An optional external context to use additionally to the context embedded in input when expanding the input.
253
262
# @param [Boolean] expanded (false) Input is already expanded
263
+
# @param [Proc] serializer (nil)
264
+
# A Serializer instance used for generating the JSON serialization of the result. If absent, the internal Ruby objects are returned, which can be transformed to JSON externally via `#to_json`.
# The resulting `Array` is either returned or yielded, if a block is given.
529
544
#
530
545
# @param [RDF::Enumerable] input
546
+
# @param [Boolean] useRdfType (false)
547
+
# If set to `true`, the JSON-LD processor will treat `rdf:type` like a normal property instead of using `@type`.
548
+
# @param [Boolean] useNativeTypes (false) use native representations
549
+
# @param [Proc] serializer (nil)
550
+
# A Serializer instance used for generating the JSON serialization of the result. If absent, the internal Ruby objects are returned, which can be transformed to JSON externally via `#to_json`.
551
+
# See {JSON::LD::API.serializer}.
531
552
# @param [Hash{Symbol => Object}] options
532
553
# @option options (see #initialize)
533
-
# @option options [Boolean] :useRdfType (false)
534
-
# If set to `true`, the JSON-LD processor will treat `rdf:type` like a normal property instead of using `@type`.
535
-
# @option options [Boolean] :useNativeTypes (false) use native representations
536
554
# @yield jsonld
537
555
# @yieldparam [Hash] jsonld
538
556
# The JSON-LD document in expanded form
539
557
# @yieldreturn [Object] returned object
540
558
# @return [Object, Hash]
541
559
# If a block is given, the result of evaluating the block is returned, otherwise, the expanded JSON-LD document
raiseJSON::LD::JsonLdError::LoadingDocumentFailed,"Script tag has type=#{element.attributes['type']}"unlesselement.attributes['type'].to_s.start_with?('application/ld+json')
0 commit comments