chrisdavies / jsonista

Clojure library for fast JSON encoding and decoding.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

jsonista Continuous Integration status

jsonissa / jsonista / jsoniin, jsonilla / jsonilta / jsonille

Clojure library for fast JSON encoding and decoding.

  • Explicit configuration
  • Embrace Java for speed
  • Uses Jackson directly
  • API docs

Aiming to be faster than Cheshire while still having all the necessary features for web development. Designed for use with Muuntaja.

Latest version

Clojars Project

Quickstart

(require '[jsonista.core :as jsonista])

(jsonista/write-value-as-string {:hello 1})
;; => "{\"hello\":1}"

(def +data+ (jsonista/write-value-as-string {:foo "bar"}))

(jsonista/read-value +data+)
;; => {"foo" "bar"}

Performance

  • All standard encoders and decoders are written in Java
  • Protocol dispatch with read-value & write-value
  • Jackson ObjectMapper is used directly
  • Small functions to support JVM Inlining

See perf-tests for details.

encode

decode

License

Copyright © 2016-2017 Metosin Oy.

Distributed under the Eclipse Public License, the same as Clojure.

About

Clojure library for fast JSON encoding and decoding.


Languages

Language:Clojure 73.2%Language:Java 24.1%Language:Shell 2.7%