bytedance / sonic-cpp

A fast JSON serializing & deserializing library, accelerated by SIMD.
Apache License 2.0
835 stars 101 forks source link

feat: support parse number as raw #60

Closed liuq19 closed 9 months ago

liuq19 commented 1 year ago

To maintain the lossless, support parse number as raw json instead of float or integer.

If you want parse numbers as raw number, can use doc.template Parse\<kParseRawNumber>(json).

Proposal : #61

codecov-commenter commented 1 year ago

Codecov Report

Merging #60 (f7a2b98) into master (50514ec) will increase coverage by 0.03%. The diff coverage is 100.00%.

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@            Coverage Diff             @@
##           master      #60      +/-   ##
==========================================
+ Coverage   95.88%   95.92%   +0.03%     
==========================================
  Files          21       21              
  Lines        2431     2427       -4     
==========================================
- Hits         2331     2328       -3     
+ Misses        100       99       -1     
Impacted Files Coverage Δ
include/sonic/dom/dynamicnode.h 96.08% <100.00%> (ø)
include/sonic/dom/genericnode.h 99.63% <100.00%> (ø)
include/sonic/dom/handler.h 100.00% <100.00%> (+0.95%) :arrow_up:
include/sonic/dom/parser.h 94.23% <100.00%> (ø)

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

xiegx94 commented 1 year ago

DNode(const DNode<SourceAllocator>& rhs, Allocator& alloc, bool copyString = false) operator==(const DNode<SourceAllocator>& rhs) destroy() Above functions need process when type is kRawNumber. Also kRaw

liuq19 commented 1 year ago

kRawNumber suppprt construct,copy and compare