Bytedance Sonic Versions Save

A blazingly fast JSON serializing & deserializing library

v1.10.2

6 months ago

Bugfix

  • [#521] use int64 for MaxInt48 to compile in x86 arch
  • [#530] unnecessary ptr check json.Unmarshaler
  • [#531] missing write-barrier when truncate empty slice
  • [#533] not use rbp in JIT

New Contributors

Full Changelog: https://github.com/bytedance/sonic/compare/v1.10.1...v1.10.2

v1.10.1

7 months ago

Feature

  • [#511] (ast) support sort keys on non-object node
  • [#527] (encoder) Add NoValidateJSONMarshaler option

Bugfix

  • [#504] (ast) check error before Set/Unset/Add()
  • [#520] (native) over boundary bugs of skip number and tolower in native c

New Contributors

Full Changelog: https://github.com/bytedance/sonic/compare/v1.10.0...v1.10.1

v1.10.0

8 months ago

Break Change

  • [#464] Due to design bugs, we are sorry to warn you that some behaviors of ast.Node have to be changed:

    • BREAK CHANGE: ast.Unset() now WON'T change ast.Len() and ast.Index()
    • BREAK CHANGE: ast.UnsafeArray() and ast.UnsafeMap() are deprecated and user SHOULDN'T modify node based on these API
  • [#393] Due to difficulty of maintaining compatibility with Golang:

    • BREAK CHANGE: sonic now only support Go 1.16~1.20, drop Go 1.15 support

Feature

  • [#493] support Go1.21.0
  • [#471] (ast) add ast.Visitor for transversing JSON in-place
  • [#470] add Valid() API

Bugfix

  • [#486] possible overflowed instruction while handling byte type
  • [#484] (decoder) avoid scratched memory of returned error
  • [#496] (ast) Exist() didn't check Valid() first
  • [#498] (ast) drop ast.Node API UnsafeArray() and UnsafeMap() (Break Change)

Optimization

  • [#393] refactor asm2asm to avoid SIGPROF crashing, and enable traceback when C function panics
  • [#464] (ast) use linked chunk as fundamental storage for nodes to keep node pointer valid (Break Change)
  • [#464] (ast) avoid malloc when meeting empty values, and inline header chunk into lazy-parsing stack to reduce malloc. The performance of Parse()\Load()\Interface() promoted 10~60%
  • [#475] (last) pass skipnumber flag to avoid decoding numbers

New Contributors

Full Changelog: https://github.com/bytedance/sonic/compare/v1.9.2...v1.10.0

v1.10.0-rc2

9 months ago

Optimization

  • [#475] (ast) pass skipnumber flag to avoid decoding numbers
  • [#483] update base64x to finish asm2asm refactor

Feature

  • [#471] (ast) add ast.Visitor for iterating JSON into custom generic data containers in-place

New Contributors

Full Changelog: https://github.com/bytedance/sonic/compare/v1.10.0-rc...v1.10.0-rc2

v1.10.0-rc

10 months ago

Bugfix

  • [#464] use linked chunk as fundamental storage for nodes, to keep returned ast.Node pointer valid.
    • BREAK CHANGE: ast.Unset() now WON'T change ast.Len() and ast.Index()
    • BREAK CHANGE: ast.UnsafeArray() and ast.UnsafeMap() are deprecated and user SHOULDN'T modify node based on these API
  • [#393] refactor asm2asm to avoid crashing when the program gets panic or profiled
    • BREAK CHANGE: sonic now only support Go 1.16~1.20

Feature

  • [#470] add Valid() API on main package

Optimization

  • [#464] reduce memory allocation when loading nodes, ast.Load() performance now speeds up 20%~60%
  • [#393]: call native C function by register-based ABI in ast.Node

New Contributors

Full Changelog: https://github.com/bytedance/sonic/compare/v1.9.2...v1.10.0-rc

v1.9.2

10 months ago

Bugfix

  • [#446] refactor sonic/loader package and fix funcname() bug
  • [#457] fix only first opt effective on internal/encoder/Pretouch()
  • [#461] fix compatibilty of overflowed float32 with STD

Optimization

  • [#444] try checking integrity of json stream first instead of decoding

New Contributors

Full Changelog: https://github.com/bytedance/sonic/compare/v1.9.1...v1.9.2

v1.9.1

11 months ago

Bugfix

  • [#436] Fix the invalid cmpeq instruction in windows
  • [#438] Initialize the cap and len of the empty slices

Document

  • [#439] Add doc for decoder and encoder APIs

Full Changelog: https://github.com/bytedance/sonic/compare/v1.9.0...v1.9.1

v1.9.0

11 months ago

Feature

  • [#430] decoder and encoder package support fallback on not-supported envs

Bugfix

  • [#433] incorrectly use mov lagre imm64 to memory instruction in jit

Doc

  • [#428] add Chinese translation for introduction & readme

New Contributors

Full Changelog: https://github.com/bytedance/sonic/compare/v1.8.10...v1.9.0

v1.8.10

11 months ago

Bigfix

  • fix: quote empty string key in ast

Full Changelog: https://github.com/bytedance/sonic/compare/v1.8.9...v1.8.10