-
-
Notifications
You must be signed in to change notification settings - Fork 230
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
Add property-db class to record & write structured data. #397
Conversation
This adds a utility to record structured data in the form of a property database where the keys are a property path with string or number values. The data can be converted to a string, or written to a file, as JSON.
Isn't nlohmann/json MIT-licensed? |
Yes it is. I haven't gotten around to adding a note in the docs for it. |
I feel like adding MIT code into b2 will be extremely controvercial with Boost devs. Can I convince you to use a standalone version of Boost.JSON instead? |
@grisumbras it is my understanding, from having asked about using boost.json previously, that there is no standalone version of it any longer. |
There is still a standalone fork. But it requires C++17. But I'm sure I can create a version that works with C++11. |
Right.. I meant a standalone 11 version. I thought about making such changes. But never had the need or time. So if you can get such changes made I could use it instead. Even just for the plain reason that Boost.JSON is better software. I'll still go ahead with this PR though. As it's an implementation detail. And eventually I also see the need for using other non-BSL external code. So might as well think about what it means now. |
Boost.JSON is overkill if all you are doing is serializing. The only meaningful implementation work for serialization is the quoting and escaping of strings, and the conversion of double to string. We might consider creating a small, actively maintained library that only does JSON serialization, and without using the DOM (the |
I will need read and write in what I use (even if I'm only using write ATM). Not sure what "using the DOM" means though. |
Proposed changes
This adds a utility to record structured data in the form of a property database where the keys are a property path with string or number values. The data can be converted to a string, or written to a file, as JSON.
This will be used for near future recording and output of a compile database JSON file. And in the later future to produce and consume ecosystem interop information.
Types of changes
What types of changes does your code introduce?