Swirrl / grafter

Linked Data & RDF Manufacturing Tools in Clojure
Eclipse Public License 1.0
190 stars 17 forks source link

datatype-uri returns wrong URI's & is out of sync with serialisation #93

Open RickMoynihan opened 7 years ago

RickMoynihan commented 7 years ago

e.g.

(datatype-uri 10) ;; => #object[java.net.URI 0x13fb0262 "http://www.w3.org/2001/XMLSchema#integer"]

Which is wrong, but if you serialise the same object (a clojure long) you get:

"11"^^<http://www.w3.org/2001/XMLSchema#long>

which is what datatype-uri should return.

Ideally the serialisation mechanism would also be built in terms of datatype-uri

scottlowe commented 4 years ago

https://github.com/Swirrl/grafter/blob/7c1f6184b8fbe95f8a78d39d38d56db76068e8e7/src/grafter_2/rdf/protocols.cljc#L352-L354