Sha256: 574aeb9c826006b5732c246ab73b95103551a2273f21c23ea65ae5c0919a0a56
Contents?: true
Size: 542 Bytes
Versions: 15
Compression:
Stored size: 542 Bytes
Contents
# frozen_string_literal: true ## # These patches are necessary for the postgres adapter to build JSON-LD versions # of RDF objects when `to_json` is called on them - that way they're stored in # the database as a standard format. module RDF class Literal def as_json(*_args) ::JSON::LD::API.fromRdf([RDF::Statement.new(RDF::URI(""), RDF::URI(""), self)])[0][""][0] end end class URI def as_json(*_args) ::JSON::LD::API.fromRdf([RDF::Statement.new(RDF::URI(""), RDF::URI(""), self)])[0][""][0] end end end
Version data entries
15 entries across 15 versions & 1 rubygems