2
0
Fork 0
mirror of https://github.com/ii64/sonic.git synced 2026-06-21 00:46:43 +08:00
Commit graph

11 commits

Author SHA1 Message Date
Yi Duan
f9d033d6f8
feat: support streaming IO (#225)
* feat (decoder): support streaming IO

* opt: fine tune buffer size factors

* feat (encoder): support streaming IO

* doc: refactor format and add comments

* fix: io.EOF dead loop

* build: adjust CI files

* doc: update README.md
2022-05-24 10:38:43 +08:00
liu
7475b256ce
support JSON validate (#189)
* fix: check unescaped control chars in decode

* feat: add utf8 validate func

* feat: validate utf8 in json string

* feat: add validateone api

* fix: check unicode pointer for surrogate

* clang12 compile

* feat: Import `Valid()` and `Skip()`

* opt: use looktable

* fix utf-8 validate performance problem

* fix: utf-8 validate bug

* clang12 build

* feat: (encoder) accelerate validating json from `json.Marshaler`

chore!:
- `encoder.NoCompactMarshaler`changes to `encoder.CompactMarshaler`, which means compacting operation is not open by default

* fix: only one json value is `Valid()`

Co-authored-by: liuqiang <liuqiang.06@bytedance.com>
Co-authored-by: duanyi.aster <duanyi.aster@bytedance.com>
2022-02-21 16:35:53 +08:00
liu
d75ce3f730
opt: use simd to optimize htmlescape (#171)
* opt: use simd to optimize htmlescape

* opt: reuse escaped buffer

* feat: cmake with Clang12

Co-authored-by: liuqiang <liuqiang.06@bytedance.com>
Co-authored-by: duanyi.aster <duanyi.aster@bytedance.com>
2022-01-18 11:30:28 +08:00
Yi Duan
14121d64f1
feat:(encoder) add optimazing options (#168)
* feat:(encoder) add option `NoCompactMarshaler` and `NoEscapeTextMarshaler`

* feat: add `EscapeHTML` to align with std lib
2022-01-05 14:20:46 +08:00
Yi Duan
fcfe1c4317
fix:(encoder) keep arguement buf alive (#166) 2021-12-31 17:15:35 +08:00
Yi Duan
22229eefc3
fix: relocate stack pointers (#156)
* fix: relocate stack pointer _VAR_sv to keep it alive

* fix: add stack pointer _VAR_vk to defend `encoding.TextUnmarshaler`

* fix: align faker func's stack with JIT func's

* fix: clear _Stack memory when err returned

* fix: clear stack pointer before return

* fix: relimit stack-overflow check at `_ValueDecoder`

Co-authored-by: duanyi.aster <duanyi.aster@bytedance.com>
2021-12-20 16:19:12 +08:00
liu
49fc705341
feat: Pretouch recursively for large/deep struct (#137) 2021-11-26 14:12:51 +08:00
Yi Duan
3eade82a01
fix: add gcGuard to prevent GC during Marshal()/Unmarshal() (#122)
Co-authored-by: duanyi.aster <duanyi.aster@bytedance.com>
2021-10-28 17:02:37 +08:00
chenzhuoyu
8383178c89 feat: supports map key-sorting via encoder options 2021-08-16 18:31:41 +08:00
chenzhuoyu
5cb6f17944 feat: performance optimizations 2021-07-02 14:38:12 +08:00
chenzhuoyu
fbe0828190 chore: make it open-source 2021-05-28 23:58:58 +08:00