Sha256: 9a915d333e15daeeae1dc43d8b7d32918f3648a1d4759b05912d0c058693da81

Contents?: true

Size: 1.53 KB

Versions: 6

Compression:

Stored size: 1.53 KB

Contents

require 'rdf' # @see http://rubygems.org/gems/rdf

module RDF
  ##
  # **`RDF::JSON`** is an RDF/JSON extension for RDF.rb.
  #
  # @example Requiring the `RDF::JSON` module
  #   require 'rdf/json'
  #
  # @example Parsing RDF statements from an RDF/JSON file
  #   RDF::JSON::Reader.open("etc/doap.json") do |reader|
  #     reader.each_statement do |statement|
  #       puts statement.inspect
  #     end
  #   end
  #
  # @example Serializing RDF statements into an RDF/JSON file
  #   RDF::JSON::Writer.open("etc/test.json") do |writer|
  #     graph.each_statement do |statement|
  #       writer << statement
  #     end
  #   end
  #
  # @example Serializing RDF values into RDF/JSON strings
  #   RDF::Node.new('foobar').to_rdf_json.to_json
  #   RDF::URI.new("http://rdf.rubyforge.org/").to_rdf_json.to_json
  #   RDF::Literal.new("Hello, world!").to_rdf_json
  #   RDF::Literal.new("Hello, world!", :language => 'en-US').to_rdf_json.to_json
  #   RDF::Literal.new(3.1415).to_rdf_json.to_json
  #   RDF::Literal.new('true', :datatype => RDF::XSD.boolean).to_rdf_json.to_json
  #   RDF::Statement.new(s, p, o).to_rdf_json.to_json
  #
  # @see http://rdf.rubyforge.org/
  # @see http://n2.talis.com/wiki/RDF_JSON_Specification
  # @see http://en.wikipedia.org/wiki/JSON
  #
  # @author [Arto Bendiken](http://ar.to/)
  module JSON
    require 'json'
    require 'rdf/json/extensions'
    require 'rdf/json/format'
    autoload :Reader,  'rdf/json/reader'
    autoload :Writer,  'rdf/json/writer'
    autoload :VERSION, 'rdf/json/version'
  end # JSON
end # RDF

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
rdf-json-2.0.0 lib/rdf/json.rb
rdf-json-2.0.0.beta1 lib/rdf/json.rb
rdf-json-1.99.0 lib/rdf/json.rb
rdf-json-1.1.2.1 lib/rdf/json.rb
rdf-json-1.1.2 lib/rdf/json.rb
rdf-json-1.1.1 lib/rdf/json.rb