I am not sure what is going wrong here, and I do not know whether the cheshire library [1] will behave as you wish, but it is worth a try.
[1] https://github.com/dakrone/cheshire Andy On Sat, Sep 27, 2014 at 10:24 AM, Alan Moore <[email protected]> wrote: > Here is a portion of the data: > > Async HTTP GET: 200 body = { > "count": 1, > "total": 1, > "orders": [ > { > "number": 12, > "vendorNumber": "12", > "created": "2014-09-25 18:25:17", > "paymentStatus": "QUEUED", > ... etc. > > The call (messy from debugging...): > > (let [orderId (Integer/parseInt (:order_id (:params request))) > url (str " > https://app.ecwid.com/api/v1/xxx/orders?STOREID=xxx&secure_auth_key=123&order=" > orderId) > {:keys [body status error]} @(http/get url) > orders_query_result (json/read-str body :key-fn keyword) > order_count (:count orders_query_result) > orders (:orders orders_query_result)] > (if error > (println "Failed, exception is " error) > (doseq [] > (println "Async HTTP GET: " status " body = " body ") > (println "orders_query_result = " orders_query_result) > (println "count = " order_count) > (println "orders = " orders) > (updateOrderPrice (first orders)))... > > This is using http-kit to do an http request to a remote server and that > seems to be working - the body prints out as expected. However, all the > string values are not in quotes: > > orders_query_result = {:count 1, :total 1, :orders [{:taxCost 0.0, > :paymentStatus QUEUED, ... etc. > > The :paymentStatus key is correct but it's value should be "QUEUED", not > QUEUED... > > What am I doing wrong? I could swear I've run across this before and fixed > it but for the life of me I can't find that code anywhere. > > Is there another library I should be using instead? I briefly experimented > with a few others but I really think this should work. > > Alan > > -- > You received this message because you are subscribed to the Google > Groups "Clojure" group. > To post to this group, send email to [email protected] > Note that posts from new members are moderated - please be patient with > your first post. > To unsubscribe from this group, send email to > [email protected] > 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 [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to [email protected] Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to [email protected] 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 [email protected]. For more options, visit https://groups.google.com/d/optout.
