lib/rdf/json/writer.rb
def format_literal(value, **options)
      case value
        when RDF::Literal then value.to_rdf_json.to_json
        else RDF::Literal.new(value).to_rdf_json.to_json
      end
    end
##
# Returns the RDF/JSON representation of a literal.
#
# @param  [RDF::Literal, String, #to_s] value
# @param  [Hash{Symbol => Object}] options
# @return [String]
Returns the RDF/JSON representation of a literal.
Returns the RDF / JSON representation of a literal .
def format_literal(value, **options)
      case value
        when RDF::Literal then value.to_rdf_json.to_json
        else RDF::Literal.new(value).to_rdf_json.to_json
      end
    end
def format_literal ( value , ** options ) case value when RDF :: Literal then value . to_rdf_json . to_json else RDF :: Literal . new ( value ) . to_rdf_json . to_json end end
Returns the RDF/JSON representation of a literal.
Returns the RDF / JSON representation of a literal .
None
String
value
options
None