Yi Duan
2e751bf5db
feat:(ast) Add more strict casting API ( #249 )
...
* feat:(ast) Add more strict API
* test: add cast test
2022-06-28 13:27:07 +08:00
Yi Duan
c3cb5de704
feat:(ast) support sorting node keys ( #164 )
...
* feat: ast.Node support ForEach() iteration (DFS)
Change-Id: Ia53f1db2814036e12b760dfbb7a21094a6abd541
* feat: support Node's key sorting
Change-Id: I0b93d9b4feada853fa2ca9f48277da71948a95be
* fmt
Change-Id: I1a53170959c08f1a32f02b0f163207254a87362c
* test: forbid `checkptr`
Change-Id: I6b34f74ee3bad883f515728300bf735a9e10b0d6
* fmt: add comments
Co-authored-by: duanyi.aster <duanyi.aster@bytedance.com>
2021-12-28 20:29:09 +08:00
Yi Duan
8405d84e31
feat: optimaze ast.Node API as container of generic values ( #150 )
...
* opt: only skip one value when call Iterator.HasNext()
* feat: V_NONE supports Set() and Add()
* feat: add node type V_ANY
* feat: ast.Node implements `json.Unmarshaler`
* fmt: use space instead of tab for indent
* feat: node V_ANY cast to Bool()\Int64()\Float64()\String()\Number()\Map()\Array()Interface()
* feat: V_NULL supports Set() and Add()
Co-authored-by: duanyi.aster <duanyi.aster@bytedance.com>
2021-12-09 15:43:51 +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
3a25fcac4f
feat: add node.Load()/LoadAll() to support concurrency ( #124 )
...
Change-Id: Ic70b61c720a10d16cecc1f3d7c131d81ff6d4071
Co-authored-by: duanyi.aster <duanyi.aster@bytedance.com>
2021-10-28 17:56:09 +08:00
Yi Duan
fa5f5026d9
opt(ast): speed up api ( #85 )
...
- inline findkey()
- use std append() instead of runtime.memmove()
Co-authored-by: duanyi.aster <duanyi.aster@bytedance.com>
2021-09-03 20:05:52 +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
8c119dd72d
feat(ast): support Node.Unset() and optimize Node.Get() ( #80 )
...
Co-authored-by: duanyi.aster <duanyi.aster@bytedance.com>
2021-08-24 13:23:55 +08:00
Yi Duan
e9b6634cac
feat: ast supports Node.Exists()/MapUseNode()/ArrayUseNode() ( #19 )
...
* feat: ast supports Node.Exists()/MapUseNode()/ArrayUseNode()
* jump table for swithcRawType
Co-authored-by: duanyi.aster <duanyi.aster@bytedance.com>
2021-06-24 16:37:32 +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
chenzhuoyu
fbe0828190
chore: make it open-source
2021-05-28 23:58:58 +08:00