Skip to content
/ clj-json Public
forked from alsor/clj-json

Fast JSON encoding and decoding for Clojure via the Jackson library

License

Notifications You must be signed in to change notification settings

Undev/clj-json

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

clj-json

Fast JSON encoding and decoding for Clojure via the Jackson library.

Synopsis

(require '(clj-json [core :as json]))
(import '(java.io StringReader BufferedReader))

(json/generate-string {"foo" "bar"})
"{\"foo\":\"bar\"}"

(json/parse-string "{\"foo\":\"bar\"}")
{"foo" "bar"}

(json/parsed-seq
  (BufferedReader. (StringReader. "{\"foo\":\"bar\"}{\"biz\":\"bat\"}")))
({"foo" "bar"} {"biz" "bat"})

Installation

clj-json is available as a Maven artifact from Clojars.

Encoding/Decoding Details

clj-json can generate JSON for maps, vectors, lists, keywords, strings, integers, doubles, and booleans.

Note that keywords generate as strings without a leading :, and will read via parse-string and parsed-seq as strings.

Development

To build, test, and package the clj-json source:

$ lein deps
$ lein javac
$ lein test
$ lein jar

License

Release under an MIT license.

About

Fast JSON encoding and decoding for Clojure via the Jackson library

Resources

License

Stars

Watchers

Forks

Packages

No packages published