Skip to content

Add support for rapidjson as the JSON library #52

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

Merged
merged 1 commit into from
Dec 2, 2020

Conversation

ben-clayton
Copy link
Contributor

@ben-clayton ben-clayton commented Dec 1, 2020

nlohmann is still the default, but if CPPDAP_JSON_DIR points to rapidjson, then this will be used instead

Most of this was upstreamed from:
https://fuchsia-review.googlesource.com/c/third_party/github.com/google/cppdap/+/456566

Fixes: #49

@ben-clayton ben-clayton requested a review from amaiorano December 1, 2020 16:32
nlohmann is still the default, but if `CPPDAP_JSON_DIR` points to rapidjson, then this will be used instead

Most of this was upstreamed from:
https://fuchsia-review.googlesource.com/c/third_party/github.com/google/cppdap/+/456566
Copy link
Member

@amaiorano amaiorano left a comment

Choose a reason for hiding this comment

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

Long-term, it feels like rather than writing wrappers around different JSON libs, it might make more sense to allow clients of the library to write their own wrappers, say by deriving from the common base, and providing it to cppdap via some factory function or something.

Also, it looks like there are no tests to validate that both libs work as expected, unless I missed it?

@ben-clayton
Copy link
Contributor Author

Long-term, it feels like rather than writing wrappers around different JSON libs, it might make more sense to allow clients of the library to write their own wrappers, say by deriving from the common base, and providing it to cppdap via some factory function or something.

I agree, but I'd rather not add support that isn't currently needed. If we get a request to do this then it should be pretty straightforward to do.

Also, it looks like there are no tests to validate that both libs work as expected, unless I missed it?

Yes, I need to add presubmit checks to do this. Its on my TODO list (it's been a really heavy couple of weeks). I'd like to get this landed though as it unblocks fuchsia.

@ben-clayton
Copy link
Contributor Author

Thanks. Created #53 so this isn't forgotten.

@ben-clayton ben-clayton merged commit 6d6cbf1 into google:main Dec 2, 2020
@ben-clayton ben-clayton deleted the rapidjson branch December 2, 2020 17:44
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.

Add build option for using rapidjson as an alternative JSON library
2 participants