Skip to content
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

Coerce JS objects? #258

Open
pepijndevos opened this issue Aug 30, 2021 · 2 comments
Open

Coerce JS objects? #258

pepijndevos opened this issue Aug 30, 2021 · 2 comments

Comments

@pepijndevos
Copy link

I was trying to coerce some data that came from JS land. After you do js-clj it works nicely, but of course this creates a bunch of extra intermediate values. For example a JS array first gets converted to a vector, and then again to a set.

Would it be possible to add a few transforms that coerce JS values directly?

@ikitommi
Copy link
Member

sure, PR welcome!

@pepijndevos
Copy link
Author

Awesome. Any pointers on what this would entail? I found this code but I'm not really sure how it works and what I'd need to add to support JS objects.

(def json-type-decoders

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