Skip to content

Should be able to encode-to/decode-from JS objects, not just strings #7

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
favila opened this issue Jan 10, 2014 · 4 comments
Closed

Comments

@favila
Copy link

favila commented Jan 10, 2014

Working from intermediate JS objects instead of going all the way down to string would be useful (and probably faster) in structured cloning contexts (indexeddb, web workers, etc). I am eager to create a pull request at least for the cljs side, but I wanted to gauge interest and feasibility.

@favila
Copy link
Author

favila commented Jan 10, 2014

By "JS objects" I of course mean JSON-encodeable (or a least structured-cloneable) JS object/array/primitive trees, not arbitrary objects.

@micha
Copy link
Member

micha commented Jan 10, 2014

You are talking about clj data <--> JS data ready for JSON stringification? Because the #'tailrecursion.cljson/encode and #'tailrecursion.cljson/decode functions do that.

@favila
Copy link
Author

favila commented Jan 11, 2014

Yes you are right, didn't see those. Any reason these are not part of the public API?

@favila favila closed this as completed Jan 11, 2014
@micha
Copy link
Member

micha commented Jan 11, 2014

In the queue for next version. See here: #8.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants