Comments (1)
When reading in the clojure reader the reader fails when it reads an unknown tag.
(clojure.edn/read-string "#unknown-tag [1 2 3]")
;; => Exception: No reader function for tag unknown-tag
You can, however give the reader a default tag, like tagged-literal
(clojure.edn/read-string {:default tagged-literal} "#unknown-tag [1 2 3]")
;; => #unknown-tag [1 2 3]
But this tagged litteral (of class clojure.lang.TaggedLiteral
) has no particular meaning inside your application, it just serializes to the same thing as it was read as.
So, no, there is no sane default here. If your application is unaware of the meaning of the data it shuffles around, fine, use tagged-litteral, otherwise you better give your EDN-reader the nescessary tag->function-mapping to parse the data.
from edn.
Related Issues (20)
- The edn spec inaccurately describes what characters are allowed in symbols. HOT 3
- json-ld, #iri HOT 1
- Ratio datatype is not part of the spec even though clojure.edn supports it. HOT 6
- Support for not-a-number or non-finite floating point values HOT 1
- Single-quote is not mentioned as a valid symbol character HOT 5
- Spec allows consecutive colons in symbols and keywords HOT 3
- Can Keywords contain escape characters? HOT 1
- Support for cyclic data HOT 2
- Tagged Elements Issue? HOT 3
- Make the spec concrete already HOT 5
- edn spec does not yet include namespace map syntax
- Reader flag to support unicode escapes in string literals HOT 2
- ns alias HOT 2
- Issue in the spec for keywords
- Alternative string quote syntax HOT 7
- An example of edn file HOT 1
- BNF is absent
- Provide a testsuite for EDN format
- JSON query results output option HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from edn.