1
0
mirror of https://github.com/json-iterator/go.git synced 2025-03-29 21:20:52 +02:00
Tim Hockin 8f3de9c412 Adapt tests to use new Config structs
the unit test uses compatible mode.  The benchmarks measure compat,
default, and fastest.

This still fails for strings and slices and maps all over the place.
2017-06-25 10:29:48 -07:00
2017-06-06 23:27:00 +08:00
2017-06-21 00:26:18 +08:00
2017-01-06 20:17:47 +08:00
2017-06-19 23:43:53 +08:00
2017-06-19 23:43:53 +08:00
2017-06-19 21:21:20 +08:00
2017-06-19 23:43:53 +08:00
2017-06-19 21:21:20 +08:00
2017-06-19 21:21:20 +08:00
2017-06-19 21:21:20 +08:00
2017-06-19 21:21:20 +08:00
2017-06-19 23:43:53 +08:00
2017-06-19 23:43:53 +08:00
2017-06-19 23:43:53 +08:00
2017-06-19 21:21:20 +08:00
2017-06-19 21:21:20 +08:00
2017-06-19 23:43:53 +08:00
2017-06-23 08:21:02 +08:00
2017-06-20 15:11:01 +08:00
2017-06-20 15:11:01 +08:00
2017-06-21 00:26:18 +08:00
2017-06-20 15:11:01 +08:00
2017-06-20 15:11:01 +08:00
2017-06-20 15:11:01 +08:00
2017-06-20 15:18:24 +08:00
2017-06-20 17:43:47 +08:00
2017-06-20 17:43:47 +08:00
2017-06-20 17:43:47 +08:00
2017-06-20 17:43:47 +08:00
2017-06-20 17:43:47 +08:00
2017-06-15 23:55:04 +08:00
2017-06-19 23:43:53 +08:00
2017-06-19 23:43:53 +08:00
2017-06-19 23:43:53 +08:00
2017-06-19 23:43:53 +08:00
2017-06-19 23:43:53 +08:00
2017-06-19 23:43:53 +08:00
2017-06-19 23:43:53 +08:00
2017-06-19 23:43:53 +08:00
2017-06-17 21:32:48 +08:00
2017-06-20 17:43:47 +08:00
2017-06-17 10:21:37 +08:00
2017-06-19 23:43:53 +08:00
2017-06-17 21:32:48 +08:00
2017-06-17 10:21:37 +08:00
2017-06-21 00:26:18 +08:00
2017-06-20 15:11:01 +08:00
2017-06-17 21:32:48 +08:00
2017-06-19 23:43:53 +08:00
2017-06-19 23:43:53 +08:00
2017-06-17 10:21:37 +08:00
2016-11-30 08:30:24 +08:00
2017-06-18 23:42:23 +08:00

rcard

jsoniter (json-iterator) is fast and flexible JSON parser available in Java and Go

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

Usage

100% compatibility with standard lib

Replace

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

with

import "github.com/json-iterator/go"
jsoniter.Marshal(&data)

Replace

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

with

import "github.com/json-iterator/go"
jsoniter.Unmarshal(input, &data)

More documentation

How to get

go get github.com/json-iterator/go

Contribution Welcomed !

Report issue or pull request, or email taowen@gmail.com, or Gitter chat

Description
Languages
Go 99.9%
Shell 0.1%