Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support parse_as_double #239

Merged
merged 1 commit into from
Jan 23, 2024
Merged

support parse_as_double #239

merged 1 commit into from
Jan 23, 2024

Conversation

bbbgan
Copy link
Collaborator

@bbbgan bbbgan commented Jan 21, 2024

set parse_as_double == true, the dom parse of iguana will parse number as double type in any case

@codecov-commenter
Copy link

codecov-commenter commented Jan 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (0f3c0c2) 44.74% compared to head (d780a60) 44.77%.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #239      +/-   ##
==========================================
+ Coverage   44.74%   44.77%   +0.03%     
==========================================
  Files          45       45              
  Lines        5466     5469       +3     
==========================================
+ Hits         2446     2449       +3     
  Misses       3020     3020              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -634,10 +634,10 @@ IGUANA_INLINE void from_json(T &value, const Byte *data, size_t size,
}
}

template <bool Is_view = false, typename It>
template <bool parse_as_double = false, bool Is_view = false, typename It>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

parse_as_double 作为函数参数吧,默认为false,模版参数有点多了,而且这个也不需要编译期bool,运行期就好了。

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

好的,确实没必要搞成模板参数。

Copy link
Owner

@qicosmos qicosmos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@bbbgan bbbgan merged commit 5f544c8 into qicosmos:master Jan 23, 2024
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants