KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have a UUID and java util date which get literals as #uuid and #inst, how do I specify the uuid or date without referencing the literals themselves? clj-json does not like dealing with them and ends up throwing an error when I try generate-string {:timestamp (java.util.Date.)} ;{:timestamp #inst "2013-05-17T13:45:24.095-00:00"} ;but as a string the date changes format {:timestamp (str (java.util.Date.))} {:timestamp "Fri May 17 09:45:44 EDT 2013"} (json/generate-string {:uuid (java.util.UUID/randomUUID)}) ;#uuid "d66cf77f-13b6-4291-95cd-c2bb40aa36b3" java.lang.Exception: Cannot generate d66cf77f-13b6-4291-95cd-c2bb40aa36b3 JsonExt.java:96 clj_json.JsonExt$Generator.generate JsonExt.java:83 clj_json.JsonExt$Generator.generate JsonExt.java:103 clj_json.JsonExt.generate core.clj:18 clj-json.core/generate-to-writer core.clj:26 clj-json.core/generate-string NO_SOURCE_FILE:32 myapp.handler/eval8390
Tags (comma-separated)
Save Edits
Cancel