Sha256: 1758bed80e0f8bec9c6aa0df16cb924f03bc767edab2e03c6ea7aea145cbb5d0
Contents?: true
Size: 1.4 KB
Versions: 1
Compression:
Stored size: 1.4 KB
Contents
$:.unshift(File.expand_path(File.join(File.dirname(__FILE__), '..'))) require 'rdf' # @see http://rubygems.org/gems/rdf module JSON ## # **`JSON::LD`** is a JSON-LD plugin for RDF.rb. # # @example Requiring the `JSON::LD` module # require 'json/ld' # # @example Parsing RDF statements from a JSON-LD file # JSON::LD::Reader.open("etc/foaf.jld") do |reader| # reader.each_statement do |statement| # puts statement.inspect # end # end # # @see http://rdf.rubyforge.org/ # @see http://www.w3.org/TR/REC-rdf-syntax/ # # @author [Gregg Kellogg](http://greggkellogg.net/) module LD require 'json' require 'json/ld/extensions' require 'json/ld/format' autoload :Normalize, 'json/ld/normalize' autoload :Reader, 'json/ld/reader' autoload :VERSION, 'json/ld/version' autoload :Writer, 'json/ld/writer' # Default context # @see http://json-ld.org/spec/ED/20110507/#the-default-context DEFAULT_CONTEXT = { '@coerce' => { '@iri' => ['@type'] } }.freeze # Default type coercion, in property => datatype order DEFAULT_COERCE = { '@type' => '@iri', RDF.first.to_s => false, # Make sure @coerce isn't generated for this RDF.rest.to_s => '@iri', }.freeze def self.debug?; @debug; end def self.debug=(value); @debug = value; end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
json-ld-0.0.8 | lib/json/ld.rb |