json-iterator / Go

Licence: mit
A high-performance 100% compatible drop-in replacement of "encoding/json"

Programming Languages

go
31211 projects - #10 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to Go

Java
jsoniter (json-iterator) is fast and flexible JSON parser available in Java and Go
Stars: ✭ 1,308 (-87.24%)
Mutual labels:  json, serializer, parser, serialization, json-parser, deserialization
Fastjson
A fast JSON parser/generator for Java.
Stars: ✭ 23,997 (+134.16%)
Mutual labels:  json, serialization, json-parser, deserialization
Dictfier
Python library to convert/serialize class instances(Objects) both flat and nested into a dictionary data structure. It's very useful in converting Python Objects into JSON format
Stars: ✭ 67 (-99.35%)
Mutual labels:  json, serializer, serialization, json-parser
Bebop
An extremely simple, fast, efficient, cross-platform serialization format
Stars: ✭ 305 (-97.02%)
Mutual labels:  json, serialization, deserialization
Play Json
The Play JSON library
Stars: ✭ 254 (-97.52%)
Mutual labels:  json, serializer, serialization
Surrealist
to_json but I wrote it myself
Stars: ✭ 271 (-97.36%)
Mutual labels:  json, serializer, serialization
Pxi
🧚 pxi (pixie) is a small, fast, and magical command-line data processor similar to jq, mlr, and awk.
Stars: ✭ 248 (-97.58%)
Mutual labels:  json, serializer, parser
Tomlplusplus
Header-only TOML config file parser and serializer for C++17 (and later!).
Stars: ✭ 403 (-96.07%)
Mutual labels:  json, serializer, parser
Bad json parsers
Exposing problems in json parsers of several programming languages.
Stars: ✭ 351 (-96.57%)
Mutual labels:  json, parser, json-parser
Jsonparser
One of the fastest alternative JSON parser for Go that does not require schema
Stars: ✭ 4,323 (-57.82%)
Mutual labels:  json, parser, json-parser
Jackson Module Kotlin
Module that adds support for serialization/deserialization of Kotlin (http://kotlinlang.org) classes and data classes.
Stars: ✭ 830 (-91.9%)
Mutual labels:  json, serialization, deserialization
Xml Js
Converter utility between XML text and Javascript object / JSON text.
Stars: ✭ 874 (-91.47%)
Mutual labels:  json, parser, json-parser
jzon
A correct and safe JSON parser.
Stars: ✭ 78 (-99.24%)
Mutual labels:  serialization, serializer, deserialization
JsonFormatter
Easy, Fast and Lightweight Json Formatter. (Serializer and Deserializer)
Stars: ✭ 26 (-99.75%)
Mutual labels:  serialization, serializer, json-parser
Rdflib Jsonld
JSON-LD parser and serializer plugins for RDFLib (Python 2.6+)
Stars: ✭ 250 (-97.56%)
Mutual labels:  json, serializer, parser
Handyjson
A handy swift json-object serialization/deserialization library
Stars: ✭ 3,913 (-61.82%)
Mutual labels:  json, serialization, deserialization
Parson
Lightweight JSON library written in C.
Stars: ✭ 965 (-90.58%)
Mutual labels:  json, parser, json-parser
Thorsserializer
C++ Serialization library for JSON
Stars: ✭ 241 (-97.65%)
Mutual labels:  json, serialization, json-parser
Jsonapi Rails
Rails gem for fast jsonapi-compliant APIs.
Stars: ✭ 242 (-97.64%)
Mutual labels:  json, serialization, deserialization
Flatcc
FlatBuffers Compiler and Library in C for C
Stars: ✭ 434 (-95.77%)
Mutual labels:  json, serialization, json-parser

Sourcegraph GoDoc Build Status codecov rcard License Gitter chat

A high-performance 100% compatible drop-in replacement of "encoding/json"

Benchmark

benchmark

Source code: https://github.com/json-iterator/go-benchmark/blob/master/src/github.com/json-iterator/go-benchmark/benchmark_medium_payload_test.go

Raw Result (easyjson requires static code generation)

ns/op allocation bytes allocation times
std decode 35510 ns/op 1960 B/op 99 allocs/op
easyjson decode 8499 ns/op 160 B/op 4 allocs/op
jsoniter decode 5623 ns/op 160 B/op 3 allocs/op
std encode 2213 ns/op 712 B/op 5 allocs/op
easyjson encode 883 ns/op 576 B/op 3 allocs/op
jsoniter encode 837 ns/op 384 B/op 4 allocs/op

Always benchmark with your own workload. The result depends heavily on the data input.

Usage

100% compatibility with standard lib

Replace

import "encoding/json"
json.Marshal(&data)

with

import jsoniter "github.com/json-iterator/go"

var json = jsoniter.ConfigCompatibleWithStandardLibrary
json.Marshal(&data)

Replace

import "encoding/json"
json.Unmarshal(input, &data)

with

import jsoniter "github.com/json-iterator/go"

var json = jsoniter.ConfigCompatibleWithStandardLibrary
json.Unmarshal(input, &data)

More documentation

How to get

go get github.com/json-iterator/go

Contribution Welcomed !

Contributors

Report issue or pull request, or email [email protected], or Gitter chat

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].