lib/rdf/json/writer.rb in rdf-json-0.3.0 vs lib/rdf/json/writer.rb in rdf-json-1.0.0

- old
+ new

@@ -62,32 +62,32 @@ # # @param [RDF::Node] value # @param [Hash{Symbol => Object}] options # @return [String] def format_node(value, options = {}) - value.to_json + value.to_rdf_json.to_json end ## # Returns the RDF/JSON representation of a URI reference. # # @param [RDF::URI] value # @param [Hash{Symbol => Object}] options # @return [String] def format_uri(value, options = {}) - value.to_json + value.to_rdf_json.to_json end ## # Returns the RDF/JSON representation of a literal. # # @param [RDF::Literal, String, #to_s] value # @param [Hash{Symbol => Object}] options # @return [String] def format_literal(value, options = {}) case value - when RDF::Literal then value.to_json - else RDF::Literal.new(value).to_json + when RDF::Literal then value.to_rdf_json.to_json + else RDF::Literal.new(value).to_rdf_json.to_json end end end # Writer end # RDF::JSON