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
Feature/685 properties json serialization #743
Conversation
Also: Rename the nested / flat encoding style flag.
Just begin reviewing this PR. Sorry for being late. |
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 just reviewed the interface design and the encoding implementation and spotted several issues.
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.
My first round review is finished, and I have left some additional remarks on decoding implementation.
@PengZheng Thanks for the thorough review. |
No problem. 😄 |
I have processed al review comments. |
It has been addressed by #745 |
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.
It seems all major issues have been addressed.
I will add some minor cleanup before merging.
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.
Improve corner case treatment, check TEST_F(PropertiesSerializationTestSuite, SavePropertiesWithArrayListsContainingNaNAndInfValueTest)
for more detail.
There are still two issues for C++ API left:
#743 (comment)
#743 (comment)
I have no other complaints. Let's get this nice enhancement merged.
This PR introduces JSON encoding for properties using the libjansson library, thereby making libjansson a mandatory dependency for the utils library and, consequently, for the framework library as well.
This PR does not implement the use of the added JSON encoding for properties. This is intentional, so that the pull request review can focus how property JSON encoding should function. Since the JSON encoding is not yet used, the previous properties encoding functions are still in place. Consequently, some of the JSON encoding functions have been temporarily suffixed with "2" (e.g.,
celix_properties_load2
). These functions will be renamed before a release of Apache Celix 3.0.0.The usage of JSON encoding for configuration properties and bundle manifests will be done in one or two follow-up pull requests.
Note that although the JSON encoding for properties is not yet used for configuration properties and bundle manifests, it can already be used elsewhere (e.g., in the remote event admin) once this PR is merged.