{"action":"created","issue":{"url":"https://api.github.com/repos/nlohmann/json/issues/997","repository_url":"https://api.github.com/repos/nlohmann/json","labels_url":"https://api.github.com/repos/nlohmann/json/issues/997/labels{/name}","comments_url":"https://api.github.com/repos/nlohmann/json/issues/997/comments","events_url":"https://api.github.com/repos/nlohmann/json/issues/997/events","html_url":"https://github.com/nlohmann/json/issues/997","id":302569855,"number":997,"title":"Enable forward declaration of json by making json a class instead of a using declaration","user":{"login":"pgoodman","id":43664,"avatar_url":"https://avatars2.githubusercontent.com/u/43664?v=4","gravatar_id":"","url":"https://api.github.com/users/pgoodman","html_url":"https://github.com/pgoodman","followers_url":"https://api.github.com/users/pgoodman/followers","following_url":"https://api.github.com/users/pgoodman/following{/other_user}","gists_url":"https://api.github.com/users/pgoodman/gists{/gist_id}","starred_url":"https://api.github.com/users/pgoodman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pgoodman/subscriptions","organizations_url":"https://api.github.com/users/pgoodman/orgs","repos_url":"https://api.github.com/users/pgoodman/repos","events_url":"https://api.github.com/users/pgoodman/events{/privacy}","received_events_url":"https://api.github.com/users/pgoodman/received_events","type":"User","site_admin":false},"labels":[{"id":558418062,"url":"https://api.github.com/repos/nlohmann/json/labels/solution:%20proposed%20fix","name":"solution: proposed fix","color":"00bb00","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2018-03-06T05:34:34Z","updated_at":"2018-03-08T09:00:03Z","closed_at":null,"author_association":"NONE","body":"I would like to be able to be able to declare the conversion operators in a header without having to `#include` the json.h file. I would then define the conversion operators in a source file, which actually includes json.h.\r\n\r\nHere is an example of what I want do do, but can't:\r\n\r\n```c++\r\nnamespace nlohmann {\r\nclass json;\r\nvoid to_json(json &j, const MyType &blah);\r\nvoid from_json(const json &j, MyType &blah);\r\n}  // namespace nlohmann\r\n```\r\n\r\nWhat is stopping me is `using json = basic_json<>;`. A simple fix should be `class json : public basic_json<> {};`.\r\n"},"comment":{"url":"https://api.github.com/repos/nlohmann/json/issues/comments/371423515","html_url":"https://github.com/nlohmann/json/issues/997#issuecomment-371423515","issue_url":"https://api.github.com/repos/nlohmann/json/issues/997","id":371423515,"user":{"login":"pgoodman","id":43664,"avatar_url":"https://avatars2.githubusercontent.com/u/43664?v=4","gravatar_id":"","url":"https://api.github.com/users/pgoodman","html_url":"https://github.com/pgoodman","followers_url":"https://api.github.com/users/pgoodman/followers","following_url":"https://api.github.com/users/pgoodman/following{/other_user}","gists_url":"https://api.github.com/users/pgoodman/gists{/gist_id}","starred_url":"https://api.github.com/users/pgoodman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pgoodman/subscriptions","organizations_url":"https://api.github.com/users/pgoodman/orgs","repos_url":"https://api.github.com/users/pgoodman/repos","events_url":"https://api.github.com/users/pgoodman/events{/privacy}","received_events_url":"https://api.github.com/users/pgoodman/received_events","type":"User","site_admin":false},"created_at":"2018-03-08T09:00:03Z","updated_at":"2018-03-08T09:00:03Z","author_association":"NONE","body":"That didn't work for me."}}
{"actor":{"display_login":"pgoodman"}}