Clojure XML to JSON parser/converter
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
doc
src/json_parse
test/json_parse
.gitignore
LICENSE
README.md
project.clj

README.md

json-parse

Convert XML to JSON in Clojure

Usage

First we need to parse the XML with this function:

    (defn parse [s] (clojure.xml/parse (java.io.ByteArrayInputStream. (.getBytes s))))

Then we just use the xml->json:

    (def parsed-xml (parse "<person><name>Salvatore</name><address>Parlermo</address></person>"))
    (def json (xml->json parsed-xml)