Categorygithub.com/orsinium-labs/jsony
repositorypackage
1.0.1
Repository: https://github.com/orsinium-labs/jsony.git
Documentation: pkg.go.dev

# README

jsony

[ 📄 docs ] [ 🐙 github ]

A blazing fast and safe Go package for serializing JSON.

Features:

  • 2-3 times faster than stdlib
  • type safe and with no runtime errors or panics
  • pure go
  • reflection-free
  • objects preserve elements' order
  • objects can be constructed dynamically

📦 Installation

go get github.com/orsinium-labs/jsony

🔧 Usage

obj := jsony.Object{
   jsony.Field{"name", jsony.String("Aragorn")},
   jsony.Field{"age", jsony.Int(87)},
}
s := jsony.EncodeString(obj)
fmt.Println(s)

See documentation.

🐎 Benchmarks

Each value is time (in ns) per operation, as reported by the Go built-in benchmark framework. Lower is better.

categoryjsonystdlib
Int15 🏆54
Float6463 🏆122
String22 🏆88
Object134 🏆136
Map246 🏆662
MixedArray125 🏆271
IntArray88 🏆183
BigArray64262 🏆115994

To reproduce, run task bench