Skip to content

⚡️ A blazing fast and safe Go package for serializing JSON

License

Notifications You must be signed in to change notification settings

orsinium-labs/jsony

Folders and files

NameName
Last commit message
Last commit date

Latest commit

9ec570e · Mar 6, 2025

History

42 Commits
Nov 2, 2024
Mar 6, 2025
Nov 13, 2024
Nov 2, 2024
Mar 6, 2025
Nov 2, 2024
Nov 2, 2024
Nov 13, 2024
Nov 2, 2024
Nov 1, 2024
Mar 6, 2025
Nov 2, 2024
Nov 13, 2024
Nov 2, 2024
Nov 2, 2024
Nov 2, 2024
Nov 2, 2024
Nov 2, 2024
Nov 13, 2024

Repository files navigation

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{
   {"name", jsony.String("Aragorn")},
   {"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.

category jsony stdlib
Int 15 🏆 54
Float64 63 🏆 122
String 22 🏆 88
Object 134 🏆 136
Map 246 🏆 662
MixedArray 125 🏆 271
IntArray 88 🏆 183
BigArray 64262 🏆 115994

To reproduce, run task bench