cognitect / transit-cljs

Transit for ClojureScript
http://transit-format.org
Apache License 2.0
323 stars 20 forks source link

Ability to ignore tags when reading JSON? #20

Closed ku1ik closed 8 years ago

ku1ik commented 8 years ago

I'm using transit-cljs because it's way faster than JSON.parse + js->clj. That's awesome.

I'm decoding user provided JSON files that happen to include ["~some stuff", ....] and these get decoded as [TaggedValue....] which breaks stuff. Users include my .js, point it to a JSON file so I can't transit-encode them upfront.

Is there a possibility to tell the transit/reader to stop treating tags in a special way?

dchelimsky commented 8 years ago

There is no API for that today, and it's really outside the objectives of the project. That said, the code is all here (and in transit-js) and you're free to extract the parts that make it a fast json reader for cljs (caching, etc).

ku1ik commented 8 years ago

Ok, thanks!

dchelimsky commented 8 years ago

If you do build something for this purpose, please feel free to let us know about it here on this thread. Maybe it'd help other folks who want the same thing. Cheers!

ku1ik commented 8 years ago

:+1: