Skip to content

rosario/json-parse

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
doc
 
 
 
 
 
 
 
 
 
 

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)

About

Clojure XML to JSON parser/converter

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published