Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
JSON in Clojure

This branch is 87 commits behind clojure:master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
src
.gitignore
README.md
epl-v10.html
pom.xml

README.md

clojure.data.json

JSON parser/generator to/from Clojure data structures.

Follows the specification on http://json.org/

Releases and Dependency Information

Latest stable release: 0.1.3

Leiningen dependency information:

[org.clojure/data.json "0.1.3"]

Maven dependency information:

<dependency>
  <groupId>org.clojure</groupId>
  <artifactId>data.json</artifactId>
  <version>0.1.3</version>
</dependency>

Example Usage

(use '[clojure.data.json :only (read-json json-str)])

(json-str {:a [1 2 3], :b "Hello"})
;;=> "{\"a\":[1,2,3],\"b\":\"Hello\"}"

(read-json "{\"a\":[1,2,3],\"b\":\"Hello\"}")
;;=> {:a [1 2 3], :b "Hello"}

Refer to docstrings in the clojure.data.json namespace for additional documentation.

API Documentation

Developer Information

Change Log

  • Release 0.1.3 on 2012-03-09
    • Fix writing strings containing characters outside the BMP
  • Release 0.1.2 on 2011-10-14
    • Better parsing of hexadecimal character escapes
    • Fix EOF-handling bug
    • Fix reflection warnings DJSON-1
  • Release 0.1.1 on 2011-07-01
    • Ensure that printing to *out* always uses a PrintWriter.
  • Release 0.1.0 on 2011-03-18
    • Initial release.
    • Source-compatible with clojure.contrib.json, except for the name change.

Copyright and License

Copyright (c) Stuart Sierra, 2012. All rights reserved. The use and distribution terms for this software are covered by the Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php) which can be found in the file epl-v10.html at the root of this distribution. By using this software in any fashion, you are agreeing to be bound by the terms of this license. You must not remove this notice, or any other, from this software.

Something went wrong with that request. Please try again.