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

38 commits

Author SHA1 Message Date
Lokdora
8acd9be7d4
doc: add Chinese translation for introduction & readme (#428) 2023-05-25 10:47:51 +08:00
liu
d393a3228d
doc: chore readme (#420) 2023-05-19 16:52:16 +08:00
Yi Duan
f87d87de7a
feat: fallback on unsupported go versions (#358)
* feat: fallback api on unsupported go version

* add compact test

* not support go version <= 1.14
2023-02-08 16:56:10 +08:00
Yi Duan
32877b6d27
fix:(decoder) not clear memory after decoding failed (#346)
* fix: not clear memory after decoding failed

* doc: update sonic ast benchmark data
2023-01-10 14:19:32 +08:00
erin liman
01c0d36194
feat: reformat print error example and clarify v1.6.0 example (#332) 2022-12-09 17:00:49 +08:00
Yi Duan
02fe88266f
feat:(decoder) support skip mismatche-typed value (#325)
* feat:(decoder) support skip mismatche-typed value

* change test cases

* refactor: add type check down into `CompilePrimitive()` to avoid repeat `null` check

* opt call skip()

* bench: add  option `--repeat_times`

* test: omit check primitive

* opt: inline primitive check into its OP

* implement on Go1.15

* fix: support skip json.Numer

* fix: OP_go_skip

* update README.md
2022-11-04 14:27:21 +08:00
liu
78c2ade913
fix: readme typos (#323) 2022-10-28 17:32:48 +08:00
Yi Duan
94f95f0479
feat:(option) add option MaxInlineDepth for addjust compilation inline depth (#287)
* feat: make compilation depth changeable

* feat: add option `DefaultMaxInlineDepth`

* add recurse depth = 10

* refactor

* doc: readme and comment

* opt: add `_MAX_FIELDS` to limit the inlining of big struct

* update license

* fix typo
2022-08-22 15:45:49 +08:00
cyn6315
dd3e092a5b
fix spelling mistake in README.md (#285)
* fix spelling mistake in README.md

* fix spelling mistake in README.md
2022-08-18 17:14:46 +08:00
cyn6315
d1190d6797
change push-check-arm.yml and remove fall back logics (#284)
* change push-check-arm.yml and remove fall back logics

* fix README on the requirement and compatibility

* fix: README on the requirement and compatibility

* fix: README add backquotes

* fix:remove instruction set requirement in README

* Update README.md

Co-authored-by: Yi Duan <duanyi.aster@bytedance.com>
2022-08-18 15:58:07 +08:00
chenzhuoyu
d4024becca chore: remove excessive spaces 2022-08-12 15:29:23 +08:00
liu
de2dc2c35a
add ValidateString option into decode (#253)
* fix: add escape validate

* feat: add validatestring option

* add print debug

* add jit debug in decoder

* fix go1.16 decoder debug

* fix: not change others

* fix generic parse bug

* remove debug info

* test twitter json

* fix: option typos

* test: add bug test

* fix validate bugs

* fix: validate

* remove files

* re-compile

* update license

* add flags on `skip_xxx()`

* fix internal native tests

* re-compile

* add validstring for perftest

* modify api

* fix readme

* fix comment

* add license

* rename to ValidateString

* fix xprintf.h

* add debug

Co-authored-by: liuqiang <liuqiang.06@bytedance.com>
Co-authored-by: duanyi.aster <duanyi.aster@bytedance.com>
2022-08-11 19:06:11 +08:00
liu
410625ca9e
opt: remove bound and loop unrolling in quote (begin to use clang13) (#237)
* opt: remove most bound check in quote

* opt: remove branch in copied escaped chars

* opt: use cache-friendly bool array

* opt: use loop unrolling in quote

* feat: add `-t` for bench.py

Change-Id: I3f41218187597126ef960eab09c6fa6fe252f347

* test:(bench) adjust repeat_time

* test: add Diff on CI

* test: update bench.py

* doc: update README.md

Co-authored-by: liuqiang <liuqiang.06@bytedance.com>
Co-authored-by: duanyi.aster <duanyi.aster@bytedance.com>
2022-06-08 21:50:10 +08:00
Yi Duan
ced28302a9
feat: add compatible API (#233)
* feat: add compatible API

* test: add api compatibility test

* fmt

* test: adjust CI

* fix: no trailing '\n' for std `Marshal()`

* doc: update README.md

* test: add windows CI

* doc: update README.md

* doc: update README.md

* fmt: add comments and refator
2022-05-25 14:16:56 +08:00
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
d923a03329
fix: some typos (#221)
Co-authored-by: liuqiang <liuqiang.06@bytedance.com>
2022-05-19 11:41:01 +08:00
liu
57dea971c6
chore: update readme (#219) 2022-04-21 03:35:32 +00:00
Yi Duan
c381c8b679
feat: add API MarshalString() (#197) 2022-03-01 15:09:09 +08:00
Yi Duan
b66168fa77
feat:(decoder) add option CopyString() (#192)
* feat: add option `CopyString()`

* test: diff copy and nocopy decoding bench

* doc: update README.md

* opt: use global link for `escape_string()`

* feat: copy JSON on `Unmarshal()`

* test: add norace test

* fix: nocopy field key

* test: add generic test

* fix: remove useless instruction
2022-02-28 18:46:25 +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
Yi Duan
3dde76677e
doc: update benchmarks and dependency repos (#180)
* doc: update benchmarks and dependency repos

* doc: add 'Optimization Options' on README

* fix some possible typos

Co-authored-by: liuqiang <liuqiang.06@bytedance.com>
2022-01-25 15:09:01 +08:00
Yi Duan
f8efc2f6e7
Update README.md (#173) 2022-01-18 14:27:19 +08:00
Yi Duan
7d3b22100f
feat: SyntaxError.Error() always calls Description() (#152)
Co-authored-by: duanyi.aster <duanyi.aster@bytedance.com>
2021-12-09 13:11:31 +08:00
liu
3f2bab552b
doc: update readme (#143)
* doc: update readme

* test: add SetOne_XX() benchmarks

* doc: update bechmark charts

* doc: fix possible typos

Co-authored-by: liuqiang <liuqiang.06@bytedance.com>
Co-authored-by: duanyi.aster <duanyi.aster@bytedance.com>
2021-12-01 18:03:19 +08:00
Yi Duan
43e4a00e90
fix: add gc_write_barrier checks (#131)
* fix: add gcWriteBarrier for decode

* add gcWriteBarrier for encoder


Co-authored-by: duanyi.aster <duanyi.aster@bytedance.com>
2021-11-17 11:21:20 +08:00
Yi Duan
a577eafc25
refactor: make it more readable (#104)
Co-authored-by: duanyi.aster <duanyi.aster@bytedance.com>
2021-09-18 11:31:25 +08:00
Yi Duan
1f13d31b5a
chore!: return error for scanning API (#81)
* chore!: return error for cast API

BREAKING CHANGE:
- Set()/Unset()/SetByIndex()/UnsetByIndex/Add() 
- Raw()/Bool()/Int64()/Float64()/Number()/Len()/Cap()
- Values()/Properties()/Map()/Array()/Interface()

Co-authored-by: duanyi.aster <duanyi.aster@bytedance.com>
2021-08-30 17:14:38 +08:00
Yi Duan
6aec2f3722
feat(ast): Node supports MarshalJson() (#84)
Co-authored-by: duanyi.aster <duanyi.aster@bytedance.com>
2021-08-27 18:28:56 +08:00
Yi Duan
dd73e36cf4
doc: update readme on Pretouch (#70) 2021-08-11 17:35:23 +08:00
duanyi.aster
12dd7fb4a6 doc: print syntax error 2021-07-08 19:12:23 +08:00
duanyi.aster
91e58904fe doc update benchmarks on README.md 2021-07-03 00:29:52 +08:00
Yi Duan
8fe152d152
doc: update README.md (#31)
Co-authored-by: Oxygen <chenzhuoyu@users.noreply.github.com>
2021-06-28 12:25:11 +08:00
Yi Duan
936cee0d3f
test: benchmark with github.com/goccy/go-json (#23)
chore: add benchmark result with go-json

Co-authored-by: duanyi.aster <duanyi.aster@bytedance.com>
2021-06-22 16:30:04 +08:00
chenzhuoyu
b2fbad7b4c feat: rewrite generic decoder in Go, using Finite State Machine 2021-06-16 23:05:21 +08:00
Yi Duan
accee2e689
feat: support UseNumber for ast (#14)
Co-authored-by: duanyi.aster <duanyi.aster@bytedance.com>
2021-06-09 15:58:27 +08:00
AsterDY
4447cc41a7
Feature/readme (#12)
chore: update readme

Co-authored-by: duanyi.aster <duanyi.aster@bytedance.com>
2021-06-08 11:39:02 +08:00
chenzhuoyu
fbe0828190 chore: make it open-source 2021-05-28 23:58:58 +08:00
Pure White
1e1b9587a7
Initial commit 2021-05-25 11:52:52 +08:00