On Tue, Aug 28, 2012 at 11:42 AM, Herwig Hochleitner <hhochleit...@gmail.com
> wrote:

> 2012/8/27 Denis Labaye <denis.lab...@gmail.com>
>
>> Fetch JSON with clj-http AND extract informations from it with enlive.
>>
>> Does anyone know what's the most straightforward way to do that?
>>
>
> Enlive currently is tied to selecting and transforming XML. I have a
> branch of enlive on my computer, on which I've decoupled enlive from its
> data representation and pulled out all the XML specific parts, leaving a
> general purpose selection and transformation engine.
>
> The selection engine is done and should be able to select nodes out of any
> tree-like structure. If you are interested I can release it, before
> finishing the transformation part and the XML bindings. It would be a nice
> proof of concept to use it for selecting JSON.
>
>
Instead of modifiying enlive/clj-http/chesire, I was rather asking how to
integrate them.

   1. Obvious solution: build a clojure.xml-esque (:tag :attrs :content)
   map from the parsed json and feed it to enlive
   2. Before: (if possible) Configure clj-http/chesire to directly output
   (:tag :attrs :content) from json
   3. Smarter: ask here :)



> Beware however, that unless you have a very complicated JSON format,
> clojure's destructuring might be a better fit for your JSON parsing needs.
>
> kind regards
>
> --
> 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 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

Reply via email to