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

Fix issue #314: Added json_fwd.hpp. #327

Conversation

ralphtandetzky
Copy link

The issue asks: "Is there a way to forward declare nlohmann::json?"

This commits helps to do that. The added file helps to reduce compilation dependencies by providing a forward declaration of nlohmann::basic_json and a typedef for nlohmann::json.

This file helps to reduce compilation dependencies by providing a forward declaration of nlohmann::basic_json and the typedef nlohmann::json.
@coveralls
Copy link

Coverage Status

Coverage remained the same at 99.904% when pulling a8af911 on ralphtandetzky:ralphtandetzky-json_fwd into a0ef5a1 on nlohmann:develop.

@theodelrieu
Copy link
Contributor

Hi, sorry about the delay since this PR was opened, but due to 2.1.0 changes, could you update the forward declarations to have adl_serializer in it?

Also, if you could provide a simple test file, I think @nlohmann will be able to close this PR ;)

@nlohmann
Copy link
Owner

I still need to check for myself whether the compilation times are really that much better.

@theodelrieu
Copy link
Contributor

Sure, I guess it became huger since 2.1.0, with all the from/to_json prototypes in users' headers. But I didn't make any measurement, this is just an assumption

@zetaPRIME
Copy link

@AraHaan
Copy link

AraHaan commented Mar 9, 2017

I would really like something like this to get merged for when people need to use things like this.

@theodelrieu
Copy link
Contributor

This is something which is likely to be added in 3.0.0

As I proposed in #474 , I'd like to have separate headers for development.
We will continue to release the single header json.hpp, but I think we should also release the separate headers version for those who want it.

@nlohmann
Copy link
Owner

This won't be merged in any time soon, so I close the PR. Let's discuss future steps in #474.

@nlohmann nlohmann closed this May 15, 2017
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.

None yet

6 participants