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

error in representation.clj #14

Closed
boxxxie opened this issue Dec 11, 2012 · 2 comments
Closed

error in representation.clj #14

boxxxie opened this issue Dec 11, 2012 · 2 comments

Comments

@boxxxie
Copy link

boxxxie commented Dec 11, 2012

(defmethod render-map-generic "application/json" [data context]
  (with-out-str (json/print-json data)))

when running a subset of the example code (as it doesn't work for unrelated reasons) i get this when launching my ring server

Exception in thread "main" java.lang.RuntimeException: No such var: json/print-json, compiling:(liberator/representation.clj:79)
...

looking at the data.json API (http://clojure.github.com/data.json/#clojure.data.json/print-json) i see that the offending method is deprecated, and looking at recent code it appears that the function is gone.

the API states this 'DEPRECATED; replaced by 'write' to out.' about print-json. maybe line 79 of representation.clj should change to reflect the new api of data.json.

@ordnungswidrig
Copy link
Member

I cannot reproduce this. Liberator depends on data.json 0.1.2 which still defines print-json. Cannot please tell me which version of liberator you were using?

Nevertheless I will update version of the dependencies with the next release.

@boxxxie
Copy link
Author

boxxxie commented Dec 13, 2012

maybe i was running some weird frankinstien liberator. i've fallen back on compojure/ring, when i get my app sorted out a bit more i'm going to see about refactoring to liberator.

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

No branches or pull requests

2 participants