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

Enable to configure cljs-http.core/jsonp if response keys are keywordized #86

Closed
jindrichmynarz opened this issue Dec 16, 2015 · 2 comments

Comments

@jindrichmynarz
Copy link
Contributor

I need cljs-http.core/jsonp not to keywordize response keys (https://github.com/r0man/cljs-http/blob/master/src/cljs_http/core.cljs#L116), because the keys in the JSON I'm requesting contain slashes and are thus (incorrectly) casted to namespaced keywords. Currently, keywordization is hard-coded, so it's not possible to disable it. Is it possible to add an option to configure if keys would be keywordized (defaulting to true to maintain compatibility)?

@r0man
Copy link
Owner

r0man commented Dec 16, 2015

@jindrichmynarz Yes, patch with test welcome!

@jindrichmynarz
Copy link
Contributor Author

I drafted a solution to this issue in #87, aiming for minimal changes to the library. Additional changes may include reducing the boilerplate in JSON-P tests, reusing cljs-http.util/json-decode in cljs-http.core/jsonp, and enabling to set :keywordize-keys there as well.

@r0man r0man closed this as completed in 883e4a0 Dec 17, 2015
r0man added a commit that referenced this issue Dec 17, 2015
Enable to switch off keywordization of JSON-P responses. Fixes #86.
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