Parsing is easy - use either https://github.com/clojure/data.json or https://github.com/dakrone/cheshire (Cheshire used to have some advantages over data.json but I have the impression data.json has caught up).
For validation I've used Prismatic Schema - https://github.com/prismatic/schema - it's good for structural validation, correct data types, valid keys etc. If you want user-friendly validation failures for individual fields you might want to use something more user-focused - there are quite a few validation libraries at http://www.clojure-toolbox.com/ you could try. - Korny On 27 Jan 2014 12:17, "David Simmons" <shortlypor...@gmail.com> wrote: > Hi Folks. > > I'm writing a web app which receives a JSON structure. I'd like to > validate that the structure is correct i.e. mandatory fields are present, > and then convert into the relevant Clojure data structure. As a bonus if a > particular field in the JSON structure is incorrect I'd like to be able to > define the error message generated (in a similar way I can do for > noir.validation). > > Does anyone have any recommended libraries or the best way to approach > this issue - I'm sure I'm not the first with this requirement. > > cheers > > Dave > > -- > -- > You received this message because you are subscribed to the Google > Groups "Clojure" group. > To post to this group, send email to clojure@googlegroups.com > Note that posts from new members are moderated - please be patient with > your first post. > To unsubscribe from this group, send email to > clojure+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/clojure?hl=en > --- > You received this message because you are subscribed to the Google Groups > "Clojure" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to clojure+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/groups/opt_out. > -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.