-
Notifications
You must be signed in to change notification settings - Fork 3
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
feat: add LDValue_SerializeJSON C binding #458
Conversation
340afa6
to
f9cdb11
Compare
@@ -1,6 +1,5 @@ | |||
#pragma once | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This header wasn't necessary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am concerned about the ultimate destination of the header moves. Specifically I am concerned that it may make boost a part of our public API. I am down with providing serialization methods, but not with exposing the serialization implementation.
@kinyoklion, I've moved the serialization headers to |
598010e
to
5881d05
Compare
This adds a new API to the
LDValue
interface for serializing to a JSON string.Example:
It's easier to view this PR commit to commit. The first one was necessary in order to access the boost::json tag_invoke implementations in
common
, whereLDValue
is implemented. Luckily, I only needed to pull over thevalue
headers and some utilities.One thing to note is that boost serializes numbers using scientific notation (e.g.
17
serializes to1.7E1
). Kind of an odd choice, but it is to JSON spec.BEGIN_COMMIT_OVERRIDE
refactor: move json_errors, primitives, and value from internal to common lib
feat: add LDValue_SerializeJSON C binding
END_COMMIT_OVERRIDE