Skip to content
Browse files

Update README and namespace docstring

  • Loading branch information...
1 parent 1f00a45 commit 11a9bfc7e8a79703bd93d895511a7fceacd913f5 @stuartsierra stuartsierra committed Feb 9, 2012
Showing with 54 additions and 29 deletions.
  1. +53 −28 README.md
  2. +1 −1 src/main/clojure/clojure/data/json.clj
View
81 README.md
@@ -1,61 +1,86 @@
-**clojure.data.json** : JavaScript Object Notation (JSON) parser/generator for Clojure
+clojure.data.json
+========================================
+
+JSON parser/generator to/from Clojure data structures.
-Copyright (c) Stuart Sierra, 2011. 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.
+Follows the specification on http://json.org/
-Adding clojure.data.json to Your Project
+
+Releases and Dependency Information
========================================
-clojure.data.json is available in the Maven central repositories. Add it to your Maven project's `pom.xml` as:
+Latest stable release: 0.1.2
+
+* [All Released Versions](http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22org.clojure%22%20AND%20a%3A%22data.json%22)
+
+* [Development Snapshot Versions](https://oss.sonatype.org/index.html#nexus-search;gav~org.clojure~data.json~~~)
+
+[Leiningen](https://github.com/technomancy/leiningen) dependency information:
+
+ [org.clojure/data.json "0.1.2"]
+
+[Maven](http://maven.apache.org/) dependency information:
<dependency>
<groupId>org.clojure</groupId>
<artifactId>data.json</artifactId>
- <version>0.1.1</version>
+ <version>0.1.2</version>
</dependency>
-or your Leiningen `project.clj` as:
-
- [org.clojure/data.json "0.1.1"]
-Then load it in a Clojure namespace as:
- (ns your.project.namespace
- (:use [clojure.data.json :only (json-str write-json read-json)]))
+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\"}"
-Comparison to clojure.contrib.json
-========================================
+ (read-json "{\"a\":[1,2,3],\"b\":\"Hello\"}")
+ ;;=> {:a [1 2 3], :b "Hello"}
-This project is the continuation of clojure.contrib.json. Versions 0.1.x are source-compatible with clojure.contrib.json, except for the name change.
+Refer to docstrings in the `clojure.data.json` namespace for
+additional documentation.
-Downloading and Building from Source
+Developer Information
========================================
-Prerequisites:
+* [GitHub project](https://github.com/clojure/data.json)
-* [Git](http://git-scm.com/)
-* [Apache Maven](http://maven.apache.org/) 2 or 3
+* [Bug Tracker](http://dev.clojure.org/jira/browse/DJSON)
-Instructions:
+* [Continuous Integration](http://build.clojure.org/job/data.json/)
+
+* [Compatibility Test Matrix](http://build.clojure.org/job/data.json-test-matrix/)
-* Download the source: `git clone git://github.com/clojure/data.json.git`
-* Enter the directory: `cd data.json`
-* Compile, test, and install locally: `mvn install`
Change Log
====================
-Release 0.1.1 on 2011-07-01
-------------------------------
+* Release 0.1.2 on 2011-10-14
+ * Better parsing of hexadecimal character escapes
+ * Fix EOF-handling bug
+ * Fix reflection warnings [DJSON-1](http://dev.clojure.org/jira/browse/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.
+
-Ensure that printing to `*out*` always uses a PrintWriter.
-Release 0.1.0 on 2011-03-18
-------------------------------
+Copyright and License
+========================================
-Initial release. Source-compatible with clojure.contrib.json, except for the name change.
+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.
View
2 src/main/clojure/clojure/data/json.clj
@@ -14,7 +14,7 @@
(ns ^{:author "Stuart Sierra"
:doc "JavaScript Object Notation (JSON) parser/writer.
See http://www.json.org/
- To write JSON, use json-str, write-json, or write-json.
+ To write JSON, use json-str, write-json, or print-json.
To read JSON, use read-json."}
clojure.data.json
(:use [clojure.pprint :only (write formatter-out)])

0 comments on commit 11a9bfc

Please sign in to comment.
Something went wrong with that request. Please try again.