Module: RDF::JSON::Extensions

Defined in:


RDF/JSON extensions for RDF.rb core classes and mixins.

Classes are extended with two new instance methods:

  • #to_rdf_json returns the RDF/JSON representation as a Hash object.
  • #to_rdf_json.to_json returns the serialized RDF/JSON representation as a string.


Serializing blank nodes into RDF/JSON format

Serializing URI references into RDF/JSON format"").to_rdf_json.to_json

Serializing plain literals into RDF/JSON format"Hello, world!").to_rdf_json.to_json

Serializing language-tagged literals into RDF/JSON format"Hello, world!", :language => 'en-US').to_rdf_json.to_json

Serializing datatyped literals into RDF/JSON format'true', :datatype => RDF::XSD.boolean).to_rdf_json.to_json

Serializing statements into RDF/JSON format, p, o).to_rdf_json.to_json

Serializing enumerables into RDF/JSON format

[, p, o)].extend(RDF::Enumerable).to_rdf_json.to_json

Defined Under Namespace

Modules: Enumerable, Graph, Literal, Node, Repository, Statement, Transaction, URI