Generated-output differences

quicktype output changed between the PR base and tested PR merge revisions.
← Back to the pull request
249test cases
253files differ
253modified
0new
0deleted
7,339changed lines
+3,796 −3,543insertions / deletions
Base 10cdaef273530caef2fdf9afdc07cdd0d1f9cae7 · PR merge 3ebcc87a4a10108cdb8e636f66ad5552184d0838 · Head 296302052acd1c0346d7c6cf7789af6b0d901c84 · raw patch
Test case

test/inputs/graphql/github1.graphql

1 generated file · +10 −9
Mgraphql-cplusplusdefault / quicktype.hpp+10 −9
@@ -154,18 +154,19 @@ namespace quicktype {
154154 }
155155
156156 namespace quicktype {
157- void from_json(const json & j, User & x);
158- void to_json(json & j, const User & x);
157+void from_json(const json & j, User & x);
158+void to_json(json & j, const User & x);
159159
160- void from_json(const json & j, Data & x);
161- void to_json(json & j, const Data & x);
160+void from_json(const json & j, Data & x);
161+void to_json(json & j, const Data & x);
162162
163- void from_json(const json & j, Error & x);
164- void to_json(json & j, const Error & x);
165-
166- void from_json(const json & j, TopLevel & x);
167- void to_json(json & j, const TopLevel & x);
163+void from_json(const json & j, Error & x);
164+void to_json(json & j, const Error & x);
168165
166+void from_json(const json & j, TopLevel & x);
167+void to_json(json & j, const TopLevel & x);
168+}
169+namespace quicktype {
169170 inline void from_json(const json & j, User& x) {
170171 x.set_login(j.at("login").get<std::string>());
171172 x.set_real_name(get_stack_optional<std::string>(j, "realName"));
Test case

test/inputs/graphql/github2.graphql

1 generated file · +14 −13
Mgraphql-cplusplusdefault / quicktype.hpp+14 −13
@@ -187,24 +187,25 @@ namespace quicktype {
187187 }
188188
189189 namespace quicktype {
190- void from_json(const json & j, Repository & x);
191- void to_json(json & j, const Repository & x);
190+void from_json(const json & j, Repository & x);
191+void to_json(json & j, const Repository & x);
192192
193- void from_json(const json & j, RepositoryConnection & x);
194- void to_json(json & j, const RepositoryConnection & x);
193+void from_json(const json & j, RepositoryConnection & x);
194+void to_json(json & j, const RepositoryConnection & x);
195195
196- void from_json(const json & j, User & x);
197- void to_json(json & j, const User & x);
196+void from_json(const json & j, User & x);
197+void to_json(json & j, const User & x);
198198
199- void from_json(const json & j, Data & x);
200- void to_json(json & j, const Data & x);
199+void from_json(const json & j, Data & x);
200+void to_json(json & j, const Data & x);
201201
202- void from_json(const json & j, Error & x);
203- void to_json(json & j, const Error & x);
204-
205- void from_json(const json & j, TopLevel & x);
206- void to_json(json & j, const TopLevel & x);
202+void from_json(const json & j, Error & x);
203+void to_json(json & j, const Error & x);
207204
205+void from_json(const json & j, TopLevel & x);
206+void to_json(json & j, const TopLevel & x);
207+}
208+namespace quicktype {
208209 inline void from_json(const json & j, Repository& x) {
209210 x.set_name(j.at("name").get<std::string>());
210211 }
Test case

test/inputs/graphql/github3.graphql

1 generated file · +18 −17
Mgraphql-cplusplusdefault / quicktype.hpp+18 −17
@@ -197,30 +197,31 @@ namespace quicktype {
197197 }
198198
199199 namespace quicktype {
200- void from_json(const json & j, PullRequest & x);
201- void to_json(json & j, const PullRequest & x);
200+void from_json(const json & j, PullRequest & x);
201+void to_json(json & j, const PullRequest & x);
202202
203- void from_json(const json & j, PullRequestConnection & x);
204- void to_json(json & j, const PullRequestConnection & x);
203+void from_json(const json & j, PullRequestConnection & x);
204+void to_json(json & j, const PullRequestConnection & x);
205205
206- void from_json(const json & j, Repository & x);
207- void to_json(json & j, const Repository & x);
206+void from_json(const json & j, Repository & x);
207+void to_json(json & j, const Repository & x);
208208
209- void from_json(const json & j, User & x);
210- void to_json(json & j, const User & x);
209+void from_json(const json & j, User & x);
210+void to_json(json & j, const User & x);
211211
212- void from_json(const json & j, Data & x);
213- void to_json(json & j, const Data & x);
212+void from_json(const json & j, Data & x);
213+void to_json(json & j, const Data & x);
214214
215- void from_json(const json & j, Error & x);
216- void to_json(json & j, const Error & x);
215+void from_json(const json & j, Error & x);
216+void to_json(json & j, const Error & x);
217217
218- void from_json(const json & j, TopLevel & x);
219- void to_json(json & j, const TopLevel & x);
220-
221- void from_json(const json & j, PullRequestState & x);
222- void to_json(json & j, const PullRequestState & x);
218+void from_json(const json & j, TopLevel & x);
219+void to_json(json & j, const TopLevel & x);
223220
221+void from_json(const json & j, PullRequestState & x);
222+void to_json(json & j, const PullRequestState & x);
223+}
224+namespace quicktype {
224225 inline void from_json(const json & j, PullRequest& x) {
225226 x.set_state(j.at("state").get<PullRequestState>());
226227 }
Test case

test/inputs/graphql/github4.graphql

1 generated file · +18 −17
Mgraphql-cplusplusdefault / quicktype.hpp+18 −17
@@ -201,30 +201,31 @@ namespace quicktype {
201201 }
202202
203203 namespace quicktype {
204- void from_json(const json & j, PullRequest & x);
205- void to_json(json & j, const PullRequest & x);
204+void from_json(const json & j, PullRequest & x);
205+void to_json(json & j, const PullRequest & x);
206206
207- void from_json(const json & j, PullRequestConnection & x);
208- void to_json(json & j, const PullRequestConnection & x);
207+void from_json(const json & j, PullRequestConnection & x);
208+void to_json(json & j, const PullRequestConnection & x);
209209
210- void from_json(const json & j, Repository & x);
211- void to_json(json & j, const Repository & x);
210+void from_json(const json & j, Repository & x);
211+void to_json(json & j, const Repository & x);
212212
213- void from_json(const json & j, User & x);
214- void to_json(json & j, const User & x);
213+void from_json(const json & j, User & x);
214+void to_json(json & j, const User & x);
215215
216- void from_json(const json & j, Data & x);
217- void to_json(json & j, const Data & x);
216+void from_json(const json & j, Data & x);
217+void to_json(json & j, const Data & x);
218218
219- void from_json(const json & j, Error & x);
220- void to_json(json & j, const Error & x);
219+void from_json(const json & j, Error & x);
220+void to_json(json & j, const Error & x);
221221
222- void from_json(const json & j, TopLevel & x);
223- void to_json(json & j, const TopLevel & x);
224-
225- void from_json(const json & j, PullRequestState & x);
226- void to_json(json & j, const PullRequestState & x);
222+void from_json(const json & j, TopLevel & x);
223+void to_json(json & j, const TopLevel & x);
227224
225+void from_json(const json & j, PullRequestState & x);
226+void to_json(json & j, const PullRequestState & x);
227+}
228+namespace quicktype {
228229 inline void from_json(const json & j, PullRequest& x) {
229230 x.set_state(j.at("state").get<PullRequestState>());
230231 }
Test case

test/inputs/graphql/github5.graphql

1 generated file · +10 −9
Mgraphql-cplusplusdefault / quicktype.hpp+10 −9
@@ -154,18 +154,19 @@ namespace quicktype {
154154 }
155155
156156 namespace quicktype {
157- void from_json(const json & j, User & x);
158- void to_json(json & j, const User & x);
157+void from_json(const json & j, User & x);
158+void to_json(json & j, const User & x);
159159
160- void from_json(const json & j, Data & x);
161- void to_json(json & j, const Data & x);
160+void from_json(const json & j, Data & x);
161+void to_json(json & j, const Data & x);
162162
163- void from_json(const json & j, Error & x);
164- void to_json(json & j, const Error & x);
165-
166- void from_json(const json & j, TopLevel & x);
167- void to_json(json & j, const TopLevel & x);
163+void from_json(const json & j, Error & x);
164+void to_json(json & j, const Error & x);
168165
166+void from_json(const json & j, TopLevel & x);
167+void to_json(json & j, const TopLevel & x);
168+}
169+namespace quicktype {
169170 inline void from_json(const json & j, User& x) {
170171 x.set_login(j.at("login").get<std::string>());
171172 x.set_name(get_stack_optional<std::string>(j, "name"));
Test case

test/inputs/graphql/github6.graphql

1 generated file · +10 −9
Mgraphql-cplusplusdefault / quicktype.hpp+10 −9
@@ -154,18 +154,19 @@ namespace quicktype {
154154 }
155155
156156 namespace quicktype {
157- void from_json(const json & j, UniformResourceLocatable & x);
158- void to_json(json & j, const UniformResourceLocatable & x);
157+void from_json(const json & j, UniformResourceLocatable & x);
158+void to_json(json & j, const UniformResourceLocatable & x);
159159
160- void from_json(const json & j, Data & x);
161- void to_json(json & j, const Data & x);
160+void from_json(const json & j, Data & x);
161+void to_json(json & j, const Data & x);
162162
163- void from_json(const json & j, Error & x);
164- void to_json(json & j, const Error & x);
165-
166- void from_json(const json & j, TopLevel & x);
167- void to_json(json & j, const TopLevel & x);
163+void from_json(const json & j, Error & x);
164+void to_json(json & j, const Error & x);
168165
166+void from_json(const json & j, TopLevel & x);
167+void to_json(json & j, const TopLevel & x);
168+}
169+namespace quicktype {
169170 inline void from_json(const json & j, UniformResourceLocatable& x) {
170171 x.set_url(j.at("url").get<std::string>());
171172 x.set_login(get_stack_optional<std::string>(j, "login"));
Test case

test/inputs/graphql/github7.graphql

1 generated file · +18 −17
Mgraphql-cplusplusdefault / quicktype.hpp+18 −17
@@ -234,30 +234,31 @@ namespace quicktype {
234234 }
235235
236236 namespace quicktype {
237- void from_json(const json & j, Connection & x);
238- void to_json(json & j, const Connection & x);
237+void from_json(const json & j, Connection & x);
238+void to_json(json & j, const Connection & x);
239239
240- void from_json(const json & j, Repository & x);
241- void to_json(json & j, const Repository & x);
240+void from_json(const json & j, Repository & x);
241+void to_json(json & j, const Repository & x);
242242
243- void from_json(const json & j, RepositoryEdge & x);
244- void to_json(json & j, const RepositoryEdge & x);
243+void from_json(const json & j, RepositoryEdge & x);
244+void to_json(json & j, const RepositoryEdge & x);
245245
246- void from_json(const json & j, RepositoryConnection & x);
247- void to_json(json & j, const RepositoryConnection & x);
246+void from_json(const json & j, RepositoryConnection & x);
247+void to_json(json & j, const RepositoryConnection & x);
248248
249- void from_json(const json & j, User & x);
250- void to_json(json & j, const User & x);
249+void from_json(const json & j, User & x);
250+void to_json(json & j, const User & x);
251251
252- void from_json(const json & j, Data & x);
253- void to_json(json & j, const Data & x);
252+void from_json(const json & j, Data & x);
253+void to_json(json & j, const Data & x);
254254
255- void from_json(const json & j, Error & x);
256- void to_json(json & j, const Error & x);
257-
258- void from_json(const json & j, TopLevel & x);
259- void to_json(json & j, const TopLevel & x);
255+void from_json(const json & j, Error & x);
256+void to_json(json & j, const Error & x);
260257
258+void from_json(const json & j, TopLevel & x);
259+void to_json(json & j, const TopLevel & x);
260+}
261+namespace quicktype {
261262 inline void from_json(const json & j, Connection& x) {
262263 x.set_total_count(j.at("totalCount").get<int64_t>());
263264 }
Test case

test/inputs/graphql/github8.graphql

1 generated file · +14 −13
Mgraphql-cplusplusdefault / quicktype.hpp+14 −13
@@ -183,24 +183,25 @@ namespace quicktype {
183183 }
184184
185185 namespace quicktype {
186- void from_json(const json & j, IssueOrPullRequest & x);
187- void to_json(json & j, const IssueOrPullRequest & x);
186+void from_json(const json & j, IssueOrPullRequest & x);
187+void to_json(json & j, const IssueOrPullRequest & x);
188188
189- void from_json(const json & j, Repository & x);
190- void to_json(json & j, const Repository & x);
189+void from_json(const json & j, Repository & x);
190+void to_json(json & j, const Repository & x);
191191
192- void from_json(const json & j, Data & x);
193- void to_json(json & j, const Data & x);
192+void from_json(const json & j, Data & x);
193+void to_json(json & j, const Data & x);
194194
195- void from_json(const json & j, Error & x);
196- void to_json(json & j, const Error & x);
195+void from_json(const json & j, Error & x);
196+void to_json(json & j, const Error & x);
197197
198- void from_json(const json & j, TopLevel & x);
199- void to_json(json & j, const TopLevel & x);
200-
201- void from_json(const json & j, IssueState & x);
202- void to_json(json & j, const IssueState & x);
198+void from_json(const json & j, TopLevel & x);
199+void to_json(json & j, const TopLevel & x);
203200
201+void from_json(const json & j, IssueState & x);
202+void to_json(json & j, const IssueState & x);
203+}
204+namespace quicktype {
204205 inline void from_json(const json & j, IssueOrPullRequest& x) {
205206 x.set_title(get_stack_optional<std::string>(j, "title"));
206207 x.set_state(get_stack_optional<IssueState>(j, "state"));
Test case

test/inputs/graphql/github9.graphql

1 generated file · +16 −15
Mgraphql-cplusplusdefault / quicktype.hpp+16 −15
@@ -192,27 +192,28 @@ namespace quicktype {
192192 }
193193
194194 namespace quicktype {
195- void from_json(const json & j, Reaction & x);
196- void to_json(json & j, const Reaction & x);
195+void from_json(const json & j, Reaction & x);
196+void to_json(json & j, const Reaction & x);
197197
198- void from_json(const json & j, Reactable & x);
199- void to_json(json & j, const Reactable & x);
198+void from_json(const json & j, Reactable & x);
199+void to_json(json & j, const Reactable & x);
200200
201- void from_json(const json & j, AddReactionPayload & x);
202- void to_json(json & j, const AddReactionPayload & x);
201+void from_json(const json & j, AddReactionPayload & x);
202+void to_json(json & j, const AddReactionPayload & x);
203203
204- void from_json(const json & j, Data & x);
205- void to_json(json & j, const Data & x);
204+void from_json(const json & j, Data & x);
205+void to_json(json & j, const Data & x);
206206
207- void from_json(const json & j, Error & x);
208- void to_json(json & j, const Error & x);
207+void from_json(const json & j, Error & x);
208+void to_json(json & j, const Error & x);
209209
210- void from_json(const json & j, TopLevel & x);
211- void to_json(json & j, const TopLevel & x);
212-
213- void from_json(const json & j, ReactionContent & x);
214- void to_json(json & j, const ReactionContent & x);
210+void from_json(const json & j, TopLevel & x);
211+void to_json(json & j, const TopLevel & x);
215212
213+void from_json(const json & j, ReactionContent & x);
214+void to_json(json & j, const ReactionContent & x);
215+}
216+namespace quicktype {
216217 inline void from_json(const json & j, Reaction& x) {
217218 x.set_content(j.at("content").get<ReactionContent>());
218219 }
Test case

test/inputs/json/misc/00ec5.json

1 generated file · +28 −27
Mcplusplusdefault / quicktype.hpp+28 −27
@@ -303,45 +303,46 @@ namespace quicktype {
303303 }
304304
305305 namespace quicktype {
306- void from_json(const json & j, Property & x);
307- void to_json(json & j, const Property & x);
306+void from_json(const json & j, Property & x);
307+void to_json(json & j, const Property & x);
308308
309- void from_json(const json & j, Provider & x);
310- void to_json(json & j, const Provider & x);
309+void from_json(const json & j, Provider & x);
310+void to_json(json & j, const Provider & x);
311311
312- void from_json(const json & j, Definitions & x);
313- void to_json(json & j, const Definitions & x);
312+void from_json(const json & j, Definitions & x);
313+void to_json(json & j, const Definitions & x);
314314
315- void from_json(const json & j, Info & x);
316- void to_json(json & j, const Info & x);
315+void from_json(const json & j, Info & x);
316+void to_json(json & j, const Info & x);
317317
318- void from_json(const json & j, Parameter & x);
319- void to_json(json & j, const Parameter & x);
318+void from_json(const json & j, Parameter & x);
319+void to_json(json & j, const Parameter & x);
320320
321- void from_json(const json & j, Schema & x);
322- void to_json(json & j, const Schema & x);
321+void from_json(const json & j, Schema & x);
322+void to_json(json & j, const Schema & x);
323323
324- void from_json(const json & j, The200 & x);
325- void to_json(json & j, const The200 & x);
324+void from_json(const json & j, The200 & x);
325+void to_json(json & j, const The200 & x);
326326
327- void from_json(const json & j, Responses & x);
328- void to_json(json & j, const Responses & x);
327+void from_json(const json & j, Responses & x);
328+void to_json(json & j, const Responses & x);
329329
330- void from_json(const json & j, Get & x);
331- void to_json(json & j, const Get & x);
330+void from_json(const json & j, Get & x);
331+void to_json(json & j, const Get & x);
332332
333- void from_json(const json & j, BusinessServiceProvidersSearch & x);
334- void to_json(json & j, const BusinessServiceProvidersSearch & x);
333+void from_json(const json & j, BusinessServiceProvidersSearch & x);
334+void to_json(json & j, const BusinessServiceProvidersSearch & x);
335335
336- void from_json(const json & j, Paths & x);
337- void to_json(json & j, const Paths & x);
336+void from_json(const json & j, Paths & x);
337+void to_json(json & j, const Paths & x);
338338
339- void from_json(const json & j, TopLevel & x);
340- void to_json(json & j, const TopLevel & x);
341-
342- void from_json(const json & j, Type & x);
343- void to_json(json & j, const Type & x);
339+void from_json(const json & j, TopLevel & x);
340+void to_json(json & j, const TopLevel & x);
344341
342+void from_json(const json & j, Type & x);
343+void to_json(json & j, const Type & x);
344+}
345+namespace quicktype {
345346 inline void from_json(const json & j, Property& x) {
346347 x.set_description(j.at("description").get<std::string>());
347348 x.set_type(j.at("type").get<Type>());
Test case

test/inputs/json/misc/010b1.json

1 generated file · +6 −5
Mcplusplusdefault / quicktype.hpp+6 −5
@@ -76,12 +76,13 @@ namespace quicktype {
7676 }
7777
7878 namespace quicktype {
79- void from_json(const json & j, TopLevelElement & x);
80- void to_json(json & j, const TopLevelElement & x);
81-
82- void from_json(const json & j, Country & x);
83- void to_json(json & j, const Country & x);
79+void from_json(const json & j, TopLevelElement & x);
80+void to_json(json & j, const TopLevelElement & x);
8481
82+void from_json(const json & j, Country & x);
83+void to_json(json & j, const Country & x);
84+}
85+namespace quicktype {
8586 inline void from_json(const json & j, TopLevelElement& x) {
8687 x.set_age(j.at("age").get<int64_t>());
8788 x.set_country(j.at("country").get<Country>());
Test case

test/inputs/json/misc/016af.json

1 generated file · +6 −5
Mcplusplusdefault / quicktype.hpp+6 −5
@@ -66,12 +66,13 @@ namespace quicktype {
6666 }
6767
6868 namespace quicktype {
69- void from_json(const json & j, TotalPopulation & x);
70- void to_json(json & j, const TotalPopulation & x);
71-
72- void from_json(const json & j, TopLevel & x);
73- void to_json(json & j, const TopLevel & x);
69+void from_json(const json & j, TotalPopulation & x);
70+void to_json(json & j, const TotalPopulation & x);
7471
72+void from_json(const json & j, TopLevel & x);
73+void to_json(json & j, const TopLevel & x);
74+}
75+namespace quicktype {
7576 inline void from_json(const json & j, TotalPopulation& x) {
7677 x.set_date(j.at("date").get<std::string>());
7778 x.set_population(j.at("population").get<int64_t>());
Test case

test/inputs/json/misc/033b1.json

1 generated file · +4 −3
Mcplusplusdefault / quicktype.hpp+4 −3
@@ -57,9 +57,10 @@ namespace quicktype {
5757 }
5858
5959 namespace quicktype {
60- void from_json(const json & j, TopLevel & x);
61- void to_json(json & j, const TopLevel & x);
62-
60+void from_json(const json & j, TopLevel & x);
61+void to_json(json & j, const TopLevel & x);
62+}
63+namespace quicktype {
6364 inline void from_json(const json & j, TopLevel& x) {
6465 x.set_base(j.at("base").get<std::string>());
6566 x.set_date(j.at("date").get<std::string>());
Test case

test/inputs/json/misc/050b0.json

1 generated file · +22 −21
Mcplusplusdefault / quicktype.hpp+22 −21
@@ -229,36 +229,37 @@ namespace quicktype {
229229 }
230230
231231 namespace quicktype {
232- void from_json(const json & j, Identifier & x);
233- void to_json(json & j, const Identifier & x);
232+void from_json(const json & j, Identifier & x);
233+void to_json(json & j, const Identifier & x);
234234
235- void from_json(const json & j, Link & x);
236- void to_json(json & j, const Link & x);
235+void from_json(const json & j, Link & x);
236+void to_json(json & j, const Link & x);
237237
238- void from_json(const json & j, OtherName & x);
239- void to_json(json & j, const OtherName & x);
238+void from_json(const json & j, OtherName & x);
239+void to_json(json & j, const OtherName & x);
240240
241- void from_json(const json & j, Text & x);
242- void to_json(json & j, const Text & x);
241+void from_json(const json & j, Text & x);
242+void to_json(json & j, const Text & x);
243243
244- void from_json(const json & j, TopLevelElement & x);
245- void to_json(json & j, const TopLevelElement & x);
244+void from_json(const json & j, TopLevelElement & x);
245+void to_json(json & j, const TopLevelElement & x);
246246
247- void from_json(const json & j, Scheme & x);
248- void to_json(json & j, const Scheme & x);
247+void from_json(const json & j, Scheme & x);
248+void to_json(json & j, const Scheme & x);
249249
250- void from_json(const json & j, Keyword & x);
251- void to_json(json & j, const Keyword & x);
250+void from_json(const json & j, Keyword & x);
251+void to_json(json & j, const Keyword & x);
252252
253- void from_json(const json & j, Note & x);
254- void to_json(json & j, const Note & x);
253+void from_json(const json & j, Note & x);
254+void to_json(json & j, const Note & x);
255255
256- void from_json(const json & j, MediaType & x);
257- void to_json(json & j, const MediaType & x);
258-
259- void from_json(const json & j, Title & x);
260- void to_json(json & j, const Title & x);
256+void from_json(const json & j, MediaType & x);
257+void to_json(json & j, const MediaType & x);
261258
259+void from_json(const json & j, Title & x);
260+void to_json(json & j, const Title & x);
261+}
262+namespace quicktype {
262263 inline void from_json(const json & j, Identifier& x) {
263264 x.set_identifier(j.at("identifier").get<std::string>());
264265 x.set_scheme(j.at("scheme").get<Scheme>());
Test case

test/inputs/json/misc/06bee.json

1 generated file · +20 −19
Mcplusplusdefault / quicktype.hpp+20 −19
@@ -156,33 +156,34 @@ namespace quicktype {
156156 }
157157
158158 namespace quicktype {
159- void from_json(const json & j, Identifier & x);
160- void to_json(json & j, const Identifier & x);
159+void from_json(const json & j, Identifier & x);
160+void to_json(json & j, const Identifier & x);
161161
162- void from_json(const json & j, Link & x);
163- void to_json(json & j, const Link & x);
162+void from_json(const json & j, Link & x);
163+void to_json(json & j, const Link & x);
164164
165- void from_json(const json & j, Text & x);
166- void to_json(json & j, const Text & x);
165+void from_json(const json & j, Text & x);
166+void to_json(json & j, const Text & x);
167167
168- void from_json(const json & j, TopLevelElement & x);
169- void to_json(json & j, const TopLevelElement & x);
168+void from_json(const json & j, TopLevelElement & x);
169+void to_json(json & j, const TopLevelElement & x);
170170
171- void from_json(const json & j, Scheme & x);
172- void to_json(json & j, const Scheme & x);
171+void from_json(const json & j, Scheme & x);
172+void to_json(json & j, const Scheme & x);
173173
174- void from_json(const json & j, Keyword & x);
175- void to_json(json & j, const Keyword & x);
174+void from_json(const json & j, Keyword & x);
175+void to_json(json & j, const Keyword & x);
176176
177- void from_json(const json & j, Note & x);
178- void to_json(json & j, const Note & x);
177+void from_json(const json & j, Note & x);
178+void to_json(json & j, const Note & x);
179179
180- void from_json(const json & j, MediaType & x);
181- void to_json(json & j, const MediaType & x);
182-
183- void from_json(const json & j, Title & x);
184- void to_json(json & j, const Title & x);
180+void from_json(const json & j, MediaType & x);
181+void to_json(json & j, const MediaType & x);
185182
183+void from_json(const json & j, Title & x);
184+void to_json(json & j, const Title & x);
185+}
186+namespace quicktype {
186187 inline void from_json(const json & j, Identifier& x) {
187188 x.set_identifier(j.at("identifier").get<std::string>());
188189 x.set_scheme(j.at("scheme").get<Scheme>());
Test case

test/inputs/json/misc/07540.json

1 generated file · +6 −5
Mcplusplusdefault / quicktype.hpp+6 −5
@@ -57,12 +57,13 @@ namespace quicktype {
5757 }
5858
5959 namespace quicktype {
60- void from_json(const json & j, Cookies & x);
61- void to_json(json & j, const Cookies & x);
62-
63- void from_json(const json & j, TopLevel & x);
64- void to_json(json & j, const TopLevel & x);
60+void from_json(const json & j, Cookies & x);
61+void to_json(json & j, const Cookies & x);
6562
63+void from_json(const json & j, TopLevel & x);
64+void to_json(json & j, const TopLevel & x);
65+}
66+namespace quicktype {
6667 inline void from_json(const json & j, Cookies& x) {
6768 (void)j;
6869 (void)x;
Test case

test/inputs/json/misc/0779f.json

1 generated file · +10 −9
Mcplusplusdefault / quicktype.hpp+10 −9
@@ -194,18 +194,19 @@ namespace quicktype {
194194 }
195195
196196 namespace quicktype {
197- void from_json(const json & j, Status & x);
198- void to_json(json & j, const Status & x);
197+void from_json(const json & j, Status & x);
198+void to_json(json & j, const Status & x);
199199
200- void from_json(const json & j, Meta & x);
201- void to_json(json & j, const Meta & x);
200+void from_json(const json & j, Meta & x);
201+void to_json(json & j, const Meta & x);
202202
203- void from_json(const json & j, Weather & x);
204- void to_json(json & j, const Weather & x);
205-
206- void from_json(const json & j, TopLevel & x);
207- void to_json(json & j, const TopLevel & x);
203+void from_json(const json & j, Weather & x);
204+void to_json(json & j, const Weather & x);
208205
206+void from_json(const json & j, TopLevel & x);
207+void to_json(json & j, const TopLevel & x);
208+}
209+namespace quicktype {
209210 inline void from_json(const json & j, Status& x) {
210211 x.set_avg_delay(j.at("avgDelay").get<std::string>());
211212 x.set_closure_begin(j.at("closureBegin").get<std::string>());
Test case

test/inputs/json/misc/07c75.json

1 generated file · +10 −9
Mcplusplusdefault / quicktype.hpp+10 −9
@@ -146,18 +146,19 @@ namespace quicktype {
146146 }
147147
148148 namespace quicktype {
149- void from_json(const json & j, Identifier & x);
150- void to_json(json & j, const Identifier & x);
149+void from_json(const json & j, Identifier & x);
150+void to_json(json & j, const Identifier & x);
151151
152- void from_json(const json & j, Link & x);
153- void to_json(json & j, const Link & x);
152+void from_json(const json & j, Link & x);
153+void to_json(json & j, const Link & x);
154154
155- void from_json(const json & j, Text & x);
156- void to_json(json & j, const Text & x);
157-
158- void from_json(const json & j, TopLevelElement & x);
159- void to_json(json & j, const TopLevelElement & x);
155+void from_json(const json & j, Text & x);
156+void to_json(json & j, const Text & x);
160157
158+void from_json(const json & j, TopLevelElement & x);
159+void to_json(json & j, const TopLevelElement & x);
160+}
161+namespace quicktype {
161162 inline void from_json(const json & j, Identifier& x) {
162163 x.set_identifier(j.at("identifier").get<std::string>());
163164 x.set_scheme(j.at("scheme").get<std::string>());
Test case

test/inputs/json/misc/09f54.json

1 generated file · +8 −7
Mcplusplusdefault / quicktype.hpp+8 −7
@@ -100,15 +100,16 @@ namespace quicktype {
100100 }
101101
102102 namespace quicktype {
103- void from_json(const json & j, Datum & x);
104- void to_json(json & j, const Datum & x);
103+void from_json(const json & j, Datum & x);
104+void to_json(json & j, const Datum & x);
105105
106- void from_json(const json & j, Description & x);
107- void to_json(json & j, const Description & x);
108-
109- void from_json(const json & j, TopLevel & x);
110- void to_json(json & j, const TopLevel & x);
106+void from_json(const json & j, Description & x);
107+void to_json(json & j, const Description & x);
111108
109+void from_json(const json & j, TopLevel & x);
110+void to_json(json & j, const TopLevel & x);
111+}
112+namespace quicktype {
112113 inline void from_json(const json & j, Datum& x) {
113114 x.set_anomaly(j.at("anomaly").get<std::string>());
114115 x.set_value(j.at("value").get<std::string>());
Test case

test/inputs/json/misc/0a358.json

1 generated file · +8 −7
Mcplusplusdefault / quicktype.hpp+8 −7
@@ -126,15 +126,16 @@ namespace quicktype {
126126 }
127127
128128 namespace quicktype {
129- void from_json(const json & j, Facets & x);
130- void to_json(json & j, const Facets & x);
129+void from_json(const json & j, Facets & x);
130+void to_json(json & j, const Facets & x);
131131
132- void from_json(const json & j, Result & x);
133- void to_json(json & j, const Result & x);
134-
135- void from_json(const json & j, TopLevel & x);
136- void to_json(json & j, const TopLevel & x);
132+void from_json(const json & j, Result & x);
133+void to_json(json & j, const Result & x);
137134
135+void from_json(const json & j, TopLevel & x);
136+void to_json(json & j, const TopLevel & x);
137+}
138+namespace quicktype {
138139 inline void from_json(const json & j, Facets& x) {
139140 (void)j;
140141 (void)x;
Test case

test/inputs/json/misc/0a91a.json

1 generated file · +28 −27
Mcplusplusdefault / quicktype.hpp+28 −27
@@ -1096,45 +1096,46 @@ namespace quicktype {
10961096 }
10971097
10981098 namespace quicktype {
1099- void from_json(const json & j, Actor & x);
1100- void to_json(json & j, const Actor & x);
1099+void from_json(const json & j, Actor & x);
1100+void to_json(json & j, const Actor & x);
11011101
1102- void from_json(const json & j, Author & x);
1103- void to_json(json & j, const Author & x);
1102+void from_json(const json & j, Author & x);
1103+void to_json(json & j, const Author & x);
11041104
1105- void from_json(const json & j, Commit & x);
1106- void to_json(json & j, const Commit & x);
1105+void from_json(const json & j, Commit & x);
1106+void to_json(json & j, const Commit & x);
11071107
1108- void from_json(const json & j, MergedBy & x);
1109- void to_json(json & j, const MergedBy & x);
1108+void from_json(const json & j, MergedBy & x);
1109+void to_json(json & j, const MergedBy & x);
11101110
1111- void from_json(const json & j, BaseRepo & x);
1112- void to_json(json & j, const BaseRepo & x);
1111+void from_json(const json & j, BaseRepo & x);
1112+void to_json(json & j, const BaseRepo & x);
11131113
1114- void from_json(const json & j, Base & x);
1115- void to_json(json & j, const Base & x);
1114+void from_json(const json & j, Base & x);
1115+void to_json(json & j, const Base & x);
11161116
1117- void from_json(const json & j, Comments & x);
1118- void to_json(json & j, const Comments & x);
1117+void from_json(const json & j, Comments & x);
1118+void to_json(json & j, const Comments & x);
11191119
1120- void from_json(const json & j, Links & x);
1121- void to_json(json & j, const Links & x);
1120+void from_json(const json & j, Links & x);
1121+void to_json(json & j, const Links & x);
11221122
1123- void from_json(const json & j, PullRequest & x);
1124- void to_json(json & j, const PullRequest & x);
1123+void from_json(const json & j, PullRequest & x);
1124+void to_json(json & j, const PullRequest & x);
11251125
1126- void from_json(const json & j, Payload & x);
1127- void to_json(json & j, const Payload & x);
1126+void from_json(const json & j, Payload & x);
1127+void to_json(json & j, const Payload & x);
11281128
1129- void from_json(const json & j, TopLevelRepo & x);
1130- void to_json(json & j, const TopLevelRepo & x);
1129+void from_json(const json & j, TopLevelRepo & x);
1130+void to_json(json & j, const TopLevelRepo & x);
11311131
1132- void from_json(const json & j, TopLevelElement & x);
1133- void to_json(json & j, const TopLevelElement & x);
1134-
1135- void from_json(const json & j, Type & x);
1136- void to_json(json & j, const Type & x);
1132+void from_json(const json & j, TopLevelElement & x);
1133+void to_json(json & j, const TopLevelElement & x);
11371134
1135+void from_json(const json & j, Type & x);
1136+void to_json(json & j, const Type & x);
1137+}
1138+namespace quicktype {
11381139 inline void from_json(const json & j, Actor& x) {
11391140 x.set_avatar_url(j.at("avatar_url").get<std::string>());
11401141 x.set_display_login(get_stack_optional<std::string>(j, "display_login"));
Test case

test/inputs/json/misc/0b91a.json

1 generated file · +14 −13
Mcplusplusdefault / quicktype.hpp+14 −13
@@ -217,24 +217,25 @@ namespace quicktype {
217217 }
218218
219219 namespace quicktype {
220- void from_json(const json & j, ResponseInfo & x);
221- void to_json(json & j, const ResponseInfo & x);
220+void from_json(const json & j, ResponseInfo & x);
221+void to_json(json & j, const ResponseInfo & x);
222222
223- void from_json(const json & j, Resultset & x);
224- void to_json(json & j, const Resultset & x);
223+void from_json(const json & j, Resultset & x);
224+void to_json(json & j, const Resultset & x);
225225
226- void from_json(const json & j, Metadata & x);
227- void to_json(json & j, const Metadata & x);
226+void from_json(const json & j, Metadata & x);
227+void to_json(json & j, const Metadata & x);
228228
229- void from_json(const json & j, Component & x);
230- void to_json(json & j, const Component & x);
229+void from_json(const json & j, Component & x);
230+void to_json(json & j, const Component & x);
231231
232- void from_json(const json & j, Result & x);
233- void to_json(json & j, const Result & x);
234-
235- void from_json(const json & j, TopLevel & x);
236- void to_json(json & j, const TopLevel & x);
232+void from_json(const json & j, Result & x);
233+void to_json(json & j, const Result & x);
237234
235+void from_json(const json & j, TopLevel & x);
236+void to_json(json & j, const TopLevel & x);
237+}
238+namespace quicktype {
238239 inline void from_json(const json & j, ResponseInfo& x) {
239240 x.set_developer_message(j.at("developerMessage").get<std::string>());
240241 x.set_status(j.at("status").get<int64_t>());
Test case

test/inputs/json/misc/0cffa.json

1 generated file · +28 −27
Mcplusplusdefault / quicktype.hpp+28 −27
@@ -566,45 +566,46 @@ namespace quicktype {
566566 }
567567
568568 namespace quicktype {
569- void from_json(const json & j, The480_WStill & x);
570- void to_json(json & j, const The480_WStill & x);
569+void from_json(const json & j, The480_WStill & x);
570+void to_json(json & j, const The480_WStill & x);
571571
572- void from_json(const json & j, DownsizedSmall & x);
573- void to_json(json & j, const DownsizedSmall & x);
572+void from_json(const json & j, DownsizedSmall & x);
573+void to_json(json & j, const DownsizedSmall & x);
574574
575- void from_json(const json & j, FixedHeight & x);
576- void to_json(json & j, const FixedHeight & x);
575+void from_json(const json & j, FixedHeight & x);
576+void to_json(json & j, const FixedHeight & x);
577577
578- void from_json(const json & j, Looping & x);
579- void to_json(json & j, const Looping & x);
578+void from_json(const json & j, Looping & x);
579+void to_json(json & j, const Looping & x);
580580
581- void from_json(const json & j, Images & x);
582- void to_json(json & j, const Images & x);
581+void from_json(const json & j, Images & x);
582+void to_json(json & j, const Images & x);
583583
584- void from_json(const json & j, User & x);
585- void to_json(json & j, const User & x);
584+void from_json(const json & j, User & x);
585+void to_json(json & j, const User & x);
586586
587- void from_json(const json & j, Datum & x);
588- void to_json(json & j, const Datum & x);
587+void from_json(const json & j, Datum & x);
588+void to_json(json & j, const Datum & x);
589589
590- void from_json(const json & j, Meta & x);
591- void to_json(json & j, const Meta & x);
590+void from_json(const json & j, Meta & x);
591+void to_json(json & j, const Meta & x);
592592
593- void from_json(const json & j, Pagination & x);
594- void to_json(json & j, const Pagination & x);
593+void from_json(const json & j, Pagination & x);
594+void to_json(json & j, const Pagination & x);
595595
596- void from_json(const json & j, TopLevel & x);
597- void to_json(json & j, const TopLevel & x);
596+void from_json(const json & j, TopLevel & x);
597+void to_json(json & j, const TopLevel & x);
598598
599- void from_json(const json & j, Rating & x);
600- void to_json(json & j, const Rating & x);
599+void from_json(const json & j, Rating & x);
600+void to_json(json & j, const Rating & x);
601601
602- void from_json(const json & j, Type & x);
603- void to_json(json & j, const Type & x);
604-
605- void from_json(const json & j, Username & x);
606- void to_json(json & j, const Username & x);
602+void from_json(const json & j, Type & x);
603+void to_json(json & j, const Type & x);
607604
605+void from_json(const json & j, Username & x);
606+void to_json(json & j, const Username & x);
607+}
608+namespace quicktype {
608609 inline void from_json(const json & j, The480_WStill& x) {
609610 x.set_height(j.at("height").get<std::string>());
610611 x.set_size(get_stack_optional<std::string>(j, "size"));
Test case

test/inputs/json/misc/0e0c2.json

1 generated file · +24 −23
Mcplusplusdefault / quicktype.hpp+24 −23
@@ -391,39 +391,40 @@ namespace quicktype {
391391 }
392392
393393 namespace quicktype {
394- void from_json(const json & j, Collection & x);
395- void to_json(json & j, const Collection & x);
394+void from_json(const json & j, Collection & x);
395+void to_json(json & j, const Collection & x);
396396
397- void from_json(const json & j, Detail & x);
398- void to_json(json & j, const Detail & x);
397+void from_json(const json & j, Detail & x);
398+void to_json(json & j, const Detail & x);
399399
400- void from_json(const json & j, FavMovie & x);
401- void to_json(json & j, const FavMovie & x);
400+void from_json(const json & j, FavMovie & x);
401+void to_json(json & j, const FavMovie & x);
402402
403- void from_json(const json & j, Image & x);
404- void to_json(json & j, const Image & x);
403+void from_json(const json & j, Image & x);
404+void to_json(json & j, const Image & x);
405405
406- void from_json(const json & j, Video & x);
407- void to_json(json & j, const Video & x);
406+void from_json(const json & j, Video & x);
407+void to_json(json & j, const Video & x);
408408
409- void from_json(const json & j, VoteScore & x);
410- void to_json(json & j, const VoteScore & x);
409+void from_json(const json & j, VoteScore & x);
410+void to_json(json & j, const VoteScore & x);
411411
412- void from_json(const json & j, Result & x);
413- void to_json(json & j, const Result & x);
412+void from_json(const json & j, Result & x);
413+void to_json(json & j, const Result & x);
414414
415- void from_json(const json & j, TopLevel & x);
416- void to_json(json & j, const TopLevel & x);
415+void from_json(const json & j, TopLevel & x);
416+void to_json(json & j, const TopLevel & x);
417417
418- void from_json(const json & j, DetailLanguage & x);
419- void to_json(json & j, const DetailLanguage & x);
418+void from_json(const json & j, DetailLanguage & x);
419+void to_json(json & j, const DetailLanguage & x);
420420
421- void from_json(const json & j, Type & x);
422- void to_json(json & j, const Type & x);
423-
424- void from_json(const json & j, ResultLanguage & x);
425- void to_json(json & j, const ResultLanguage & x);
421+void from_json(const json & j, Type & x);
422+void to_json(json & j, const Type & x);
426423
424+void from_json(const json & j, ResultLanguage & x);
425+void to_json(json & j, const ResultLanguage & x);
426+}
427+namespace quicktype {
427428 inline void from_json(const json & j, Collection& x) {
428429 x.set_id(j.at("id").get<int64_t>());
429430 x.set_movies(j.at("movies").get<std::vector<int64_t>>());
Test case

test/inputs/json/misc/0fecf.json

1 generated file · +4 −3
Mcplusplusdefault / quicktype.hpp+4 −3
@@ -47,9 +47,10 @@ namespace quicktype {
4747 }
4848
4949 namespace quicktype {
50- void from_json(const json & j, TopLevel & x);
51- void to_json(json & j, const TopLevel & x);
52-
50+void from_json(const json & j, TopLevel & x);
51+void to_json(json & j, const TopLevel & x);
52+}
53+namespace quicktype {
5354 inline void from_json(const json & j, TopLevel& x) {
5455 x.set_countries(j.at("countries").get<std::vector<std::string>>());
5556 }
Test case

test/inputs/json/misc/10be4.json

1 generated file · +22 −21
Mcplusplusdefault / quicktype.hpp+22 −21
@@ -229,36 +229,37 @@ namespace quicktype {
229229 }
230230
231231 namespace quicktype {
232- void from_json(const json & j, Identifier & x);
233- void to_json(json & j, const Identifier & x);
232+void from_json(const json & j, Identifier & x);
233+void to_json(json & j, const Identifier & x);
234234
235- void from_json(const json & j, Link & x);
236- void to_json(json & j, const Link & x);
235+void from_json(const json & j, Link & x);
236+void to_json(json & j, const Link & x);
237237
238- void from_json(const json & j, OtherName & x);
239- void to_json(json & j, const OtherName & x);
238+void from_json(const json & j, OtherName & x);
239+void to_json(json & j, const OtherName & x);
240240
241- void from_json(const json & j, Text & x);
242- void to_json(json & j, const Text & x);
241+void from_json(const json & j, Text & x);
242+void to_json(json & j, const Text & x);
243243
244- void from_json(const json & j, TopLevelElement & x);
245- void to_json(json & j, const TopLevelElement & x);
244+void from_json(const json & j, TopLevelElement & x);
245+void to_json(json & j, const TopLevelElement & x);
246246
247- void from_json(const json & j, Scheme & x);
248- void to_json(json & j, const Scheme & x);
247+void from_json(const json & j, Scheme & x);
248+void to_json(json & j, const Scheme & x);
249249
250- void from_json(const json & j, Keyword & x);
251- void to_json(json & j, const Keyword & x);
250+void from_json(const json & j, Keyword & x);
251+void to_json(json & j, const Keyword & x);
252252
253- void from_json(const json & j, Note & x);
254- void to_json(json & j, const Note & x);
253+void from_json(const json & j, Note & x);
254+void to_json(json & j, const Note & x);
255255
256- void from_json(const json & j, MediaType & x);
257- void to_json(json & j, const MediaType & x);
258-
259- void from_json(const json & j, Title & x);
260- void to_json(json & j, const Title & x);
256+void from_json(const json & j, MediaType & x);
257+void to_json(json & j, const MediaType & x);
261258
259+void from_json(const json & j, Title & x);
260+void to_json(json & j, const Title & x);
261+}
262+namespace quicktype {
262263 inline void from_json(const json & j, Identifier& x) {
263264 x.set_identifier(j.at("identifier").get<std::string>());
264265 x.set_scheme(j.at("scheme").get<Scheme>());
Test case

test/inputs/json/misc/112b5.json

1 generated file · +8 −7
Mcplusplusdefault / quicktype.hpp+8 −7
@@ -101,15 +101,16 @@ namespace quicktype {
101101 }
102102
103103 namespace quicktype {
104- void from_json(const json & j, Args & x);
105- void to_json(json & j, const Args & x);
104+void from_json(const json & j, Args & x);
105+void to_json(json & j, const Args & x);
106106
107- void from_json(const json & j, Headers & x);
108- void to_json(json & j, const Headers & x);
109-
110- void from_json(const json & j, TopLevel & x);
111- void to_json(json & j, const TopLevel & x);
107+void from_json(const json & j, Headers & x);
108+void to_json(json & j, const Headers & x);
112109
110+void from_json(const json & j, TopLevel & x);
111+void to_json(json & j, const TopLevel & x);
112+}
113+namespace quicktype {
113114 inline void from_json(const json & j, Args& x) {
114115 (void)j;
115116 (void)x;
Test case

test/inputs/json/misc/127a1.json

1 generated file · +28 −27
Mcplusplusdefault / quicktype.hpp+28 −27
@@ -566,45 +566,46 @@ namespace quicktype {
566566 }
567567
568568 namespace quicktype {
569- void from_json(const json & j, The480_WStill & x);
570- void to_json(json & j, const The480_WStill & x);
569+void from_json(const json & j, The480_WStill & x);
570+void to_json(json & j, const The480_WStill & x);
571571
572- void from_json(const json & j, DownsizedSmall & x);
573- void to_json(json & j, const DownsizedSmall & x);
572+void from_json(const json & j, DownsizedSmall & x);
573+void to_json(json & j, const DownsizedSmall & x);
574574
575- void from_json(const json & j, FixedHeight & x);
576- void to_json(json & j, const FixedHeight & x);
575+void from_json(const json & j, FixedHeight & x);
576+void to_json(json & j, const FixedHeight & x);
577577
578- void from_json(const json & j, Looping & x);
579- void to_json(json & j, const Looping & x);
578+void from_json(const json & j, Looping & x);
579+void to_json(json & j, const Looping & x);
580580
581- void from_json(const json & j, Images & x);
582- void to_json(json & j, const Images & x);
581+void from_json(const json & j, Images & x);
582+void to_json(json & j, const Images & x);
583583
584- void from_json(const json & j, User & x);
585- void to_json(json & j, const User & x);
584+void from_json(const json & j, User & x);
585+void to_json(json & j, const User & x);
586586
587- void from_json(const json & j, Datum & x);
588- void to_json(json & j, const Datum & x);
587+void from_json(const json & j, Datum & x);
588+void to_json(json & j, const Datum & x);
589589
590- void from_json(const json & j, Meta & x);
591- void to_json(json & j, const Meta & x);
590+void from_json(const json & j, Meta & x);
591+void to_json(json & j, const Meta & x);
592592
593- void from_json(const json & j, Pagination & x);
594- void to_json(json & j, const Pagination & x);
593+void from_json(const json & j, Pagination & x);
594+void to_json(json & j, const Pagination & x);
595595
596- void from_json(const json & j, TopLevel & x);
597- void to_json(json & j, const TopLevel & x);
596+void from_json(const json & j, TopLevel & x);
597+void to_json(json & j, const TopLevel & x);
598598
599- void from_json(const json & j, Rating & x);
600- void to_json(json & j, const Rating & x);
599+void from_json(const json & j, Rating & x);
600+void to_json(json & j, const Rating & x);
601601
602- void from_json(const json & j, Type & x);
603- void to_json(json & j, const Type & x);
604-
605- void from_json(const json & j, Username & x);
606- void to_json(json & j, const Username & x);
602+void from_json(const json & j, Type & x);
603+void to_json(json & j, const Type & x);
607604
605+void from_json(const json & j, Username & x);
606+void to_json(json & j, const Username & x);
607+}
608+namespace quicktype {
608609 inline void from_json(const json & j, The480_WStill& x) {
609610 x.set_height(j.at("height").get<std::string>());
610611 x.set_size(get_stack_optional<std::string>(j, "size"));
Test case

test/inputs/json/misc/13d8d.json

1 generated file · +10 −9
Mcplusplusdefault / quicktype.hpp+10 −9
@@ -151,18 +151,19 @@ namespace quicktype {
151151 }
152152
153153 namespace quicktype {
154- void from_json(const json & j, Street & x);
155- void to_json(json & j, const Street & x);
154+void from_json(const json & j, Street & x);
155+void to_json(json & j, const Street & x);
156156
157- void from_json(const json & j, Location & x);
158- void to_json(json & j, const Location & x);
157+void from_json(const json & j, Location & x);
158+void to_json(json & j, const Location & x);
159159
160- void from_json(const json & j, OutcomeStatus & x);
161- void to_json(json & j, const OutcomeStatus & x);
162-
163- void from_json(const json & j, TopLevelElement & x);
164- void to_json(json & j, const TopLevelElement & x);
160+void from_json(const json & j, OutcomeStatus & x);
161+void to_json(json & j, const OutcomeStatus & x);
165162
163+void from_json(const json & j, TopLevelElement & x);
164+void to_json(json & j, const TopLevelElement & x);
165+}
166+namespace quicktype {
166167 inline void from_json(const json & j, Street& x) {
167168 x.set_id(j.at("id").get<int64_t>());
168169 x.set_name(j.at("name").get<std::string>());
Test case

test/inputs/json/misc/14d38.json

1 generated file · +6 −5
Mcplusplusdefault / quicktype.hpp+6 −5
@@ -76,12 +76,13 @@ namespace quicktype {
7676 }
7777
7878 namespace quicktype {
79- void from_json(const json & j, Headers & x);
80- void to_json(json & j, const Headers & x);
81-
82- void from_json(const json & j, TopLevel & x);
83- void to_json(json & j, const TopLevel & x);
79+void from_json(const json & j, Headers & x);
80+void to_json(json & j, const Headers & x);
8481
82+void from_json(const json & j, TopLevel & x);
83+void to_json(json & j, const TopLevel & x);
84+}
85+namespace quicktype {
8586 inline void from_json(const json & j, Headers& x) {
8687 x.set_accept_encoding(j.at("Accept-Encoding").get<std::string>());
8788 x.set_connection(j.at("Connection").get<std::string>());
Test case

test/inputs/json/misc/167d6.json

1 generated file · +4 −3
Mcplusplusdefault / quicktype.hpp+4 −3
@@ -57,9 +57,10 @@ namespace quicktype {
5757 }
5858
5959 namespace quicktype {
60- void from_json(const json & j, TopLevel & x);
61- void to_json(json & j, const TopLevel & x);
62-
60+void from_json(const json & j, TopLevel & x);
61+void to_json(json & j, const TopLevel & x);
62+}
63+namespace quicktype {
6364 inline void from_json(const json & j, TopLevel& x) {
6465 x.set_base(j.at("base").get<std::string>());
6566 x.set_date(j.at("date").get<std::string>());
Test case

test/inputs/json/misc/16bc5.json

1 generated file · +30 −29
Mcplusplusdefault / quicktype.hpp+30 −29
@@ -459,48 +459,49 @@ namespace quicktype {
459459 }
460460
461461 namespace quicktype {
462- void from_json(const json & j, Astronomy & x);
463- void to_json(json & j, const Astronomy & x);
462+void from_json(const json & j, Astronomy & x);
463+void to_json(json & j, const Astronomy & x);
464464
465- void from_json(const json & j, Atmosphere & x);
466- void to_json(json & j, const Atmosphere & x);
465+void from_json(const json & j, Atmosphere & x);
466+void to_json(json & j, const Atmosphere & x);
467467
468- void from_json(const json & j, Image & x);
469- void to_json(json & j, const Image & x);
468+void from_json(const json & j, Image & x);
469+void to_json(json & j, const Image & x);
470470
471- void from_json(const json & j, Condition & x);
472- void to_json(json & j, const Condition & x);
471+void from_json(const json & j, Condition & x);
472+void to_json(json & j, const Condition & x);
473473
474- void from_json(const json & j, Forecast & x);
475- void to_json(json & j, const Forecast & x);
474+void from_json(const json & j, Forecast & x);
475+void to_json(json & j, const Forecast & x);
476476
477- void from_json(const json & j, Guid & x);
478- void to_json(json & j, const Guid & x);
477+void from_json(const json & j, Guid & x);
478+void to_json(json & j, const Guid & x);
479479
480- void from_json(const json & j, Item & x);
481- void to_json(json & j, const Item & x);
480+void from_json(const json & j, Item & x);
481+void to_json(json & j, const Item & x);
482482
483- void from_json(const json & j, Location & x);
484- void to_json(json & j, const Location & x);
483+void from_json(const json & j, Location & x);
484+void to_json(json & j, const Location & x);
485485
486- void from_json(const json & j, Units & x);
487- void to_json(json & j, const Units & x);
486+void from_json(const json & j, Units & x);
487+void to_json(json & j, const Units & x);
488488
489- void from_json(const json & j, Wind & x);
490- void to_json(json & j, const Wind & x);
489+void from_json(const json & j, Wind & x);
490+void to_json(json & j, const Wind & x);
491491
492- void from_json(const json & j, Channel & x);
493- void to_json(json & j, const Channel & x);
492+void from_json(const json & j, Channel & x);
493+void to_json(json & j, const Channel & x);
494494
495- void from_json(const json & j, Results & x);
496- void to_json(json & j, const Results & x);
495+void from_json(const json & j, Results & x);
496+void to_json(json & j, const Results & x);
497497
498- void from_json(const json & j, Query & x);
499- void to_json(json & j, const Query & x);
500-
501- void from_json(const json & j, TopLevel & x);
502- void to_json(json & j, const TopLevel & x);
498+void from_json(const json & j, Query & x);
499+void to_json(json & j, const Query & x);
503500
501+void from_json(const json & j, TopLevel & x);
502+void to_json(json & j, const TopLevel & x);
503+}
504+namespace quicktype {
504505 inline void from_json(const json & j, Astronomy& x) {
505506 x.set_sunrise(j.at("sunrise").get<std::string>());
506507 x.set_sunset(j.at("sunset").get<std::string>());
Test case

test/inputs/json/misc/176f1.json

1 generated file · +12 −11
Mcplusplusdefault / quicktype.hpp+12 −11
@@ -205,21 +205,22 @@ namespace quicktype {
205205 }
206206
207207 namespace quicktype {
208- void from_json(const json & j, Footnote & x);
209- void to_json(json & j, const Footnote & x);
208+void from_json(const json & j, Footnote & x);
209+void to_json(json & j, const Footnote & x);
210210
211- void from_json(const json & j, Datum & x);
212- void to_json(json & j, const Datum & x);
211+void from_json(const json & j, Datum & x);
212+void to_json(json & j, const Datum & x);
213213
214- void from_json(const json & j, Series & x);
215- void to_json(json & j, const Series & x);
214+void from_json(const json & j, Series & x);
215+void to_json(json & j, const Series & x);
216216
217- void from_json(const json & j, Results & x);
218- void to_json(json & j, const Results & x);
219-
220- void from_json(const json & j, TopLevel & x);
221- void to_json(json & j, const TopLevel & x);
217+void from_json(const json & j, Results & x);
218+void to_json(json & j, const Results & x);
222219
220+void from_json(const json & j, TopLevel & x);
221+void to_json(json & j, const TopLevel & x);
222+}
223+namespace quicktype {
223224 inline void from_json(const json & j, Footnote& x) {
224225 x.set_code(get_stack_optional<std::string>(j, "code"));
225226 x.set_text(get_stack_optional<std::string>(j, "text"));
Test case

test/inputs/json/misc/1a7f5.json

1 generated file · +6 −5
Mcplusplusdefault / quicktype.hpp+6 −5
@@ -76,12 +76,13 @@ namespace quicktype {
7676 }
7777
7878 namespace quicktype {
79- void from_json(const json & j, TopLevelElement & x);
80- void to_json(json & j, const TopLevelElement & x);
81-
82- void from_json(const json & j, Country & x);
83- void to_json(json & j, const Country & x);
79+void from_json(const json & j, TopLevelElement & x);
80+void to_json(json & j, const TopLevelElement & x);
8481
82+void from_json(const json & j, Country & x);
83+void to_json(json & j, const Country & x);
84+}
85+namespace quicktype {
8586 inline void from_json(const json & j, TopLevelElement& x) {
8687 x.set_age(j.at("age").get<int64_t>());
8788 x.set_country(j.at("country").get<Country>());
Test case

test/inputs/json/misc/1b28c.json

1 generated file · +6 −5
Mcplusplusdefault / quicktype.hpp+6 −5
@@ -66,12 +66,13 @@ namespace quicktype {
6666 }
6767
6868 namespace quicktype {
69- void from_json(const json & j, TotalPopulation & x);
70- void to_json(json & j, const TotalPopulation & x);
71-
72- void from_json(const json & j, TopLevel & x);
73- void to_json(json & j, const TopLevel & x);
69+void from_json(const json & j, TotalPopulation & x);
70+void to_json(json & j, const TotalPopulation & x);
7471
72+void from_json(const json & j, TopLevel & x);
73+void to_json(json & j, const TopLevel & x);
74+}
75+namespace quicktype {
7576 inline void from_json(const json & j, TotalPopulation& x) {
7677 x.set_date(j.at("date").get<std::string>());
7778 x.set_population(j.at("population").get<int64_t>());
Test case

test/inputs/json/misc/1b409.json

1 generated file · +26 −25
Mcplusplusdefault / quicktype.hpp+26 −25
@@ -389,42 +389,43 @@ namespace quicktype {
389389 }
390390
391391 namespace quicktype {
392- void from_json(const json & j, Meta & x);
393- void to_json(json & j, const Meta & x);
392+void from_json(const json & j, Meta & x);
393+void to_json(json & j, const Meta & x);
394394
395- void from_json(const json & j, Extra & x);
396- void to_json(json & j, const Extra & x);
395+void from_json(const json & j, Extra & x);
396+void to_json(json & j, const Extra & x);
397397
398- void from_json(const json & j, Person & x);
399- void to_json(json & j, const Person & x);
398+void from_json(const json & j, Person & x);
399+void to_json(json & j, const Person & x);
400400
401- void from_json(const json & j, Object & x);
402- void to_json(json & j, const Object & x);
401+void from_json(const json & j, Object & x);
402+void to_json(json & j, const Object & x);
403403
404- void from_json(const json & j, TopLevel & x);
405- void to_json(json & j, const TopLevel & x);
404+void from_json(const json & j, TopLevel & x);
405+void to_json(json & j, const TopLevel & x);
406406
407- void from_json(const json & j, Party & x);
408- void to_json(json & j, const Party & x);
407+void from_json(const json & j, Party & x);
408+void to_json(json & j, const Party & x);
409409
410- void from_json(const json & j, Gender & x);
411- void to_json(json & j, const Gender & x);
410+void from_json(const json & j, Gender & x);
411+void to_json(json & j, const Gender & x);
412412
413- void from_json(const json & j, GenderLabel & x);
414- void to_json(json & j, const GenderLabel & x);
413+void from_json(const json & j, GenderLabel & x);
414+void to_json(json & j, const GenderLabel & x);
415415
416- void from_json(const json & j, Namemod & x);
417- void to_json(json & j, const Namemod & x);
416+void from_json(const json & j, Namemod & x);
417+void to_json(json & j, const Namemod & x);
418418
419- void from_json(const json & j, RoleType & x);
420- void to_json(json & j, const RoleType & x);
419+void from_json(const json & j, RoleType & x);
420+void to_json(json & j, const RoleType & x);
421421
422- void from_json(const json & j, RoleTypeLabel & x);
423- void to_json(json & j, const RoleTypeLabel & x);
424-
425- void from_json(const json & j, Title & x);
426- void to_json(json & j, const Title & x);
422+void from_json(const json & j, RoleTypeLabel & x);
423+void to_json(json & j, const RoleTypeLabel & x);
427424
425+void from_json(const json & j, Title & x);
426+void to_json(json & j, const Title & x);
427+}
428+namespace quicktype {
428429 inline void from_json(const json & j, Meta& x) {
429430 x.set_limit(j.at("limit").get<int64_t>());
430431 x.set_offset(j.at("offset").get<int64_t>());
Test case

test/inputs/json/misc/2465e.json

1 generated file · +28 −27
Mcplusplusdefault / quicktype.hpp+28 −27
@@ -340,45 +340,46 @@ namespace quicktype {
340340 }
341341
342342 namespace quicktype {
343- void from_json(const json & j, Annotations & x);
344- void to_json(json & j, const Annotations & x);
343+void from_json(const json & j, Annotations & x);
344+void to_json(json & j, const Annotations & x);
345345
346- void from_json(const json & j, Properties & x);
347- void to_json(json & j, const Properties & x);
346+void from_json(const json & j, Properties & x);
347+void to_json(json & j, const Properties & x);
348348
349- void from_json(const json & j, Taxonomy & x);
350- void to_json(json & j, const Taxonomy & x);
349+void from_json(const json & j, Taxonomy & x);
350+void to_json(json & j, const Taxonomy & x);
351351
352- void from_json(const json & j, Definitions & x);
353- void to_json(json & j, const Definitions & x);
352+void from_json(const json & j, Definitions & x);
353+void to_json(json & j, const Definitions & x);
354354
355- void from_json(const json & j, Info & x);
356- void to_json(json & j, const Info & x);
355+void from_json(const json & j, Info & x);
356+void to_json(json & j, const Info & x);
357357
358- void from_json(const json & j, Parameter & x);
359- void to_json(json & j, const Parameter & x);
358+void from_json(const json & j, Parameter & x);
359+void to_json(json & j, const Parameter & x);
360360
361- void from_json(const json & j, Schema & x);
362- void to_json(json & j, const Schema & x);
361+void from_json(const json & j, Schema & x);
362+void to_json(json & j, const Schema & x);
363363
364- void from_json(const json & j, The200 & x);
365- void to_json(json & j, const The200 & x);
364+void from_json(const json & j, The200 & x);
365+void to_json(json & j, const The200 & x);
366366
367- void from_json(const json & j, Responses & x);
368- void to_json(json & j, const Responses & x);
367+void from_json(const json & j, Responses & x);
368+void to_json(json & j, const Responses & x);
369369
370- void from_json(const json & j, Get & x);
371- void to_json(json & j, const Get & x);
370+void from_json(const json & j, Get & x);
371+void to_json(json & j, const Get & x);
372372
373- void from_json(const json & j, ItaTaxonomiesSearch & x);
374- void to_json(json & j, const ItaTaxonomiesSearch & x);
373+void from_json(const json & j, ItaTaxonomiesSearch & x);
374+void to_json(json & j, const ItaTaxonomiesSearch & x);
375375
376- void from_json(const json & j, Paths & x);
377- void to_json(json & j, const Paths & x);
378-
379- void from_json(const json & j, TopLevel & x);
380- void to_json(json & j, const TopLevel & x);
376+void from_json(const json & j, Paths & x);
377+void to_json(json & j, const Paths & x);
381378
379+void from_json(const json & j, TopLevel & x);
380+void to_json(json & j, const TopLevel & x);
381+}
382+namespace quicktype {
382383 inline void from_json(const json & j, Annotations& x) {
383384 x.set_description(j.at("description").get<std::string>());
384385 x.set_type(j.at("type").get<std::string>());
Test case

test/inputs/json/misc/24f52.json

1 generated file · +10 −9
Mcplusplusdefault / quicktype.hpp+10 −9
@@ -194,18 +194,19 @@ namespace quicktype {
194194 }
195195
196196 namespace quicktype {
197- void from_json(const json & j, Status & x);
198- void to_json(json & j, const Status & x);
197+void from_json(const json & j, Status & x);
198+void to_json(json & j, const Status & x);
199199
200- void from_json(const json & j, Meta & x);
201- void to_json(json & j, const Meta & x);
200+void from_json(const json & j, Meta & x);
201+void to_json(json & j, const Meta & x);
202202
203- void from_json(const json & j, Weather & x);
204- void to_json(json & j, const Weather & x);
205-
206- void from_json(const json & j, TopLevel & x);
207- void to_json(json & j, const TopLevel & x);
203+void from_json(const json & j, Weather & x);
204+void to_json(json & j, const Weather & x);
208205
206+void from_json(const json & j, TopLevel & x);
207+void to_json(json & j, const TopLevel & x);
208+}
209+namespace quicktype {
209210 inline void from_json(const json & j, Status& x) {
210211 x.set_avg_delay(j.at("avgDelay").get<std::string>());
211212 x.set_closure_begin(j.at("closureBegin").get<std::string>());
Test case

test/inputs/json/misc/262f0.json

1 generated file · +32 −31
Mcplusplusdefault / quicktype.hpp+32 −31
@@ -461,51 +461,52 @@ namespace quicktype {
461461 }
462462
463463 namespace quicktype {
464- void from_json(const json & j, Astronomy & x);
465- void to_json(json & j, const Astronomy & x);
464+void from_json(const json & j, Astronomy & x);
465+void to_json(json & j, const Astronomy & x);
466466
467- void from_json(const json & j, Atmosphere & x);
468- void to_json(json & j, const Atmosphere & x);
467+void from_json(const json & j, Atmosphere & x);
468+void to_json(json & j, const Atmosphere & x);
469469
470- void from_json(const json & j, Image & x);
471- void to_json(json & j, const Image & x);
470+void from_json(const json & j, Image & x);
471+void to_json(json & j, const Image & x);
472472
473- void from_json(const json & j, Condition & x);
474- void to_json(json & j, const Condition & x);
473+void from_json(const json & j, Condition & x);
474+void to_json(json & j, const Condition & x);
475475
476- void from_json(const json & j, Forecast & x);
477- void to_json(json & j, const Forecast & x);
476+void from_json(const json & j, Forecast & x);
477+void to_json(json & j, const Forecast & x);
478478
479- void from_json(const json & j, Guid & x);
480- void to_json(json & j, const Guid & x);
479+void from_json(const json & j, Guid & x);
480+void to_json(json & j, const Guid & x);
481481
482- void from_json(const json & j, Item & x);
483- void to_json(json & j, const Item & x);
482+void from_json(const json & j, Item & x);
483+void to_json(json & j, const Item & x);
484484
485- void from_json(const json & j, Location & x);
486- void to_json(json & j, const Location & x);
485+void from_json(const json & j, Location & x);
486+void to_json(json & j, const Location & x);
487487
488- void from_json(const json & j, Units & x);
489- void to_json(json & j, const Units & x);
488+void from_json(const json & j, Units & x);
489+void to_json(json & j, const Units & x);
490490
491- void from_json(const json & j, Wind & x);
492- void to_json(json & j, const Wind & x);
491+void from_json(const json & j, Wind & x);
492+void to_json(json & j, const Wind & x);
493493
494- void from_json(const json & j, Channel & x);
495- void to_json(json & j, const Channel & x);
494+void from_json(const json & j, Channel & x);
495+void to_json(json & j, const Channel & x);
496496
497- void from_json(const json & j, Results & x);
498- void to_json(json & j, const Results & x);
497+void from_json(const json & j, Results & x);
498+void to_json(json & j, const Results & x);
499499
500- void from_json(const json & j, Query & x);
501- void to_json(json & j, const Query & x);
500+void from_json(const json & j, Query & x);
501+void to_json(json & j, const Query & x);
502502
503- void from_json(const json & j, TopLevel & x);
504- void to_json(json & j, const TopLevel & x);
505-
506- void from_json(const json & j, Text & x);
507- void to_json(json & j, const Text & x);
503+void from_json(const json & j, TopLevel & x);
504+void to_json(json & j, const TopLevel & x);
508505
506+void from_json(const json & j, Text & x);
507+void to_json(json & j, const Text & x);
508+}
509+namespace quicktype {
509510 inline void from_json(const json & j, Astronomy& x) {
510511 x.set_sunrise(j.at("sunrise").get<std::string>());
511512 x.set_sunset(j.at("sunset").get<std::string>());
Test case

test/inputs/json/misc/26b49.json

1 generated file · +26 −25
Mcplusplusdefault / quicktype.hpp+26 −25
@@ -569,42 +569,43 @@ namespace quicktype {
569569 }
570570
571571 namespace quicktype {
572- void from_json(const json & j, The480_WStill & x);
573- void to_json(json & j, const The480_WStill & x);
572+void from_json(const json & j, The480_WStill & x);
573+void to_json(json & j, const The480_WStill & x);
574574
575- void from_json(const json & j, DownsizedSmall & x);
576- void to_json(json & j, const DownsizedSmall & x);
575+void from_json(const json & j, DownsizedSmall & x);
576+void to_json(json & j, const DownsizedSmall & x);
577577
578- void from_json(const json & j, FixedHeight & x);
579- void to_json(json & j, const FixedHeight & x);
578+void from_json(const json & j, FixedHeight & x);
579+void to_json(json & j, const FixedHeight & x);
580580
581- void from_json(const json & j, Looping & x);
582- void to_json(json & j, const Looping & x);
581+void from_json(const json & j, Looping & x);
582+void to_json(json & j, const Looping & x);
583583
584- void from_json(const json & j, Images & x);
585- void to_json(json & j, const Images & x);
584+void from_json(const json & j, Images & x);
585+void to_json(json & j, const Images & x);
586586
587- void from_json(const json & j, User & x);
588- void to_json(json & j, const User & x);
587+void from_json(const json & j, User & x);
588+void to_json(json & j, const User & x);
589589
590- void from_json(const json & j, Datum & x);
591- void to_json(json & j, const Datum & x);
590+void from_json(const json & j, Datum & x);
591+void to_json(json & j, const Datum & x);
592592
593- void from_json(const json & j, Meta & x);
594- void to_json(json & j, const Meta & x);
593+void from_json(const json & j, Meta & x);
594+void to_json(json & j, const Meta & x);
595595
596- void from_json(const json & j, Pagination & x);
597- void to_json(json & j, const Pagination & x);
596+void from_json(const json & j, Pagination & x);
597+void to_json(json & j, const Pagination & x);
598598
599- void from_json(const json & j, TopLevel & x);
600- void to_json(json & j, const TopLevel & x);
599+void from_json(const json & j, TopLevel & x);
600+void to_json(json & j, const TopLevel & x);
601601
602- void from_json(const json & j, Rating & x);
603- void to_json(json & j, const Rating & x);
604-
605- void from_json(const json & j, Type & x);
606- void to_json(json & j, const Type & x);
602+void from_json(const json & j, Rating & x);
603+void to_json(json & j, const Rating & x);
607604
605+void from_json(const json & j, Type & x);
606+void to_json(json & j, const Type & x);
607+}
608+namespace quicktype {
608609 inline void from_json(const json & j, The480_WStill& x) {
609610 x.set_height(j.at("height").get<std::string>());
610611 x.set_size(get_stack_optional<std::string>(j, "size"));
Test case

test/inputs/json/misc/27332.json

1 generated file · +38 −37
Mcplusplusdefault / quicktype.hpp+38 −37
@@ -689,60 +689,61 @@ namespace quicktype {
689689 }
690690
691691 namespace quicktype {
692- void from_json(const json & j, Oembed & x);
693- void to_json(json & j, const Oembed & x);
692+void from_json(const json & j, Oembed & x);
693+void to_json(json & j, const Oembed & x);
694694
695- void from_json(const json & j, Media & x);
696- void to_json(json & j, const Media & x);
695+void from_json(const json & j, Media & x);
696+void to_json(json & j, const Media & x);
697697
698- void from_json(const json & j, MediaEmbed & x);
699- void to_json(json & j, const MediaEmbed & x);
698+void from_json(const json & j, MediaEmbed & x);
699+void to_json(json & j, const MediaEmbed & x);
700700
701- void from_json(const json & j, Source & x);
702- void to_json(json & j, const Source & x);
701+void from_json(const json & j, Source & x);
702+void to_json(json & j, const Source & x);
703703
704- void from_json(const json & j, Variants & x);
705- void to_json(json & j, const Variants & x);
704+void from_json(const json & j, Variants & x);
705+void to_json(json & j, const Variants & x);
706706
707- void from_json(const json & j, Image & x);
708- void to_json(json & j, const Image & x);
707+void from_json(const json & j, Image & x);
708+void to_json(json & j, const Image & x);
709709
710- void from_json(const json & j, Preview & x);
711- void to_json(json & j, const Preview & x);
710+void from_json(const json & j, Preview & x);
711+void to_json(json & j, const Preview & x);
712712
713- void from_json(const json & j, ChildData & x);
714- void to_json(json & j, const ChildData & x);
713+void from_json(const json & j, ChildData & x);
714+void to_json(json & j, const ChildData & x);
715715
716- void from_json(const json & j, Child & x);
717- void to_json(json & j, const Child & x);
716+void from_json(const json & j, Child & x);
717+void to_json(json & j, const Child & x);
718718
719- void from_json(const json & j, TopLevelData & x);
720- void to_json(json & j, const TopLevelData & x);
719+void from_json(const json & j, TopLevelData & x);
720+void to_json(json & j, const TopLevelData & x);
721721
722- void from_json(const json & j, TopLevel & x);
723- void to_json(json & j, const TopLevel & x);
722+void from_json(const json & j, TopLevel & x);
723+void to_json(json & j, const TopLevel & x);
724724
725- void from_json(const json & j, Domain & x);
726- void to_json(json & j, const Domain & x);
725+void from_json(const json & j, Domain & x);
726+void to_json(json & j, const Domain & x);
727727
728- void from_json(const json & j, PostHint & x);
729- void to_json(json & j, const PostHint & x);
728+void from_json(const json & j, PostHint & x);
729+void to_json(json & j, const PostHint & x);
730730
731- void from_json(const json & j, Subreddit & x);
732- void to_json(json & j, const Subreddit & x);
731+void from_json(const json & j, Subreddit & x);
732+void to_json(json & j, const Subreddit & x);
733733
734- void from_json(const json & j, SubredditId & x);
735- void to_json(json & j, const SubredditId & x);
734+void from_json(const json & j, SubredditId & x);
735+void to_json(json & j, const SubredditId & x);
736736
737- void from_json(const json & j, SubredditNamePrefixed & x);
738- void to_json(json & j, const SubredditNamePrefixed & x);
737+void from_json(const json & j, SubredditNamePrefixed & x);
738+void to_json(json & j, const SubredditNamePrefixed & x);
739739
740- void from_json(const json & j, SubredditType & x);
741- void to_json(json & j, const SubredditType & x);
742-
743- void from_json(const json & j, Kind & x);
744- void to_json(json & j, const Kind & x);
740+void from_json(const json & j, SubredditType & x);
741+void to_json(json & j, const SubredditType & x);
745742
743+void from_json(const json & j, Kind & x);
744+void to_json(json & j, const Kind & x);
745+}
746+namespace quicktype {
746747 inline void from_json(const json & j, Oembed& x) {
747748 x.set_description(j.at("description").get<std::string>());
748749 x.set_height(j.at("height").get<int64_t>());
Test case

test/inputs/json/misc/2d4e2.json

1 generated file · +34 −33
Mcplusplusdefault / quicktype.hpp+34 −33
@@ -408,54 +408,55 @@ namespace quicktype {
408408 }
409409
410410 namespace quicktype {
411- void from_json(const json & j, Meta & x);
412- void to_json(json & j, const Meta & x);
411+void from_json(const json & j, Meta & x);
412+void to_json(json & j, const Meta & x);
413413
414- void from_json(const json & j, Extra & x);
415- void to_json(json & j, const Extra & x);
414+void from_json(const json & j, Extra & x);
415+void to_json(json & j, const Extra & x);
416416
417- void from_json(const json & j, Person & x);
418- void to_json(json & j, const Person & x);
417+void from_json(const json & j, Person & x);
418+void to_json(json & j, const Person & x);
419419
420- void from_json(const json & j, Object & x);
421- void to_json(json & j, const Object & x);
420+void from_json(const json & j, Object & x);
421+void to_json(json & j, const Object & x);
422422
423- void from_json(const json & j, TopLevel & x);
424- void to_json(json & j, const TopLevel & x);
423+void from_json(const json & j, TopLevel & x);
424+void to_json(json & j, const TopLevel & x);
425425
426- void from_json(const json & j, Party & x);
427- void to_json(json & j, const Party & x);
426+void from_json(const json & j, Party & x);
427+void to_json(json & j, const Party & x);
428428
429- void from_json(const json & j, Gender & x);
430- void to_json(json & j, const Gender & x);
429+void from_json(const json & j, Gender & x);
430+void to_json(json & j, const Gender & x);
431431
432- void from_json(const json & j, GenderLabel & x);
433- void to_json(json & j, const GenderLabel & x);
432+void from_json(const json & j, GenderLabel & x);
433+void to_json(json & j, const GenderLabel & x);
434434
435- void from_json(const json & j, Namemod & x);
436- void to_json(json & j, const Namemod & x);
435+void from_json(const json & j, Namemod & x);
436+void to_json(json & j, const Namemod & x);
437437
438- void from_json(const json & j, RoleType & x);
439- void to_json(json & j, const RoleType & x);
438+void from_json(const json & j, RoleType & x);
439+void to_json(json & j, const RoleType & x);
440440
441- void from_json(const json & j, RoleTypeLabel & x);
442- void to_json(json & j, const RoleTypeLabel & x);
441+void from_json(const json & j, RoleTypeLabel & x);
442+void to_json(json & j, const RoleTypeLabel & x);
443443
444- void from_json(const json & j, SenatorClass & x);
445- void to_json(json & j, const SenatorClass & x);
444+void from_json(const json & j, SenatorClass & x);
445+void to_json(json & j, const SenatorClass & x);
446446
447- void from_json(const json & j, SenatorClassLabel & x);
448- void to_json(json & j, const SenatorClassLabel & x);
447+void from_json(const json & j, SenatorClassLabel & x);
448+void to_json(json & j, const SenatorClassLabel & x);
449449
450- void from_json(const json & j, SenatorRank & x);
451- void to_json(json & j, const SenatorRank & x);
450+void from_json(const json & j, SenatorRank & x);
451+void to_json(json & j, const SenatorRank & x);
452452
453- void from_json(const json & j, SenatorRankLabel & x);
454- void to_json(json & j, const SenatorRankLabel & x);
455-
456- void from_json(const json & j, Title & x);
457- void to_json(json & j, const Title & x);
453+void from_json(const json & j, SenatorRankLabel & x);
454+void to_json(json & j, const SenatorRankLabel & x);
458455
456+void from_json(const json & j, Title & x);
457+void to_json(json & j, const Title & x);
458+}
459+namespace quicktype {
459460 inline void from_json(const json & j, Meta& x) {
460461 x.set_limit(j.at("limit").get<int64_t>());
461462 x.set_offset(j.at("offset").get<int64_t>());
Test case

test/inputs/json/misc/31189.json

1 generated file · +10 −9
Mcplusplusdefault / quicktype.hpp+10 −9
@@ -201,18 +201,19 @@ namespace quicktype {
201201 }
202202
203203 namespace quicktype {
204- void from_json(const json & j, Rates & x);
205- void to_json(json & j, const Rates & x);
204+void from_json(const json & j, Rates & x);
205+void to_json(json & j, const Rates & x);
206206
207- void from_json(const json & j, Period & x);
208- void to_json(json & j, const Period & x);
207+void from_json(const json & j, Period & x);
208+void to_json(json & j, const Period & x);
209209
210- void from_json(const json & j, Rate & x);
211- void to_json(json & j, const Rate & x);
212-
213- void from_json(const json & j, TopLevel & x);
214- void to_json(json & j, const TopLevel & x);
210+void from_json(const json & j, Rate & x);
211+void to_json(json & j, const Rate & x);
215212
213+void from_json(const json & j, TopLevel & x);
214+void to_json(json & j, const TopLevel & x);
215+}
216+namespace quicktype {
216217 inline void from_json(const json & j, Rates& x) {
217218 x.set_parking(get_stack_optional<double>(j, "parking"));
218219 x.set_reduced(get_stack_optional<double>(j, "reduced"));
Test case

test/inputs/json/misc/32431.json

1 generated file · +22 −21
Mcplusplusdefault / quicktype.hpp+22 −21
@@ -351,36 +351,37 @@ namespace quicktype {
351351 }
352352
353353 namespace quicktype {
354- void from_json(const json & j, Geometry & x);
355- void to_json(json & j, const Geometry & x);
354+void from_json(const json & j, Geometry & x);
355+void to_json(json & j, const Geometry & x);
356356
357- void from_json(const json & j, Properties & x);
358- void to_json(json & j, const Properties & x);
357+void from_json(const json & j, Properties & x);
358+void to_json(json & j, const Properties & x);
359359
360- void from_json(const json & j, Feature & x);
361- void to_json(json & j, const Feature & x);
360+void from_json(const json & j, Feature & x);
361+void to_json(json & j, const Feature & x);
362362
363- void from_json(const json & j, Metadata & x);
364- void to_json(json & j, const Metadata & x);
363+void from_json(const json & j, Metadata & x);
364+void to_json(json & j, const Metadata & x);
365365
366- void from_json(const json & j, TopLevel & x);
367- void to_json(json & j, const TopLevel & x);
366+void from_json(const json & j, TopLevel & x);
367+void to_json(json & j, const TopLevel & x);
368368
369- void from_json(const json & j, GeometryType & x);
370- void to_json(json & j, const GeometryType & x);
369+void from_json(const json & j, GeometryType & x);
370+void to_json(json & j, const GeometryType & x);
371371
372- void from_json(const json & j, MagType & x);
373- void to_json(json & j, const MagType & x);
372+void from_json(const json & j, MagType & x);
373+void to_json(json & j, const MagType & x);
374374
375- void from_json(const json & j, Status & x);
376- void to_json(json & j, const Status & x);
375+void from_json(const json & j, Status & x);
376+void to_json(json & j, const Status & x);
377377
378- void from_json(const json & j, PropertiesType & x);
379- void to_json(json & j, const PropertiesType & x);
380-
381- void from_json(const json & j, FeatureType & x);
382- void to_json(json & j, const FeatureType & x);
378+void from_json(const json & j, PropertiesType & x);
379+void to_json(json & j, const PropertiesType & x);
383380
381+void from_json(const json & j, FeatureType & x);
382+void to_json(json & j, const FeatureType & x);
383+}
384+namespace quicktype {
384385 inline void from_json(const json & j, Geometry& x) {
385386 x.set_coordinates(j.at("coordinates").get<std::vector<double>>());
386387 x.set_type(j.at("type").get<GeometryType>());
Test case

test/inputs/json/misc/32d5c.json

1 generated file · +4 −3
Mcplusplusdefault / quicktype.hpp+4 −3
@@ -139,9 +139,10 @@ namespace quicktype {
139139 }
140140
141141 namespace quicktype {
142- void from_json(const json & j, TopLevelElement & x);
143- void to_json(json & j, const TopLevelElement & x);
144-
142+void from_json(const json & j, TopLevelElement & x);
143+void to_json(json & j, const TopLevelElement & x);
144+}
145+namespace quicktype {
145146 inline void from_json(const json & j, TopLevelElement& x) {
146147 x.set_birth_date(get_stack_optional<std::string>(j, "BirthDate"));
147148 x.set_birth_date_is_protected(j.at("BirthDateIsProtected").get<bool>());
Test case

test/inputs/json/misc/337ed.json

1 generated file · +16 −15
Mcplusplusdefault / quicktype.hpp+16 −15
@@ -350,27 +350,28 @@ namespace quicktype {
350350 }
351351
352352 namespace quicktype {
353- void from_json(const json & j, Facets & x);
354- void to_json(json & j, const Facets & x);
353+void from_json(const json & j, Facets & x);
354+void to_json(json & j, const Facets & x);
355355
356- void from_json(const json & j, CustomIncome & x);
357- void to_json(json & j, const CustomIncome & x);
356+void from_json(const json & j, CustomIncome & x);
357+void to_json(json & j, const CustomIncome & x);
358358
359- void from_json(const json & j, Result & x);
360- void to_json(json & j, const Result & x);
359+void from_json(const json & j, Result & x);
360+void to_json(json & j, const Result & x);
361361
362- void from_json(const json & j, TopLevel & x);
363- void to_json(json & j, const TopLevel & x);
362+void from_json(const json & j, TopLevel & x);
363+void to_json(json & j, const TopLevel & x);
364364
365- void from_json(const json & j, Status & x);
366- void to_json(json & j, const Status & x);
365+void from_json(const json & j, Status & x);
366+void to_json(json & j, const Status & x);
367367
368- void from_json(const json & j, CustomIncomeType & x);
369- void to_json(json & j, const CustomIncomeType & x);
370-
371- void from_json(const json & j, ResultType & x);
372- void to_json(json & j, const ResultType & x);
368+void from_json(const json & j, CustomIncomeType & x);
369+void to_json(json & j, const CustomIncomeType & x);
373370
371+void from_json(const json & j, ResultType & x);
372+void to_json(json & j, const ResultType & x);
373+}
374+namespace quicktype {
374375 inline void from_json(const json & j, Facets& x) {
375376 (void)j;
376377 (void)x;
Test case

test/inputs/json/misc/34702.json

1 generated file · +26 −25
Mcplusplusdefault / quicktype.hpp+26 −25
@@ -298,42 +298,43 @@ namespace quicktype {
298298 }
299299
300300 namespace quicktype {
301- void from_json(const json & j, CrsProperties & x);
302- void to_json(json & j, const CrsProperties & x);
301+void from_json(const json & j, CrsProperties & x);
302+void to_json(json & j, const CrsProperties & x);
303303
304- void from_json(const json & j, Crs & x);
305- void to_json(json & j, const Crs & x);
304+void from_json(const json & j, Crs & x);
305+void to_json(json & j, const Crs & x);
306306
307- void from_json(const json & j, Geometry & x);
308- void to_json(json & j, const Geometry & x);
307+void from_json(const json & j, Geometry & x);
308+void to_json(json & j, const Geometry & x);
309309
310- void from_json(const json & j, FeatureProperties & x);
311- void to_json(json & j, const FeatureProperties & x);
310+void from_json(const json & j, FeatureProperties & x);
311+void to_json(json & j, const FeatureProperties & x);
312312
313- void from_json(const json & j, Feature & x);
314- void to_json(json & j, const Feature & x);
313+void from_json(const json & j, Feature & x);
314+void to_json(json & j, const Feature & x);
315315
316- void from_json(const json & j, TopLevel & x);
317- void to_json(json & j, const TopLevel & x);
316+void from_json(const json & j, TopLevel & x);
317+void to_json(json & j, const TopLevel & x);
318318
319- void from_json(const json & j, GeometryType & x);
320- void to_json(json & j, const GeometryType & x);
319+void from_json(const json & j, GeometryType & x);
320+void to_json(json & j, const GeometryType & x);
321321
322- void from_json(const json & j, GeometryName & x);
323- void to_json(json & j, const GeometryName & x);
322+void from_json(const json & j, GeometryName & x);
323+void to_json(json & j, const GeometryName & x);
324324
325- void from_json(const json & j, FireBanR & x);
326- void to_json(json & j, const FireBanR & x);
325+void from_json(const json & j, FireBanR & x);
326+void to_json(json & j, const FireBanR & x);
327327
328- void from_json(const json & j, Region & x);
329- void to_json(json & j, const Region & x);
328+void from_json(const json & j, Region & x);
329+void to_json(json & j, const Region & x);
330330
331- void from_json(const json & j, PropertiesType & x);
332- void to_json(json & j, const PropertiesType & x);
333-
334- void from_json(const json & j, FeatureType & x);
335- void to_json(json & j, const FeatureType & x);
331+void from_json(const json & j, PropertiesType & x);
332+void to_json(json & j, const PropertiesType & x);
336333
334+void from_json(const json & j, FeatureType & x);
335+void to_json(json & j, const FeatureType & x);
336+}
337+namespace quicktype {
337338 inline void from_json(const json & j, CrsProperties& x) {
338339 x.set_name(j.at("name").get<std::string>());
339340 }
Test case

test/inputs/json/misc/3536b.json

1 generated file · +14 −13
Mcplusplusdefault / quicktype.hpp+14 −13
@@ -150,24 +150,25 @@ namespace quicktype {
150150 }
151151
152152 namespace quicktype {
153- void from_json(const json & j, Identifier & x);
154- void to_json(json & j, const Identifier & x);
153+void from_json(const json & j, Identifier & x);
154+void to_json(json & j, const Identifier & x);
155155
156- void from_json(const json & j, Link & x);
157- void to_json(json & j, const Link & x);
156+void from_json(const json & j, Link & x);
157+void to_json(json & j, const Link & x);
158158
159- void from_json(const json & j, Text & x);
160- void to_json(json & j, const Text & x);
159+void from_json(const json & j, Text & x);
160+void to_json(json & j, const Text & x);
161161
162- void from_json(const json & j, TopLevelElement & x);
163- void to_json(json & j, const TopLevelElement & x);
162+void from_json(const json & j, TopLevelElement & x);
163+void to_json(json & j, const TopLevelElement & x);
164164
165- void from_json(const json & j, Scheme & x);
166- void to_json(json & j, const Scheme & x);
167-
168- void from_json(const json & j, Keyword & x);
169- void to_json(json & j, const Keyword & x);
165+void from_json(const json & j, Scheme & x);
166+void to_json(json & j, const Scheme & x);
170167
168+void from_json(const json & j, Keyword & x);
169+void to_json(json & j, const Keyword & x);
170+}
171+namespace quicktype {
171172 inline void from_json(const json & j, Identifier& x) {
172173 x.set_identifier(j.at("identifier").get<std::string>());
173174 x.set_scheme(j.at("scheme").get<Scheme>());
Test case

test/inputs/json/misc/3659d.json

1 generated file · +6 −5
Mcplusplusdefault / quicktype.hpp+6 −5
@@ -66,12 +66,13 @@ namespace quicktype {
6666 }
6767
6868 namespace quicktype {
69- void from_json(const json & j, TotalPopulation & x);
70- void to_json(json & j, const TotalPopulation & x);
71-
72- void from_json(const json & j, TopLevel & x);
73- void to_json(json & j, const TopLevel & x);
69+void from_json(const json & j, TotalPopulation & x);
70+void to_json(json & j, const TotalPopulation & x);
7471
72+void from_json(const json & j, TopLevel & x);
73+void to_json(json & j, const TopLevel & x);
74+}
75+namespace quicktype {
7576 inline void from_json(const json & j, TotalPopulation& x) {
7677 x.set_date(j.at("date").get<std::string>());
7778 x.set_population(j.at("population").get<int64_t>());
Test case

test/inputs/json/misc/36d5d.json

1 generated file · +10 −9
Mcplusplusdefault / quicktype.hpp+10 −9
@@ -194,18 +194,19 @@ namespace quicktype {
194194 }
195195
196196 namespace quicktype {
197- void from_json(const json & j, Status & x);
198- void to_json(json & j, const Status & x);
197+void from_json(const json & j, Status & x);
198+void to_json(json & j, const Status & x);
199199
200- void from_json(const json & j, Meta & x);
201- void to_json(json & j, const Meta & x);
200+void from_json(const json & j, Meta & x);
201+void to_json(json & j, const Meta & x);
202202
203- void from_json(const json & j, Weather & x);
204- void to_json(json & j, const Weather & x);
205-
206- void from_json(const json & j, TopLevel & x);
207- void to_json(json & j, const TopLevel & x);
203+void from_json(const json & j, Weather & x);
204+void to_json(json & j, const Weather & x);
208205
206+void from_json(const json & j, TopLevel & x);
207+void to_json(json & j, const TopLevel & x);
208+}
209+namespace quicktype {
209210 inline void from_json(const json & j, Status& x) {
210211 x.set_avg_delay(j.at("avgDelay").get<std::string>());
211212 x.set_closure_begin(j.at("closureBegin").get<std::string>());
Test case

test/inputs/json/misc/3a6b3.json

1 generated file · +10 −9
Mcplusplusdefault / quicktype.hpp+10 −9
@@ -194,18 +194,19 @@ namespace quicktype {
194194 }
195195
196196 namespace quicktype {
197- void from_json(const json & j, Status & x);
198- void to_json(json & j, const Status & x);
197+void from_json(const json & j, Status & x);
198+void to_json(json & j, const Status & x);
199199
200- void from_json(const json & j, Meta & x);
201- void to_json(json & j, const Meta & x);
200+void from_json(const json & j, Meta & x);
201+void to_json(json & j, const Meta & x);
202202
203- void from_json(const json & j, Weather & x);
204- void to_json(json & j, const Weather & x);
205-
206- void from_json(const json & j, TopLevel & x);
207- void to_json(json & j, const TopLevel & x);
203+void from_json(const json & j, Weather & x);
204+void to_json(json & j, const Weather & x);
208205
206+void from_json(const json & j, TopLevel & x);
207+void to_json(json & j, const TopLevel & x);
208+}
209+namespace quicktype {
209210 inline void from_json(const json & j, Status& x) {
210211 x.set_avg_delay(j.at("avgDelay").get<std::string>());
211212 x.set_closure_begin(j.at("closureBegin").get<std::string>());
Test case

test/inputs/json/misc/3e9a3.json

1 generated file · +12 −11
Mcplusplusdefault / quicktype.hpp+12 −11
@@ -205,21 +205,22 @@ namespace quicktype {
205205 }
206206
207207 namespace quicktype {
208- void from_json(const json & j, Footnote & x);
209- void to_json(json & j, const Footnote & x);
208+void from_json(const json & j, Footnote & x);
209+void to_json(json & j, const Footnote & x);
210210
211- void from_json(const json & j, Datum & x);
212- void to_json(json & j, const Datum & x);
211+void from_json(const json & j, Datum & x);
212+void to_json(json & j, const Datum & x);
213213
214- void from_json(const json & j, Series & x);
215- void to_json(json & j, const Series & x);
214+void from_json(const json & j, Series & x);
215+void to_json(json & j, const Series & x);
216216
217- void from_json(const json & j, Results & x);
218- void to_json(json & j, const Results & x);
219-
220- void from_json(const json & j, TopLevel & x);
221- void to_json(json & j, const TopLevel & x);
217+void from_json(const json & j, Results & x);
218+void to_json(json & j, const Results & x);
222219
220+void from_json(const json & j, TopLevel & x);
221+void to_json(json & j, const TopLevel & x);
222+}
223+namespace quicktype {
223224 inline void from_json(const json & j, Footnote& x) {
224225 x.set_code(get_stack_optional<std::string>(j, "code"));
225226 x.set_text(get_stack_optional<std::string>(j, "text"));
Test case

test/inputs/json/misc/3f1ce.json

1 generated file · +32 −31
Mcplusplusdefault / quicktype.hpp+32 −31
@@ -461,51 +461,52 @@ namespace quicktype {
461461 }
462462
463463 namespace quicktype {
464- void from_json(const json & j, Astronomy & x);
465- void to_json(json & j, const Astronomy & x);
464+void from_json(const json & j, Astronomy & x);
465+void to_json(json & j, const Astronomy & x);
466466
467- void from_json(const json & j, Atmosphere & x);
468- void to_json(json & j, const Atmosphere & x);
467+void from_json(const json & j, Atmosphere & x);
468+void to_json(json & j, const Atmosphere & x);
469469
470- void from_json(const json & j, Image & x);
471- void to_json(json & j, const Image & x);
470+void from_json(const json & j, Image & x);
471+void to_json(json & j, const Image & x);
472472
473- void from_json(const json & j, Condition & x);
474- void to_json(json & j, const Condition & x);
473+void from_json(const json & j, Condition & x);
474+void to_json(json & j, const Condition & x);
475475
476- void from_json(const json & j, Forecast & x);
477- void to_json(json & j, const Forecast & x);
476+void from_json(const json & j, Forecast & x);
477+void to_json(json & j, const Forecast & x);
478478
479- void from_json(const json & j, Guid & x);
480- void to_json(json & j, const Guid & x);
479+void from_json(const json & j, Guid & x);
480+void to_json(json & j, const Guid & x);
481481
482- void from_json(const json & j, Item & x);
483- void to_json(json & j, const Item & x);
482+void from_json(const json & j, Item & x);
483+void to_json(json & j, const Item & x);
484484
485- void from_json(const json & j, Location & x);
486- void to_json(json & j, const Location & x);
485+void from_json(const json & j, Location & x);
486+void to_json(json & j, const Location & x);
487487
488- void from_json(const json & j, Units & x);
489- void to_json(json & j, const Units & x);
488+void from_json(const json & j, Units & x);
489+void to_json(json & j, const Units & x);
490490
491- void from_json(const json & j, Wind & x);
492- void to_json(json & j, const Wind & x);
491+void from_json(const json & j, Wind & x);
492+void to_json(json & j, const Wind & x);
493493
494- void from_json(const json & j, Channel & x);
495- void to_json(json & j, const Channel & x);
494+void from_json(const json & j, Channel & x);
495+void to_json(json & j, const Channel & x);
496496
497- void from_json(const json & j, Results & x);
498- void to_json(json & j, const Results & x);
497+void from_json(const json & j, Results & x);
498+void to_json(json & j, const Results & x);
499499
500- void from_json(const json & j, Query & x);
501- void to_json(json & j, const Query & x);
500+void from_json(const json & j, Query & x);
501+void to_json(json & j, const Query & x);
502502
503- void from_json(const json & j, TopLevel & x);
504- void to_json(json & j, const TopLevel & x);
505-
506- void from_json(const json & j, Text & x);
507- void to_json(json & j, const Text & x);
503+void from_json(const json & j, TopLevel & x);
504+void to_json(json & j, const TopLevel & x);
508505
506+void from_json(const json & j, Text & x);
507+void to_json(json & j, const Text & x);
508+}
509+namespace quicktype {
509510 inline void from_json(const json & j, Astronomy& x) {
510511 x.set_sunrise(j.at("sunrise").get<std::string>());
511512 x.set_sunset(j.at("sunset").get<std::string>());
Test case

test/inputs/json/misc/437e7.json

1 generated file · +26 −25
Mcplusplusdefault / quicktype.hpp+26 −25
@@ -554,42 +554,43 @@ namespace quicktype {
554554 }
555555
556556 namespace quicktype {
557- void from_json(const json & j, Downsized & x);
558- void to_json(json & j, const Downsized & x);
557+void from_json(const json & j, Downsized & x);
558+void to_json(json & j, const Downsized & x);
559559
560- void from_json(const json & j, DownsizedSmall & x);
561- void to_json(json & j, const DownsizedSmall & x);
560+void from_json(const json & j, DownsizedSmall & x);
561+void to_json(json & j, const DownsizedSmall & x);
562562
563- void from_json(const json & j, FixedHeight & x);
564- void to_json(json & j, const FixedHeight & x);
563+void from_json(const json & j, FixedHeight & x);
564+void to_json(json & j, const FixedHeight & x);
565565
566- void from_json(const json & j, Looping & x);
567- void to_json(json & j, const Looping & x);
566+void from_json(const json & j, Looping & x);
567+void to_json(json & j, const Looping & x);
568568
569- void from_json(const json & j, Images & x);
570- void to_json(json & j, const Images & x);
569+void from_json(const json & j, Images & x);
570+void to_json(json & j, const Images & x);
571571
572- void from_json(const json & j, User & x);
573- void to_json(json & j, const User & x);
572+void from_json(const json & j, User & x);
573+void to_json(json & j, const User & x);
574574
575- void from_json(const json & j, Datum & x);
576- void to_json(json & j, const Datum & x);
575+void from_json(const json & j, Datum & x);
576+void to_json(json & j, const Datum & x);
577577
578- void from_json(const json & j, Meta & x);
579- void to_json(json & j, const Meta & x);
578+void from_json(const json & j, Meta & x);
579+void to_json(json & j, const Meta & x);
580580
581- void from_json(const json & j, Pagination & x);
582- void to_json(json & j, const Pagination & x);
581+void from_json(const json & j, Pagination & x);
582+void to_json(json & j, const Pagination & x);
583583
584- void from_json(const json & j, TopLevel & x);
585- void to_json(json & j, const TopLevel & x);
584+void from_json(const json & j, TopLevel & x);
585+void to_json(json & j, const TopLevel & x);
586586
587- void from_json(const json & j, Rating & x);
588- void to_json(json & j, const Rating & x);
589-
590- void from_json(const json & j, Type & x);
591- void to_json(json & j, const Type & x);
587+void from_json(const json & j, Rating & x);
588+void to_json(json & j, const Rating & x);
592589
590+void from_json(const json & j, Type & x);
591+void to_json(json & j, const Type & x);
592+}
593+namespace quicktype {
593594 inline void from_json(const json & j, Downsized& x) {
594595 x.set_height(j.at("height").get<std::string>());
595596 x.set_size(get_stack_optional<std::string>(j, "size"));
Test case

test/inputs/json/misc/43970.json

1 generated file · +4 −3
Mcplusplusdefault / quicktype.hpp+4 −3
@@ -59,9 +59,10 @@ namespace quicktype {
5959 }
6060
6161 namespace quicktype {
62- void from_json(const json & j, TopLevelElement & x);
63- void to_json(json & j, const TopLevelElement & x);
64-
62+void from_json(const json & j, TopLevelElement & x);
63+void to_json(json & j, const TopLevelElement & x);
64+}
65+namespace quicktype {
6566 inline void from_json(const json & j, TopLevelElement& x) {
6667 x.set_id(j.at("ID").get<int64_t>());
6768 x.set_name(j.at("Name").get<std::string>());
Test case

test/inputs/json/misc/43eaf.json

1 generated file · +4 −3
Mcplusplusdefault / quicktype.hpp+4 −3
@@ -57,9 +57,10 @@ namespace quicktype {
5757 }
5858
5959 namespace quicktype {
60- void from_json(const json & j, TopLevel & x);
61- void to_json(json & j, const TopLevel & x);
62-
60+void from_json(const json & j, TopLevel & x);
61+void to_json(json & j, const TopLevel & x);
62+}
63+namespace quicktype {
6364 inline void from_json(const json & j, TopLevel& x) {
6465 x.set_base(j.at("base").get<std::string>());
6566 x.set_date(j.at("date").get<std::string>());
Test case

test/inputs/json/misc/458db.json

1 generated file · +16 −15
Mcplusplusdefault / quicktype.hpp+16 −15
@@ -214,27 +214,28 @@ namespace quicktype {
214214 }
215215
216216 namespace quicktype {
217- void from_json(const json & j, ResponseInfo & x);
218- void to_json(json & j, const ResponseInfo & x);
217+void from_json(const json & j, ResponseInfo & x);
218+void to_json(json & j, const ResponseInfo & x);
219219
220- void from_json(const json & j, Resultset & x);
221- void to_json(json & j, const Resultset & x);
220+void from_json(const json & j, Resultset & x);
221+void to_json(json & j, const Resultset & x);
222222
223- void from_json(const json & j, Metadata & x);
224- void to_json(json & j, const Metadata & x);
223+void from_json(const json & j, Metadata & x);
224+void to_json(json & j, const Metadata & x);
225225
226- void from_json(const json & j, Component & x);
227- void to_json(json & j, const Component & x);
226+void from_json(const json & j, Component & x);
227+void to_json(json & j, const Component & x);
228228
229- void from_json(const json & j, Result & x);
230- void to_json(json & j, const Result & x);
229+void from_json(const json & j, Result & x);
230+void to_json(json & j, const Result & x);
231231
232- void from_json(const json & j, TopLevel & x);
233- void to_json(json & j, const TopLevel & x);
234-
235- void from_json(const json & j, Name & x);
236- void to_json(json & j, const Name & x);
232+void from_json(const json & j, TopLevel & x);
233+void to_json(json & j, const TopLevel & x);
237234
235+void from_json(const json & j, Name & x);
236+void to_json(json & j, const Name & x);
237+}
238+namespace quicktype {
238239 inline void from_json(const json & j, ResponseInfo& x) {
239240 x.set_developer_message(j.at("developerMessage").get<std::string>());
240241 x.set_status(j.at("status").get<int64_t>());
Test case

test/inputs/json/misc/4961a.json

1 generated file · +6 −5
Mcplusplusdefault / quicktype.hpp+6 −5
@@ -66,12 +66,13 @@ namespace quicktype {
6666 }
6767
6868 namespace quicktype {
69- void from_json(const json & j, TotalPopulation & x);
70- void to_json(json & j, const TotalPopulation & x);
71-
72- void from_json(const json & j, TopLevel & x);
73- void to_json(json & j, const TopLevel & x);
69+void from_json(const json & j, TotalPopulation & x);
70+void to_json(json & j, const TotalPopulation & x);
7471
72+void from_json(const json & j, TopLevel & x);
73+void to_json(json & j, const TopLevel & x);
74+}
75+namespace quicktype {
7576 inline void from_json(const json & j, TotalPopulation& x) {
7677 x.set_date(j.at("date").get<std::string>());
7778 x.set_population(j.at("population").get<int64_t>());
Test case

test/inputs/json/misc/4a0d7.json

1 generated file · +6 −5
Mcplusplusdefault / quicktype.hpp+6 −5
@@ -66,12 +66,13 @@ namespace quicktype {
6666 }
6767
6868 namespace quicktype {
69- void from_json(const json & j, TotalPopulation & x);
70- void to_json(json & j, const TotalPopulation & x);
71-
72- void from_json(const json & j, TopLevel & x);
73- void to_json(json & j, const TopLevel & x);
69+void from_json(const json & j, TotalPopulation & x);
70+void to_json(json & j, const TotalPopulation & x);
7471
72+void from_json(const json & j, TopLevel & x);
73+void to_json(json & j, const TopLevel & x);
74+}
75+namespace quicktype {
7576 inline void from_json(const json & j, TotalPopulation& x) {
7677 x.set_date(j.at("date").get<std::string>());
7778 x.set_population(j.at("population").get<int64_t>());
Test case

test/inputs/json/misc/4a455.json

1 generated file · +20 −19
Mcplusplusdefault / quicktype.hpp+20 −19
@@ -193,33 +193,34 @@ namespace quicktype {
193193 }
194194
195195 namespace quicktype {
196- void from_json(const json & j, CrsProperties & x);
197- void to_json(json & j, const CrsProperties & x);
196+void from_json(const json & j, CrsProperties & x);
197+void to_json(json & j, const CrsProperties & x);
198198
199- void from_json(const json & j, Crs & x);
200- void to_json(json & j, const Crs & x);
199+void from_json(const json & j, Crs & x);
200+void to_json(json & j, const Crs & x);
201201
202- void from_json(const json & j, Geometry & x);
203- void to_json(json & j, const Geometry & x);
202+void from_json(const json & j, Geometry & x);
203+void to_json(json & j, const Geometry & x);
204204
205- void from_json(const json & j, FeatureProperties & x);
206- void to_json(json & j, const FeatureProperties & x);
205+void from_json(const json & j, FeatureProperties & x);
206+void to_json(json & j, const FeatureProperties & x);
207207
208- void from_json(const json & j, Feature & x);
209- void to_json(json & j, const Feature & x);
208+void from_json(const json & j, Feature & x);
209+void to_json(json & j, const Feature & x);
210210
211- void from_json(const json & j, TopLevel & x);
212- void to_json(json & j, const TopLevel & x);
211+void from_json(const json & j, TopLevel & x);
212+void to_json(json & j, const TopLevel & x);
213213
214- void from_json(const json & j, GeometryType & x);
215- void to_json(json & j, const GeometryType & x);
214+void from_json(const json & j, GeometryType & x);
215+void to_json(json & j, const GeometryType & x);
216216
217- void from_json(const json & j, GeometryName & x);
218- void to_json(json & j, const GeometryName & x);
219-
220- void from_json(const json & j, FeatureType & x);
221- void to_json(json & j, const FeatureType & x);
217+void from_json(const json & j, GeometryName & x);
218+void to_json(json & j, const GeometryName & x);
222219
220+void from_json(const json & j, FeatureType & x);
221+void to_json(json & j, const FeatureType & x);
222+}
223+namespace quicktype {
223224 inline void from_json(const json & j, CrsProperties& x) {
224225 x.set_name(j.at("name").get<std::string>());
225226 }
Test case

test/inputs/json/misc/4c547.json

1 generated file · +30 −29
Mcplusplusdefault / quicktype.hpp+30 −29
@@ -459,48 +459,49 @@ namespace quicktype {
459459 }
460460
461461 namespace quicktype {
462- void from_json(const json & j, Astronomy & x);
463- void to_json(json & j, const Astronomy & x);
462+void from_json(const json & j, Astronomy & x);
463+void to_json(json & j, const Astronomy & x);
464464
465- void from_json(const json & j, Atmosphere & x);
466- void to_json(json & j, const Atmosphere & x);
465+void from_json(const json & j, Atmosphere & x);
466+void to_json(json & j, const Atmosphere & x);
467467
468- void from_json(const json & j, Image & x);
469- void to_json(json & j, const Image & x);
468+void from_json(const json & j, Image & x);
469+void to_json(json & j, const Image & x);
470470
471- void from_json(const json & j, Condition & x);
472- void to_json(json & j, const Condition & x);
471+void from_json(const json & j, Condition & x);
472+void to_json(json & j, const Condition & x);
473473
474- void from_json(const json & j, Forecast & x);
475- void to_json(json & j, const Forecast & x);
474+void from_json(const json & j, Forecast & x);
475+void to_json(json & j, const Forecast & x);
476476
477- void from_json(const json & j, Guid & x);
478- void to_json(json & j, const Guid & x);
477+void from_json(const json & j, Guid & x);
478+void to_json(json & j, const Guid & x);
479479
480- void from_json(const json & j, Item & x);
481- void to_json(json & j, const Item & x);
480+void from_json(const json & j, Item & x);
481+void to_json(json & j, const Item & x);
482482
483- void from_json(const json & j, Location & x);
484- void to_json(json & j, const Location & x);
483+void from_json(const json & j, Location & x);
484+void to_json(json & j, const Location & x);
485485
486- void from_json(const json & j, Units & x);
487- void to_json(json & j, const Units & x);
486+void from_json(const json & j, Units & x);
487+void to_json(json & j, const Units & x);
488488
489- void from_json(const json & j, Wind & x);
490- void to_json(json & j, const Wind & x);
489+void from_json(const json & j, Wind & x);
490+void to_json(json & j, const Wind & x);
491491
492- void from_json(const json & j, Channel & x);
493- void to_json(json & j, const Channel & x);
492+void from_json(const json & j, Channel & x);
493+void to_json(json & j, const Channel & x);
494494
495- void from_json(const json & j, Results & x);
496- void to_json(json & j, const Results & x);
495+void from_json(const json & j, Results & x);
496+void to_json(json & j, const Results & x);
497497
498- void from_json(const json & j, Query & x);
499- void to_json(json & j, const Query & x);
500-
501- void from_json(const json & j, TopLevel & x);
502- void to_json(json & j, const TopLevel & x);
498+void from_json(const json & j, Query & x);
499+void to_json(json & j, const Query & x);
503500
501+void from_json(const json & j, TopLevel & x);
502+void to_json(json & j, const TopLevel & x);
503+}
504+namespace quicktype {
504505 inline void from_json(const json & j, Astronomy& x) {
505506 x.set_sunrise(j.at("sunrise").get<std::string>());
506507 x.set_sunset(j.at("sunset").get<std::string>());
Test case

test/inputs/json/misc/4d6fb.json

1 generated file · +36 −35
Mcplusplusdefault / quicktype.hpp+36 −35
@@ -698,57 +698,58 @@ namespace quicktype {
698698 }
699699
700700 namespace quicktype {
701- void from_json(const json & j, Oembed & x);
702- void to_json(json & j, const Oembed & x);
701+void from_json(const json & j, Oembed & x);
702+void to_json(json & j, const Oembed & x);
703703
704- void from_json(const json & j, Media & x);
705- void to_json(json & j, const Media & x);
704+void from_json(const json & j, Media & x);
705+void to_json(json & j, const Media & x);
706706
707- void from_json(const json & j, MediaEmbed & x);
708- void to_json(json & j, const MediaEmbed & x);
707+void from_json(const json & j, MediaEmbed & x);
708+void to_json(json & j, const MediaEmbed & x);
709709
710- void from_json(const json & j, Source & x);
711- void to_json(json & j, const Source & x);
710+void from_json(const json & j, Source & x);
711+void to_json(json & j, const Source & x);
712712
713- void from_json(const json & j, Variants & x);
714- void to_json(json & j, const Variants & x);
713+void from_json(const json & j, Variants & x);
714+void to_json(json & j, const Variants & x);
715715
716- void from_json(const json & j, Image & x);
717- void to_json(json & j, const Image & x);
716+void from_json(const json & j, Image & x);
717+void to_json(json & j, const Image & x);
718718
719- void from_json(const json & j, Preview & x);
720- void to_json(json & j, const Preview & x);
719+void from_json(const json & j, Preview & x);
720+void to_json(json & j, const Preview & x);
721721
722- void from_json(const json & j, ChildData & x);
723- void to_json(json & j, const ChildData & x);
722+void from_json(const json & j, ChildData & x);
723+void to_json(json & j, const ChildData & x);
724724
725- void from_json(const json & j, Child & x);
726- void to_json(json & j, const Child & x);
725+void from_json(const json & j, Child & x);
726+void to_json(json & j, const Child & x);
727727
728- void from_json(const json & j, TopLevelData & x);
729- void to_json(json & j, const TopLevelData & x);
728+void from_json(const json & j, TopLevelData & x);
729+void to_json(json & j, const TopLevelData & x);
730730
731- void from_json(const json & j, TopLevel & x);
732- void to_json(json & j, const TopLevel & x);
731+void from_json(const json & j, TopLevel & x);
732+void to_json(json & j, const TopLevel & x);
733733
734- void from_json(const json & j, PostHint & x);
735- void to_json(json & j, const PostHint & x);
734+void from_json(const json & j, PostHint & x);
735+void to_json(json & j, const PostHint & x);
736736
737- void from_json(const json & j, Subreddit & x);
738- void to_json(json & j, const Subreddit & x);
737+void from_json(const json & j, Subreddit & x);
738+void to_json(json & j, const Subreddit & x);
739739
740- void from_json(const json & j, SubredditId & x);
741- void to_json(json & j, const SubredditId & x);
740+void from_json(const json & j, SubredditId & x);
741+void to_json(json & j, const SubredditId & x);
742742
743- void from_json(const json & j, SubredditNamePrefixed & x);
744- void to_json(json & j, const SubredditNamePrefixed & x);
743+void from_json(const json & j, SubredditNamePrefixed & x);
744+void to_json(json & j, const SubredditNamePrefixed & x);
745745
746- void from_json(const json & j, SubredditType & x);
747- void to_json(json & j, const SubredditType & x);
748-
749- void from_json(const json & j, Kind & x);
750- void to_json(json & j, const Kind & x);
746+void from_json(const json & j, SubredditType & x);
747+void to_json(json & j, const SubredditType & x);
751748
749+void from_json(const json & j, Kind & x);
750+void to_json(json & j, const Kind & x);
751+}
752+namespace quicktype {
752753 inline void from_json(const json & j, Oembed& x) {
753754 x.set_author_name(j.at("author_name").get<std::string>());
754755 x.set_author_url(j.at("author_url").get<std::string>());
Test case

test/inputs/json/misc/4e336.json

1 generated file · +6 −5
Mcplusplusdefault / quicktype.hpp+6 −5
@@ -66,12 +66,13 @@ namespace quicktype {
6666 }
6767
6868 namespace quicktype {
69- void from_json(const json & j, TotalPopulation & x);
70- void to_json(json & j, const TotalPopulation & x);
71-
72- void from_json(const json & j, TopLevel & x);
73- void to_json(json & j, const TopLevel & x);
69+void from_json(const json & j, TotalPopulation & x);
70+void to_json(json & j, const TotalPopulation & x);
7471
72+void from_json(const json & j, TopLevel & x);
73+void to_json(json & j, const TopLevel & x);
74+}
75+namespace quicktype {
7576 inline void from_json(const json & j, TotalPopulation& x) {
7677 x.set_date(j.at("date").get<std::string>());
7778 x.set_population(j.at("population").get<int64_t>());
Test case

test/inputs/json/misc/54147.json

1 generated file · +8 −7
Mcplusplusdefault / quicktype.hpp+8 −7
@@ -116,15 +116,16 @@ namespace quicktype {
116116 }
117117
118118 namespace quicktype {
119- void from_json(const json & j, Args & x);
120- void to_json(json & j, const Args & x);
119+void from_json(const json & j, Args & x);
120+void to_json(json & j, const Args & x);
121121
122- void from_json(const json & j, Headers & x);
123- void to_json(json & j, const Headers & x);
124-
125- void from_json(const json & j, TopLevel & x);
126- void to_json(json & j, const TopLevel & x);
122+void from_json(const json & j, Headers & x);
123+void to_json(json & j, const Headers & x);
127124
125+void from_json(const json & j, TopLevel & x);
126+void to_json(json & j, const TopLevel & x);
127+}
128+namespace quicktype {
128129 inline void from_json(const json & j, Args& x) {
129130 (void)j;
130131 (void)x;
Test case

test/inputs/json/misc/54d32.json

1 generated file · +10 −9
Mcplusplusdefault / quicktype.hpp+10 −9
@@ -128,18 +128,19 @@ namespace quicktype {
128128 }
129129
130130 namespace quicktype {
131- void from_json(const json & j, Facets & x);
132- void to_json(json & j, const Facets & x);
131+void from_json(const json & j, Facets & x);
132+void to_json(json & j, const Facets & x);
133133
134- void from_json(const json & j, Result & x);
135- void to_json(json & j, const Result & x);
134+void from_json(const json & j, Result & x);
135+void to_json(json & j, const Result & x);
136136
137- void from_json(const json & j, TopLevel & x);
138- void to_json(json & j, const TopLevel & x);
139-
140- void from_json(const json & j, Status & x);
141- void to_json(json & j, const Status & x);
137+void from_json(const json & j, TopLevel & x);
138+void to_json(json & j, const TopLevel & x);
142139
140+void from_json(const json & j, Status & x);
141+void to_json(json & j, const Status & x);
142+}
143+namespace quicktype {
143144 inline void from_json(const json & j, Facets& x) {
144145 (void)j;
145146 (void)x;
Test case

test/inputs/json/misc/570ec.json

1 generated file · +14 −13
Mcplusplusdefault / quicktype.hpp+14 −13
@@ -222,24 +222,25 @@ namespace quicktype {
222222 }
223223
224224 namespace quicktype {
225- void from_json(const json & j, Identifier & x);
226- void to_json(json & j, const Identifier & x);
225+void from_json(const json & j, Identifier & x);
226+void to_json(json & j, const Identifier & x);
227227
228- void from_json(const json & j, Link & x);
229- void to_json(json & j, const Link & x);
228+void from_json(const json & j, Link & x);
229+void to_json(json & j, const Link & x);
230230
231- void from_json(const json & j, OtherName & x);
232- void to_json(json & j, const OtherName & x);
231+void from_json(const json & j, OtherName & x);
232+void to_json(json & j, const OtherName & x);
233233
234- void from_json(const json & j, Text & x);
235- void to_json(json & j, const Text & x);
234+void from_json(const json & j, Text & x);
235+void to_json(json & j, const Text & x);
236236
237- void from_json(const json & j, TopLevelElement & x);
238- void to_json(json & j, const TopLevelElement & x);
239-
240- void from_json(const json & j, Scheme & x);
241- void to_json(json & j, const Scheme & x);
237+void from_json(const json & j, TopLevelElement & x);
238+void to_json(json & j, const TopLevelElement & x);
242239
240+void from_json(const json & j, Scheme & x);
241+void to_json(json & j, const Scheme & x);
242+}
243+namespace quicktype {
243244 inline void from_json(const json & j, Identifier& x) {
244245 x.set_identifier(j.at("identifier").get<std::string>());
245246 x.set_scheme(j.at("scheme").get<Scheme>());
Test case

test/inputs/json/misc/5dd0d.json

1 generated file · +10 −9
Mcplusplusdefault / quicktype.hpp+10 −9
@@ -194,18 +194,19 @@ namespace quicktype {
194194 }
195195
196196 namespace quicktype {
197- void from_json(const json & j, Status & x);
198- void to_json(json & j, const Status & x);
197+void from_json(const json & j, Status & x);
198+void to_json(json & j, const Status & x);
199199
200- void from_json(const json & j, Meta & x);
201- void to_json(json & j, const Meta & x);
200+void from_json(const json & j, Meta & x);
201+void to_json(json & j, const Meta & x);
202202
203- void from_json(const json & j, Weather & x);
204- void to_json(json & j, const Weather & x);
205-
206- void from_json(const json & j, TopLevel & x);
207- void to_json(json & j, const TopLevel & x);
203+void from_json(const json & j, Weather & x);
204+void to_json(json & j, const Weather & x);
208205
206+void from_json(const json & j, TopLevel & x);
207+void to_json(json & j, const TopLevel & x);
208+}
209+namespace quicktype {
209210 inline void from_json(const json & j, Status& x) {
210211 x.set_avg_delay(j.at("avgDelay").get<std::string>());
211212 x.set_closure_begin(j.at("closureBegin").get<std::string>());
Test case

test/inputs/json/misc/5eae5.json

1 generated file · +4 −3
Mcplusplusdefault / quicktype.hpp+4 −3
@@ -64,9 +64,10 @@ namespace quicktype {
6464 }
6565
6666 namespace quicktype {
67- void from_json(const json & j, TopLevelElement & x);
68- void to_json(json & j, const TopLevelElement & x);
69-
67+void from_json(const json & j, TopLevelElement & x);
68+void to_json(json & j, const TopLevelElement & x);
69+}
70+namespace quicktype {
7071 inline void from_json(const json & j, TopLevelElement& x) {
7172 x.set_date(j.at("Date").get<std::string>());
7273 x.set_id(j.at("ID").get<int64_t>());
Test case

test/inputs/json/misc/5eb20.json

1 generated file · +10 −9
Mcplusplusdefault / quicktype.hpp+10 −9
@@ -194,18 +194,19 @@ namespace quicktype {
194194 }
195195
196196 namespace quicktype {
197- void from_json(const json & j, Status & x);
198- void to_json(json & j, const Status & x);
197+void from_json(const json & j, Status & x);
198+void to_json(json & j, const Status & x);
199199
200- void from_json(const json & j, Meta & x);
201- void to_json(json & j, const Meta & x);
200+void from_json(const json & j, Meta & x);
201+void to_json(json & j, const Meta & x);
202202
203- void from_json(const json & j, Weather & x);
204- void to_json(json & j, const Weather & x);
205-
206- void from_json(const json & j, TopLevel & x);
207- void to_json(json & j, const TopLevel & x);
203+void from_json(const json & j, Weather & x);
204+void to_json(json & j, const Weather & x);
208205
206+void from_json(const json & j, TopLevel & x);
207+void to_json(json & j, const TopLevel & x);
208+}
209+namespace quicktype {
209210 inline void from_json(const json & j, Status& x) {
210211 x.set_avg_delay(j.at("avgDelay").get<std::string>());
211212 x.set_closure_begin(j.at("closureBegin").get<std::string>());
Test case

test/inputs/json/misc/5f3a1.json

1 generated file · +4 −3
Mcplusplusdefault / quicktype.hpp+4 −3
@@ -57,9 +57,10 @@ namespace quicktype {
5757 }
5858
5959 namespace quicktype {
60- void from_json(const json & j, TopLevel & x);
61- void to_json(json & j, const TopLevel & x);
62-
60+void from_json(const json & j, TopLevel & x);
61+void to_json(json & j, const TopLevel & x);
62+}
63+namespace quicktype {
6364 inline void from_json(const json & j, TopLevel& x) {
6465 x.set_base(j.at("base").get<std::string>());
6566 x.set_date(j.at("date").get<std::string>());
Test case

test/inputs/json/misc/61b66.json

1 generated file · +10 −9
Mcplusplusdefault / quicktype.hpp+10 −9
@@ -194,18 +194,19 @@ namespace quicktype {
194194 }
195195
196196 namespace quicktype {
197- void from_json(const json & j, Status & x);
198- void to_json(json & j, const Status & x);
197+void from_json(const json & j, Status & x);
198+void to_json(json & j, const Status & x);
199199
200- void from_json(const json & j, Meta & x);
201- void to_json(json & j, const Meta & x);
200+void from_json(const json & j, Meta & x);
201+void to_json(json & j, const Meta & x);
202202
203- void from_json(const json & j, Weather & x);
204- void to_json(json & j, const Weather & x);
205-
206- void from_json(const json & j, TopLevel & x);
207- void to_json(json & j, const TopLevel & x);
203+void from_json(const json & j, Weather & x);
204+void to_json(json & j, const Weather & x);
208205
206+void from_json(const json & j, TopLevel & x);
207+void to_json(json & j, const TopLevel & x);
208+}
209+namespace quicktype {
209210 inline void from_json(const json & j, Status& x) {
210211 x.set_avg_delay(j.at("avgDelay").get<std::string>());
211212 x.set_closure_begin(j.at("closureBegin").get<std::string>());
Test case

test/inputs/json/misc/6260a.json

1 generated file · +4 −3
Mcplusplusdefault / quicktype.hpp+4 −3
@@ -57,9 +57,10 @@ namespace quicktype {
5757 }
5858
5959 namespace quicktype {
60- void from_json(const json & j, TopLevel & x);
61- void to_json(json & j, const TopLevel & x);
62-
60+void from_json(const json & j, TopLevel & x);
61+void to_json(json & j, const TopLevel & x);
62+}
63+namespace quicktype {
6364 inline void from_json(const json & j, TopLevel& x) {
6465 x.set_base(j.at("base").get<std::string>());
6566 x.set_date(j.at("date").get<std::string>());
Test case

test/inputs/json/misc/65dec.json

1 generated file · +22 −21
Mcplusplusdefault / quicktype.hpp+22 −21
@@ -353,36 +353,37 @@ namespace quicktype {
353353 }
354354
355355 namespace quicktype {
356- void from_json(const json & j, LegalityElement & x);
357- void to_json(json & j, const LegalityElement & x);
356+void from_json(const json & j, LegalityElement & x);
357+void to_json(json & j, const LegalityElement & x);
358358
359- void from_json(const json & j, Ruling & x);
360- void to_json(json & j, const Ruling & x);
359+void from_json(const json & j, Ruling & x);
360+void to_json(json & j, const Ruling & x);
361361
362- void from_json(const json & j, Card & x);
363- void to_json(json & j, const Card & x);
362+void from_json(const json & j, Card & x);
363+void to_json(json & j, const Card & x);
364364
365- void from_json(const json & j, TopLevel & x);
366- void to_json(json & j, const TopLevel & x);
365+void from_json(const json & j, TopLevel & x);
366+void to_json(json & j, const TopLevel & x);
367367
368- void from_json(const json & j, ColorIdentity & x);
369- void to_json(json & j, const ColorIdentity & x);
368+void from_json(const json & j, ColorIdentity & x);
369+void to_json(json & j, const ColorIdentity & x);
370370
371- void from_json(const json & j, Watermark & x);
372- void to_json(json & j, const Watermark & x);
371+void from_json(const json & j, Watermark & x);
372+void to_json(json & j, const Watermark & x);
373373
374- void from_json(const json & j, Layout & x);
375- void to_json(json & j, const Layout & x);
374+void from_json(const json & j, Layout & x);
375+void to_json(json & j, const Layout & x);
376376
377- void from_json(const json & j, LegalityEnum & x);
378- void to_json(json & j, const LegalityEnum & x);
377+void from_json(const json & j, LegalityEnum & x);
378+void to_json(json & j, const LegalityEnum & x);
379379
380- void from_json(const json & j, Rarity & x);
381- void to_json(json & j, const Rarity & x);
382-
383- void from_json(const json & j, Type & x);
384- void to_json(json & j, const Type & x);
380+void from_json(const json & j, Rarity & x);
381+void to_json(json & j, const Rarity & x);
385382
383+void from_json(const json & j, Type & x);
384+void to_json(json & j, const Type & x);
385+}
386+namespace quicktype {
386387 inline void from_json(const json & j, LegalityElement& x) {
387388 x.set_format(j.at("format").get<std::string>());
388389 x.set_legality(j.at("legality").get<LegalityEnum>());
Test case

test/inputs/json/misc/66121.json

1 generated file · +20 −19
Mcplusplusdefault / quicktype.hpp+20 −19
@@ -211,33 +211,34 @@ namespace quicktype {
211211 }
212212
213213 namespace quicktype {
214- void from_json(const json & j, Identifier & x);
215- void to_json(json & j, const Identifier & x);
214+void from_json(const json & j, Identifier & x);
215+void to_json(json & j, const Identifier & x);
216216
217- void from_json(const json & j, Link & x);
218- void to_json(json & j, const Link & x);
217+void from_json(const json & j, Link & x);
218+void to_json(json & j, const Link & x);
219219
220- void from_json(const json & j, Text & x);
221- void to_json(json & j, const Text & x);
220+void from_json(const json & j, Text & x);
221+void to_json(json & j, const Text & x);
222222
223- void from_json(const json & j, TopLevelElement & x);
224- void to_json(json & j, const TopLevelElement & x);
223+void from_json(const json & j, TopLevelElement & x);
224+void to_json(json & j, const TopLevelElement & x);
225225
226- void from_json(const json & j, Scheme & x);
227- void to_json(json & j, const Scheme & x);
226+void from_json(const json & j, Scheme & x);
227+void to_json(json & j, const Scheme & x);
228228
229- void from_json(const json & j, Keyword & x);
230- void to_json(json & j, const Keyword & x);
229+void from_json(const json & j, Keyword & x);
230+void to_json(json & j, const Keyword & x);
231231
232- void from_json(const json & j, Note & x);
233- void to_json(json & j, const Note & x);
232+void from_json(const json & j, Note & x);
233+void to_json(json & j, const Note & x);
234234
235- void from_json(const json & j, MediaType & x);
236- void to_json(json & j, const MediaType & x);
237-
238- void from_json(const json & j, Title & x);
239- void to_json(json & j, const Title & x);
235+void from_json(const json & j, MediaType & x);
236+void to_json(json & j, const MediaType & x);
240237
238+void from_json(const json & j, Title & x);
239+void to_json(json & j, const Title & x);
240+}
241+namespace quicktype {
241242 inline void from_json(const json & j, Identifier& x) {
242243 x.set_identifier(j.at("identifier").get<std::string>());
243244 x.set_scheme(j.at("scheme").get<Scheme>());
Test case

test/inputs/json/misc/6617c.json

1 generated file · +6 −5
Mcplusplusdefault / quicktype.hpp+6 −5
@@ -76,12 +76,13 @@ namespace quicktype {
7676 }
7777
7878 namespace quicktype {
79- void from_json(const json & j, IssPosition & x);
80- void to_json(json & j, const IssPosition & x);
81-
82- void from_json(const json & j, TopLevel & x);
83- void to_json(json & j, const TopLevel & x);
79+void from_json(const json & j, IssPosition & x);
80+void to_json(json & j, const IssPosition & x);
8481
82+void from_json(const json & j, TopLevel & x);
83+void to_json(json & j, const TopLevel & x);
84+}
85+namespace quicktype {
8586 inline void from_json(const json & j, IssPosition& x) {
8687 x.set_latitude(j.at("latitude").get<std::string>());
8788 x.set_longitude(j.at("longitude").get<std::string>());
Test case

test/inputs/json/misc/67c03.json

1 generated file · +6 −5
Mcplusplusdefault / quicktype.hpp+6 −5
@@ -76,12 +76,13 @@ namespace quicktype {
7676 }
7777
7878 namespace quicktype {
79- void from_json(const json & j, Person & x);
80- void to_json(json & j, const Person & x);
81-
82- void from_json(const json & j, TopLevel & x);
83- void to_json(json & j, const TopLevel & x);
79+void from_json(const json & j, Person & x);
80+void to_json(json & j, const Person & x);
8481
82+void from_json(const json & j, TopLevel & x);
83+void to_json(json & j, const TopLevel & x);
84+}
85+namespace quicktype {
8586 inline void from_json(const json & j, Person& x) {
8687 x.set_craft(j.at("craft").get<std::string>());
8788 x.set_name(j.at("name").get<std::string>());
Test case

test/inputs/json/misc/68c30.json

1 generated file · +10 −9
Mcplusplusdefault / quicktype.hpp+10 −9
@@ -184,18 +184,19 @@ namespace quicktype {
184184 }
185185
186186 namespace quicktype {
187- void from_json(const json & j, Out & x);
188- void to_json(json & j, const Out & x);
187+void from_json(const json & j, Out & x);
188+void to_json(json & j, const Out & x);
189189
190- void from_json(const json & j, Input & x);
191- void to_json(json & j, const Input & x);
190+void from_json(const json & j, Input & x);
191+void to_json(json & j, const Input & x);
192192
193- void from_json(const json & j, Tx & x);
194- void to_json(json & j, const Tx & x);
195-
196- void from_json(const json & j, TopLevel & x);
197- void to_json(json & j, const TopLevel & x);
193+void from_json(const json & j, Tx & x);
194+void to_json(json & j, const Tx & x);
198195
196+void from_json(const json & j, TopLevel & x);
197+void to_json(json & j, const TopLevel & x);
198+}
199+namespace quicktype {
199200 inline void from_json(const json & j, Out& x) {
200201 x.set_addr(j.at("addr").get<std::string>());
201202 x.set_n(j.at("n").get<int64_t>());
Test case

test/inputs/json/misc/6c155.json

1 generated file · +16 −15
Mcplusplusdefault / quicktype.hpp+16 −15
@@ -276,27 +276,28 @@ namespace quicktype {
276276 }
277277
278278 namespace quicktype {
279- void from_json(const json & j, ResponseInfo & x);
280- void to_json(json & j, const ResponseInfo & x);
279+void from_json(const json & j, ResponseInfo & x);
280+void to_json(json & j, const ResponseInfo & x);
281281
282- void from_json(const json & j, Resultset & x);
283- void to_json(json & j, const Resultset & x);
282+void from_json(const json & j, Resultset & x);
283+void to_json(json & j, const Resultset & x);
284284
285- void from_json(const json & j, Metadata & x);
286- void to_json(json & j, const Metadata & x);
285+void from_json(const json & j, Metadata & x);
286+void to_json(json & j, const Metadata & x);
287287
288- void from_json(const json & j, Component & x);
289- void to_json(json & j, const Component & x);
288+void from_json(const json & j, Component & x);
289+void to_json(json & j, const Component & x);
290290
291- void from_json(const json & j, Location & x);
292- void to_json(json & j, const Location & x);
291+void from_json(const json & j, Location & x);
292+void to_json(json & j, const Location & x);
293293
294- void from_json(const json & j, Result & x);
295- void to_json(json & j, const Result & x);
296-
297- void from_json(const json & j, TopLevel & x);
298- void to_json(json & j, const TopLevel & x);
294+void from_json(const json & j, Result & x);
295+void to_json(json & j, const Result & x);
299296
297+void from_json(const json & j, TopLevel & x);
298+void to_json(json & j, const TopLevel & x);
299+}
300+namespace quicktype {
300301 inline void from_json(const json & j, ResponseInfo& x) {
301302 x.set_developer_message(j.at("developerMessage").get<std::string>());
302303 x.set_status(j.at("status").get<int64_t>());
Test case

test/inputs/json/misc/6de06.json

1 generated file · +32 −31
Mcplusplusdefault / quicktype.hpp+32 −31
@@ -719,51 +719,52 @@ namespace quicktype {
719719 }
720720
721721 namespace quicktype {
722- void from_json(const json & j, Oembed & x);
723- void to_json(json & j, const Oembed & x);
722+void from_json(const json & j, Oembed & x);
723+void to_json(json & j, const Oembed & x);
724724
725- void from_json(const json & j, Media & x);
726- void to_json(json & j, const Media & x);
725+void from_json(const json & j, Media & x);
726+void to_json(json & j, const Media & x);
727727
728- void from_json(const json & j, MediaEmbed & x);
729- void to_json(json & j, const MediaEmbed & x);
728+void from_json(const json & j, MediaEmbed & x);
729+void to_json(json & j, const MediaEmbed & x);
730730
731- void from_json(const json & j, Source & x);
732- void to_json(json & j, const Source & x);
731+void from_json(const json & j, Source & x);
732+void to_json(json & j, const Source & x);
733733
734- void from_json(const json & j, Gif & x);
735- void to_json(json & j, const Gif & x);
734+void from_json(const json & j, Gif & x);
735+void to_json(json & j, const Gif & x);
736736
737- void from_json(const json & j, Variants & x);
738- void to_json(json & j, const Variants & x);
737+void from_json(const json & j, Variants & x);
738+void to_json(json & j, const Variants & x);
739739
740- void from_json(const json & j, Image & x);
741- void to_json(json & j, const Image & x);
740+void from_json(const json & j, Image & x);
741+void to_json(json & j, const Image & x);
742742
743- void from_json(const json & j, Preview & x);
744- void to_json(json & j, const Preview & x);
743+void from_json(const json & j, Preview & x);
744+void to_json(json & j, const Preview & x);
745745
746- void from_json(const json & j, ChildData & x);
747- void to_json(json & j, const ChildData & x);
746+void from_json(const json & j, ChildData & x);
747+void to_json(json & j, const ChildData & x);
748748
749- void from_json(const json & j, Child & x);
750- void to_json(json & j, const Child & x);
749+void from_json(const json & j, Child & x);
750+void to_json(json & j, const Child & x);
751751
752- void from_json(const json & j, TopLevelData & x);
753- void to_json(json & j, const TopLevelData & x);
752+void from_json(const json & j, TopLevelData & x);
753+void to_json(json & j, const TopLevelData & x);
754754
755- void from_json(const json & j, TopLevel & x);
756- void to_json(json & j, const TopLevel & x);
755+void from_json(const json & j, TopLevel & x);
756+void to_json(json & j, const TopLevel & x);
757757
758- void from_json(const json & j, PostHint & x);
759- void to_json(json & j, const PostHint & x);
758+void from_json(const json & j, PostHint & x);
759+void to_json(json & j, const PostHint & x);
760760
761- void from_json(const json & j, SubredditType & x);
762- void to_json(json & j, const SubredditType & x);
763-
764- void from_json(const json & j, Kind & x);
765- void to_json(json & j, const Kind & x);
761+void from_json(const json & j, SubredditType & x);
762+void to_json(json & j, const SubredditType & x);
766763
764+void from_json(const json & j, Kind & x);
765+void to_json(json & j, const Kind & x);
766+}
767+namespace quicktype {
767768 inline void from_json(const json & j, Oembed& x) {
768769 x.set_description(j.at("description").get<std::string>());
769770 x.set_height(j.at("height").get<int64_t>());
Test case

test/inputs/json/misc/6dec6.json

1 generated file · +32 −31
Mcplusplusdefault / quicktype.hpp+32 −31
@@ -461,51 +461,52 @@ namespace quicktype {
461461 }
462462
463463 namespace quicktype {
464- void from_json(const json & j, Astronomy & x);
465- void to_json(json & j, const Astronomy & x);
464+void from_json(const json & j, Astronomy & x);
465+void to_json(json & j, const Astronomy & x);
466466
467- void from_json(const json & j, Atmosphere & x);
468- void to_json(json & j, const Atmosphere & x);
467+void from_json(const json & j, Atmosphere & x);
468+void to_json(json & j, const Atmosphere & x);
469469
470- void from_json(const json & j, Image & x);
471- void to_json(json & j, const Image & x);
470+void from_json(const json & j, Image & x);
471+void to_json(json & j, const Image & x);
472472
473- void from_json(const json & j, Condition & x);
474- void to_json(json & j, const Condition & x);
473+void from_json(const json & j, Condition & x);
474+void to_json(json & j, const Condition & x);
475475
476- void from_json(const json & j, Forecast & x);
477- void to_json(json & j, const Forecast & x);
476+void from_json(const json & j, Forecast & x);
477+void to_json(json & j, const Forecast & x);
478478
479- void from_json(const json & j, Guid & x);
480- void to_json(json & j, const Guid & x);
479+void from_json(const json & j, Guid & x);
480+void to_json(json & j, const Guid & x);
481481
482- void from_json(const json & j, Item & x);
483- void to_json(json & j, const Item & x);
482+void from_json(const json & j, Item & x);
483+void to_json(json & j, const Item & x);
484484
485- void from_json(const json & j, Location & x);
486- void to_json(json & j, const Location & x);
485+void from_json(const json & j, Location & x);
486+void to_json(json & j, const Location & x);
487487
488- void from_json(const json & j, Units & x);
489- void to_json(json & j, const Units & x);
488+void from_json(const json & j, Units & x);
489+void to_json(json & j, const Units & x);
490490
491- void from_json(const json & j, Wind & x);
492- void to_json(json & j, const Wind & x);
491+void from_json(const json & j, Wind & x);
492+void to_json(json & j, const Wind & x);
493493
494- void from_json(const json & j, Channel & x);
495- void to_json(json & j, const Channel & x);
494+void from_json(const json & j, Channel & x);
495+void to_json(json & j, const Channel & x);
496496
497- void from_json(const json & j, Results & x);
498- void to_json(json & j, const Results & x);
497+void from_json(const json & j, Results & x);
498+void to_json(json & j, const Results & x);
499499
500- void from_json(const json & j, Query & x);
501- void to_json(json & j, const Query & x);
500+void from_json(const json & j, Query & x);
501+void to_json(json & j, const Query & x);
502502
503- void from_json(const json & j, TopLevel & x);
504- void to_json(json & j, const TopLevel & x);
505-
506- void from_json(const json & j, Text & x);
507- void to_json(json & j, const Text & x);
503+void from_json(const json & j, TopLevel & x);
504+void to_json(json & j, const TopLevel & x);
508505
506+void from_json(const json & j, Text & x);
507+void to_json(json & j, const Text & x);
508+}
509+namespace quicktype {
509510 inline void from_json(const json & j, Astronomy& x) {
510511 x.set_sunrise(j.at("sunrise").get<std::string>());
511512 x.set_sunset(j.at("sunset").get<std::string>());
Test case

test/inputs/json/misc/6eb00.json

1 generated file · +4 −3
Mcplusplusdefault / quicktype.hpp+4 −3
@@ -59,9 +59,10 @@ namespace quicktype {
5959 }
6060
6161 namespace quicktype {
62- void from_json(const json & j, TopLevelElement & x);
63- void to_json(json & j, const TopLevelElement & x);
64-
62+void from_json(const json & j, TopLevelElement & x);
63+void to_json(json & j, const TopLevelElement & x);
64+}
65+namespace quicktype {
6566 inline void from_json(const json & j, TopLevelElement& x) {
6667 x.set_directorate_id(j.at("DirectorateID").get<int64_t>());
6768 x.set_id(j.at("Id").get<int64_t>());
Test case

test/inputs/json/misc/70c77.json

1 generated file · +4 −3
Mcplusplusdefault / quicktype.hpp+4 −3
@@ -57,9 +57,10 @@ namespace quicktype {
5757 }
5858
5959 namespace quicktype {
60- void from_json(const json & j, TopLevel & x);
61- void to_json(json & j, const TopLevel & x);
62-
60+void from_json(const json & j, TopLevel & x);
61+void to_json(json & j, const TopLevel & x);
62+}
63+namespace quicktype {
6364 inline void from_json(const json & j, TopLevel& x) {
6465 x.set_base(j.at("base").get<std::string>());
6566 x.set_date(j.at("date").get<std::string>());
Test case

test/inputs/json/misc/734ad.json

1 generated file · +10 −9
Mcplusplusdefault / quicktype.hpp+10 −9
@@ -427,18 +427,19 @@ namespace quicktype {
427427 }
428428
429429 namespace quicktype {
430- void from_json(const json & j, Facets & x);
431- void to_json(json & j, const Facets & x);
430+void from_json(const json & j, Facets & x);
431+void to_json(json & j, const Facets & x);
432432
433- void from_json(const json & j, Result & x);
434- void to_json(json & j, const Result & x);
433+void from_json(const json & j, Result & x);
434+void to_json(json & j, const Result & x);
435435
436- void from_json(const json & j, TopLevel & x);
437- void to_json(json & j, const TopLevel & x);
438-
439- void from_json(const json & j, Status & x);
440- void to_json(json & j, const Status & x);
436+void from_json(const json & j, TopLevel & x);
437+void to_json(json & j, const TopLevel & x);
441438
439+void from_json(const json & j, Status & x);
440+void to_json(json & j, const Status & x);
441+}
442+namespace quicktype {
442443 inline void from_json(const json & j, Facets& x) {
443444 (void)j;
444445 (void)x;
Test case

test/inputs/json/misc/75912.json

1 generated file · +4 −3
Mcplusplusdefault / quicktype.hpp+4 −3
@@ -57,9 +57,10 @@ namespace quicktype {
5757 }
5858
5959 namespace quicktype {
60- void from_json(const json & j, TopLevel & x);
61- void to_json(json & j, const TopLevel & x);
62-
60+void from_json(const json & j, TopLevel & x);
61+void to_json(json & j, const TopLevel & x);
62+}
63+namespace quicktype {
6364 inline void from_json(const json & j, TopLevel& x) {
6465 x.set_base(j.at("base").get<std::string>());
6566 x.set_date(j.at("date").get<std::string>());
Test case

test/inputs/json/misc/7681c.json

1 generated file · +28 −27
Mcplusplusdefault / quicktype.hpp+28 −27
@@ -566,45 +566,46 @@ namespace quicktype {
566566 }
567567
568568 namespace quicktype {
569- void from_json(const json & j, The480_WStill & x);
570- void to_json(json & j, const The480_WStill & x);
569+void from_json(const json & j, The480_WStill & x);
570+void to_json(json & j, const The480_WStill & x);
571571
572- void from_json(const json & j, DownsizedSmall & x);
573- void to_json(json & j, const DownsizedSmall & x);
572+void from_json(const json & j, DownsizedSmall & x);
573+void to_json(json & j, const DownsizedSmall & x);
574574
575- void from_json(const json & j, FixedHeight & x);
576- void to_json(json & j, const FixedHeight & x);
575+void from_json(const json & j, FixedHeight & x);
576+void to_json(json & j, const FixedHeight & x);
577577
578- void from_json(const json & j, Looping & x);
579- void to_json(json & j, const Looping & x);
578+void from_json(const json & j, Looping & x);
579+void to_json(json & j, const Looping & x);
580580
581- void from_json(const json & j, Images & x);
582- void to_json(json & j, const Images & x);
581+void from_json(const json & j, Images & x);
582+void to_json(json & j, const Images & x);
583583
584- void from_json(const json & j, User & x);
585- void to_json(json & j, const User & x);
584+void from_json(const json & j, User & x);
585+void to_json(json & j, const User & x);
586586
587- void from_json(const json & j, Datum & x);
588- void to_json(json & j, const Datum & x);
587+void from_json(const json & j, Datum & x);
588+void to_json(json & j, const Datum & x);
589589
590- void from_json(const json & j, Meta & x);
591- void to_json(json & j, const Meta & x);
590+void from_json(const json & j, Meta & x);
591+void to_json(json & j, const Meta & x);
592592
593- void from_json(const json & j, Pagination & x);
594- void to_json(json & j, const Pagination & x);
593+void from_json(const json & j, Pagination & x);
594+void to_json(json & j, const Pagination & x);
595595
596- void from_json(const json & j, TopLevel & x);
597- void to_json(json & j, const TopLevel & x);
596+void from_json(const json & j, TopLevel & x);
597+void to_json(json & j, const TopLevel & x);
598598
599- void from_json(const json & j, Rating & x);
600- void to_json(json & j, const Rating & x);
599+void from_json(const json & j, Rating & x);
600+void to_json(json & j, const Rating & x);
601601
602- void from_json(const json & j, Type & x);
603- void to_json(json & j, const Type & x);
604-
605- void from_json(const json & j, Username & x);
606- void to_json(json & j, const Username & x);
602+void from_json(const json & j, Type & x);
603+void to_json(json & j, const Type & x);
607604
605+void from_json(const json & j, Username & x);
606+void to_json(json & j, const Username & x);
607+}
608+namespace quicktype {
608609 inline void from_json(const json & j, The480_WStill& x) {
609610 x.set_height(j.at("height").get<std::string>());
610611 x.set_size(get_stack_optional<std::string>(j, "size"));
Test case

test/inputs/json/misc/76ae1.json

1 generated file · +58 −57
Mcplusplusdefault / quicktype.hpp+58 −57
@@ -784,90 +784,91 @@ namespace quicktype {
784784 }
785785
786786 namespace quicktype {
787- void from_json(const json & j, Property & x);
788- void to_json(json & j, const Property & x);
787+void from_json(const json & j, Property & x);
788+void to_json(json & j, const Property & x);
789789
790- void from_json(const json & j, Article & x);
791- void to_json(json & j, const Article & x);
790+void from_json(const json & j, Article & x);
791+void to_json(json & j, const Article & x);
792792
793- void from_json(const json & j, DeMinimisProperties & x);
794- void to_json(json & j, const DeMinimisProperties & x);
793+void from_json(const json & j, DeMinimisProperties & x);
794+void to_json(json & j, const DeMinimisProperties & x);
795795
796- void from_json(const json & j, DeMinimis & x);
797- void to_json(json & j, const DeMinimis & x);
796+void from_json(const json & j, DeMinimis & x);
797+void to_json(json & j, const DeMinimis & x);
798798
799- void from_json(const json & j, FaqProperties & x);
800- void to_json(json & j, const FaqProperties & x);
799+void from_json(const json & j, FaqProperties & x);
800+void to_json(json & j, const FaqProperties & x);
801801
802- void from_json(const json & j, Faq & x);
803- void to_json(json & j, const Faq & x);
802+void from_json(const json & j, Faq & x);
803+void to_json(json & j, const Faq & x);
804804
805- void from_json(const json & j, ReportProperties & x);
806- void to_json(json & j, const ReportProperties & x);
805+void from_json(const json & j, ReportProperties & x);
806+void to_json(json & j, const ReportProperties & x);
807807
808- void from_json(const json & j, Report & x);
809- void to_json(json & j, const Report & x);
808+void from_json(const json & j, Report & x);
809+void to_json(json & j, const Report & x);
810810
811- void from_json(const json & j, TaxonomyProperties & x);
812- void to_json(json & j, const TaxonomyProperties & x);
811+void from_json(const json & j, TaxonomyProperties & x);
812+void to_json(json & j, const TaxonomyProperties & x);
813813
814- void from_json(const json & j, Taxonomy & x);
815- void to_json(json & j, const Taxonomy & x);
814+void from_json(const json & j, Taxonomy & x);
815+void to_json(json & j, const Taxonomy & x);
816816
817- void from_json(const json & j, Definitions & x);
818- void to_json(json & j, const Definitions & x);
817+void from_json(const json & j, Definitions & x);
818+void to_json(json & j, const Definitions & x);
819819
820- void from_json(const json & j, Info & x);
821- void to_json(json & j, const Info & x);
820+void from_json(const json & j, Info & x);
821+void to_json(json & j, const Info & x);
822822
823- void from_json(const json & j, Parameter & x);
824- void to_json(json & j, const Parameter & x);
823+void from_json(const json & j, Parameter & x);
824+void to_json(json & j, const Parameter & x);
825825
826- void from_json(const json & j, ItemsClass & x);
827- void to_json(json & j, const ItemsClass & x);
826+void from_json(const json & j, ItemsClass & x);
827+void to_json(json & j, const ItemsClass & x);
828828
829- void from_json(const json & j, Purple200 & x);
830- void to_json(json & j, const Purple200 & x);
829+void from_json(const json & j, Purple200 & x);
830+void to_json(json & j, const Purple200 & x);
831831
832- void from_json(const json & j, PurpleResponses & x);
833- void to_json(json & j, const PurpleResponses & x);
832+void from_json(const json & j, PurpleResponses & x);
833+void to_json(json & j, const PurpleResponses & x);
834834
835- void from_json(const json & j, BusinessServiceProvidersSearchGet & x);
836- void to_json(json & j, const BusinessServiceProvidersSearchGet & x);
835+void from_json(const json & j, BusinessServiceProvidersSearchGet & x);
836+void to_json(json & j, const BusinessServiceProvidersSearchGet & x);
837837
838- void from_json(const json & j, BusinessServiceProvidersSearchClass & x);
839- void to_json(json & j, const BusinessServiceProvidersSearchClass & x);
838+void from_json(const json & j, BusinessServiceProvidersSearchClass & x);
839+void to_json(json & j, const BusinessServiceProvidersSearchClass & x);
840840
841- void from_json(const json & j, PurpleSchema & x);
842- void to_json(json & j, const PurpleSchema & x);
841+void from_json(const json & j, PurpleSchema & x);
842+void to_json(json & j, const PurpleSchema & x);
843843
844- void from_json(const json & j, Fluffy200 & x);
845- void to_json(json & j, const Fluffy200 & x);
844+void from_json(const json & j, Fluffy200 & x);
845+void to_json(json & j, const Fluffy200 & x);
846846
847- void from_json(const json & j, FluffyResponses & x);
848- void to_json(json & j, const FluffyResponses & x);
847+void from_json(const json & j, FluffyResponses & x);
848+void to_json(json & j, const FluffyResponses & x);
849849
850- void from_json(const json & j, ConsolidatedScreeningListSearchGet & x);
851- void to_json(json & j, const ConsolidatedScreeningListSearchGet & x);
850+void from_json(const json & j, ConsolidatedScreeningListSearchGet & x);
851+void to_json(json & j, const ConsolidatedScreeningListSearchGet & x);
852852
853- void from_json(const json & j, ConsolidatedScreeningListSearchClass & x);
854- void to_json(json & j, const ConsolidatedScreeningListSearchClass & x);
853+void from_json(const json & j, ConsolidatedScreeningListSearchClass & x);
854+void to_json(json & j, const ConsolidatedScreeningListSearchClass & x);
855855
856- void from_json(const json & j, Paths & x);
857- void to_json(json & j, const Paths & x);
856+void from_json(const json & j, Paths & x);
857+void to_json(json & j, const Paths & x);
858858
859- void from_json(const json & j, TopLevel & x);
860- void to_json(json & j, const TopLevel & x);
859+void from_json(const json & j, TopLevel & x);
860+void to_json(json & j, const TopLevel & x);
861861
862- void from_json(const json & j, FormatEnum & x);
863- void to_json(json & j, const FormatEnum & x);
862+void from_json(const json & j, FormatEnum & x);
863+void to_json(json & j, const FormatEnum & x);
864864
865- void from_json(const json & j, In & x);
866- void to_json(json & j, const In & x);
867-
868- void from_json(const json & j, SchemaType & x);
869- void to_json(json & j, const SchemaType & x);
865+void from_json(const json & j, In & x);
866+void to_json(json & j, const In & x);
870867
868+void from_json(const json & j, SchemaType & x);
869+void to_json(json & j, const SchemaType & x);
870+}
871+namespace quicktype {
871872 inline void from_json(const json & j, Property& x) {
872873 x.set_description(j.at("description").get<std::string>());
873874 x.set_type(j.at("type").get<FormatEnum>());
Test case

test/inputs/json/misc/77392.json

1 generated file · +8 −7
Mcplusplusdefault / quicktype.hpp+8 −7
@@ -155,15 +155,16 @@ namespace quicktype {
155155 }
156156
157157 namespace quicktype {
158- void from_json(const json & j, TopLevelElement & x);
159- void to_json(json & j, const TopLevelElement & x);
158+void from_json(const json & j, TopLevelElement & x);
159+void to_json(json & j, const TopLevelElement & x);
160160
161- void from_json(const json & j, OrbitClass & x);
162- void to_json(json & j, const OrbitClass & x);
163-
164- void from_json(const json & j, Pha & x);
165- void to_json(json & j, const Pha & x);
161+void from_json(const json & j, OrbitClass & x);
162+void to_json(json & j, const OrbitClass & x);
166163
164+void from_json(const json & j, Pha & x);
165+void to_json(json & j, const Pha & x);
166+}
167+namespace quicktype {
167168 inline void from_json(const json & j, TopLevelElement& x) {
168169 x.set_designation(j.at("designation").get<std::string>());
169170 x.set_discovery_date(j.at("discovery_date").get<std::string>());
Test case

test/inputs/json/misc/7d397.json

1 generated file · +32 −31
Mcplusplusdefault / quicktype.hpp+32 −31
@@ -324,51 +324,52 @@ namespace quicktype {
324324 }
325325
326326 namespace quicktype {
327- void from_json(const json & j, Property & x);
328- void to_json(json & j, const Property & x);
327+void from_json(const json & j, Property & x);
328+void to_json(json & j, const Property & x);
329329
330- void from_json(const json & j, List & x);
331- void to_json(json & j, const List & x);
330+void from_json(const json & j, List & x);
331+void to_json(json & j, const List & x);
332332
333- void from_json(const json & j, Definitions & x);
334- void to_json(json & j, const Definitions & x);
333+void from_json(const json & j, Definitions & x);
334+void to_json(json & j, const Definitions & x);
335335
336- void from_json(const json & j, Info & x);
337- void to_json(json & j, const Info & x);
336+void from_json(const json & j, Info & x);
337+void to_json(json & j, const Info & x);
338338
339- void from_json(const json & j, Parameter & x);
340- void to_json(json & j, const Parameter & x);
339+void from_json(const json & j, Parameter & x);
340+void to_json(json & j, const Parameter & x);
341341
342- void from_json(const json & j, Items & x);
343- void to_json(json & j, const Items & x);
342+void from_json(const json & j, Items & x);
343+void to_json(json & j, const Items & x);
344344
345- void from_json(const json & j, Schema & x);
346- void to_json(json & j, const Schema & x);
345+void from_json(const json & j, Schema & x);
346+void to_json(json & j, const Schema & x);
347347
348- void from_json(const json & j, The200 & x);
349- void to_json(json & j, const The200 & x);
348+void from_json(const json & j, The200 & x);
349+void to_json(json & j, const The200 & x);
350350
351- void from_json(const json & j, Responses & x);
352- void to_json(json & j, const Responses & x);
351+void from_json(const json & j, Responses & x);
352+void to_json(json & j, const Responses & x);
353353
354- void from_json(const json & j, Get & x);
355- void to_json(json & j, const Get & x);
354+void from_json(const json & j, Get & x);
355+void to_json(json & j, const Get & x);
356356
357- void from_json(const json & j, ConsolidatedScreeningListSearch & x);
358- void to_json(json & j, const ConsolidatedScreeningListSearch & x);
357+void from_json(const json & j, ConsolidatedScreeningListSearch & x);
358+void to_json(json & j, const ConsolidatedScreeningListSearch & x);
359359
360- void from_json(const json & j, Paths & x);
361- void to_json(json & j, const Paths & x);
360+void from_json(const json & j, Paths & x);
361+void to_json(json & j, const Paths & x);
362362
363- void from_json(const json & j, TopLevel & x);
364- void to_json(json & j, const TopLevel & x);
363+void from_json(const json & j, TopLevel & x);
364+void to_json(json & j, const TopLevel & x);
365365
366- void from_json(const json & j, Type & x);
367- void to_json(json & j, const Type & x);
368-
369- void from_json(const json & j, In & x);
370- void to_json(json & j, const In & x);
366+void from_json(const json & j, Type & x);
367+void to_json(json & j, const Type & x);
371368
369+void from_json(const json & j, In & x);
370+void to_json(json & j, const In & x);
371+}
372+namespace quicktype {
372373 inline void from_json(const json & j, Property& x) {
373374 x.set_description(j.at("description").get<std::string>());
374375 x.set_type(j.at("type").get<Type>());
Test case

test/inputs/json/misc/7d722.json

1 generated file · +10 −9
Mcplusplusdefault / quicktype.hpp+10 −9
@@ -194,18 +194,19 @@ namespace quicktype {
194194 }
195195
196196 namespace quicktype {
197- void from_json(const json & j, Status & x);
198- void to_json(json & j, const Status & x);
197+void from_json(const json & j, Status & x);
198+void to_json(json & j, const Status & x);
199199
200- void from_json(const json & j, Meta & x);
201- void to_json(json & j, const Meta & x);
200+void from_json(const json & j, Meta & x);
201+void to_json(json & j, const Meta & x);
202202
203- void from_json(const json & j, Weather & x);
204- void to_json(json & j, const Weather & x);
205-
206- void from_json(const json & j, TopLevel & x);
207- void to_json(json & j, const TopLevel & x);
203+void from_json(const json & j, Weather & x);
204+void to_json(json & j, const Weather & x);
208205
206+void from_json(const json & j, TopLevel & x);
207+void to_json(json & j, const TopLevel & x);
208+}
209+namespace quicktype {
209210 inline void from_json(const json & j, Status& x) {
210211 x.set_avg_delay(j.at("avgDelay").get<std::string>());
211212 x.set_closure_begin(j.at("closureBegin").get<std::string>());
Test case

test/inputs/json/misc/7df41.json

1 generated file · +6 −5
Mcplusplusdefault / quicktype.hpp+6 −5
@@ -91,12 +91,13 @@ namespace quicktype {
9191 }
9292
9393 namespace quicktype {
94- void from_json(const json & j, Pc & x);
95- void to_json(json & j, const Pc & x);
96-
97- void from_json(const json & j, TopLevel & x);
98- void to_json(json & j, const TopLevel & x);
94+void from_json(const json & j, Pc & x);
95+void to_json(json & j, const Pc & x);
9996
97+void from_json(const json & j, TopLevel & x);
98+void to_json(json & j, const TopLevel & x);
99+}
100+namespace quicktype {
100101 inline void from_json(const json & j, Pc& x) {
101102 x.set_count(j.at("count").get<int64_t>());
102103 x.set_label(j.at("label").get<std::string>());
Test case

test/inputs/json/misc/7dfa6.json

1 generated file · +6 −5
Mcplusplusdefault / quicktype.hpp+6 −5
@@ -66,12 +66,13 @@ namespace quicktype {
6666 }
6767
6868 namespace quicktype {
69- void from_json(const json & j, TotalPopulation & x);
70- void to_json(json & j, const TotalPopulation & x);
71-
72- void from_json(const json & j, TopLevel & x);
73- void to_json(json & j, const TopLevel & x);
69+void from_json(const json & j, TotalPopulation & x);
70+void to_json(json & j, const TotalPopulation & x);
7471
72+void from_json(const json & j, TopLevel & x);
73+void to_json(json & j, const TopLevel & x);
74+}
75+namespace quicktype {
7576 inline void from_json(const json & j, TotalPopulation& x) {
7677 x.set_date(j.at("date").get<std::string>());
7778 x.set_population(j.at("population").get<int64_t>());
Test case

test/inputs/json/misc/7eb30.json

1 generated file · +18 −17
Mcplusplusdefault / quicktype.hpp+18 −17
@@ -180,30 +180,31 @@ namespace quicktype {
180180 }
181181
182182 namespace quicktype {
183- void from_json(const json & j, Group & x);
184- void to_json(json & j, const Group & x);
183+void from_json(const json & j, Group & x);
184+void to_json(json & j, const Group & x);
185185
186- void from_json(const json & j, Result & x);
187- void to_json(json & j, const Result & x);
186+void from_json(const json & j, Result & x);
187+void to_json(json & j, const Result & x);
188188
189- void from_json(const json & j, TopLevel & x);
190- void to_json(json & j, const TopLevel & x);
189+void from_json(const json & j, TopLevel & x);
190+void to_json(json & j, const TopLevel & x);
191191
192- void from_json(const json & j, Code & x);
193- void to_json(json & j, const Code & x);
192+void from_json(const json & j, Code & x);
193+void to_json(json & j, const Code & x);
194194
195- void from_json(const json & j, English & x);
196- void to_json(json & j, const English & x);
195+void from_json(const json & j, English & x);
196+void to_json(json & j, const English & x);
197197
198- void from_json(const json & j, Thai & x);
199- void to_json(json & j, const Thai & x);
198+void from_json(const json & j, Thai & x);
199+void to_json(json & j, const Thai & x);
200200
201- void from_json(const json & j, Location & x);
202- void to_json(json & j, const Location & x);
203-
204- void from_json(const json & j, Tel & x);
205- void to_json(json & j, const Tel & x);
201+void from_json(const json & j, Location & x);
202+void to_json(json & j, const Location & x);
206203
204+void from_json(const json & j, Tel & x);
205+void to_json(json & j, const Tel & x);
206+}
207+namespace quicktype {
207208 inline void from_json(const json & j, Group& x) {
208209 x.set_code(j.at("code").get<Code>());
209210 x.set_english(j.at("english").get<English>());
Test case

test/inputs/json/misc/7f568.json

1 generated file · +10 −9
Mcplusplusdefault / quicktype.hpp+10 −9
@@ -216,18 +216,19 @@ namespace quicktype {
216216 }
217217
218218 namespace quicktype {
219- void from_json(const json & j, File & x);
220- void to_json(json & j, const File & x);
219+void from_json(const json & j, File & x);
220+void to_json(json & j, const File & x);
221221
222- void from_json(const json & j, TopLevelElement & x);
223- void to_json(json & j, const TopLevelElement & x);
222+void from_json(const json & j, TopLevelElement & x);
223+void to_json(json & j, const TopLevelElement & x);
224224
225- void from_json(const json & j, Language & x);
226- void to_json(json & j, const Language & x);
227-
228- void from_json(const json & j, Type & x);
229- void to_json(json & j, const Type & x);
225+void from_json(const json & j, Language & x);
226+void to_json(json & j, const Language & x);
230227
228+void from_json(const json & j, Type & x);
229+void to_json(json & j, const Type & x);
230+}
231+namespace quicktype {
231232 inline void from_json(const json & j, File& x) {
232233 x.set_filename(j.at("filename").get<std::string>());
233234 x.set_language(get_stack_optional<Language>(j, "language"));
Test case

test/inputs/json/misc/80aff.json

1 generated file · +8 −7
Mcplusplusdefault / quicktype.hpp+8 −7
@@ -186,15 +186,16 @@ namespace quicktype {
186186 }
187187
188188 namespace quicktype {
189- void from_json(const json & j, Facets & x);
190- void to_json(json & j, const Facets & x);
189+void from_json(const json & j, Facets & x);
190+void to_json(json & j, const Facets & x);
191191
192- void from_json(const json & j, Result & x);
193- void to_json(json & j, const Result & x);
194-
195- void from_json(const json & j, TopLevel & x);
196- void to_json(json & j, const TopLevel & x);
192+void from_json(const json & j, Result & x);
193+void to_json(json & j, const Result & x);
197194
195+void from_json(const json & j, TopLevel & x);
196+void to_json(json & j, const TopLevel & x);
197+}
198+namespace quicktype {
198199 inline void from_json(const json & j, Facets& x) {
199200 (void)j;
200201 (void)x;
Test case

test/inputs/json/misc/82509.json

1 generated file · +4 −3
Mcplusplusdefault / quicktype.hpp+4 −3
@@ -47,9 +47,10 @@ namespace quicktype {
4747 }
4848
4949 namespace quicktype {
50- void from_json(const json & j, TopLevel & x);
51- void to_json(json & j, const TopLevel & x);
52-
50+void from_json(const json & j, TopLevel & x);
51+void to_json(json & j, const TopLevel & x);
52+}
53+namespace quicktype {
5354 inline void from_json(const json & j, TopLevel& x) {
5455 x.set_origin(j.at("origin").get<std::string>());
5556 }
Test case

test/inputs/json/misc/8592b.json

1 generated file · +32 −31
Mcplusplusdefault / quicktype.hpp+32 −31
@@ -577,51 +577,52 @@ namespace quicktype {
577577 }
578578
579579 namespace quicktype {
580- void from_json(const json & j, MediaEmbed & x);
581- void to_json(json & j, const MediaEmbed & x);
580+void from_json(const json & j, MediaEmbed & x);
581+void to_json(json & j, const MediaEmbed & x);
582582
583- void from_json(const json & j, Source & x);
584- void to_json(json & j, const Source & x);
583+void from_json(const json & j, Source & x);
584+void to_json(json & j, const Source & x);
585585
586- void from_json(const json & j, Image & x);
587- void to_json(json & j, const Image & x);
586+void from_json(const json & j, Image & x);
587+void to_json(json & j, const Image & x);
588588
589- void from_json(const json & j, Preview & x);
590- void to_json(json & j, const Preview & x);
589+void from_json(const json & j, Preview & x);
590+void to_json(json & j, const Preview & x);
591591
592- void from_json(const json & j, ChildData & x);
593- void to_json(json & j, const ChildData & x);
592+void from_json(const json & j, ChildData & x);
593+void to_json(json & j, const ChildData & x);
594594
595- void from_json(const json & j, Child & x);
596- void to_json(json & j, const Child & x);
595+void from_json(const json & j, Child & x);
596+void to_json(json & j, const Child & x);
597597
598- void from_json(const json & j, TopLevelData & x);
599- void to_json(json & j, const TopLevelData & x);
598+void from_json(const json & j, TopLevelData & x);
599+void to_json(json & j, const TopLevelData & x);
600600
601- void from_json(const json & j, TopLevel & x);
602- void to_json(json & j, const TopLevel & x);
601+void from_json(const json & j, TopLevel & x);
602+void to_json(json & j, const TopLevel & x);
603603
604- void from_json(const json & j, PostHint & x);
605- void to_json(json & j, const PostHint & x);
604+void from_json(const json & j, PostHint & x);
605+void to_json(json & j, const PostHint & x);
606606
607- void from_json(const json & j, Subreddit & x);
608- void to_json(json & j, const Subreddit & x);
607+void from_json(const json & j, Subreddit & x);
608+void to_json(json & j, const Subreddit & x);
609609
610- void from_json(const json & j, SubredditId & x);
611- void to_json(json & j, const SubredditId & x);
610+void from_json(const json & j, SubredditId & x);
611+void to_json(json & j, const SubredditId & x);
612612
613- void from_json(const json & j, SubredditNamePrefixed & x);
614- void to_json(json & j, const SubredditNamePrefixed & x);
613+void from_json(const json & j, SubredditNamePrefixed & x);
614+void to_json(json & j, const SubredditNamePrefixed & x);
615615
616- void from_json(const json & j, SubredditType & x);
617- void to_json(json & j, const SubredditType & x);
616+void from_json(const json & j, SubredditType & x);
617+void to_json(json & j, const SubredditType & x);
618618
619- void from_json(const json & j, SuggestedSort & x);
620- void to_json(json & j, const SuggestedSort & x);
621-
622- void from_json(const json & j, Kind & x);
623- void to_json(json & j, const Kind & x);
619+void from_json(const json & j, SuggestedSort & x);
620+void to_json(json & j, const SuggestedSort & x);
624621
622+void from_json(const json & j, Kind & x);
623+void to_json(json & j, const Kind & x);
624+}
625+namespace quicktype {
625626 inline void from_json(const json & j, MediaEmbed& x) {
626627 (void)j;
627628 (void)x;
Test case

test/inputs/json/misc/88130.json

1 generated file · +30 −29
Mcplusplusdefault / quicktype.hpp+30 −29
@@ -459,48 +459,49 @@ namespace quicktype {
459459 }
460460
461461 namespace quicktype {
462- void from_json(const json & j, Astronomy & x);
463- void to_json(json & j, const Astronomy & x);
462+void from_json(const json & j, Astronomy & x);
463+void to_json(json & j, const Astronomy & x);
464464
465- void from_json(const json & j, Atmosphere & x);
466- void to_json(json & j, const Atmosphere & x);
465+void from_json(const json & j, Atmosphere & x);
466+void to_json(json & j, const Atmosphere & x);
467467
468- void from_json(const json & j, Image & x);
469- void to_json(json & j, const Image & x);
468+void from_json(const json & j, Image & x);
469+void to_json(json & j, const Image & x);
470470
471- void from_json(const json & j, Condition & x);
472- void to_json(json & j, const Condition & x);
471+void from_json(const json & j, Condition & x);
472+void to_json(json & j, const Condition & x);
473473
474- void from_json(const json & j, Forecast & x);
475- void to_json(json & j, const Forecast & x);
474+void from_json(const json & j, Forecast & x);
475+void to_json(json & j, const Forecast & x);
476476
477- void from_json(const json & j, Guid & x);
478- void to_json(json & j, const Guid & x);
477+void from_json(const json & j, Guid & x);
478+void to_json(json & j, const Guid & x);
479479
480- void from_json(const json & j, Item & x);
481- void to_json(json & j, const Item & x);
480+void from_json(const json & j, Item & x);
481+void to_json(json & j, const Item & x);
482482
483- void from_json(const json & j, Location & x);
484- void to_json(json & j, const Location & x);
483+void from_json(const json & j, Location & x);
484+void to_json(json & j, const Location & x);
485485
486- void from_json(const json & j, Units & x);
487- void to_json(json & j, const Units & x);
486+void from_json(const json & j, Units & x);
487+void to_json(json & j, const Units & x);
488488
489- void from_json(const json & j, Wind & x);
490- void to_json(json & j, const Wind & x);
489+void from_json(const json & j, Wind & x);
490+void to_json(json & j, const Wind & x);
491491
492- void from_json(const json & j, Channel & x);
493- void to_json(json & j, const Channel & x);
492+void from_json(const json & j, Channel & x);
493+void to_json(json & j, const Channel & x);
494494
495- void from_json(const json & j, Results & x);
496- void to_json(json & j, const Results & x);
495+void from_json(const json & j, Results & x);
496+void to_json(json & j, const Results & x);
497497
498- void from_json(const json & j, Query & x);
499- void to_json(json & j, const Query & x);
500-
501- void from_json(const json & j, TopLevel & x);
502- void to_json(json & j, const TopLevel & x);
498+void from_json(const json & j, Query & x);
499+void to_json(json & j, const Query & x);
503500
501+void from_json(const json & j, TopLevel & x);
502+void to_json(json & j, const TopLevel & x);
503+}
504+namespace quicktype {
504505 inline void from_json(const json & j, Astronomy& x) {
505506 x.set_sunrise(j.at("sunrise").get<std::string>());
506507 x.set_sunset(j.at("sunset").get<std::string>());
Test case

test/inputs/json/misc/8a62c.json

1 generated file · +6 −5
Mcplusplusdefault / quicktype.hpp+6 −5
@@ -66,12 +66,13 @@ namespace quicktype {
6666 }
6767
6868 namespace quicktype {
69- void from_json(const json & j, TotalPopulation & x);
70- void to_json(json & j, const TotalPopulation & x);
71-
72- void from_json(const json & j, TopLevel & x);
73- void to_json(json & j, const TopLevel & x);
69+void from_json(const json & j, TotalPopulation & x);
70+void to_json(json & j, const TotalPopulation & x);
7471
72+void from_json(const json & j, TopLevel & x);
73+void to_json(json & j, const TopLevel & x);
74+}
75+namespace quicktype {
7576 inline void from_json(const json & j, TotalPopulation& x) {
7677 x.set_date(j.at("date").get<std::string>());
7778 x.set_population(j.at("population").get<int64_t>());
Test case

test/inputs/json/misc/908db.json

1 generated file · +8 −7
Mcplusplusdefault / quicktype.hpp+8 −7
@@ -80,15 +80,16 @@ namespace quicktype {
8080 }
8181
8282 namespace quicktype {
83- void from_json(const json & j, StateState & x);
84- void to_json(json & j, const StateState & x);
83+void from_json(const json & j, StateState & x);
84+void to_json(json & j, const StateState & x);
8585
86- void from_json(const json & j, StateElement & x);
87- void to_json(json & j, const StateElement & x);
88-
89- void from_json(const json & j, TopLevel & x);
90- void to_json(json & j, const TopLevel & x);
86+void from_json(const json & j, StateElement & x);
87+void to_json(json & j, const StateElement & x);
9188
89+void from_json(const json & j, TopLevel & x);
90+void to_json(json & j, const TopLevel & x);
91+}
92+namespace quicktype {
9293 inline void from_json(const json & j, StateState& x) {
9394 x.set_state_id(j.at("state_id").get<std::string>());
9495 x.set_state_name(j.at("state_name").get<std::string>());
Test case

test/inputs/json/misc/9617f.json

1 generated file · +4 −3
Mcplusplusdefault / quicktype.hpp+4 −3
@@ -57,9 +57,10 @@ namespace quicktype {
5757 }
5858
5959 namespace quicktype {
60- void from_json(const json & j, TopLevel & x);
61- void to_json(json & j, const TopLevel & x);
62-
60+void from_json(const json & j, TopLevel & x);
61+void to_json(json & j, const TopLevel & x);
62+}
63+namespace quicktype {
6364 inline void from_json(const json & j, TopLevel& x) {
6465 x.set_base(j.at("base").get<std::string>());
6566 x.set_date(j.at("date").get<std::string>());
Test case

test/inputs/json/misc/96f7c.json

1 generated file · +4 −3
Mcplusplusdefault / quicktype.hpp+4 −3
@@ -72,9 +72,10 @@ namespace quicktype {
7272 }
7373
7474 namespace quicktype {
75- void from_json(const json & j, TopLevel & x);
76- void to_json(json & j, const TopLevel & x);
77-
75+void from_json(const json & j, TopLevel & x);
76+void to_json(json & j, const TopLevel & x);
77+}
78+namespace quicktype {
7879 inline void from_json(const json & j, TopLevel& x) {
7980 x.set_git(j.at("git").get<std::vector<std::string>>());
8081 x.set_github_services_sha(j.at("github_services_sha").get<std::string>());
Test case

test/inputs/json/misc/9847b.json

1 generated file · +4 −3
Mcplusplusdefault / quicktype.hpp+4 −3
@@ -54,9 +54,10 @@ namespace quicktype {
5454 }
5555
5656 namespace quicktype {
57- void from_json(const json & j, TopLevelElement & x);
58- void to_json(json & j, const TopLevelElement & x);
59-
57+void from_json(const json & j, TopLevelElement & x);
58+void to_json(json & j, const TopLevelElement & x);
59+}
60+namespace quicktype {
6061 inline void from_json(const json & j, TopLevelElement& x) {
6162 x.set_id(j.at("id").get<std::string>());
6263 x.set_name(j.at("name").get<std::string>());
Test case

test/inputs/json/misc/9929c.json

1 generated file · +30 −29
Mcplusplusdefault / quicktype.hpp+30 −29
@@ -459,48 +459,49 @@ namespace quicktype {
459459 }
460460
461461 namespace quicktype {
462- void from_json(const json & j, Astronomy & x);
463- void to_json(json & j, const Astronomy & x);
462+void from_json(const json & j, Astronomy & x);
463+void to_json(json & j, const Astronomy & x);
464464
465- void from_json(const json & j, Atmosphere & x);
466- void to_json(json & j, const Atmosphere & x);
465+void from_json(const json & j, Atmosphere & x);
466+void to_json(json & j, const Atmosphere & x);
467467
468- void from_json(const json & j, Image & x);
469- void to_json(json & j, const Image & x);
468+void from_json(const json & j, Image & x);
469+void to_json(json & j, const Image & x);
470470
471- void from_json(const json & j, Condition & x);
472- void to_json(json & j, const Condition & x);
471+void from_json(const json & j, Condition & x);
472+void to_json(json & j, const Condition & x);
473473
474- void from_json(const json & j, Forecast & x);
475- void to_json(json & j, const Forecast & x);
474+void from_json(const json & j, Forecast & x);
475+void to_json(json & j, const Forecast & x);
476476
477- void from_json(const json & j, Guid & x);
478- void to_json(json & j, const Guid & x);
477+void from_json(const json & j, Guid & x);
478+void to_json(json & j, const Guid & x);
479479
480- void from_json(const json & j, Item & x);
481- void to_json(json & j, const Item & x);
480+void from_json(const json & j, Item & x);
481+void to_json(json & j, const Item & x);
482482
483- void from_json(const json & j, Location & x);
484- void to_json(json & j, const Location & x);
483+void from_json(const json & j, Location & x);
484+void to_json(json & j, const Location & x);
485485
486- void from_json(const json & j, Units & x);
487- void to_json(json & j, const Units & x);
486+void from_json(const json & j, Units & x);
487+void to_json(json & j, const Units & x);
488488
489- void from_json(const json & j, Wind & x);
490- void to_json(json & j, const Wind & x);
489+void from_json(const json & j, Wind & x);
490+void to_json(json & j, const Wind & x);
491491
492- void from_json(const json & j, Channel & x);
493- void to_json(json & j, const Channel & x);
492+void from_json(const json & j, Channel & x);
493+void to_json(json & j, const Channel & x);
494494
495- void from_json(const json & j, Results & x);
496- void to_json(json & j, const Results & x);
495+void from_json(const json & j, Results & x);
496+void to_json(json & j, const Results & x);
497497
498- void from_json(const json & j, Query & x);
499- void to_json(json & j, const Query & x);
500-
501- void from_json(const json & j, TopLevel & x);
502- void to_json(json & j, const TopLevel & x);
498+void from_json(const json & j, Query & x);
499+void to_json(json & j, const Query & x);
503500
501+void from_json(const json & j, TopLevel & x);
502+void to_json(json & j, const TopLevel & x);
503+}
504+namespace quicktype {
504505 inline void from_json(const json & j, Astronomy& x) {
505506 x.set_sunrise(j.at("sunrise").get<std::string>());
506507 x.set_sunset(j.at("sunset").get<std::string>());
Test case

test/inputs/json/misc/996bd.json

1 generated file · +18 −17
Mcplusplusdefault / quicktype.hpp+18 −17
@@ -209,30 +209,31 @@ namespace quicktype {
209209 }
210210
211211 namespace quicktype {
212- void from_json(const json & j, Identifier & x);
213- void to_json(json & j, const Identifier & x);
212+void from_json(const json & j, Identifier & x);
213+void to_json(json & j, const Identifier & x);
214214
215- void from_json(const json & j, Link & x);
216- void to_json(json & j, const Link & x);
215+void from_json(const json & j, Link & x);
216+void to_json(json & j, const Link & x);
217217
218- void from_json(const json & j, Text & x);
219- void to_json(json & j, const Text & x);
218+void from_json(const json & j, Text & x);
219+void to_json(json & j, const Text & x);
220220
221- void from_json(const json & j, TopLevelElement & x);
222- void to_json(json & j, const TopLevelElement & x);
221+void from_json(const json & j, TopLevelElement & x);
222+void to_json(json & j, const TopLevelElement & x);
223223
224- void from_json(const json & j, Scheme & x);
225- void to_json(json & j, const Scheme & x);
224+void from_json(const json & j, Scheme & x);
225+void to_json(json & j, const Scheme & x);
226226
227- void from_json(const json & j, Keyword & x);
228- void to_json(json & j, const Keyword & x);
227+void from_json(const json & j, Keyword & x);
228+void to_json(json & j, const Keyword & x);
229229
230- void from_json(const json & j, MediaType & x);
231- void to_json(json & j, const MediaType & x);
232-
233- void from_json(const json & j, Title & x);
234- void to_json(json & j, const Title & x);
230+void from_json(const json & j, MediaType & x);
231+void to_json(json & j, const MediaType & x);
235232
233+void from_json(const json & j, Title & x);
234+void to_json(json & j, const Title & x);
235+}
236+namespace quicktype {
236237 inline void from_json(const json & j, Identifier& x) {
237238 x.set_identifier(j.at("identifier").get<std::string>());
238239 x.set_scheme(j.at("scheme").get<Scheme>());
Test case

test/inputs/json/misc/9a503.json

1 generated file · +12 −11
Mcplusplusdefault / quicktype.hpp+12 −11
@@ -148,21 +148,22 @@ namespace quicktype {
148148 }
149149
150150 namespace quicktype {
151- void from_json(const json & j, Identifier & x);
152- void to_json(json & j, const Identifier & x);
151+void from_json(const json & j, Identifier & x);
152+void to_json(json & j, const Identifier & x);
153153
154- void from_json(const json & j, Link & x);
155- void to_json(json & j, const Link & x);
154+void from_json(const json & j, Link & x);
155+void to_json(json & j, const Link & x);
156156
157- void from_json(const json & j, Text & x);
158- void to_json(json & j, const Text & x);
157+void from_json(const json & j, Text & x);
158+void to_json(json & j, const Text & x);
159159
160- void from_json(const json & j, TopLevelElement & x);
161- void to_json(json & j, const TopLevelElement & x);
162-
163- void from_json(const json & j, Keyword & x);
164- void to_json(json & j, const Keyword & x);
160+void from_json(const json & j, TopLevelElement & x);
161+void to_json(json & j, const TopLevelElement & x);
165162
163+void from_json(const json & j, Keyword & x);
164+void to_json(json & j, const Keyword & x);
165+}
166+namespace quicktype {
166167 inline void from_json(const json & j, Identifier& x) {
167168 x.set_identifier(j.at("identifier").get<std::string>());
168169 x.set_scheme(j.at("scheme").get<std::string>());
Test case

test/inputs/json/misc/9ac3b.json

1 generated file · +12 −11
Mcplusplusdefault / quicktype.hpp+12 −11
@@ -209,21 +209,22 @@ namespace quicktype {
209209 }
210210
211211 namespace quicktype {
212- void from_json(const json & j, Facets & x);
213- void to_json(json & j, const Facets & x);
212+void from_json(const json & j, Facets & x);
213+void to_json(json & j, const Facets & x);
214214
215- void from_json(const json & j, Result & x);
216- void to_json(json & j, const Result & x);
215+void from_json(const json & j, Result & x);
216+void to_json(json & j, const Result & x);
217217
218- void from_json(const json & j, TopLevel & x);
219- void to_json(json & j, const TopLevel & x);
218+void from_json(const json & j, TopLevel & x);
219+void to_json(json & j, const TopLevel & x);
220220
221- void from_json(const json & j, Status & x);
222- void to_json(json & j, const Status & x);
223-
224- void from_json(const json & j, Title & x);
225- void to_json(json & j, const Title & x);
221+void from_json(const json & j, Status & x);
222+void to_json(json & j, const Status & x);
226223
224+void from_json(const json & j, Title & x);
225+void to_json(json & j, const Title & x);
226+}
227+namespace quicktype {
227228 inline void from_json(const json & j, Facets& x) {
228229 (void)j;
229230 (void)x;
Test case

test/inputs/json/misc/9eed5.json

1 generated file · +12 −11
Mcplusplusdefault / quicktype.hpp+12 −11
@@ -148,21 +148,22 @@ namespace quicktype {
148148 }
149149
150150 namespace quicktype {
151- void from_json(const json & j, Identifier & x);
152- void to_json(json & j, const Identifier & x);
151+void from_json(const json & j, Identifier & x);
152+void to_json(json & j, const Identifier & x);
153153
154- void from_json(const json & j, Link & x);
155- void to_json(json & j, const Link & x);
154+void from_json(const json & j, Link & x);
155+void to_json(json & j, const Link & x);
156156
157- void from_json(const json & j, Text & x);
158- void to_json(json & j, const Text & x);
157+void from_json(const json & j, Text & x);
158+void to_json(json & j, const Text & x);
159159
160- void from_json(const json & j, TopLevelElement & x);
161- void to_json(json & j, const TopLevelElement & x);
162-
163- void from_json(const json & j, Keyword & x);
164- void to_json(json & j, const Keyword & x);
160+void from_json(const json & j, TopLevelElement & x);
161+void to_json(json & j, const TopLevelElement & x);
165162
163+void from_json(const json & j, Keyword & x);
164+void to_json(json & j, const Keyword & x);
165+}
166+namespace quicktype {
166167 inline void from_json(const json & j, Identifier& x) {
167168 x.set_identifier(j.at("identifier").get<std::string>());
168169 x.set_scheme(j.at("scheme").get<std::string>());
Test case

test/inputs/json/misc/a1eca.json

1 generated file · +30 −29
Mcplusplusdefault / quicktype.hpp+30 −29
@@ -459,48 +459,49 @@ namespace quicktype {
459459 }
460460
461461 namespace quicktype {
462- void from_json(const json & j, Astronomy & x);
463- void to_json(json & j, const Astronomy & x);
462+void from_json(const json & j, Astronomy & x);
463+void to_json(json & j, const Astronomy & x);
464464
465- void from_json(const json & j, Atmosphere & x);
466- void to_json(json & j, const Atmosphere & x);
465+void from_json(const json & j, Atmosphere & x);
466+void to_json(json & j, const Atmosphere & x);
467467
468- void from_json(const json & j, Image & x);
469- void to_json(json & j, const Image & x);
468+void from_json(const json & j, Image & x);
469+void to_json(json & j, const Image & x);
470470
471- void from_json(const json & j, Condition & x);
472- void to_json(json & j, const Condition & x);
471+void from_json(const json & j, Condition & x);
472+void to_json(json & j, const Condition & x);
473473
474- void from_json(const json & j, Forecast & x);
475- void to_json(json & j, const Forecast & x);
474+void from_json(const json & j, Forecast & x);
475+void to_json(json & j, const Forecast & x);
476476
477- void from_json(const json & j, Guid & x);
478- void to_json(json & j, const Guid & x);
477+void from_json(const json & j, Guid & x);
478+void to_json(json & j, const Guid & x);
479479
480- void from_json(const json & j, Item & x);
481- void to_json(json & j, const Item & x);
480+void from_json(const json & j, Item & x);
481+void to_json(json & j, const Item & x);
482482
483- void from_json(const json & j, Location & x);
484- void to_json(json & j, const Location & x);
483+void from_json(const json & j, Location & x);
484+void to_json(json & j, const Location & x);
485485
486- void from_json(const json & j, Units & x);
487- void to_json(json & j, const Units & x);
486+void from_json(const json & j, Units & x);
487+void to_json(json & j, const Units & x);
488488
489- void from_json(const json & j, Wind & x);
490- void to_json(json & j, const Wind & x);
489+void from_json(const json & j, Wind & x);
490+void to_json(json & j, const Wind & x);
491491
492- void from_json(const json & j, Channel & x);
493- void to_json(json & j, const Channel & x);
492+void from_json(const json & j, Channel & x);
493+void to_json(json & j, const Channel & x);
494494
495- void from_json(const json & j, Results & x);
496- void to_json(json & j, const Results & x);
495+void from_json(const json & j, Results & x);
496+void to_json(json & j, const Results & x);
497497
498- void from_json(const json & j, Query & x);
499- void to_json(json & j, const Query & x);
500-
501- void from_json(const json & j, TopLevel & x);
502- void to_json(json & j, const TopLevel & x);
498+void from_json(const json & j, Query & x);
499+void to_json(json & j, const Query & x);
503500
501+void from_json(const json & j, TopLevel & x);
502+void to_json(json & j, const TopLevel & x);
503+}
504+namespace quicktype {
504505 inline void from_json(const json & j, Astronomy& x) {
505506 x.set_sunrise(j.at("sunrise").get<std::string>());
506507 x.set_sunset(j.at("sunset").get<std::string>());
Test case

test/inputs/json/misc/a45b0.json

1 generated file · +6 −5
Mcplusplusdefault / quicktype.hpp+6 −5
@@ -76,12 +76,13 @@ namespace quicktype {
7676 }
7777
7878 namespace quicktype {
79- void from_json(const json & j, TopLevelElement & x);
80- void to_json(json & j, const TopLevelElement & x);
81-
82- void from_json(const json & j, Country & x);
83- void to_json(json & j, const Country & x);
79+void from_json(const json & j, TopLevelElement & x);
80+void to_json(json & j, const TopLevelElement & x);
8481
82+void from_json(const json & j, Country & x);
83+void to_json(json & j, const Country & x);
84+}
85+namespace quicktype {
8586 inline void from_json(const json & j, TopLevelElement& x) {
8687 x.set_age(j.at("age").get<int64_t>());
8788 x.set_country(j.at("country").get<Country>());
Test case

test/inputs/json/misc/a71df.json

1 generated file · +10 −9
Mcplusplusdefault / quicktype.hpp+10 −9
@@ -194,18 +194,19 @@ namespace quicktype {
194194 }
195195
196196 namespace quicktype {
197- void from_json(const json & j, Status & x);
198- void to_json(json & j, const Status & x);
197+void from_json(const json & j, Status & x);
198+void to_json(json & j, const Status & x);
199199
200- void from_json(const json & j, Meta & x);
201- void to_json(json & j, const Meta & x);
200+void from_json(const json & j, Meta & x);
201+void to_json(json & j, const Meta & x);
202202
203- void from_json(const json & j, Weather & x);
204- void to_json(json & j, const Weather & x);
205-
206- void from_json(const json & j, TopLevel & x);
207- void to_json(json & j, const TopLevel & x);
203+void from_json(const json & j, Weather & x);
204+void to_json(json & j, const Weather & x);
208205
206+void from_json(const json & j, TopLevel & x);
207+void to_json(json & j, const TopLevel & x);
208+}
209+namespace quicktype {
209210 inline void from_json(const json & j, Status& x) {
210211 x.set_avg_delay(j.at("avgDelay").get<std::string>());
211212 x.set_closure_begin(j.at("closureBegin").get<std::string>());
Test case

test/inputs/json/misc/a9691.json

1 generated file · +4 −3
Mcplusplusdefault / quicktype.hpp+4 −3
@@ -57,9 +57,10 @@ namespace quicktype {
5757 }
5858
5959 namespace quicktype {
60- void from_json(const json & j, TopLevel & x);
61- void to_json(json & j, const TopLevel & x);
62-
60+void from_json(const json & j, TopLevel & x);
61+void to_json(json & j, const TopLevel & x);
62+}
63+namespace quicktype {
6364 inline void from_json(const json & j, TopLevel& x) {
6465 x.set_base(j.at("base").get<std::string>());
6566 x.set_date(j.at("date").get<std::string>());
Test case

test/inputs/json/misc/ab0d1.json

1 generated file · +6 −5
Mcplusplusdefault / quicktype.hpp+6 −5
@@ -76,12 +76,13 @@ namespace quicktype {
7676 }
7777
7878 namespace quicktype {
79- void from_json(const json & j, TopLevelElement & x);
80- void to_json(json & j, const TopLevelElement & x);
81-
82- void from_json(const json & j, Country & x);
83- void to_json(json & j, const Country & x);
79+void from_json(const json & j, TopLevelElement & x);
80+void to_json(json & j, const TopLevelElement & x);
8481
82+void from_json(const json & j, Country & x);
83+void to_json(json & j, const Country & x);
84+}
85+namespace quicktype {
8586 inline void from_json(const json & j, TopLevelElement& x) {
8687 x.set_age(j.at("age").get<int64_t>());
8788 x.set_country(j.at("country").get<Country>());
Test case

test/inputs/json/misc/abb4b.json

1 generated file · +6 −5
Mcplusplusdefault / quicktype.hpp+6 −5
@@ -66,12 +66,13 @@ namespace quicktype {
6666 }
6767
6868 namespace quicktype {
69- void from_json(const json & j, TotalPopulation & x);
70- void to_json(json & j, const TotalPopulation & x);
71-
72- void from_json(const json & j, TopLevel & x);
73- void to_json(json & j, const TopLevel & x);
69+void from_json(const json & j, TotalPopulation & x);
70+void to_json(json & j, const TotalPopulation & x);
7471
72+void from_json(const json & j, TopLevel & x);
73+void to_json(json & j, const TopLevel & x);
74+}
75+namespace quicktype {
7576 inline void from_json(const json & j, TotalPopulation& x) {
7677 x.set_date(j.at("date").get<std::string>());
7778 x.set_population(j.at("population").get<int64_t>());
Test case

test/inputs/json/misc/ac944.json

1 generated file · +4 −3
Mcplusplusdefault / quicktype.hpp+4 −3
@@ -57,9 +57,10 @@ namespace quicktype {
5757 }
5858
5959 namespace quicktype {
60- void from_json(const json & j, TopLevel & x);
61- void to_json(json & j, const TopLevel & x);
62-
60+void from_json(const json & j, TopLevel & x);
61+void to_json(json & j, const TopLevel & x);
62+}
63+namespace quicktype {
6364 inline void from_json(const json & j, TopLevel& x) {
6465 x.set_base(j.at("base").get<std::string>());
6566 x.set_date(j.at("date").get<std::string>());
Test case

test/inputs/json/misc/ad8be.json

1 generated file · +22 −21
Mcplusplusdefault / quicktype.hpp+22 −21
@@ -229,36 +229,37 @@ namespace quicktype {
229229 }
230230
231231 namespace quicktype {
232- void from_json(const json & j, Identifier & x);
233- void to_json(json & j, const Identifier & x);
232+void from_json(const json & j, Identifier & x);
233+void to_json(json & j, const Identifier & x);
234234
235- void from_json(const json & j, Link & x);
236- void to_json(json & j, const Link & x);
235+void from_json(const json & j, Link & x);
236+void to_json(json & j, const Link & x);
237237
238- void from_json(const json & j, OtherName & x);
239- void to_json(json & j, const OtherName & x);
238+void from_json(const json & j, OtherName & x);
239+void to_json(json & j, const OtherName & x);
240240
241- void from_json(const json & j, Text & x);
242- void to_json(json & j, const Text & x);
241+void from_json(const json & j, Text & x);
242+void to_json(json & j, const Text & x);
243243
244- void from_json(const json & j, TopLevelElement & x);
245- void to_json(json & j, const TopLevelElement & x);
244+void from_json(const json & j, TopLevelElement & x);
245+void to_json(json & j, const TopLevelElement & x);
246246
247- void from_json(const json & j, Scheme & x);
248- void to_json(json & j, const Scheme & x);
247+void from_json(const json & j, Scheme & x);
248+void to_json(json & j, const Scheme & x);
249249
250- void from_json(const json & j, Keyword & x);
251- void to_json(json & j, const Keyword & x);
250+void from_json(const json & j, Keyword & x);
251+void to_json(json & j, const Keyword & x);
252252
253- void from_json(const json & j, Note & x);
254- void to_json(json & j, const Note & x);
253+void from_json(const json & j, Note & x);
254+void to_json(json & j, const Note & x);
255255
256- void from_json(const json & j, MediaType & x);
257- void to_json(json & j, const MediaType & x);
258-
259- void from_json(const json & j, Title & x);
260- void to_json(json & j, const Title & x);
256+void from_json(const json & j, MediaType & x);
257+void to_json(json & j, const MediaType & x);
261258
259+void from_json(const json & j, Title & x);
260+void to_json(json & j, const Title & x);
261+}
262+namespace quicktype {
262263 inline void from_json(const json & j, Identifier& x) {
263264 x.set_identifier(j.at("identifier").get<std::string>());
264265 x.set_scheme(j.at("scheme").get<Scheme>());
Test case

test/inputs/json/misc/ae7f0.json

1 generated file · +24 −23
Mcplusplusdefault / quicktype.hpp+24 −23
@@ -485,39 +485,40 @@ namespace quicktype {
485485 }
486486
487487 namespace quicktype {
488- void from_json(const json & j, MediaEmbed & x);
489- void to_json(json & j, const MediaEmbed & x);
488+void from_json(const json & j, MediaEmbed & x);
489+void to_json(json & j, const MediaEmbed & x);
490490
491- void from_json(const json & j, ChildData & x);
492- void to_json(json & j, const ChildData & x);
491+void from_json(const json & j, ChildData & x);
492+void to_json(json & j, const ChildData & x);
493493
494- void from_json(const json & j, Child & x);
495- void to_json(json & j, const Child & x);
494+void from_json(const json & j, Child & x);
495+void to_json(json & j, const Child & x);
496496
497- void from_json(const json & j, TopLevelData & x);
498- void to_json(json & j, const TopLevelData & x);
497+void from_json(const json & j, TopLevelData & x);
498+void to_json(json & j, const TopLevelData & x);
499499
500- void from_json(const json & j, TopLevel & x);
501- void to_json(json & j, const TopLevel & x);
500+void from_json(const json & j, TopLevel & x);
501+void to_json(json & j, const TopLevel & x);
502502
503- void from_json(const json & j, Domain & x);
504- void to_json(json & j, const Domain & x);
503+void from_json(const json & j, Domain & x);
504+void to_json(json & j, const Domain & x);
505505
506- void from_json(const json & j, Subreddit & x);
507- void to_json(json & j, const Subreddit & x);
506+void from_json(const json & j, Subreddit & x);
507+void to_json(json & j, const Subreddit & x);
508508
509- void from_json(const json & j, SubredditId & x);
510- void to_json(json & j, const SubredditId & x);
509+void from_json(const json & j, SubredditId & x);
510+void to_json(json & j, const SubredditId & x);
511511
512- void from_json(const json & j, SubredditNamePrefixed & x);
513- void to_json(json & j, const SubredditNamePrefixed & x);
512+void from_json(const json & j, SubredditNamePrefixed & x);
513+void to_json(json & j, const SubredditNamePrefixed & x);
514514
515- void from_json(const json & j, SubredditType & x);
516- void to_json(json & j, const SubredditType & x);
517-
518- void from_json(const json & j, Kind & x);
519- void to_json(json & j, const Kind & x);
515+void from_json(const json & j, SubredditType & x);
516+void to_json(json & j, const SubredditType & x);
520517
518+void from_json(const json & j, Kind & x);
519+void to_json(json & j, const Kind & x);
520+}
521+namespace quicktype {
521522 inline void from_json(const json & j, MediaEmbed& x) {
522523 (void)j;
523524 (void)x;
Test case

test/inputs/json/misc/ae9ca.json

1 generated file · +20 −19
Mcplusplusdefault / quicktype.hpp+20 −19
@@ -169,33 +169,34 @@ namespace quicktype {
169169 }
170170
171171 namespace quicktype {
172- void from_json(const json & j, Geometry & x);
173- void to_json(json & j, const Geometry & x);
172+void from_json(const json & j, Geometry & x);
173+void to_json(json & j, const Geometry & x);
174174
175- void from_json(const json & j, Properties & x);
176- void to_json(json & j, const Properties & x);
175+void from_json(const json & j, Properties & x);
176+void to_json(json & j, const Properties & x);
177177
178- void from_json(const json & j, Feature & x);
179- void to_json(json & j, const Feature & x);
178+void from_json(const json & j, Feature & x);
179+void to_json(json & j, const Feature & x);
180180
181- void from_json(const json & j, TopLevel & x);
182- void to_json(json & j, const TopLevel & x);
181+void from_json(const json & j, TopLevel & x);
182+void to_json(json & j, const TopLevel & x);
183183
184- void from_json(const json & j, GeometryType & x);
185- void to_json(json & j, const GeometryType & x);
184+void from_json(const json & j, GeometryType & x);
185+void to_json(json & j, const GeometryType & x);
186186
187- void from_json(const json & j, MaintainingAuthority & x);
188- void to_json(json & j, const MaintainingAuthority & x);
187+void from_json(const json & j, MaintainingAuthority & x);
188+void to_json(json & j, const MaintainingAuthority & x);
189189
190- void from_json(const json & j, Class & x);
191- void to_json(json & j, const Class & x);
190+void from_json(const json & j, Class & x);
191+void to_json(json & j, const Class & x);
192192
193- void from_json(const json & j, Ward & x);
194- void to_json(json & j, const Ward & x);
195-
196- void from_json(const json & j, FeatureType & x);
197- void to_json(json & j, const FeatureType & x);
193+void from_json(const json & j, Ward & x);
194+void to_json(json & j, const Ward & x);
198195
196+void from_json(const json & j, FeatureType & x);
197+void to_json(json & j, const FeatureType & x);
198+}
199+namespace quicktype {
199200 inline void from_json(const json & j, Geometry& x) {
200201 x.set_coordinates(j.at("coordinates").get<std::vector<double>>());
201202 x.set_type(j.at("type").get<GeometryType>());
Test case

test/inputs/json/misc/af2d1.json

1 generated file · +34 −33
Mcplusplusdefault / quicktype.hpp+34 −33
@@ -410,54 +410,55 @@ namespace quicktype {
410410 }
411411
412412 namespace quicktype {
413- void from_json(const json & j, CrsProperties & x);
414- void to_json(json & j, const CrsProperties & x);
413+void from_json(const json & j, CrsProperties & x);
414+void to_json(json & j, const CrsProperties & x);
415415
416- void from_json(const json & j, Crs & x);
417- void to_json(json & j, const Crs & x);
416+void from_json(const json & j, Crs & x);
417+void to_json(json & j, const Crs & x);
418418
419- void from_json(const json & j, Geometry & x);
420- void to_json(json & j, const Geometry & x);
419+void from_json(const json & j, Geometry & x);
420+void to_json(json & j, const Geometry & x);
421421
422- void from_json(const json & j, FeatureProperties & x);
423- void to_json(json & j, const FeatureProperties & x);
422+void from_json(const json & j, FeatureProperties & x);
423+void to_json(json & j, const FeatureProperties & x);
424424
425- void from_json(const json & j, Feature & x);
426- void to_json(json & j, const Feature & x);
425+void from_json(const json & j, Feature & x);
426+void to_json(json & j, const Feature & x);
427427
428- void from_json(const json & j, TopLevel & x);
429- void to_json(json & j, const TopLevel & x);
428+void from_json(const json & j, TopLevel & x);
429+void to_json(json & j, const TopLevel & x);
430430
431- void from_json(const json & j, GeometryType & x);
432- void to_json(json & j, const GeometryType & x);
431+void from_json(const json & j, GeometryType & x);
432+void to_json(json & j, const GeometryType & x);
433433
434- void from_json(const json & j, GeometryName & x);
435- void to_json(json & j, const GeometryName & x);
434+void from_json(const json & j, GeometryName & x);
435+void to_json(json & j, const GeometryName & x);
436436
437- void from_json(const json & j, AddImprov & x);
438- void to_json(json & j, const AddImprov & x);
437+void from_json(const json & j, AddImprov & x);
438+void to_json(json & j, const AddImprov & x);
439439
440- void from_json(const json & j, FundingBa & x);
441- void to_json(json & j, const FundingBa & x);
440+void from_json(const json & j, FundingBa & x);
441+void to_json(json & j, const FundingBa & x);
442442
443- void from_json(const json & j, LevelAccu & x);
444- void to_json(json & j, const LevelAccu & x);
443+void from_json(const json & j, LevelAccu & x);
444+void to_json(json & j, const LevelAccu & x);
445445
446- void from_json(const json & j, Material & x);
447- void to_json(json & j, const Material & x);
446+void from_json(const json & j, Material & x);
447+void to_json(json & j, const Material & x);
448448
449- void from_json(const json & j, MiSymbolo & x);
450- void to_json(json & j, const MiSymbolo & x);
449+void from_json(const json & j, MiSymbolo & x);
450+void to_json(json & j, const MiSymbolo & x);
451451
452- void from_json(const json & j, Status & x);
453- void to_json(json & j, const Status & x);
452+void from_json(const json & j, Status & x);
453+void to_json(json & j, const Status & x);
454454
455- void from_json(const json & j, PropertiesType & x);
456- void to_json(json & j, const PropertiesType & x);
457-
458- void from_json(const json & j, FeatureType & x);
459- void to_json(json & j, const FeatureType & x);
455+void from_json(const json & j, PropertiesType & x);
456+void to_json(json & j, const PropertiesType & x);
460457
458+void from_json(const json & j, FeatureType & x);
459+void to_json(json & j, const FeatureType & x);
460+}
461+namespace quicktype {
461462 inline void from_json(const json & j, CrsProperties& x) {
462463 x.set_name(j.at("name").get<std::string>());
463464 }
Test case

test/inputs/json/misc/b4865.json

1 generated file · +12 −11
Mcplusplusdefault / quicktype.hpp+12 −11
@@ -186,21 +186,22 @@ namespace quicktype {
186186 }
187187
188188 namespace quicktype {
189- void from_json(const json & j, Geolocation & x);
190- void to_json(json & j, const Geolocation & x);
189+void from_json(const json & j, Geolocation & x);
190+void to_json(json & j, const Geolocation & x);
191191
192- void from_json(const json & j, TopLevelElement & x);
193- void to_json(json & j, const TopLevelElement & x);
192+void from_json(const json & j, TopLevelElement & x);
193+void to_json(json & j, const TopLevelElement & x);
194194
195- void from_json(const json & j, Fall & x);
196- void to_json(json & j, const Fall & x);
195+void from_json(const json & j, Fall & x);
196+void to_json(json & j, const Fall & x);
197197
198- void from_json(const json & j, Type & x);
199- void to_json(json & j, const Type & x);
200-
201- void from_json(const json & j, Nametype & x);
202- void to_json(json & j, const Nametype & x);
198+void from_json(const json & j, Type & x);
199+void to_json(json & j, const Type & x);
203200
201+void from_json(const json & j, Nametype & x);
202+void to_json(json & j, const Nametype & x);
203+}
204+namespace quicktype {
204205 inline void from_json(const json & j, Geolocation& x) {
205206 x.set_coordinates(j.at("coordinates").get<std::vector<double>>());
206207 x.set_type(j.at("type").get<Type>());
Test case

test/inputs/json/misc/b6f2c.json

1 generated file · +6 −5
Mcplusplusdefault / quicktype.hpp+6 −5
@@ -66,12 +66,13 @@ namespace quicktype {
6666 }
6767
6868 namespace quicktype {
69- void from_json(const json & j, TotalPopulation & x);
70- void to_json(json & j, const TotalPopulation & x);
71-
72- void from_json(const json & j, TopLevel & x);
73- void to_json(json & j, const TopLevel & x);
69+void from_json(const json & j, TotalPopulation & x);
70+void to_json(json & j, const TotalPopulation & x);
7471
72+void from_json(const json & j, TopLevel & x);
73+void to_json(json & j, const TopLevel & x);
74+}
75+namespace quicktype {
7576 inline void from_json(const json & j, TotalPopulation& x) {
7677 x.set_date(j.at("date").get<std::string>());
7778 x.set_population(j.at("population").get<int64_t>());
Test case

test/inputs/json/misc/b6fe5.json

1 generated file · +4 −3
Mcplusplusdefault / quicktype.hpp+4 −3
@@ -62,9 +62,10 @@ namespace quicktype {
6262 }
6363
6464 namespace quicktype {
65- void from_json(const json & j, TopLevel & x);
66- void to_json(json & j, const TopLevel & x);
67-
65+void from_json(const json & j, TopLevel & x);
66+void to_json(json & j, const TopLevel & x);
67+}
68+namespace quicktype {
6869 inline void from_json(const json & j, TopLevel& x) {
6970 x.set_group(j.at("group").get<std::string>());
7071 x.set_movie(j.at("movie").get<std::string>());
Test case

test/inputs/json/misc/b9f64.json

1 generated file · +4 −3
Mcplusplusdefault / quicktype.hpp+4 −3
@@ -47,9 +47,10 @@ namespace quicktype {
4747 }
4848
4949 namespace quicktype {
50- void from_json(const json & j, TopLevel & x);
51- void to_json(json & j, const TopLevel & x);
52-
50+void from_json(const json & j, TopLevel & x);
51+void to_json(json & j, const TopLevel & x);
52+}
53+namespace quicktype {
5354 inline void from_json(const json & j, TopLevel& x) {
5455 x.set_user_agent(j.at("user-agent").get<std::string>());
5556 }
Test case

test/inputs/json/misc/bb1ec.json

1 generated file · +6 −5
Mcplusplusdefault / quicktype.hpp+6 −5
@@ -66,12 +66,13 @@ namespace quicktype {
6666 }
6767
6868 namespace quicktype {
69- void from_json(const json & j, TotalPopulation & x);
70- void to_json(json & j, const TotalPopulation & x);
71-
72- void from_json(const json & j, TopLevel & x);
73- void to_json(json & j, const TopLevel & x);
69+void from_json(const json & j, TotalPopulation & x);
70+void to_json(json & j, const TotalPopulation & x);
7471
72+void from_json(const json & j, TopLevel & x);
73+void to_json(json & j, const TopLevel & x);
74+}
75+namespace quicktype {
7576 inline void from_json(const json & j, TotalPopulation& x) {
7677 x.set_date(j.at("date").get<std::string>());
7778 x.set_population(j.at("population").get<int64_t>());
Test case

test/inputs/json/misc/be234.json

1 generated file · +40 −39
Mcplusplusdefault / quicktype.hpp+40 −39
@@ -723,63 +723,64 @@ namespace quicktype {
723723 }
724724
725725 namespace quicktype {
726- void from_json(const json & j, Oembed & x);
727- void to_json(json & j, const Oembed & x);
726+void from_json(const json & j, Oembed & x);
727+void to_json(json & j, const Oembed & x);
728728
729- void from_json(const json & j, Media & x);
730- void to_json(json & j, const Media & x);
729+void from_json(const json & j, Media & x);
730+void to_json(json & j, const Media & x);
731731
732- void from_json(const json & j, MediaEmbed & x);
733- void to_json(json & j, const MediaEmbed & x);
732+void from_json(const json & j, MediaEmbed & x);
733+void to_json(json & j, const MediaEmbed & x);
734734
735- void from_json(const json & j, Source & x);
736- void to_json(json & j, const Source & x);
735+void from_json(const json & j, Source & x);
736+void to_json(json & j, const Source & x);
737737
738- void from_json(const json & j, Gif & x);
739- void to_json(json & j, const Gif & x);
738+void from_json(const json & j, Gif & x);
739+void to_json(json & j, const Gif & x);
740740
741- void from_json(const json & j, Variants & x);
742- void to_json(json & j, const Variants & x);
741+void from_json(const json & j, Variants & x);
742+void to_json(json & j, const Variants & x);
743743
744- void from_json(const json & j, Image & x);
745- void to_json(json & j, const Image & x);
744+void from_json(const json & j, Image & x);
745+void to_json(json & j, const Image & x);
746746
747- void from_json(const json & j, Preview & x);
748- void to_json(json & j, const Preview & x);
747+void from_json(const json & j, Preview & x);
748+void to_json(json & j, const Preview & x);
749749
750- void from_json(const json & j, ChildData & x);
751- void to_json(json & j, const ChildData & x);
750+void from_json(const json & j, ChildData & x);
751+void to_json(json & j, const ChildData & x);
752752
753- void from_json(const json & j, Child & x);
754- void to_json(json & j, const Child & x);
753+void from_json(const json & j, Child & x);
754+void to_json(json & j, const Child & x);
755755
756- void from_json(const json & j, TopLevelData & x);
757- void to_json(json & j, const TopLevelData & x);
756+void from_json(const json & j, TopLevelData & x);
757+void to_json(json & j, const TopLevelData & x);
758758
759- void from_json(const json & j, TopLevel & x);
760- void to_json(json & j, const TopLevel & x);
759+void from_json(const json & j, TopLevel & x);
760+void to_json(json & j, const TopLevel & x);
761761
762- void from_json(const json & j, Domain & x);
763- void to_json(json & j, const Domain & x);
762+void from_json(const json & j, Domain & x);
763+void to_json(json & j, const Domain & x);
764764
765- void from_json(const json & j, PostHint & x);
766- void to_json(json & j, const PostHint & x);
765+void from_json(const json & j, PostHint & x);
766+void to_json(json & j, const PostHint & x);
767767
768- void from_json(const json & j, Subreddit & x);
769- void to_json(json & j, const Subreddit & x);
768+void from_json(const json & j, Subreddit & x);
769+void to_json(json & j, const Subreddit & x);
770770
771- void from_json(const json & j, SubredditId & x);
772- void to_json(json & j, const SubredditId & x);
771+void from_json(const json & j, SubredditId & x);
772+void to_json(json & j, const SubredditId & x);
773773
774- void from_json(const json & j, SubredditNamePrefixed & x);
775- void to_json(json & j, const SubredditNamePrefixed & x);
774+void from_json(const json & j, SubredditNamePrefixed & x);
775+void to_json(json & j, const SubredditNamePrefixed & x);
776776
777- void from_json(const json & j, SubredditType & x);
778- void to_json(json & j, const SubredditType & x);
779-
780- void from_json(const json & j, Kind & x);
781- void to_json(json & j, const Kind & x);
777+void from_json(const json & j, SubredditType & x);
778+void to_json(json & j, const SubredditType & x);
782779
780+void from_json(const json & j, Kind & x);
781+void to_json(json & j, const Kind & x);
782+}
783+namespace quicktype {
783784 inline void from_json(const json & j, Oembed& x) {
784785 x.set_description(j.at("description").get<std::string>());
785786 x.set_height(j.at("height").get<int64_t>());
Test case

test/inputs/json/misc/c0356.json

1 generated file · +8 −7
Mcplusplusdefault / quicktype.hpp+8 −7
@@ -95,15 +95,16 @@ namespace quicktype {
9595 }
9696
9797 namespace quicktype {
98- void from_json(const json & j, Datum & x);
99- void to_json(json & j, const Datum & x);
98+void from_json(const json & j, Datum & x);
99+void to_json(json & j, const Datum & x);
100100
101- void from_json(const json & j, Description & x);
102- void to_json(json & j, const Description & x);
103-
104- void from_json(const json & j, TopLevel & x);
105- void to_json(json & j, const TopLevel & x);
101+void from_json(const json & j, Description & x);
102+void to_json(json & j, const Description & x);
106103
104+void from_json(const json & j, TopLevel & x);
105+void to_json(json & j, const TopLevel & x);
106+}
107+namespace quicktype {
107108 inline void from_json(const json & j, Datum& x) {
108109 x.set_anomaly(j.at("anomaly").get<std::string>());
109110 x.set_value(j.at("value").get<std::string>());
Test case

test/inputs/json/misc/c0a3a.json

1 generated file · +10 −9
Mcplusplusdefault / quicktype.hpp+10 −9
@@ -194,18 +194,19 @@ namespace quicktype {
194194 }
195195
196196 namespace quicktype {
197- void from_json(const json & j, Status & x);
198- void to_json(json & j, const Status & x);
197+void from_json(const json & j, Status & x);
198+void to_json(json & j, const Status & x);
199199
200- void from_json(const json & j, Meta & x);
201- void to_json(json & j, const Meta & x);
200+void from_json(const json & j, Meta & x);
201+void to_json(json & j, const Meta & x);
202202
203- void from_json(const json & j, Weather & x);
204- void to_json(json & j, const Weather & x);
205-
206- void from_json(const json & j, TopLevel & x);
207- void to_json(json & j, const TopLevel & x);
203+void from_json(const json & j, Weather & x);
204+void to_json(json & j, const Weather & x);
208205
206+void from_json(const json & j, TopLevel & x);
207+void to_json(json & j, const TopLevel & x);
208+}
209+namespace quicktype {
209210 inline void from_json(const json & j, Status& x) {
210211 x.set_avg_delay(j.at("avgDelay").get<std::string>());
211212 x.set_closure_begin(j.at("closureBegin").get<std::string>());
Test case

test/inputs/json/misc/c3303.json

1 generated file · +28 −27
Mcplusplusdefault / quicktype.hpp+28 −27
@@ -561,45 +561,46 @@ namespace quicktype {
561561 }
562562
563563 namespace quicktype {
564- void from_json(const json & j, The480_WStill & x);
565- void to_json(json & j, const The480_WStill & x);
564+void from_json(const json & j, The480_WStill & x);
565+void to_json(json & j, const The480_WStill & x);
566566
567- void from_json(const json & j, DownsizedSmall & x);
568- void to_json(json & j, const DownsizedSmall & x);
567+void from_json(const json & j, DownsizedSmall & x);
568+void to_json(json & j, const DownsizedSmall & x);
569569
570- void from_json(const json & j, FixedHeight & x);
571- void to_json(json & j, const FixedHeight & x);
570+void from_json(const json & j, FixedHeight & x);
571+void to_json(json & j, const FixedHeight & x);
572572
573- void from_json(const json & j, Looping & x);
574- void to_json(json & j, const Looping & x);
573+void from_json(const json & j, Looping & x);
574+void to_json(json & j, const Looping & x);
575575
576- void from_json(const json & j, Images & x);
577- void to_json(json & j, const Images & x);
576+void from_json(const json & j, Images & x);
577+void to_json(json & j, const Images & x);
578578
579- void from_json(const json & j, User & x);
580- void to_json(json & j, const User & x);
579+void from_json(const json & j, User & x);
580+void to_json(json & j, const User & x);
581581
582- void from_json(const json & j, Datum & x);
583- void to_json(json & j, const Datum & x);
582+void from_json(const json & j, Datum & x);
583+void to_json(json & j, const Datum & x);
584584
585- void from_json(const json & j, Meta & x);
586- void to_json(json & j, const Meta & x);
585+void from_json(const json & j, Meta & x);
586+void to_json(json & j, const Meta & x);
587587
588- void from_json(const json & j, Pagination & x);
589- void to_json(json & j, const Pagination & x);
588+void from_json(const json & j, Pagination & x);
589+void to_json(json & j, const Pagination & x);
590590
591- void from_json(const json & j, TopLevel & x);
592- void to_json(json & j, const TopLevel & x);
591+void from_json(const json & j, TopLevel & x);
592+void to_json(json & j, const TopLevel & x);
593593
594- void from_json(const json & j, Rating & x);
595- void to_json(json & j, const Rating & x);
594+void from_json(const json & j, Rating & x);
595+void to_json(json & j, const Rating & x);
596596
597- void from_json(const json & j, Type & x);
598- void to_json(json & j, const Type & x);
599-
600- void from_json(const json & j, Username & x);
601- void to_json(json & j, const Username & x);
597+void from_json(const json & j, Type & x);
598+void to_json(json & j, const Type & x);
602599
600+void from_json(const json & j, Username & x);
601+void to_json(json & j, const Username & x);
602+}
603+namespace quicktype {
603604 inline void from_json(const json & j, The480_WStill& x) {
604605 x.set_height(j.at("height").get<std::string>());
605606 x.set_size(get_stack_optional<std::string>(j, "size"));
Test case

test/inputs/json/misc/c6cfd.json

1 generated file · +6 −5
Mcplusplusdefault / quicktype.hpp+6 −5
@@ -66,12 +66,13 @@ namespace quicktype {
6666 }
6767
6868 namespace quicktype {
69- void from_json(const json & j, Country & x);
70- void to_json(json & j, const Country & x);
71-
72- void from_json(const json & j, TopLevel & x);
73- void to_json(json & j, const TopLevel & x);
69+void from_json(const json & j, Country & x);
70+void to_json(json & j, const Country & x);
7471
72+void from_json(const json & j, TopLevel & x);
73+void to_json(json & j, const TopLevel & x);
74+}
75+namespace quicktype {
7576 inline void from_json(const json & j, Country& x) {
7677 x.set_code(j.at("code").get<std::string>());
7778 x.set_name(j.at("name").get<std::string>());
Test case

test/inputs/json/misc/cb0cc.json

1 generated file · +10 −9
Mcplusplusdefault / quicktype.hpp+10 −9
@@ -169,18 +169,19 @@ namespace quicktype {
169169 }
170170
171171 namespace quicktype {
172- void from_json(const json & j, Laureate & x);
173- void to_json(json & j, const Laureate & x);
172+void from_json(const json & j, Laureate & x);
173+void to_json(json & j, const Laureate & x);
174174
175- void from_json(const json & j, Prize & x);
176- void to_json(json & j, const Prize & x);
175+void from_json(const json & j, Prize & x);
176+void to_json(json & j, const Prize & x);
177177
178- void from_json(const json & j, TopLevel & x);
179- void to_json(json & j, const TopLevel & x);
180-
181- void from_json(const json & j, Category & x);
182- void to_json(json & j, const Category & x);
178+void from_json(const json & j, TopLevel & x);
179+void to_json(json & j, const TopLevel & x);
183180
181+void from_json(const json & j, Category & x);
182+void to_json(json & j, const Category & x);
183+}
184+namespace quicktype {
184185 inline void from_json(const json & j, Laureate& x) {
185186 x.set_firstname(j.at("firstname").get<std::string>());
186187 x.set_id(j.at("id").get<std::string>());
Test case

test/inputs/json/misc/cb81e.json

1 generated file · +6 −5
Mcplusplusdefault / quicktype.hpp+6 −5
@@ -81,12 +81,13 @@ namespace quicktype {
8181 }
8282
8383 namespace quicktype {
84- void from_json(const json & j, Description & x);
85- void to_json(json & j, const Description & x);
86-
87- void from_json(const json & j, TopLevel & x);
88- void to_json(json & j, const TopLevel & x);
84+void from_json(const json & j, Description & x);
85+void to_json(json & j, const Description & x);
8986
87+void from_json(const json & j, TopLevel & x);
88+void to_json(json & j, const TopLevel & x);
89+}
90+namespace quicktype {
9091 inline void from_json(const json & j, Description& x) {
9192 x.set_base_period(j.at("base_period").get<std::string>());
9293 x.set_missing(j.at("missing").get<std::string>());
Test case

test/inputs/json/misc/ccd18.json

1 generated file · +10 −9
Mcplusplusdefault / quicktype.hpp+10 −9
@@ -194,18 +194,19 @@ namespace quicktype {
194194 }
195195
196196 namespace quicktype {
197- void from_json(const json & j, Status & x);
198- void to_json(json & j, const Status & x);
197+void from_json(const json & j, Status & x);
198+void to_json(json & j, const Status & x);
199199
200- void from_json(const json & j, Meta & x);
201- void to_json(json & j, const Meta & x);
200+void from_json(const json & j, Meta & x);
201+void to_json(json & j, const Meta & x);
202202
203- void from_json(const json & j, Weather & x);
204- void to_json(json & j, const Weather & x);
205-
206- void from_json(const json & j, TopLevel & x);
207- void to_json(json & j, const TopLevel & x);
203+void from_json(const json & j, Weather & x);
204+void to_json(json & j, const Weather & x);
208205
206+void from_json(const json & j, TopLevel & x);
207+void to_json(json & j, const TopLevel & x);
208+}
209+namespace quicktype {
209210 inline void from_json(const json & j, Status& x) {
210211 x.set_avg_delay(j.at("avgDelay").get<std::string>());
211212 x.set_closure_begin(j.at("closureBegin").get<std::string>());
Test case

test/inputs/json/misc/cd238.json

1 generated file · +10 −9
Mcplusplusdefault / quicktype.hpp+10 −9
@@ -194,18 +194,19 @@ namespace quicktype {
194194 }
195195
196196 namespace quicktype {
197- void from_json(const json & j, Status & x);
198- void to_json(json & j, const Status & x);
197+void from_json(const json & j, Status & x);
198+void to_json(json & j, const Status & x);
199199
200- void from_json(const json & j, Meta & x);
201- void to_json(json & j, const Meta & x);
200+void from_json(const json & j, Meta & x);
201+void to_json(json & j, const Meta & x);
202202
203- void from_json(const json & j, Weather & x);
204- void to_json(json & j, const Weather & x);
205-
206- void from_json(const json & j, TopLevel & x);
207- void to_json(json & j, const TopLevel & x);
203+void from_json(const json & j, Weather & x);
204+void to_json(json & j, const Weather & x);
208205
206+void from_json(const json & j, TopLevel & x);
207+void to_json(json & j, const TopLevel & x);
208+}
209+namespace quicktype {
209210 inline void from_json(const json & j, Status& x) {
210211 x.set_avg_delay(j.at("avgDelay").get<std::string>());
211212 x.set_closure_begin(j.at("closureBegin").get<std::string>());
Test case

test/inputs/json/misc/cd463.json

1 generated file · +4 −3
Mcplusplusdefault / quicktype.hpp+4 −3
@@ -57,9 +57,10 @@ namespace quicktype {
5757 }
5858
5959 namespace quicktype {
60- void from_json(const json & j, TopLevel & x);
61- void to_json(json & j, const TopLevel & x);
62-
60+void from_json(const json & j, TopLevel & x);
61+void to_json(json & j, const TopLevel & x);
62+}
63+namespace quicktype {
6364 inline void from_json(const json & j, TopLevel& x) {
6465 x.set_base(j.at("base").get<std::string>());
6566 x.set_date(j.at("date").get<std::string>());
Test case

test/inputs/json/misc/cf0d8.json

1 generated file · +30 −29
Mcplusplusdefault / quicktype.hpp+30 −29
@@ -459,48 +459,49 @@ namespace quicktype {
459459 }
460460
461461 namespace quicktype {
462- void from_json(const json & j, Astronomy & x);
463- void to_json(json & j, const Astronomy & x);
462+void from_json(const json & j, Astronomy & x);
463+void to_json(json & j, const Astronomy & x);
464464
465- void from_json(const json & j, Atmosphere & x);
466- void to_json(json & j, const Atmosphere & x);
465+void from_json(const json & j, Atmosphere & x);
466+void to_json(json & j, const Atmosphere & x);
467467
468- void from_json(const json & j, Image & x);
469- void to_json(json & j, const Image & x);
468+void from_json(const json & j, Image & x);
469+void to_json(json & j, const Image & x);
470470
471- void from_json(const json & j, Condition & x);
472- void to_json(json & j, const Condition & x);
471+void from_json(const json & j, Condition & x);
472+void to_json(json & j, const Condition & x);
473473
474- void from_json(const json & j, Forecast & x);
475- void to_json(json & j, const Forecast & x);
474+void from_json(const json & j, Forecast & x);
475+void to_json(json & j, const Forecast & x);
476476
477- void from_json(const json & j, Guid & x);
478- void to_json(json & j, const Guid & x);
477+void from_json(const json & j, Guid & x);
478+void to_json(json & j, const Guid & x);
479479
480- void from_json(const json & j, Item & x);
481- void to_json(json & j, const Item & x);
480+void from_json(const json & j, Item & x);
481+void to_json(json & j, const Item & x);
482482
483- void from_json(const json & j, Location & x);
484- void to_json(json & j, const Location & x);
483+void from_json(const json & j, Location & x);
484+void to_json(json & j, const Location & x);
485485
486- void from_json(const json & j, Units & x);
487- void to_json(json & j, const Units & x);
486+void from_json(const json & j, Units & x);
487+void to_json(json & j, const Units & x);
488488
489- void from_json(const json & j, Wind & x);
490- void to_json(json & j, const Wind & x);
489+void from_json(const json & j, Wind & x);
490+void to_json(json & j, const Wind & x);
491491
492- void from_json(const json & j, Channel & x);
493- void to_json(json & j, const Channel & x);
492+void from_json(const json & j, Channel & x);
493+void to_json(json & j, const Channel & x);
494494
495- void from_json(const json & j, Results & x);
496- void to_json(json & j, const Results & x);
495+void from_json(const json & j, Results & x);
496+void to_json(json & j, const Results & x);
497497
498- void from_json(const json & j, Query & x);
499- void to_json(json & j, const Query & x);
500-
501- void from_json(const json & j, TopLevel & x);
502- void to_json(json & j, const TopLevel & x);
498+void from_json(const json & j, Query & x);
499+void to_json(json & j, const Query & x);
503500
501+void from_json(const json & j, TopLevel & x);
502+void to_json(json & j, const TopLevel & x);
503+}
504+namespace quicktype {
504505 inline void from_json(const json & j, Astronomy& x) {
505506 x.set_sunrise(j.at("sunrise").get<std::string>());
506507 x.set_sunset(j.at("sunset").get<std::string>());
Test case

test/inputs/json/misc/cfbce.json

1 generated file · +4 −3
Mcplusplusdefault / quicktype.hpp+4 −3
@@ -57,9 +57,10 @@ namespace quicktype {
5757 }
5858
5959 namespace quicktype {
60- void from_json(const json & j, TopLevel & x);
61- void to_json(json & j, const TopLevel & x);
62-
60+void from_json(const json & j, TopLevel & x);
61+void to_json(json & j, const TopLevel & x);
62+}
63+namespace quicktype {
6364 inline void from_json(const json & j, TopLevel& x) {
6465 x.set_base(j.at("base").get<std::string>());
6566 x.set_date(j.at("date").get<std::string>());
Test case

test/inputs/json/misc/d0908.json

1 generated file · +6 −5
Mcplusplusdefault / quicktype.hpp+6 −5
@@ -66,12 +66,13 @@ namespace quicktype {
6666 }
6767
6868 namespace quicktype {
69- void from_json(const json & j, TotalPopulation & x);
70- void to_json(json & j, const TotalPopulation & x);
71-
72- void from_json(const json & j, TopLevel & x);
73- void to_json(json & j, const TopLevel & x);
69+void from_json(const json & j, TotalPopulation & x);
70+void to_json(json & j, const TotalPopulation & x);
7471
72+void from_json(const json & j, TopLevel & x);
73+void to_json(json & j, const TopLevel & x);
74+}
75+namespace quicktype {
7576 inline void from_json(const json & j, TotalPopulation& x) {
7677 x.set_date(j.at("date").get<std::string>());
7778 x.set_population(j.at("population").get<int64_t>());
Test case

test/inputs/json/misc/d23d5.json

1 generated file · +8 −7
Mcplusplusdefault / quicktype.hpp+8 −7
@@ -181,15 +181,16 @@ namespace quicktype {
181181 }
182182
183183 namespace quicktype {
184- void from_json(const json & j, Facets & x);
185- void to_json(json & j, const Facets & x);
184+void from_json(const json & j, Facets & x);
185+void to_json(json & j, const Facets & x);
186186
187- void from_json(const json & j, Result & x);
188- void to_json(json & j, const Result & x);
189-
190- void from_json(const json & j, TopLevel & x);
191- void to_json(json & j, const TopLevel & x);
187+void from_json(const json & j, Result & x);
188+void to_json(json & j, const Result & x);
192189
190+void from_json(const json & j, TopLevel & x);
191+void to_json(json & j, const TopLevel & x);
192+}
193+namespace quicktype {
193194 inline void from_json(const json & j, Facets& x) {
194195 (void)j;
195196 (void)x;
Test case

test/inputs/json/misc/dbfb3.json

1 generated file · +32 −31
Mcplusplusdefault / quicktype.hpp+32 −31
@@ -461,51 +461,52 @@ namespace quicktype {
461461 }
462462
463463 namespace quicktype {
464- void from_json(const json & j, Astronomy & x);
465- void to_json(json & j, const Astronomy & x);
464+void from_json(const json & j, Astronomy & x);
465+void to_json(json & j, const Astronomy & x);
466466
467- void from_json(const json & j, Atmosphere & x);
468- void to_json(json & j, const Atmosphere & x);
467+void from_json(const json & j, Atmosphere & x);
468+void to_json(json & j, const Atmosphere & x);
469469
470- void from_json(const json & j, Image & x);
471- void to_json(json & j, const Image & x);
470+void from_json(const json & j, Image & x);
471+void to_json(json & j, const Image & x);
472472
473- void from_json(const json & j, Condition & x);
474- void to_json(json & j, const Condition & x);
473+void from_json(const json & j, Condition & x);
474+void to_json(json & j, const Condition & x);
475475
476- void from_json(const json & j, Forecast & x);
477- void to_json(json & j, const Forecast & x);
476+void from_json(const json & j, Forecast & x);
477+void to_json(json & j, const Forecast & x);
478478
479- void from_json(const json & j, Guid & x);
480- void to_json(json & j, const Guid & x);
479+void from_json(const json & j, Guid & x);
480+void to_json(json & j, const Guid & x);
481481
482- void from_json(const json & j, Item & x);
483- void to_json(json & j, const Item & x);
482+void from_json(const json & j, Item & x);
483+void to_json(json & j, const Item & x);
484484
485- void from_json(const json & j, Location & x);
486- void to_json(json & j, const Location & x);
485+void from_json(const json & j, Location & x);
486+void to_json(json & j, const Location & x);
487487
488- void from_json(const json & j, Units & x);
489- void to_json(json & j, const Units & x);
488+void from_json(const json & j, Units & x);
489+void to_json(json & j, const Units & x);
490490
491- void from_json(const json & j, Wind & x);
492- void to_json(json & j, const Wind & x);
491+void from_json(const json & j, Wind & x);
492+void to_json(json & j, const Wind & x);
493493
494- void from_json(const json & j, Channel & x);
495- void to_json(json & j, const Channel & x);
494+void from_json(const json & j, Channel & x);
495+void to_json(json & j, const Channel & x);
496496
497- void from_json(const json & j, Results & x);
498- void to_json(json & j, const Results & x);
497+void from_json(const json & j, Results & x);
498+void to_json(json & j, const Results & x);
499499
500- void from_json(const json & j, Query & x);
501- void to_json(json & j, const Query & x);
500+void from_json(const json & j, Query & x);
501+void to_json(json & j, const Query & x);
502502
503- void from_json(const json & j, TopLevel & x);
504- void to_json(json & j, const TopLevel & x);
505-
506- void from_json(const json & j, Text & x);
507- void to_json(json & j, const Text & x);
503+void from_json(const json & j, TopLevel & x);
504+void to_json(json & j, const TopLevel & x);
508505
506+void from_json(const json & j, Text & x);
507+void to_json(json & j, const Text & x);
508+}
509+namespace quicktype {
509510 inline void from_json(const json & j, Astronomy& x) {
510511 x.set_sunrise(j.at("sunrise").get<std::string>());
511512 x.set_sunset(j.at("sunset").get<std::string>());
Test case

test/inputs/json/misc/dc44f.json

1 generated file · +28 −27
Mcplusplusdefault / quicktype.hpp+28 −27
@@ -355,45 +355,46 @@ namespace quicktype {
355355 }
356356
357357 namespace quicktype {
358- void from_json(const json & j, LegalityElement & x);
359- void to_json(json & j, const LegalityElement & x);
358+void from_json(const json & j, LegalityElement & x);
359+void to_json(json & j, const LegalityElement & x);
360360
361- void from_json(const json & j, Ruling & x);
362- void to_json(json & j, const Ruling & x);
361+void from_json(const json & j, Ruling & x);
362+void to_json(json & j, const Ruling & x);
363363
364- void from_json(const json & j, Card & x);
365- void to_json(json & j, const Card & x);
364+void from_json(const json & j, Card & x);
365+void to_json(json & j, const Card & x);
366366
367- void from_json(const json & j, TopLevel & x);
368- void to_json(json & j, const TopLevel & x);
367+void from_json(const json & j, TopLevel & x);
368+void to_json(json & j, const TopLevel & x);
369369
370- void from_json(const json & j, Booster & x);
371- void to_json(json & j, const Booster & x);
370+void from_json(const json & j, Booster & x);
371+void to_json(json & j, const Booster & x);
372372
373- void from_json(const json & j, ColorIdentity & x);
374- void to_json(json & j, const ColorIdentity & x);
373+void from_json(const json & j, ColorIdentity & x);
374+void to_json(json & j, const ColorIdentity & x);
375375
376- void from_json(const json & j, Color & x);
377- void to_json(json & j, const Color & x);
376+void from_json(const json & j, Color & x);
377+void to_json(json & j, const Color & x);
378378
379- void from_json(const json & j, Layout & x);
380- void to_json(json & j, const Layout & x);
379+void from_json(const json & j, Layout & x);
380+void to_json(json & j, const Layout & x);
381381
382- void from_json(const json & j, Format & x);
383- void to_json(json & j, const Format & x);
382+void from_json(const json & j, Format & x);
383+void to_json(json & j, const Format & x);
384384
385- void from_json(const json & j, LegalityEnum & x);
386- void to_json(json & j, const LegalityEnum & x);
385+void from_json(const json & j, LegalityEnum & x);
386+void to_json(json & j, const LegalityEnum & x);
387387
388- void from_json(const json & j, Rarity & x);
389- void to_json(json & j, const Rarity & x);
388+void from_json(const json & j, Rarity & x);
389+void to_json(json & j, const Rarity & x);
390390
391- void from_json(const json & j, Supertype & x);
392- void to_json(json & j, const Supertype & x);
393-
394- void from_json(const json & j, Type & x);
395- void to_json(json & j, const Type & x);
391+void from_json(const json & j, Supertype & x);
392+void to_json(json & j, const Supertype & x);
396393
394+void from_json(const json & j, Type & x);
395+void to_json(json & j, const Type & x);
396+}
397+namespace quicktype {
397398 inline void from_json(const json & j, LegalityElement& x) {
398399 x.set_format(j.at("format").get<Format>());
399400 x.set_legality(j.at("legality").get<LegalityEnum>());
Test case

test/inputs/json/misc/dd1ce.json

1 generated file · +28 −27
Mcplusplusdefault / quicktype.hpp+28 −27
@@ -355,45 +355,46 @@ namespace quicktype {
355355 }
356356
357357 namespace quicktype {
358- void from_json(const json & j, LegalityElement & x);
359- void to_json(json & j, const LegalityElement & x);
358+void from_json(const json & j, LegalityElement & x);
359+void to_json(json & j, const LegalityElement & x);
360360
361- void from_json(const json & j, Ruling & x);
362- void to_json(json & j, const Ruling & x);
361+void from_json(const json & j, Ruling & x);
362+void to_json(json & j, const Ruling & x);
363363
364- void from_json(const json & j, Card & x);
365- void to_json(json & j, const Card & x);
364+void from_json(const json & j, Card & x);
365+void to_json(json & j, const Card & x);
366366
367- void from_json(const json & j, TopLevel & x);
368- void to_json(json & j, const TopLevel & x);
367+void from_json(const json & j, TopLevel & x);
368+void to_json(json & j, const TopLevel & x);
369369
370- void from_json(const json & j, Booster & x);
371- void to_json(json & j, const Booster & x);
370+void from_json(const json & j, Booster & x);
371+void to_json(json & j, const Booster & x);
372372
373- void from_json(const json & j, ColorIdentity & x);
374- void to_json(json & j, const ColorIdentity & x);
373+void from_json(const json & j, ColorIdentity & x);
374+void to_json(json & j, const ColorIdentity & x);
375375
376- void from_json(const json & j, Color & x);
377- void to_json(json & j, const Color & x);
376+void from_json(const json & j, Color & x);
377+void to_json(json & j, const Color & x);
378378
379- void from_json(const json & j, Layout & x);
380- void to_json(json & j, const Layout & x);
379+void from_json(const json & j, Layout & x);
380+void to_json(json & j, const Layout & x);
381381
382- void from_json(const json & j, Format & x);
383- void to_json(json & j, const Format & x);
382+void from_json(const json & j, Format & x);
383+void to_json(json & j, const Format & x);
384384
385- void from_json(const json & j, LegalityEnum & x);
386- void to_json(json & j, const LegalityEnum & x);
385+void from_json(const json & j, LegalityEnum & x);
386+void to_json(json & j, const LegalityEnum & x);
387387
388- void from_json(const json & j, Rarity & x);
389- void to_json(json & j, const Rarity & x);
388+void from_json(const json & j, Rarity & x);
389+void to_json(json & j, const Rarity & x);
390390
391- void from_json(const json & j, Supertype & x);
392- void to_json(json & j, const Supertype & x);
393-
394- void from_json(const json & j, Type & x);
395- void to_json(json & j, const Type & x);
391+void from_json(const json & j, Supertype & x);
392+void to_json(json & j, const Supertype & x);
396393
394+void from_json(const json & j, Type & x);
395+void to_json(json & j, const Type & x);
396+}
397+namespace quicktype {
397398 inline void from_json(const json & j, LegalityElement& x) {
398399 x.set_format(j.at("format").get<Format>());
399400 x.set_legality(j.at("legality").get<LegalityEnum>());
Test case

test/inputs/json/misc/dec3a.json

1 generated file · +16 −15
Mcplusplusdefault / quicktype.hpp+16 −15
@@ -316,27 +316,28 @@ namespace quicktype {
316316 }
317317
318318 namespace quicktype {
319- void from_json(const json & j, ResponseInfo & x);
320- void to_json(json & j, const ResponseInfo & x);
319+void from_json(const json & j, ResponseInfo & x);
320+void to_json(json & j, const ResponseInfo & x);
321321
322- void from_json(const json & j, Resultset & x);
323- void to_json(json & j, const Resultset & x);
322+void from_json(const json & j, Resultset & x);
323+void to_json(json & j, const Resultset & x);
324324
325- void from_json(const json & j, Metadata & x);
326- void to_json(json & j, const Metadata & x);
325+void from_json(const json & j, Metadata & x);
326+void to_json(json & j, const Metadata & x);
327327
328- void from_json(const json & j, HiringOrg & x);
329- void to_json(json & j, const HiringOrg & x);
328+void from_json(const json & j, HiringOrg & x);
329+void to_json(json & j, const HiringOrg & x);
330330
331- void from_json(const json & j, Location & x);
332- void to_json(json & j, const Location & x);
331+void from_json(const json & j, Location & x);
332+void to_json(json & j, const Location & x);
333333
334- void from_json(const json & j, Result & x);
335- void to_json(json & j, const Result & x);
336-
337- void from_json(const json & j, TopLevel & x);
338- void to_json(json & j, const TopLevel & x);
334+void from_json(const json & j, Result & x);
335+void to_json(json & j, const Result & x);
339336
337+void from_json(const json & j, TopLevel & x);
338+void to_json(json & j, const TopLevel & x);
339+}
340+namespace quicktype {
340341 inline void from_json(const json & j, ResponseInfo& x) {
341342 x.set_developer_message(j.at("developerMessage").get<std::string>());
342343 x.set_status(j.at("status").get<int64_t>());
Test case

test/inputs/json/misc/df957.json

1 generated file · +30 −29
Mcplusplusdefault / quicktype.hpp+30 −29
@@ -459,48 +459,49 @@ namespace quicktype {
459459 }
460460
461461 namespace quicktype {
462- void from_json(const json & j, Astronomy & x);
463- void to_json(json & j, const Astronomy & x);
462+void from_json(const json & j, Astronomy & x);
463+void to_json(json & j, const Astronomy & x);
464464
465- void from_json(const json & j, Atmosphere & x);
466- void to_json(json & j, const Atmosphere & x);
465+void from_json(const json & j, Atmosphere & x);
466+void to_json(json & j, const Atmosphere & x);
467467
468- void from_json(const json & j, Image & x);
469- void to_json(json & j, const Image & x);
468+void from_json(const json & j, Image & x);
469+void to_json(json & j, const Image & x);
470470
471- void from_json(const json & j, Condition & x);
472- void to_json(json & j, const Condition & x);
471+void from_json(const json & j, Condition & x);
472+void to_json(json & j, const Condition & x);
473473
474- void from_json(const json & j, Forecast & x);
475- void to_json(json & j, const Forecast & x);
474+void from_json(const json & j, Forecast & x);
475+void to_json(json & j, const Forecast & x);
476476
477- void from_json(const json & j, Guid & x);
478- void to_json(json & j, const Guid & x);
477+void from_json(const json & j, Guid & x);
478+void to_json(json & j, const Guid & x);
479479
480- void from_json(const json & j, Item & x);
481- void to_json(json & j, const Item & x);
480+void from_json(const json & j, Item & x);
481+void to_json(json & j, const Item & x);
482482
483- void from_json(const json & j, Location & x);
484- void to_json(json & j, const Location & x);
483+void from_json(const json & j, Location & x);
484+void to_json(json & j, const Location & x);
485485
486- void from_json(const json & j, Units & x);
487- void to_json(json & j, const Units & x);
486+void from_json(const json & j, Units & x);
487+void to_json(json & j, const Units & x);
488488
489- void from_json(const json & j, Wind & x);
490- void to_json(json & j, const Wind & x);
489+void from_json(const json & j, Wind & x);
490+void to_json(json & j, const Wind & x);
491491
492- void from_json(const json & j, Channel & x);
493- void to_json(json & j, const Channel & x);
492+void from_json(const json & j, Channel & x);
493+void to_json(json & j, const Channel & x);
494494
495- void from_json(const json & j, Results & x);
496- void to_json(json & j, const Results & x);
495+void from_json(const json & j, Results & x);
496+void to_json(json & j, const Results & x);
497497
498- void from_json(const json & j, Query & x);
499- void to_json(json & j, const Query & x);
500-
501- void from_json(const json & j, TopLevel & x);
502- void to_json(json & j, const TopLevel & x);
498+void from_json(const json & j, Query & x);
499+void to_json(json & j, const Query & x);
503500
501+void from_json(const json & j, TopLevel & x);
502+void to_json(json & j, const TopLevel & x);
503+}
504+namespace quicktype {
504505 inline void from_json(const json & j, Astronomy& x) {
505506 x.set_sunrise(j.at("sunrise").get<std::string>());
506507 x.set_sunset(j.at("sunset").get<std::string>());
Test case

test/inputs/json/misc/e0ac7.json

1 generated file · +26 −25
Mcplusplusdefault / quicktype.hpp+26 −25
@@ -564,42 +564,43 @@ namespace quicktype {
564564 }
565565
566566 namespace quicktype {
567- void from_json(const json & j, Downsized & x);
568- void to_json(json & j, const Downsized & x);
567+void from_json(const json & j, Downsized & x);
568+void to_json(json & j, const Downsized & x);
569569
570- void from_json(const json & j, DownsizedSmall & x);
571- void to_json(json & j, const DownsizedSmall & x);
570+void from_json(const json & j, DownsizedSmall & x);
571+void to_json(json & j, const DownsizedSmall & x);
572572
573- void from_json(const json & j, FixedHeight & x);
574- void to_json(json & j, const FixedHeight & x);
573+void from_json(const json & j, FixedHeight & x);
574+void to_json(json & j, const FixedHeight & x);
575575
576- void from_json(const json & j, Looping & x);
577- void to_json(json & j, const Looping & x);
576+void from_json(const json & j, Looping & x);
577+void to_json(json & j, const Looping & x);
578578
579- void from_json(const json & j, Images & x);
580- void to_json(json & j, const Images & x);
579+void from_json(const json & j, Images & x);
580+void to_json(json & j, const Images & x);
581581
582- void from_json(const json & j, User & x);
583- void to_json(json & j, const User & x);
582+void from_json(const json & j, User & x);
583+void to_json(json & j, const User & x);
584584
585- void from_json(const json & j, Datum & x);
586- void to_json(json & j, const Datum & x);
585+void from_json(const json & j, Datum & x);
586+void to_json(json & j, const Datum & x);
587587
588- void from_json(const json & j, Meta & x);
589- void to_json(json & j, const Meta & x);
588+void from_json(const json & j, Meta & x);
589+void to_json(json & j, const Meta & x);
590590
591- void from_json(const json & j, Pagination & x);
592- void to_json(json & j, const Pagination & x);
591+void from_json(const json & j, Pagination & x);
592+void to_json(json & j, const Pagination & x);
593593
594- void from_json(const json & j, TopLevel & x);
595- void to_json(json & j, const TopLevel & x);
594+void from_json(const json & j, TopLevel & x);
595+void to_json(json & j, const TopLevel & x);
596596
597- void from_json(const json & j, Rating & x);
598- void to_json(json & j, const Rating & x);
599-
600- void from_json(const json & j, Type & x);
601- void to_json(json & j, const Type & x);
597+void from_json(const json & j, Rating & x);
598+void to_json(json & j, const Rating & x);
602599
600+void from_json(const json & j, Type & x);
601+void to_json(json & j, const Type & x);
602+}
603+namespace quicktype {
603604 inline void from_json(const json & j, Downsized& x) {
604605 x.set_height(j.at("height").get<std::string>());
605606 x.set_size(get_stack_optional<std::string>(j, "size"));
Test case

test/inputs/json/misc/e2915.json

1 generated file · +32 −31
Mcplusplusdefault / quicktype.hpp+32 −31
@@ -461,51 +461,52 @@ namespace quicktype {
461461 }
462462
463463 namespace quicktype {
464- void from_json(const json & j, Astronomy & x);
465- void to_json(json & j, const Astronomy & x);
464+void from_json(const json & j, Astronomy & x);
465+void to_json(json & j, const Astronomy & x);
466466
467- void from_json(const json & j, Atmosphere & x);
468- void to_json(json & j, const Atmosphere & x);
467+void from_json(const json & j, Atmosphere & x);
468+void to_json(json & j, const Atmosphere & x);
469469
470- void from_json(const json & j, Image & x);
471- void to_json(json & j, const Image & x);
470+void from_json(const json & j, Image & x);
471+void to_json(json & j, const Image & x);
472472
473- void from_json(const json & j, Condition & x);
474- void to_json(json & j, const Condition & x);
473+void from_json(const json & j, Condition & x);
474+void to_json(json & j, const Condition & x);
475475
476- void from_json(const json & j, Forecast & x);
477- void to_json(json & j, const Forecast & x);
476+void from_json(const json & j, Forecast & x);
477+void to_json(json & j, const Forecast & x);
478478
479- void from_json(const json & j, Guid & x);
480- void to_json(json & j, const Guid & x);
479+void from_json(const json & j, Guid & x);
480+void to_json(json & j, const Guid & x);
481481
482- void from_json(const json & j, Item & x);
483- void to_json(json & j, const Item & x);
482+void from_json(const json & j, Item & x);
483+void to_json(json & j, const Item & x);
484484
485- void from_json(const json & j, Location & x);
486- void to_json(json & j, const Location & x);
485+void from_json(const json & j, Location & x);
486+void to_json(json & j, const Location & x);
487487
488- void from_json(const json & j, Units & x);
489- void to_json(json & j, const Units & x);
488+void from_json(const json & j, Units & x);
489+void to_json(json & j, const Units & x);
490490
491- void from_json(const json & j, Wind & x);
492- void to_json(json & j, const Wind & x);
491+void from_json(const json & j, Wind & x);
492+void to_json(json & j, const Wind & x);
493493
494- void from_json(const json & j, Channel & x);
495- void to_json(json & j, const Channel & x);
494+void from_json(const json & j, Channel & x);
495+void to_json(json & j, const Channel & x);
496496
497- void from_json(const json & j, Results & x);
498- void to_json(json & j, const Results & x);
497+void from_json(const json & j, Results & x);
498+void to_json(json & j, const Results & x);
499499
500- void from_json(const json & j, Query & x);
501- void to_json(json & j, const Query & x);
500+void from_json(const json & j, Query & x);
501+void to_json(json & j, const Query & x);
502502
503- void from_json(const json & j, TopLevel & x);
504- void to_json(json & j, const TopLevel & x);
505-
506- void from_json(const json & j, Text & x);
507- void to_json(json & j, const Text & x);
503+void from_json(const json & j, TopLevel & x);
504+void to_json(json & j, const TopLevel & x);
508505
506+void from_json(const json & j, Text & x);
507+void to_json(json & j, const Text & x);
508+}
509+namespace quicktype {
509510 inline void from_json(const json & j, Astronomy& x) {
510511 x.set_sunrise(j.at("sunrise").get<std::string>());
511512 x.set_sunset(j.at("sunset").get<std::string>());
Test case

test/inputs/json/misc/e2a58.json

1 generated file · +4 −3
Mcplusplusdefault / quicktype.hpp+4 −3
@@ -54,9 +54,10 @@ namespace quicktype {
5454 }
5555
5656 namespace quicktype {
57- void from_json(const json & j, TopLevelElement & x);
58- void to_json(json & j, const TopLevelElement & x);
59-
57+void from_json(const json & j, TopLevelElement & x);
58+void to_json(json & j, const TopLevelElement & x);
59+}
60+namespace quicktype {
6061 inline void from_json(const json & j, TopLevelElement& x) {
6162 x.set_date(j.at("date").get<std::string>());
6263 x.set_stop_and_search(j.at("stop-and-search").get<std::vector<std::string>>());
Test case

test/inputs/json/misc/e324e.json

1 generated file · +30 −29
Mcplusplusdefault / quicktype.hpp+30 −29
@@ -322,48 +322,49 @@ namespace quicktype {
322322 }
323323
324324 namespace quicktype {
325- void from_json(const json & j, Property & x);
326- void to_json(json & j, const Property & x);
325+void from_json(const json & j, Property & x);
326+void to_json(json & j, const Property & x);
327327
328- void from_json(const json & j, Rate & x);
329- void to_json(json & j, const Rate & x);
328+void from_json(const json & j, Rate & x);
329+void to_json(json & j, const Rate & x);
330330
331- void from_json(const json & j, Definitions & x);
332- void to_json(json & j, const Definitions & x);
331+void from_json(const json & j, Definitions & x);
332+void to_json(json & j, const Definitions & x);
333333
334- void from_json(const json & j, Info & x);
335- void to_json(json & j, const Info & x);
334+void from_json(const json & j, Info & x);
335+void to_json(json & j, const Info & x);
336336
337- void from_json(const json & j, Parameter & x);
338- void to_json(json & j, const Parameter & x);
337+void from_json(const json & j, Parameter & x);
338+void to_json(json & j, const Parameter & x);
339339
340- void from_json(const json & j, Items & x);
341- void to_json(json & j, const Items & x);
340+void from_json(const json & j, Items & x);
341+void to_json(json & j, const Items & x);
342342
343- void from_json(const json & j, Schema & x);
344- void to_json(json & j, const Schema & x);
343+void from_json(const json & j, Schema & x);
344+void to_json(json & j, const Schema & x);
345345
346- void from_json(const json & j, The200 & x);
347- void to_json(json & j, const The200 & x);
346+void from_json(const json & j, The200 & x);
347+void to_json(json & j, const The200 & x);
348348
349- void from_json(const json & j, Responses & x);
350- void to_json(json & j, const Responses & x);
349+void from_json(const json & j, Responses & x);
350+void to_json(json & j, const Responses & x);
351351
352- void from_json(const json & j, Get & x);
353- void to_json(json & j, const Get & x);
352+void from_json(const json & j, Get & x);
353+void to_json(json & j, const Get & x);
354354
355- void from_json(const json & j, TariffRatesSearch & x);
356- void to_json(json & j, const TariffRatesSearch & x);
355+void from_json(const json & j, TariffRatesSearch & x);
356+void to_json(json & j, const TariffRatesSearch & x);
357357
358- void from_json(const json & j, Paths & x);
359- void to_json(json & j, const Paths & x);
358+void from_json(const json & j, Paths & x);
359+void to_json(json & j, const Paths & x);
360360
361- void from_json(const json & j, TopLevel & x);
362- void to_json(json & j, const TopLevel & x);
363-
364- void from_json(const json & j, Type & x);
365- void to_json(json & j, const Type & x);
361+void from_json(const json & j, TopLevel & x);
362+void to_json(json & j, const TopLevel & x);
366363
364+void from_json(const json & j, Type & x);
365+void to_json(json & j, const Type & x);
366+}
367+namespace quicktype {
367368 inline void from_json(const json & j, Property& x) {
368369 x.set_description(j.at("description").get<std::string>());
369370 x.set_type(j.at("type").get<Type>());
Test case

test/inputs/json/misc/e64a0.json

1 generated file · +8 −7
Mcplusplusdefault / quicktype.hpp+8 −7
@@ -101,15 +101,16 @@ namespace quicktype {
101101 }
102102
103103 namespace quicktype {
104- void from_json(const json & j, Args & x);
105- void to_json(json & j, const Args & x);
104+void from_json(const json & j, Args & x);
105+void to_json(json & j, const Args & x);
106106
107- void from_json(const json & j, Headers & x);
108- void to_json(json & j, const Headers & x);
109-
110- void from_json(const json & j, TopLevel & x);
111- void to_json(json & j, const TopLevel & x);
107+void from_json(const json & j, Headers & x);
108+void to_json(json & j, const Headers & x);
112109
110+void from_json(const json & j, TopLevel & x);
111+void to_json(json & j, const TopLevel & x);
112+}
113+namespace quicktype {
113114 inline void from_json(const json & j, Args& x) {
114115 (void)j;
115116 (void)x;
Test case

test/inputs/json/misc/e8a0b.json

1 generated file · +6 −5
Mcplusplusdefault / quicktype.hpp+6 −5
@@ -76,12 +76,13 @@ namespace quicktype {
7676 }
7777
7878 namespace quicktype {
79- void from_json(const json & j, TopLevelElement & x);
80- void to_json(json & j, const TopLevelElement & x);
81-
82- void from_json(const json & j, Country & x);
83- void to_json(json & j, const Country & x);
79+void from_json(const json & j, TopLevelElement & x);
80+void to_json(json & j, const TopLevelElement & x);
8481
82+void from_json(const json & j, Country & x);
83+void to_json(json & j, const Country & x);
84+}
85+namespace quicktype {
8586 inline void from_json(const json & j, TopLevelElement& x) {
8687 x.set_age(j.at("age").get<int64_t>());
8788 x.set_country(j.at("country").get<Country>());
Test case

test/inputs/json/misc/e8b04.json

1 generated file · +94 −93
Mcplusplusdefault / quicktype.hpp+94 −93
@@ -945,144 +945,145 @@ namespace quicktype {
945945 }
946946
947947 namespace quicktype {
948- void from_json(const json & j, Grant & x);
949- void to_json(json & j, const Grant & x);
948+void from_json(const json & j, Grant & x);
949+void to_json(json & j, const Grant & x);
950950
951- void from_json(const json & j, Test & x);
952- void to_json(json & j, const Test & x);
951+void from_json(const json & j, Test & x);
952+void to_json(json & j, const Test & x);
953953
954- void from_json(const json & j, CustomFields & x);
955- void to_json(json & j, const CustomFields & x);
954+void from_json(const json & j, CustomFields & x);
955+void to_json(json & j, const CustomFields & x);
956956
957- void from_json(const json & j, Group & x);
958- void to_json(json & j, const Group & x);
957+void from_json(const json & j, Group & x);
958+void to_json(json & j, const Group & x);
959959
960- void from_json(const json & j, Order & x);
961- void to_json(json & j, const Order & x);
960+void from_json(const json & j, Order & x);
961+void to_json(json & j, const Order & x);
962962
963- void from_json(const json & j, Select & x);
964- void to_json(json & j, const Select & x);
963+void from_json(const json & j, Select & x);
964+void to_json(json & j, const Select & x);
965965
966- void from_json(const json & j, TableColumnId & x);
967- void to_json(json & j, const TableColumnId & x);
966+void from_json(const json & j, TableColumnId & x);
967+void to_json(json & j, const TableColumnId & x);
968968
969- void from_json(const json & j, ChildMetadata & x);
970- void to_json(json & j, const ChildMetadata & x);
969+void from_json(const json & j, ChildMetadata & x);
970+void to_json(json & j, const ChildMetadata & x);
971971
972- void from_json(const json & j, Child & x);
973- void to_json(json & j, const Child & x);
972+void from_json(const json & j, Child & x);
973+void to_json(json & j, const Child & x);
974974
975- void from_json(const json & j, Where & x);
976- void to_json(json & j, const Where & x);
975+void from_json(const json & j, Where & x);
976+void to_json(json & j, const Where & x);
977977
978- void from_json(const json & j, JsonQuery & x);
979- void to_json(json & j, const JsonQuery & x);
978+void from_json(const json & j, JsonQuery & x);
979+void to_json(json & j, const JsonQuery & x);
980980
981- void from_json(const json & j, PurpleVisible & x);
982- void to_json(json & j, const PurpleVisible & x);
981+void from_json(const json & j, PurpleVisible & x);
982+void to_json(json & j, const PurpleVisible & x);
983983
984- void from_json(const json & j, MetadataRenderTypeConfig & x);
985- void to_json(json & j, const MetadataRenderTypeConfig & x);
984+void from_json(const json & j, MetadataRenderTypeConfig & x);
985+void to_json(json & j, const MetadataRenderTypeConfig & x);
986986
987- void from_json(const json & j, Field & x);
988- void to_json(json & j, const Field & x);
987+void from_json(const json & j, Field & x);
988+void to_json(json & j, const Field & x);
989989
990- void from_json(const json & j, Row & x);
991- void to_json(json & j, const Row & x);
990+void from_json(const json & j, Row & x);
991+void to_json(json & j, const Row & x);
992992
993- void from_json(const json & j, Styles & x);
994- void to_json(json & j, const Styles & x);
993+void from_json(const json & j, Styles & x);
994+void to_json(json & j, const Styles & x);
995995
996- void from_json(const json & j, Column & x);
997- void to_json(json & j, const Column & x);
996+void from_json(const json & j, Column & x);
997+void to_json(json & j, const Column & x);
998998
999- void from_json(const json & j, FatRow & x);
1000- void to_json(json & j, const FatRow & x);
999+void from_json(const json & j, FatRow & x);
1000+void to_json(json & j, const FatRow & x);
10011001
1002- void from_json(const json & j, RichRendererConfigs & x);
1003- void to_json(json & j, const RichRendererConfigs & x);
1002+void from_json(const json & j, RichRendererConfigs & x);
1003+void to_json(json & j, const RichRendererConfigs & x);
10041004
1005- void from_json(const json & j, AccessPoints & x);
1006- void to_json(json & j, const AccessPoints & x);
1005+void from_json(const json & j, AccessPoints & x);
1006+void to_json(json & j, const AccessPoints & x);
10071007
1008- void from_json(const json & j, FluffyVisible & x);
1009- void to_json(json & j, const FluffyVisible & x);
1008+void from_json(const json & j, FluffyVisible & x);
1009+void to_json(json & j, const FluffyVisible & x);
10101010
1011- void from_json(const json & j, V1ArchivedPropertiesRenderTypeConfig & x);
1012- void to_json(json & j, const V1ArchivedPropertiesRenderTypeConfig & x);
1011+void from_json(const json & j, V1ArchivedPropertiesRenderTypeConfig & x);
1012+void to_json(json & j, const V1ArchivedPropertiesRenderTypeConfig & x);
10131013
1014- void from_json(const json & j, V1ArchivedProperties & x);
1015- void to_json(json & j, const V1ArchivedProperties & x);
1014+void from_json(const json & j, V1ArchivedProperties & x);
1015+void to_json(json & j, const V1ArchivedProperties & x);
10161016
1017- void from_json(const json & j, TopLevelMetadata & x);
1018- void to_json(json & j, const TopLevelMetadata & x);
1017+void from_json(const json & j, TopLevelMetadata & x);
1018+void to_json(json & j, const TopLevelMetadata & x);
10191019
1020- void from_json(const json & j, Owner & x);
1021- void to_json(json & j, const Owner & x);
1020+void from_json(const json & j, Owner & x);
1021+void to_json(json & j, const Owner & x);
10221022
1023- void from_json(const json & j, Ratings & x);
1024- void to_json(json & j, const Ratings & x);
1023+void from_json(const json & j, Ratings & x);
1024+void to_json(json & j, const Ratings & x);
10251025
1026- void from_json(const json & j, TableAuthor & x);
1027- void to_json(json & j, const TableAuthor & x);
1026+void from_json(const json & j, TableAuthor & x);
1027+void to_json(json & j, const TableAuthor & x);
10281028
1029- void from_json(const json & j, TopLevelElement & x);
1030- void to_json(json & j, const TopLevelElement & x);
1029+void from_json(const json & j, TopLevelElement & x);
1030+void to_json(json & j, const TopLevelElement & x);
10311031
1032- void from_json(const json & j, DisplayType & x);
1033- void to_json(json & j, const DisplayType & x);
1032+void from_json(const json & j, DisplayType & x);
1033+void to_json(json & j, const DisplayType & x);
10341034
1035- void from_json(const json & j, TopLevelFlag & x);
1036- void to_json(json & j, const TopLevelFlag & x);
1035+void from_json(const json & j, TopLevelFlag & x);
1036+void to_json(json & j, const TopLevelFlag & x);
10371037
1038- void from_json(const json & j, GrantFlag & x);
1039- void to_json(json & j, const GrantFlag & x);
1038+void from_json(const json & j, GrantFlag & x);
1039+void to_json(json & j, const GrantFlag & x);
10401040
1041- void from_json(const json & j, GrantType & x);
1042- void to_json(json & j, const GrantType & x);
1041+void from_json(const json & j, GrantType & x);
1042+void to_json(json & j, const GrantType & x);
10431043
1044- void from_json(const json & j, OrderColumnFieldName & x);
1045- void to_json(json & j, const OrderColumnFieldName & x);
1044+void from_json(const json & j, OrderColumnFieldName & x);
1045+void to_json(json & j, const OrderColumnFieldName & x);
10461046
1047- void from_json(const json & j, ChildOperator & x);
1048- void to_json(json & j, const ChildOperator & x);
1047+void from_json(const json & j, ChildOperator & x);
1048+void to_json(json & j, const ChildOperator & x);
10491049
1050- void from_json(const json & j, ChildColumnFieldName & x);
1051- void to_json(json & j, const ChildColumnFieldName & x);
1050+void from_json(const json & j, ChildColumnFieldName & x);
1051+void to_json(json & j, const ChildColumnFieldName & x);
10521052
1053- void from_json(const json & j, MetadataOperator & x);
1054- void to_json(json & j, const MetadataOperator & x);
1053+void from_json(const json & j, MetadataOperator & x);
1054+void to_json(json & j, const MetadataOperator & x);
10551055
1056- void from_json(const json & j, WhereOperator & x);
1057- void to_json(json & j, const WhereOperator & x);
1056+void from_json(const json & j, WhereOperator & x);
1057+void to_json(json & j, const WhereOperator & x);
10581058
1059- void from_json(const json & j, FieldType & x);
1060- void to_json(json & j, const FieldType & x);
1059+void from_json(const json & j, FieldType & x);
1060+void to_json(json & j, const FieldType & x);
10611061
1062- void from_json(const json & j, Width & x);
1063- void to_json(json & j, const Width & x);
1062+void from_json(const json & j, Width & x);
1063+void to_json(json & j, const Width & x);
10641064
1065- void from_json(const json & j, ModifyingViewUid & x);
1066- void to_json(json & j, const ModifyingViewUid & x);
1065+void from_json(const json & j, ModifyingViewUid & x);
1066+void to_json(json & j, const ModifyingViewUid & x);
10671067
1068- void from_json(const json & j, RoleName & x);
1069- void to_json(json & j, const RoleName & x);
1068+void from_json(const json & j, RoleName & x);
1069+void to_json(json & j, const RoleName & x);
10701070
1071- void from_json(const json & j, Provenance & x);
1072- void to_json(json & j, const Provenance & x);
1071+void from_json(const json & j, Provenance & x);
1072+void to_json(json & j, const Provenance & x);
10731073
1074- void from_json(const json & j, PublicationStage & x);
1075- void to_json(json & j, const PublicationStage & x);
1074+void from_json(const json & j, PublicationStage & x);
1075+void to_json(json & j, const PublicationStage & x);
10761076
1077- void from_json(const json & j, Right & x);
1078- void to_json(json & j, const Right & x);
1077+void from_json(const json & j, Right & x);
1078+void to_json(json & j, const Right & x);
10791079
1080- void from_json(const json & j, RowsUpdatedBy & x);
1081- void to_json(json & j, const RowsUpdatedBy & x);
1082-
1083- void from_json(const json & j, ViewType & x);
1084- void to_json(json & j, const ViewType & x);
1080+void from_json(const json & j, RowsUpdatedBy & x);
1081+void to_json(json & j, const RowsUpdatedBy & x);
10851082
1083+void from_json(const json & j, ViewType & x);
1084+void to_json(json & j, const ViewType & x);
1085+}
1086+namespace quicktype {
10861087 inline void from_json(const json & j, Grant& x) {
10871088 x.set_flags(j.at("flags").get<std::vector<GrantFlag>>());
10881089 x.set_inherited(j.at("inherited").get<bool>());
Test case

test/inputs/json/misc/f22f5.json

1 generated file · +22 −21
Mcplusplusdefault / quicktype.hpp+22 −21
@@ -483,36 +483,37 @@ namespace quicktype {
483483 }
484484
485485 namespace quicktype {
486- void from_json(const json & j, MediaEmbed & x);
487- void to_json(json & j, const MediaEmbed & x);
486+void from_json(const json & j, MediaEmbed & x);
487+void to_json(json & j, const MediaEmbed & x);
488488
489- void from_json(const json & j, ChildData & x);
490- void to_json(json & j, const ChildData & x);
489+void from_json(const json & j, ChildData & x);
490+void to_json(json & j, const ChildData & x);
491491
492- void from_json(const json & j, Child & x);
493- void to_json(json & j, const Child & x);
492+void from_json(const json & j, Child & x);
493+void to_json(json & j, const Child & x);
494494
495- void from_json(const json & j, TopLevelData & x);
496- void to_json(json & j, const TopLevelData & x);
495+void from_json(const json & j, TopLevelData & x);
496+void to_json(json & j, const TopLevelData & x);
497497
498- void from_json(const json & j, TopLevel & x);
499- void to_json(json & j, const TopLevel & x);
498+void from_json(const json & j, TopLevel & x);
499+void to_json(json & j, const TopLevel & x);
500500
501- void from_json(const json & j, Subreddit & x);
502- void to_json(json & j, const Subreddit & x);
501+void from_json(const json & j, Subreddit & x);
502+void to_json(json & j, const Subreddit & x);
503503
504- void from_json(const json & j, SubredditId & x);
505- void to_json(json & j, const SubredditId & x);
504+void from_json(const json & j, SubredditId & x);
505+void to_json(json & j, const SubredditId & x);
506506
507- void from_json(const json & j, SubredditNamePrefixed & x);
508- void to_json(json & j, const SubredditNamePrefixed & x);
507+void from_json(const json & j, SubredditNamePrefixed & x);
508+void to_json(json & j, const SubredditNamePrefixed & x);
509509
510- void from_json(const json & j, SubredditType & x);
511- void to_json(json & j, const SubredditType & x);
512-
513- void from_json(const json & j, Kind & x);
514- void to_json(json & j, const Kind & x);
510+void from_json(const json & j, SubredditType & x);
511+void to_json(json & j, const SubredditType & x);
515512
513+void from_json(const json & j, Kind & x);
514+void to_json(json & j, const Kind & x);
515+}
516+namespace quicktype {
516517 inline void from_json(const json & j, MediaEmbed& x) {
517518 (void)j;
518519 (void)x;
Test case

test/inputs/json/misc/f3139.json

1 generated file · +4 −3
Mcplusplusdefault / quicktype.hpp+4 −3
@@ -54,9 +54,10 @@ namespace quicktype {
5454 }
5555
5656 namespace quicktype {
57- void from_json(const json & j, TopLevelElement & x);
58- void to_json(json & j, const TopLevelElement & x);
59-
57+void from_json(const json & j, TopLevelElement & x);
58+void to_json(json & j, const TopLevelElement & x);
59+}
60+namespace quicktype {
6061 inline void from_json(const json & j, TopLevelElement& x) {
6162 x.set_id(j.at("id").get<std::string>());
6263 x.set_name(j.at("name").get<std::string>());
Test case

test/inputs/json/misc/f3edf.json

1 generated file · +6 −5
Mcplusplusdefault / quicktype.hpp+6 −5
@@ -76,12 +76,13 @@ namespace quicktype {
7676 }
7777
7878 namespace quicktype {
79- void from_json(const json & j, TopLevelElement & x);
80- void to_json(json & j, const TopLevelElement & x);
81-
82- void from_json(const json & j, Country & x);
83- void to_json(json & j, const Country & x);
79+void from_json(const json & j, TopLevelElement & x);
80+void to_json(json & j, const TopLevelElement & x);
8481
82+void from_json(const json & j, Country & x);
83+void to_json(json & j, const Country & x);
84+}
85+namespace quicktype {
8586 inline void from_json(const json & j, TopLevelElement& x) {
8687 x.set_age(j.at("age").get<int64_t>());
8788 x.set_country(j.at("country").get<Country>());
Test case

test/inputs/json/misc/f466a.json

1 generated file · +6 −5
Mcplusplusdefault / quicktype.hpp+6 −5
@@ -76,12 +76,13 @@ namespace quicktype {
7676 }
7777
7878 namespace quicktype {
79- void from_json(const json & j, TopLevelElement & x);
80- void to_json(json & j, const TopLevelElement & x);
81-
82- void from_json(const json & j, Country & x);
83- void to_json(json & j, const Country & x);
79+void from_json(const json & j, TopLevelElement & x);
80+void to_json(json & j, const TopLevelElement & x);
8481
82+void from_json(const json & j, Country & x);
83+void to_json(json & j, const Country & x);
84+}
85+namespace quicktype {
8586 inline void from_json(const json & j, TopLevelElement& x) {
8687 x.set_age(j.at("age").get<int64_t>());
8788 x.set_country(j.at("country").get<Country>());
Test case

test/inputs/json/misc/f6a65.json

1 generated file · +28 −27
Mcplusplusdefault / quicktype.hpp+28 −27
@@ -566,45 +566,46 @@ namespace quicktype {
566566 }
567567
568568 namespace quicktype {
569- void from_json(const json & j, The480_WStill & x);
570- void to_json(json & j, const The480_WStill & x);
569+void from_json(const json & j, The480_WStill & x);
570+void to_json(json & j, const The480_WStill & x);
571571
572- void from_json(const json & j, DownsizedSmall & x);
573- void to_json(json & j, const DownsizedSmall & x);
572+void from_json(const json & j, DownsizedSmall & x);
573+void to_json(json & j, const DownsizedSmall & x);
574574
575- void from_json(const json & j, FixedHeight & x);
576- void to_json(json & j, const FixedHeight & x);
575+void from_json(const json & j, FixedHeight & x);
576+void to_json(json & j, const FixedHeight & x);
577577
578- void from_json(const json & j, Looping & x);
579- void to_json(json & j, const Looping & x);
578+void from_json(const json & j, Looping & x);
579+void to_json(json & j, const Looping & x);
580580
581- void from_json(const json & j, Images & x);
582- void to_json(json & j, const Images & x);
581+void from_json(const json & j, Images & x);
582+void to_json(json & j, const Images & x);
583583
584- void from_json(const json & j, User & x);
585- void to_json(json & j, const User & x);
584+void from_json(const json & j, User & x);
585+void to_json(json & j, const User & x);
586586
587- void from_json(const json & j, Datum & x);
588- void to_json(json & j, const Datum & x);
587+void from_json(const json & j, Datum & x);
588+void to_json(json & j, const Datum & x);
589589
590- void from_json(const json & j, Meta & x);
591- void to_json(json & j, const Meta & x);
590+void from_json(const json & j, Meta & x);
591+void to_json(json & j, const Meta & x);
592592
593- void from_json(const json & j, Pagination & x);
594- void to_json(json & j, const Pagination & x);
593+void from_json(const json & j, Pagination & x);
594+void to_json(json & j, const Pagination & x);
595595
596- void from_json(const json & j, TopLevel & x);
597- void to_json(json & j, const TopLevel & x);
596+void from_json(const json & j, TopLevel & x);
597+void to_json(json & j, const TopLevel & x);
598598
599- void from_json(const json & j, Rating & x);
600- void to_json(json & j, const Rating & x);
599+void from_json(const json & j, Rating & x);
600+void to_json(json & j, const Rating & x);
601601
602- void from_json(const json & j, Type & x);
603- void to_json(json & j, const Type & x);
604-
605- void from_json(const json & j, Username & x);
606- void to_json(json & j, const Username & x);
602+void from_json(const json & j, Type & x);
603+void to_json(json & j, const Type & x);
607604
605+void from_json(const json & j, Username & x);
606+void to_json(json & j, const Username & x);
607+}
608+namespace quicktype {
608609 inline void from_json(const json & j, The480_WStill& x) {
609610 x.set_height(j.at("height").get<std::string>());
610611 x.set_size(get_stack_optional<std::string>(j, "size"));
Test case

test/inputs/json/misc/f82d9.json

1 generated file · +32 −31
Mcplusplusdefault / quicktype.hpp+32 −31
@@ -381,51 +381,52 @@ namespace quicktype {
381381 }
382382
383383 namespace quicktype {
384- void from_json(const json & j, ClickUrl & x);
385- void to_json(json & j, const ClickUrl & x);
384+void from_json(const json & j, ClickUrl & x);
385+void to_json(json & j, const ClickUrl & x);
386386
387- void from_json(const json & j, Properties & x);
388- void to_json(json & j, const Properties & x);
387+void from_json(const json & j, Properties & x);
388+void to_json(json & j, const Properties & x);
389389
390- void from_json(const json & j, Report & x);
391- void to_json(json & j, const Report & x);
390+void from_json(const json & j, Report & x);
391+void to_json(json & j, const Report & x);
392392
393- void from_json(const json & j, Definitions & x);
394- void to_json(json & j, const Definitions & x);
393+void from_json(const json & j, Definitions & x);
394+void to_json(json & j, const Definitions & x);
395395
396- void from_json(const json & j, Info & x);
397- void to_json(json & j, const Info & x);
396+void from_json(const json & j, Info & x);
397+void to_json(json & j, const Info & x);
398398
399- void from_json(const json & j, Parameter & x);
400- void to_json(json & j, const Parameter & x);
399+void from_json(const json & j, Parameter & x);
400+void to_json(json & j, const Parameter & x);
401401
402- void from_json(const json & j, Items & x);
403- void to_json(json & j, const Items & x);
402+void from_json(const json & j, Items & x);
403+void to_json(json & j, const Items & x);
404404
405- void from_json(const json & j, Schema & x);
406- void to_json(json & j, const Schema & x);
405+void from_json(const json & j, Schema & x);
406+void to_json(json & j, const Schema & x);
407407
408- void from_json(const json & j, The200 & x);
409- void to_json(json & j, const The200 & x);
408+void from_json(const json & j, The200 & x);
409+void to_json(json & j, const The200 & x);
410410
411- void from_json(const json & j, Responses & x);
412- void to_json(json & j, const Responses & x);
411+void from_json(const json & j, Responses & x);
412+void to_json(json & j, const Responses & x);
413413
414- void from_json(const json & j, Get & x);
415- void to_json(json & j, const Get & x);
414+void from_json(const json & j, Get & x);
415+void to_json(json & j, const Get & x);
416416
417- void from_json(const json & j, MarketResearchLibrarySearch & x);
418- void to_json(json & j, const MarketResearchLibrarySearch & x);
417+void from_json(const json & j, MarketResearchLibrarySearch & x);
418+void to_json(json & j, const MarketResearchLibrarySearch & x);
419419
420- void from_json(const json & j, Paths & x);
421- void to_json(json & j, const Paths & x);
420+void from_json(const json & j, Paths & x);
421+void to_json(json & j, const Paths & x);
422422
423- void from_json(const json & j, TopLevel & x);
424- void to_json(json & j, const TopLevel & x);
425-
426- void from_json(const json & j, Type & x);
427- void to_json(json & j, const Type & x);
423+void from_json(const json & j, TopLevel & x);
424+void to_json(json & j, const TopLevel & x);
428425
426+void from_json(const json & j, Type & x);
427+void to_json(json & j, const Type & x);
428+}
429+namespace quicktype {
429430 inline void from_json(const json & j, ClickUrl& x) {
430431 x.set_description(j.at("description").get<std::string>());
431432 x.set_type(j.at("type").get<Type>());
Test case

test/inputs/json/misc/f974d.json

1 generated file · +4 −3
Mcplusplusdefault / quicktype.hpp+4 −3
@@ -67,9 +67,10 @@ namespace quicktype {
6767 }
6868
6969 namespace quicktype {
70- void from_json(const json & j, TopLevel & x);
71- void to_json(json & j, const TopLevel & x);
72-
70+void from_json(const json & j, TopLevel & x);
71+void to_json(json & j, const TopLevel & x);
72+}
73+namespace quicktype {
7374 inline void from_json(const json & j, TopLevel& x) {
7475 x.set_block_index(j.at("block_index").get<int64_t>());
7576 x.set_hash(j.at("hash").get<std::string>());
Test case

test/inputs/json/misc/faff5.json

1 generated file · +6 −5
Mcplusplusdefault / quicktype.hpp+6 −5
@@ -66,12 +66,13 @@ namespace quicktype {
6666 }
6767
6868 namespace quicktype {
69- void from_json(const json & j, Response & x);
70- void to_json(json & j, const Response & x);
71-
72- void from_json(const json & j, TopLevel & x);
73- void to_json(json & j, const TopLevel & x);
69+void from_json(const json & j, Response & x);
70+void to_json(json & j, const Response & x);
7471
72+void from_json(const json & j, TopLevel & x);
73+void to_json(json & j, const TopLevel & x);
74+}
75+namespace quicktype {
7576 inline void from_json(const json & j, Response& x) {
7677 x.set_player_count(j.at("player_count").get<int64_t>());
7778 x.set_result(j.at("result").get<int64_t>());
Test case

test/inputs/json/misc/fd329.json

1 generated file · +8 −7
Mcplusplusdefault / quicktype.hpp+8 −7
@@ -100,15 +100,16 @@ namespace quicktype {
100100 }
101101
102102 namespace quicktype {
103- void from_json(const json & j, Datum & x);
104- void to_json(json & j, const Datum & x);
103+void from_json(const json & j, Datum & x);
104+void to_json(json & j, const Datum & x);
105105
106- void from_json(const json & j, Description & x);
107- void to_json(json & j, const Description & x);
108-
109- void from_json(const json & j, TopLevel & x);
110- void to_json(json & j, const TopLevel & x);
106+void from_json(const json & j, Description & x);
107+void to_json(json & j, const Description & x);
111108
109+void from_json(const json & j, TopLevel & x);
110+void to_json(json & j, const TopLevel & x);
111+}
112+namespace quicktype {
112113 inline void from_json(const json & j, Datum& x) {
113114 x.set_anomaly(j.at("anomaly").get<std::string>());
114115 x.set_value(j.at("value").get<std::string>());
Test case

test/inputs/json/priority/blns-object.json

1 generated file · +10 −9
Mcplusplusdefault / quicktype.hpp+10 −9
@@ -3004,18 +3004,19 @@ namespace quicktype {
30043004 }
30053005
30063006 namespace quicktype {
3007- void from_json(const json & j, A & x);
3008- void to_json(json & j, const A & x);
3007+void from_json(const json & j, A & x);
3008+void to_json(json & j, const A & x);
30093009
3010- void from_json(const json & j, B & x);
3011- void to_json(json & j, const B & x);
3010+void from_json(const json & j, B & x);
3011+void to_json(json & j, const B & x);
30123012
3013- void from_json(const json & j, C & x);
3014- void to_json(json & j, const C & x);
3015-
3016- void from_json(const json & j, TopLevel & x);
3017- void to_json(json & j, const TopLevel & x);
3013+void from_json(const json & j, C & x);
3014+void to_json(json & j, const C & x);
30183015
3016+void from_json(const json & j, TopLevel & x);
3017+void to_json(json & j, const TopLevel & x);
3018+}
3019+namespace quicktype {
30193020 inline void from_json(const json & j, A& x) {
30203021 x.set_12(j.at("パーティーへ行かないか").get<std::string>());
30213022 x.set_13(j.at("和製漢語").get<std::string>());
Test case

test/inputs/json/priority/bug2037.json

1 generated file · +10 −9
Mcplusplusdefault / quicktype.hpp+10 −9
@@ -85,18 +85,19 @@ namespace quicktype {
8585 }
8686
8787 namespace quicktype {
88- void from_json(const json & j, Reward & x);
89- void to_json(json & j, const Reward & x);
88+void from_json(const json & j, Reward & x);
89+void to_json(json & j, const Reward & x);
9090
91- void from_json(const json & j, Objective & x);
92- void to_json(json & j, const Objective & x);
91+void from_json(const json & j, Objective & x);
92+void to_json(json & j, const Objective & x);
9393
94- void from_json(const json & j, MissionSpec & x);
95- void to_json(json & j, const MissionSpec & x);
96-
97- void from_json(const json & j, TopLevel & x);
98- void to_json(json & j, const TopLevel & x);
94+void from_json(const json & j, MissionSpec & x);
95+void to_json(json & j, const MissionSpec & x);
9996
97+void from_json(const json & j, TopLevel & x);
98+void to_json(json & j, const TopLevel & x);
99+}
100+namespace quicktype {
100101 inline void from_json(const json & j, Reward& x) {
101102 (void)j;
102103 (void)x;
Test case

test/inputs/json/priority/bug2521.json

2 generated files · +12 −10
Mcplusplusdefault / quicktype.hpp+6 −5
@@ -123,12 +123,13 @@ namespace quicktype {
123123 }
124124
125125 namespace quicktype {
126- void from_json(const json & j, Option & x);
127- void to_json(json & j, const Option & x);
128-
129- void from_json(const json & j, TopLevel & x);
130- void to_json(json & j, const TopLevel & x);
126+void from_json(const json & j, Option & x);
127+void to_json(json & j, const Option & x);
131128
129+void from_json(const json & j, TopLevel & x);
130+void to_json(json & j, const TopLevel & x);
131+}
132+namespace quicktype {
132133 inline void from_json(const json & j, Option& x) {
133134 x.set_foo(get_stack_optional<std::string>(j, "foo"));
134135 x.set_name(j.at("name").get<std::string>());
Mcpluspluswstring-use-wstring--3909ec5a1524 / quicktype.hpp+6 −5
@@ -193,12 +193,13 @@ namespace quicktype {
193193 }
194194
195195 namespace quicktype {
196- void from_json(const json & j, Option & x);
197- void to_json(json & j, const Option & x);
198-
199- void from_json(const json & j, TopLevel & x);
200- void to_json(json & j, const TopLevel & x);
196+void from_json(const json & j, Option & x);
197+void to_json(json & j, const Option & x);
201198
199+void from_json(const json & j, TopLevel & x);
200+void to_json(json & j, const TopLevel & x);
201+}
202+namespace quicktype {
202203 inline void from_json(const json & j, Option& x) {
203204 x.set_foo(Utf16_Utf8<std::optional<std::string>, std::optional<std::wstring>>::convert(get_stack_optional<std::string>(j, Utf16_Utf8<std::wstring, std::string>::convert(L"foo"))));
204205 x.set_name(Utf16_Utf8<std::string, std::wstring>::convert(j.at(Utf16_Utf8<std::wstring, std::string>::convert(L"name")).get<std::string>()));
Test case

test/inputs/json/priority/bug2590.json

1 generated file · +6 −5
Mcplusplusdefault / quicktype.hpp+6 −5
@@ -125,12 +125,13 @@ namespace quicktype {
125125 }
126126
127127 namespace quicktype {
128- void from_json(const json & j, Invoice & x);
129- void to_json(json & j, const Invoice & x);
130-
131- void from_json(const json & j, TopLevel & x);
132- void to_json(json & j, const TopLevel & x);
128+void from_json(const json & j, Invoice & x);
129+void to_json(json & j, const Invoice & x);
133130
131+void from_json(const json & j, TopLevel & x);
132+void to_json(json & j, const TopLevel & x);
133+}
134+namespace quicktype {
134135 inline void from_json(const json & j, Invoice& x) {
135136 x.set_created_at(get_stack_optional<std::string>(j, "createdAt"));
136137 x.set_due_date(get_stack_optional<std::string>(j, "dueDate"));
Test case

test/inputs/json/priority/bug2663.json

1 generated file · +4 −3
Mcplusplusdefault / quicktype.hpp+4 −3
@@ -57,9 +57,10 @@ namespace quicktype {
5757 }
5858
5959 namespace quicktype {
60- void from_json(const json & j, TopLevel & x);
61- void to_json(json & j, const TopLevel & x);
62-
60+void from_json(const json & j, TopLevel & x);
61+void to_json(json & j, const TopLevel & x);
62+}
63+namespace quicktype {
6364 inline void from_json(const json & j, TopLevel& x) {
6465 x.set_birthday(j.at("birthday").get<std::string>());
6566 x.set_last_seen(j.at("lastSeen").get<std::string>());
Test case

test/inputs/json/priority/bug2793.json

1 generated file · +8 −7
Mcplusplusdefault / quicktype.hpp+8 −7
@@ -81,15 +81,16 @@ namespace quicktype {
8181 }
8282
8383 namespace quicktype {
84- void from_json(const json & j, Hints & x);
85- void to_json(json & j, const Hints & x);
84+void from_json(const json & j, Hints & x);
85+void to_json(json & j, const Hints & x);
8686
87- void from_json(const json & j, Labels & x);
88- void to_json(json & j, const Labels & x);
89-
90- void from_json(const json & j, TopLevel & x);
91- void to_json(json & j, const TopLevel & x);
87+void from_json(const json & j, Labels & x);
88+void to_json(json & j, const Labels & x);
9289
90+void from_json(const json & j, TopLevel & x);
91+void to_json(json & j, const TopLevel & x);
92+}
93+namespace quicktype {
9394 inline void from_json(const json & j, Hints& x) {
9495 (void)j;
9596 (void)x;
Test case

test/inputs/json/priority/bug427.json

1 generated file · +140 −139
Mcplusplusdefault / quicktype.hpp+140 −139
@@ -2491,213 +2491,214 @@ namespace quicktype {
24912491 }
24922492
24932493 namespace quicktype {
2494- void from_json(const json & j, PurpleComment & x);
2495- void to_json(json & j, const PurpleComment & x);
2494+void from_json(const json & j, PurpleComment & x);
2495+void to_json(json & j, const PurpleComment & x);
24962496
2497- void from_json(const json & j, PurpleFlags & x);
2498- void to_json(json & j, const PurpleFlags & x);
2497+void from_json(const json & j, PurpleFlags & x);
2498+void to_json(json & j, const PurpleFlags & x);
24992499
2500- void from_json(const json & j, GetSignatureFlags & x);
2501- void to_json(json & j, const GetSignatureFlags & x);
2500+void from_json(const json & j, GetSignatureFlags & x);
2501+void to_json(json & j, const GetSignatureFlags & x);
25022502
2503- void from_json(const json & j, ElementType & x);
2504- void to_json(json & j, const ElementType & x);
2503+void from_json(const json & j, ElementType & x);
2504+void to_json(json & j, const ElementType & x);
25052505
2506- void from_json(const json & j, FluffyComment & x);
2507- void to_json(json & j, const FluffyComment & x);
2506+void from_json(const json & j, FluffyComment & x);
2507+void to_json(json & j, const FluffyComment & x);
25082508
2509- void from_json(const json & j, FluffyFlags & x);
2510- void to_json(json & j, const FluffyFlags & x);
2509+void from_json(const json & j, FluffyFlags & x);
2510+void to_json(json & j, const FluffyFlags & x);
25112511
2512- void from_json(const json & j, Source & x);
2513- void to_json(json & j, const Source & x);
2512+void from_json(const json & j, Source & x);
2513+void to_json(json & j, const Source & x);
25142514
2515- void from_json(const json & j, GetSignatureComment & x);
2516- void to_json(json & j, const GetSignatureComment & x);
2515+void from_json(const json & j, GetSignatureComment & x);
2516+void to_json(json & j, const GetSignatureComment & x);
25172517
2518- void from_json(const json & j, Group & x);
2519- void to_json(json & j, const Group & x);
2518+void from_json(const json & j, Group & x);
2519+void to_json(json & j, const Group & x);
25202520
2521- void from_json(const json & j, TentacledComment & x);
2522- void to_json(json & j, const TentacledComment & x);
2521+void from_json(const json & j, TentacledComment & x);
2522+void to_json(json & j, const TentacledComment & x);
25232523
2524- void from_json(const json & j, TentacledFlags & x);
2525- void to_json(json & j, const TentacledFlags & x);
2524+void from_json(const json & j, TentacledFlags & x);
2525+void to_json(json & j, const TentacledFlags & x);
25262526
2527- void from_json(const json & j, FluffyType & x);
2528- void to_json(json & j, const FluffyType & x);
2527+void from_json(const json & j, FluffyType & x);
2528+void to_json(json & j, const FluffyType & x);
25292529
2530- void from_json(const json & j, GetSignatureParameter & x);
2531- void to_json(json & j, const GetSignatureParameter & x);
2530+void from_json(const json & j, GetSignatureParameter & x);
2531+void to_json(json & j, const GetSignatureParameter & x);
25322532
2533- void from_json(const json & j, GetSignatureType & x);
2534- void to_json(json & j, const GetSignatureType & x);
2533+void from_json(const json & j, GetSignatureType & x);
2534+void to_json(json & j, const GetSignatureType & x);
25352535
2536- void from_json(const json & j, IndexSignatureElement & x);
2537- void to_json(json & j, const IndexSignatureElement & x);
2536+void from_json(const json & j, IndexSignatureElement & x);
2537+void to_json(json & j, const IndexSignatureElement & x);
25382538
2539- void from_json(const json & j, PurpleType & x);
2540- void to_json(json & j, const PurpleType & x);
2539+void from_json(const json & j, PurpleType & x);
2540+void to_json(json & j, const PurpleType & x);
25412541
2542- void from_json(const json & j, GetSignatureChild & x);
2543- void to_json(json & j, const GetSignatureChild & x);
2542+void from_json(const json & j, GetSignatureChild & x);
2543+void to_json(json & j, const GetSignatureChild & x);
25442544
2545- void from_json(const json & j, GetSignature & x);
2546- void to_json(json & j, const GetSignature & x);
2545+void from_json(const json & j, GetSignature & x);
2546+void to_json(json & j, const GetSignature & x);
25472547
2548- void from_json(const json & j, PurpleDeclaration & x);
2549- void to_json(json & j, const PurpleDeclaration & x);
2548+void from_json(const json & j, PurpleDeclaration & x);
2549+void to_json(json & j, const PurpleDeclaration & x);
25502550
2551- void from_json(const json & j, TentacledType & x);
2552- void to_json(json & j, const TentacledType & x);
2551+void from_json(const json & j, TentacledType & x);
2552+void to_json(json & j, const TentacledType & x);
25532553
2554- void from_json(const json & j, PurpleSignature & x);
2555- void to_json(json & j, const PurpleSignature & x);
2554+void from_json(const json & j, PurpleSignature & x);
2555+void to_json(json & j, const PurpleSignature & x);
25562556
2557- void from_json(const json & j, TypeElement & x);
2558- void to_json(json & j, const TypeElement & x);
2557+void from_json(const json & j, TypeElement & x);
2558+void to_json(json & j, const TypeElement & x);
25592559
2560- void from_json(const json & j, TentacledChild & x);
2561- void to_json(json & j, const TentacledChild & x);
2560+void from_json(const json & j, TentacledChild & x);
2561+void to_json(json & j, const TentacledChild & x);
25622562
2563- void from_json(const json & j, Tag & x);
2564- void to_json(json & j, const Tag & x);
2563+void from_json(const json & j, Tag & x);
2564+void to_json(json & j, const Tag & x);
25652565
2566- void from_json(const json & j, StickyComment & x);
2567- void to_json(json & j, const StickyComment & x);
2566+void from_json(const json & j, StickyComment & x);
2567+void to_json(json & j, const StickyComment & x);
25682568
2569- void from_json(const json & j, StickyFlags & x);
2570- void to_json(json & j, const StickyFlags & x);
2569+void from_json(const json & j, StickyFlags & x);
2570+void to_json(json & j, const StickyFlags & x);
25712571
2572- void from_json(const json & j, ExtendedBy & x);
2573- void to_json(json & j, const ExtendedBy & x);
2572+void from_json(const json & j, ExtendedBy & x);
2573+void to_json(json & j, const ExtendedBy & x);
25742574
2575- void from_json(const json & j, IndigoFlags & x);
2576- void to_json(json & j, const IndigoFlags & x);
2575+void from_json(const json & j, IndigoFlags & x);
2576+void to_json(json & j, const IndigoFlags & x);
25772577
2578- void from_json(const json & j, StickyType & x);
2579- void to_json(json & j, const StickyType & x);
2578+void from_json(const json & j, StickyType & x);
2579+void to_json(json & j, const StickyType & x);
25802580
2581- void from_json(const json & j, PurpleParameter & x);
2582- void to_json(json & j, const PurpleParameter & x);
2581+void from_json(const json & j, PurpleParameter & x);
2582+void to_json(json & j, const PurpleParameter & x);
25832583
2584- void from_json(const json & j, FluffySignature & x);
2585- void to_json(json & j, const FluffySignature & x);
2584+void from_json(const json & j, FluffySignature & x);
2585+void to_json(json & j, const FluffySignature & x);
25862586
2587- void from_json(const json & j, IndecentType & x);
2588- void to_json(json & j, const IndecentType & x);
2587+void from_json(const json & j, IndecentType & x);
2588+void to_json(json & j, const IndecentType & x);
25892589
2590- void from_json(const json & j, StickyChild & x);
2591- void to_json(json & j, const StickyChild & x);
2590+void from_json(const json & j, StickyChild & x);
2591+void to_json(json & j, const StickyChild & x);
25922592
2593- void from_json(const json & j, HilariousType & x);
2594- void to_json(json & j, const HilariousType & x);
2593+void from_json(const json & j, HilariousType & x);
2594+void to_json(json & j, const HilariousType & x);
25952595
2596- void from_json(const json & j, IndexSignature & x);
2597- void to_json(json & j, const IndexSignature & x);
2596+void from_json(const json & j, IndexSignature & x);
2597+void to_json(json & j, const IndexSignature & x);
25982598
2599- void from_json(const json & j, IndigoComment & x);
2600- void to_json(json & j, const IndigoComment & x);
2599+void from_json(const json & j, IndigoComment & x);
2600+void to_json(json & j, const IndigoComment & x);
26012601
2602- void from_json(const json & j, FluffyParameter & x);
2603- void to_json(json & j, const FluffyParameter & x);
2602+void from_json(const json & j, FluffyParameter & x);
2603+void to_json(json & j, const FluffyParameter & x);
26042604
2605- void from_json(const json & j, TentacledSignature & x);
2606- void to_json(json & j, const TentacledSignature & x);
2605+void from_json(const json & j, TentacledSignature & x);
2606+void to_json(json & j, const TentacledSignature & x);
26072607
2608- void from_json(const json & j, FluffyDeclaration & x);
2609- void to_json(json & j, const FluffyDeclaration & x);
2608+void from_json(const json & j, FluffyDeclaration & x);
2609+void to_json(json & j, const FluffyDeclaration & x);
26102610
2611- void from_json(const json & j, PurpleTypeArgument & x);
2612- void to_json(json & j, const PurpleTypeArgument & x);
2611+void from_json(const json & j, PurpleTypeArgument & x);
2612+void to_json(json & j, const PurpleTypeArgument & x);
26132613
2614- void from_json(const json & j, IndigoType & x);
2615- void to_json(json & j, const IndigoType & x);
2614+void from_json(const json & j, IndigoType & x);
2615+void to_json(json & j, const IndigoType & x);
26162616
2617- void from_json(const json & j, FluffyChild & x);
2618- void to_json(json & j, const FluffyChild & x);
2617+void from_json(const json & j, FluffyChild & x);
2618+void to_json(json & j, const FluffyChild & x);
26192619
2620- void from_json(const json & j, IndecentFlags & x);
2621- void to_json(json & j, const IndecentFlags & x);
2620+void from_json(const json & j, IndecentFlags & x);
2621+void to_json(json & j, const IndecentFlags & x);
26222622
2623- void from_json(const json & j, IndigoChild & x);
2624- void to_json(json & j, const IndigoChild & x);
2623+void from_json(const json & j, IndigoChild & x);
2624+void to_json(json & j, const IndigoChild & x);
26252625
2626- void from_json(const json & j, TentacledDeclaration & x);
2627- void to_json(json & j, const TentacledDeclaration & x);
2626+void from_json(const json & j, TentacledDeclaration & x);
2627+void to_json(json & j, const TentacledDeclaration & x);
26282628
2629- void from_json(const json & j, AmbitiousType & x);
2630- void to_json(json & j, const AmbitiousType & x);
2629+void from_json(const json & j, AmbitiousType & x);
2630+void to_json(json & j, const AmbitiousType & x);
26312631
2632- void from_json(const json & j, TentacledParameter & x);
2633- void to_json(json & j, const TentacledParameter & x);
2632+void from_json(const json & j, TentacledParameter & x);
2633+void to_json(json & j, const TentacledParameter & x);
26342634
2635- void from_json(const json & j, CunningType & x);
2636- void to_json(json & j, const CunningType & x);
2635+void from_json(const json & j, CunningType & x);
2636+void to_json(json & j, const CunningType & x);
26372637
2638- void from_json(const json & j, StickySignature & x);
2639- void to_json(json & j, const StickySignature & x);
2638+void from_json(const json & j, StickySignature & x);
2639+void to_json(json & j, const StickySignature & x);
26402640
2641- void from_json(const json & j, IndigoDeclaration & x);
2642- void to_json(json & j, const IndigoDeclaration & x);
2641+void from_json(const json & j, IndigoDeclaration & x);
2642+void to_json(json & j, const IndigoDeclaration & x);
26432643
2644- void from_json(const json & j, FriskyType & x);
2645- void to_json(json & j, const FriskyType & x);
2644+void from_json(const json & j, FriskyType & x);
2645+void to_json(json & j, const FriskyType & x);
26462646
2647- void from_json(const json & j, IndecentChild & x);
2648- void to_json(json & j, const IndecentChild & x);
2647+void from_json(const json & j, IndecentChild & x);
2648+void to_json(json & j, const IndecentChild & x);
26492649
2650- void from_json(const json & j, StickyDeclaration & x);
2651- void to_json(json & j, const StickyDeclaration & x);
2650+void from_json(const json & j, StickyDeclaration & x);
2651+void to_json(json & j, const StickyDeclaration & x);
26522652
2653- void from_json(const json & j, FluffyTypeArgument & x);
2654- void to_json(json & j, const FluffyTypeArgument & x);
2653+void from_json(const json & j, FluffyTypeArgument & x);
2654+void to_json(json & j, const FluffyTypeArgument & x);
26552655
2656- void from_json(const json & j, MagentaType & x);
2657- void to_json(json & j, const MagentaType & x);
2656+void from_json(const json & j, MagentaType & x);
2657+void to_json(json & j, const MagentaType & x);
26582658
2659- void from_json(const json & j, MischievousType & x);
2660- void to_json(json & j, const MischievousType & x);
2659+void from_json(const json & j, MischievousType & x);
2660+void to_json(json & j, const MischievousType & x);
26612661
2662- void from_json(const json & j, TypeParameter & x);
2663- void to_json(json & j, const TypeParameter & x);
2662+void from_json(const json & j, TypeParameter & x);
2663+void to_json(json & j, const TypeParameter & x);
26642664
2665- void from_json(const json & j, PurpleChild & x);
2666- void to_json(json & j, const PurpleChild & x);
2665+void from_json(const json & j, PurpleChild & x);
2666+void to_json(json & j, const PurpleChild & x);
26672667
2668- void from_json(const json & j, IndecentComment & x);
2669- void to_json(json & j, const IndecentComment & x);
2668+void from_json(const json & j, IndecentComment & x);
2669+void to_json(json & j, const IndecentComment & x);
26702670
2671- void from_json(const json & j, TopLevelChild & x);
2672- void to_json(json & j, const TopLevelChild & x);
2671+void from_json(const json & j, TopLevelChild & x);
2672+void to_json(json & j, const TopLevelChild & x);
26732673
2674- void from_json(const json & j, TopLevel & x);
2675- void to_json(json & j, const TopLevel & x);
2674+void from_json(const json & j, TopLevel & x);
2675+void to_json(json & j, const TopLevel & x);
26762676
2677- void from_json(const json & j, PurpleKindString & x);
2678- void to_json(json & j, const PurpleKindString & x);
2677+void from_json(const json & j, PurpleKindString & x);
2678+void to_json(json & j, const PurpleKindString & x);
26792679
2680- void from_json(const json & j, SignatureKindString & x);
2681- void to_json(json & j, const SignatureKindString & x);
2680+void from_json(const json & j, SignatureKindString & x);
2681+void to_json(json & j, const SignatureKindString & x);
26822682
2683- void from_json(const json & j, Name & x);
2684- void to_json(json & j, const Name & x);
2683+void from_json(const json & j, Name & x);
2684+void to_json(json & j, const Name & x);
26852685
2686- void from_json(const json & j, TypeEnum & x);
2687- void to_json(json & j, const TypeEnum & x);
2686+void from_json(const json & j, TypeEnum & x);
2687+void to_json(json & j, const TypeEnum & x);
26882688
2689- void from_json(const json & j, FileName & x);
2690- void to_json(json & j, const FileName & x);
2689+void from_json(const json & j, FileName & x);
2690+void to_json(json & j, const FileName & x);
26912691
2692- void from_json(const json & j, ParameterKindString & x);
2693- void to_json(json & j, const ParameterKindString & x);
2692+void from_json(const json & j, ParameterKindString & x);
2693+void to_json(json & j, const ParameterKindString & x);
26942694
2695- void from_json(const json & j, FluffyKindString & x);
2696- void to_json(json & j, const FluffyKindString & x);
2697-
2698- void from_json(const json & j, TentacledKindString & x);
2699- void to_json(json & j, const TentacledKindString & x);
2695+void from_json(const json & j, FluffyKindString & x);
2696+void to_json(json & j, const FluffyKindString & x);
27002697
2698+void from_json(const json & j, TentacledKindString & x);
2699+void to_json(json & j, const TentacledKindString & x);
2700+}
2701+namespace quicktype {
27012702 inline void from_json(const json & j, PurpleComment& x) {
27022703 x.set_short_text(j.at("shortText").get<std::string>());
27032704 }
Test case

test/inputs/json/priority/bug790.json

1 generated file · +4 −3
Mcplusplusdefault / quicktype.hpp+4 −3
@@ -82,9 +82,10 @@ namespace quicktype {
8282 }
8383
8484 namespace quicktype {
85- void from_json(const json & j, TopLevel & x);
86- void to_json(json & j, const TopLevel & x);
87-
85+void from_json(const json & j, TopLevel & x);
86+void to_json(json & j, const TopLevel & x);
87+}
88+namespace quicktype {
8889 inline void from_json(const json & j, TopLevel& x) {
8990 x.set_children_data(j.at("children_data").get<std::vector<TopLevel>>());
9091 x.set_id(j.at("id").get<int64_t>());
Test case

test/inputs/json/priority/bug855-short.json

1 generated file · +4 −3
Mcplusplusdefault / quicktype.hpp+4 −3
@@ -69,9 +69,10 @@ namespace quicktype {
6969 }
7070
7171 namespace quicktype {
72- void from_json(const json & j, TopLevelValue & x);
73- void to_json(json & j, const TopLevelValue & x);
74-
72+void from_json(const json & j, TopLevelValue & x);
73+void to_json(json & j, const TopLevelValue & x);
74+}
75+namespace quicktype {
7576 inline void from_json(const json & j, TopLevelValue& x) {
7677 x.set_channel_id(j.at("channel_id").get<std::string>());
7778 x.set_channel_name(j.at("channel_name").get<std::string>());
Test case

test/inputs/json/priority/coin-pairs.json

1 generated file · +6 −5
Mcplusplusdefault / quicktype.hpp+6 −5
@@ -101,12 +101,13 @@ namespace quicktype {
101101 }
102102
103103 namespace quicktype {
104- void from_json(const json & j, Pair & x);
105- void to_json(json & j, const Pair & x);
106-
107- void from_json(const json & j, TopLevel & x);
108- void to_json(json & j, const TopLevel & x);
104+void from_json(const json & j, Pair & x);
105+void to_json(json & j, const Pair & x);
109106
107+void from_json(const json & j, TopLevel & x);
108+void to_json(json & j, const TopLevel & x);
109+}
110+namespace quicktype {
110111 inline void from_json(const json & j, Pair& x) {
111112 x.set_decimal_places(j.at("decimal_places").get<int64_t>());
112113 x.set_fee(j.at("fee").get<double>());
Test case

test/inputs/json/priority/combined-enum.json

1 generated file · +8 −7
Mcplusplusdefault / quicktype.hpp+8 −7
@@ -68,15 +68,16 @@ namespace quicktype {
6868 }
6969
7070 namespace quicktype {
71- void from_json(const json & j, Bar & x);
72- void to_json(json & j, const Bar & x);
71+void from_json(const json & j, Bar & x);
72+void to_json(json & j, const Bar & x);
7373
74- void from_json(const json & j, TopLevel & x);
75- void to_json(json & j, const TopLevel & x);
76-
77- void from_json(const json & j, X & x);
78- void to_json(json & j, const X & x);
74+void from_json(const json & j, TopLevel & x);
75+void to_json(json & j, const TopLevel & x);
7976
77+void from_json(const json & j, X & x);
78+void to_json(json & j, const X & x);
79+}
80+namespace quicktype {
8081 inline void from_json(const json & j, Bar& x) {
8182 x.set_x(j.at("x").get<X>());
8283 }
Test case

test/inputs/json/priority/direct-recursive.json

1 generated file · +4 −3
Mcplusplusdefault / quicktype.hpp+4 −3
@@ -124,9 +124,10 @@ namespace quicktype {
124124 }
125125
126126 namespace quicktype {
127- void from_json(const json & j, TopLevel & x);
128- void to_json(json & j, const TopLevel & x);
129-
127+void from_json(const json & j, TopLevel & x);
128+void to_json(json & j, const TopLevel & x);
129+}
130+namespace quicktype {
130131 inline void from_json(const json & j, TopLevel& x) {
131132 x.set_also(get_heap_optional<TopLevel>(j, "also"));
132133 x.set_bar(j.at("bar").get<bool>());
Test case

test/inputs/json/priority/empty-enum.json

1 generated file · +6 −5
Mcplusplusdefault / quicktype.hpp+6 −5
@@ -118,12 +118,13 @@ namespace quicktype {
118118 }
119119
120120 namespace quicktype {
121- void from_json(const json & j, Foo & x);
122- void to_json(json & j, const Foo & x);
123-
124- void from_json(const json & j, TopLevel & x);
125- void to_json(json & j, const TopLevel & x);
121+void from_json(const json & j, Foo & x);
122+void to_json(json & j, const Foo & x);
126123
124+void from_json(const json & j, TopLevel & x);
125+void to_json(json & j, const TopLevel & x);
126+}
127+namespace quicktype {
127128 inline void from_json(const json & j, Foo& x) {
128129 x.set_bar(get_stack_optional<std::string>(j, "bar"));
129130 }
Test case

test/inputs/json/priority/identifiers.json

1 generated file · +16 −15
Mcplusplusdefault / quicktype.hpp+16 −15
@@ -167,27 +167,28 @@ namespace quicktype {
167167 }
168168
169169 namespace quicktype {
170- void from_json(const json & j, TopLevelBla & x);
171- void to_json(json & j, const TopLevelBla & x);
170+void from_json(const json & j, TopLevelBla & x);
171+void to_json(json & j, const TopLevelBla & x);
172172
173- void from_json(const json & j, Empty & x);
174- void to_json(json & j, const Empty & x);
173+void from_json(const json & j, Empty & x);
174+void to_json(json & j, const Empty & x);
175175
176- void from_json(const json & j, FooBla & x);
177- void to_json(json & j, const FooBla & x);
176+void from_json(const json & j, FooBla & x);
177+void to_json(json & j, const FooBla & x);
178178
179- void from_json(const json & j, Foo & x);
180- void to_json(json & j, const Foo & x);
179+void from_json(const json & j, Foo & x);
180+void to_json(json & j, const Foo & x);
181181
182- void from_json(const json & j, ThisIsAToughOne & x);
183- void to_json(json & j, const ThisIsAToughOne & x);
182+void from_json(const json & j, ThisIsAToughOne & x);
183+void to_json(json & j, const ThisIsAToughOne & x);
184184
185- void from_json(const json & j, EmptyClass & x);
186- void to_json(json & j, const EmptyClass & x);
187-
188- void from_json(const json & j, TopLevel & x);
189- void to_json(json & j, const TopLevel & x);
185+void from_json(const json & j, EmptyClass & x);
186+void to_json(json & j, const EmptyClass & x);
190187
188+void from_json(const json & j, TopLevel & x);
189+void to_json(json & j, const TopLevel & x);
190+}
191+namespace quicktype {
191192 inline void from_json(const json & j, TopLevelBla& x) {
192193 x.set_bar(j.at("bar").get<int64_t>());
193194 }
Test case

test/inputs/json/priority/issue2680-object-array.json

1 generated file · +4 −3
Mcplusplusdefault / quicktype.hpp+4 −3
@@ -49,9 +49,10 @@ namespace quicktype {
4949 }
5050
5151 namespace quicktype {
52- void from_json(const json & j, TopLevelElement & x);
53- void to_json(json & j, const TopLevelElement & x);
54-
52+void from_json(const json & j, TopLevelElement & x);
53+void to_json(json & j, const TopLevelElement & x);
54+}
55+namespace quicktype {
5556 inline void from_json(const json & j, TopLevelElement& x) {
5657 x.set_key(j.at("key").get<std::string>());
5758 }
Test case

test/inputs/json/priority/keywords.json

1 generated file · +572 −571
Mcplusplusdefault / quicktype.hpp+572 −571
@@ -5443,861 +5443,862 @@ namespace quicktype {
54435443 }
54445444
54455445 namespace quicktype {
5446- void from_json(const json & j, Abstract & x);
5447- void to_json(json & j, const Abstract & x);
5446+void from_json(const json & j, Abstract & x);
5447+void to_json(json & j, const Abstract & x);
54485448
5449- void from_json(const json & j, Any & x);
5450- void to_json(json & j, const Any & x);
5449+void from_json(const json & j, Any & x);
5450+void to_json(json & j, const Any & x);
54515451
5452- void from_json(const json & j, Array & x);
5453- void to_json(json & j, const Array & x);
5452+void from_json(const json & j, Array & x);
5453+void to_json(json & j, const Array & x);
54545454
5455- void from_json(const json & j, As & x);
5456- void to_json(json & j, const As & x);
5455+void from_json(const json & j, As & x);
5456+void to_json(json & j, const As & x);
54575457
5458- void from_json(const json & j, Assert & x);
5459- void to_json(json & j, const Assert & x);
5458+void from_json(const json & j, Assert & x);
5459+void to_json(json & j, const Assert & x);
54605460
5461- void from_json(const json & j, Associatedtype & x);
5462- void to_json(json & j, const Associatedtype & x);
5461+void from_json(const json & j, Associatedtype & x);
5462+void to_json(json & j, const Associatedtype & x);
54635463
5464- void from_json(const json & j, Associativity & x);
5465- void to_json(json & j, const Associativity & x);
5464+void from_json(const json & j, Associativity & x);
5465+void to_json(json & j, const Associativity & x);
54665466
5467- void from_json(const json & j, Async & x);
5468- void to_json(json & j, const Async & x);
5467+void from_json(const json & j, Async & x);
5468+void to_json(json & j, const Async & x);
54695469
5470- void from_json(const json & j, Atomic & x);
5471- void to_json(json & j, const Atomic & x);
5470+void from_json(const json & j, Atomic & x);
5471+void to_json(json & j, const Atomic & x);
54725472
5473- void from_json(const json & j, Await & x);
5474- void to_json(json & j, const Await & x);
5473+void from_json(const json & j, Await & x);
5474+void to_json(json & j, const Await & x);
54755475
5476- void from_json(const json & j, Base & x);
5477- void to_json(json & j, const Base & x);
5476+void from_json(const json & j, Base & x);
5477+void to_json(json & j, const Base & x);
54785478
5479- void from_json(const json & j, Boolean & x);
5480- void to_json(json & j, const Boolean & x);
5479+void from_json(const json & j, Boolean & x);
5480+void to_json(json & j, const Boolean & x);
54815481
5482- void from_json(const json & j, Bycopy & x);
5483- void to_json(json & j, const Bycopy & x);
5482+void from_json(const json & j, Bycopy & x);
5483+void to_json(json & j, const Bycopy & x);
54845484
5485- void from_json(const json & j, Byref & x);
5486- void to_json(json & j, const Byref & x);
5485+void from_json(const json & j, Byref & x);
5486+void to_json(json & j, const Byref & x);
54875487
5488- void from_json(const json & j, Byte & x);
5489- void to_json(json & j, const Byte & x);
5488+void from_json(const json & j, Byte & x);
5489+void to_json(json & j, const Byte & x);
54905490
5491- void from_json(const json & j, Chan & x);
5492- void to_json(json & j, const Chan & x);
5491+void from_json(const json & j, Chan & x);
5492+void to_json(json & j, const Chan & x);
54935493
5494- void from_json(const json & j, Checked & x);
5495- void to_json(json & j, const Checked & x);
5494+void from_json(const json & j, Checked & x);
5495+void to_json(json & j, const Checked & x);
54965496
5497- void from_json(const json & j, Clone & x);
5498- void to_json(json & j, const Clone & x);
5497+void from_json(const json & j, Clone & x);
5498+void to_json(json & j, const Clone & x);
54995499
5500- void from_json(const json & j, Complex & x);
5501- void to_json(json & j, const Complex & x);
5500+void from_json(const json & j, Complex & x);
5501+void to_json(json & j, const Complex & x);
55025502
5503- void from_json(const json & j, Console & x);
5504- void to_json(json & j, const Console & x);
5503+void from_json(const json & j, Console & x);
5504+void to_json(json & j, const Console & x);
55055505
5506- void from_json(const json & j, Constructor & x);
5507- void to_json(json & j, const Constructor & x);
5506+void from_json(const json & j, Constructor & x);
5507+void to_json(json & j, const Constructor & x);
55085508
5509- void from_json(const json & j, Convenience & x);
5510- void to_json(json & j, const Convenience & x);
5509+void from_json(const json & j, Convenience & x);
5510+void to_json(json & j, const Convenience & x);
55115511
5512- void from_json(const json & j, Convert & x);
5513- void to_json(json & j, const Convert & x);
5512+void from_json(const json & j, Convert & x);
5513+void to_json(json & j, const Convert & x);
55145514
5515- void from_json(const json & j, Converter & x);
5516- void to_json(json & j, const Converter & x);
5515+void from_json(const json & j, Converter & x);
5516+void to_json(json & j, const Converter & x);
55175517
5518- void from_json(const json & j, Date & x);
5519- void to_json(json & j, const Date & x);
5518+void from_json(const json & j, Date & x);
5519+void to_json(json & j, const Date & x);
55205520
5521- void from_json(const json & j, DateParseHandling & x);
5522- void to_json(json & j, const DateParseHandling & x);
5521+void from_json(const json & j, DateParseHandling & x);
5522+void to_json(json & j, const DateParseHandling & x);
55235523
5524- void from_json(const json & j, Debugger & x);
5525- void to_json(json & j, const Debugger & x);
5524+void from_json(const json & j, Debugger & x);
5525+void to_json(json & j, const Debugger & x);
55265526
5527- void from_json(const json & j, Decimal & x);
5528- void to_json(json & j, const Decimal & x);
5527+void from_json(const json & j, Decimal & x);
5528+void to_json(json & j, const Decimal & x);
55295529
5530- void from_json(const json & j, Declare & x);
5531- void to_json(json & j, const Declare & x);
5530+void from_json(const json & j, Declare & x);
5531+void to_json(json & j, const Declare & x);
55325532
5533- void from_json(const json & j, DecodeString & x);
5534- void to_json(json & j, const DecodeString & x);
5533+void from_json(const json & j, DecodeString & x);
5534+void to_json(json & j, const DecodeString & x);
55355535
5536- void from_json(const json & j, Empty & x);
5537- void to_json(json & j, const Empty & x);
5536+void from_json(const json & j, Empty & x);
5537+void to_json(json & j, const Empty & x);
55385538
5539- void from_json(const json & j, Obj1Bool & x);
5540- void to_json(json & j, const Obj1Bool & x);
5539+void from_json(const json & j, Obj1Bool & x);
5540+void to_json(json & j, const Obj1Bool & x);
55415541
5542- void from_json(const json & j, Imaginery & x);
5543- void to_json(json & j, const Imaginery & x);
5542+void from_json(const json & j, Imaginery & x);
5543+void to_json(json & j, const Imaginery & x);
55445544
5545- void from_json(const json & j, Alignas & x);
5546- void to_json(json & j, const Alignas & x);
5545+void from_json(const json & j, Alignas & x);
5546+void to_json(json & j, const Alignas & x);
55475547
5548- void from_json(const json & j, Alignof & x);
5549- void to_json(json & j, const Alignof & x);
5548+void from_json(const json & j, Alignof & x);
5549+void to_json(json & j, const Alignof & x);
55505550
5551- void from_json(const json & j, And & x);
5552- void to_json(json & j, const And & x);
5551+void from_json(const json & j, And & x);
5552+void to_json(json & j, const And & x);
55535553
5554- void from_json(const json & j, AndEq & x);
5555- void to_json(json & j, const AndEq & x);
5554+void from_json(const json & j, AndEq & x);
5555+void to_json(json & j, const AndEq & x);
55565556
5557- void from_json(const json & j, AnyClass & x);
5558- void to_json(json & j, const AnyClass & x);
5557+void from_json(const json & j, AnyClass & x);
5558+void to_json(json & j, const AnyClass & x);
55595559
5560- void from_json(const json & j, Asm & x);
5561- void to_json(json & j, const Asm & x);
5560+void from_json(const json & j, Asm & x);
5561+void to_json(json & j, const Asm & x);
55625562
5563- void from_json(const json & j, AtomicCancel & x);
5564- void to_json(json & j, const AtomicCancel & x);
5563+void from_json(const json & j, AtomicCancel & x);
5564+void to_json(json & j, const AtomicCancel & x);
55655565
5566- void from_json(const json & j, AtomicCommit & x);
5567- void to_json(json & j, const AtomicCommit & x);
5566+void from_json(const json & j, AtomicCommit & x);
5567+void to_json(json & j, const AtomicCommit & x);
55685568
5569- void from_json(const json & j, AtomicNoexcept & x);
5570- void to_json(json & j, const AtomicNoexcept & x);
5569+void from_json(const json & j, AtomicNoexcept & x);
5570+void to_json(json & j, const AtomicNoexcept & x);
55715571
5572- void from_json(const json & j, Auto & x);
5573- void to_json(json & j, const Auto & x);
5572+void from_json(const json & j, Auto & x);
5573+void to_json(json & j, const Auto & x);
55745574
5575- void from_json(const json & j, Bitand & x);
5576- void to_json(json & j, const Bitand & x);
5575+void from_json(const json & j, Bitand & x);
5576+void to_json(json & j, const Bitand & x);
55775577
5578- void from_json(const json & j, Bitor & x);
5579- void to_json(json & j, const Bitor & x);
5578+void from_json(const json & j, Bitor & x);
5579+void to_json(json & j, const Bitor & x);
55805580
5581- void from_json(const json & j, Bool & x);
5582- void to_json(json & j, const Bool & x);
5581+void from_json(const json & j, Bool & x);
5582+void to_json(json & j, const Bool & x);
55835583
5584- void from_json(const json & j, Break & x);
5585- void to_json(json & j, const Break & x);
5584+void from_json(const json & j, Break & x);
5585+void to_json(json & j, const Break & x);
55865586
5587- void from_json(const json & j, Case & x);
5588- void to_json(json & j, const Case & x);
5587+void from_json(const json & j, Case & x);
5588+void to_json(json & j, const Case & x);
55895589
5590- void from_json(const json & j, Catch & x);
5591- void to_json(json & j, const Catch & x);
5590+void from_json(const json & j, Catch & x);
5591+void to_json(json & j, const Catch & x);
55925592
5593- void from_json(const json & j, Char & x);
5594- void to_json(json & j, const Char & x);
5593+void from_json(const json & j, Char & x);
5594+void to_json(json & j, const Char & x);
55955595
5596- void from_json(const json & j, Char16T & x);
5597- void to_json(json & j, const Char16T & x);
5596+void from_json(const json & j, Char16T & x);
5597+void to_json(json & j, const Char16T & x);
55985598
5599- void from_json(const json & j, Char32T & x);
5600- void to_json(json & j, const Char32T & x);
5599+void from_json(const json & j, Char32T & x);
5600+void to_json(json & j, const Char32T & x);
56015601
5602- void from_json(const json & j, Class & x);
5603- void to_json(json & j, const Class & x);
5602+void from_json(const json & j, Class & x);
5603+void to_json(json & j, const Class & x);
56045604
5605- void from_json(const json & j, CoAwait & x);
5606- void to_json(json & j, const CoAwait & x);
5605+void from_json(const json & j, CoAwait & x);
5606+void to_json(json & j, const CoAwait & x);
56075607
5608- void from_json(const json & j, CoReturn & x);
5609- void to_json(json & j, const CoReturn & x);
5608+void from_json(const json & j, CoReturn & x);
5609+void to_json(json & j, const CoReturn & x);
56105610
5611- void from_json(const json & j, CoYield & x);
5612- void to_json(json & j, const CoYield & x);
5611+void from_json(const json & j, CoYield & x);
5612+void to_json(json & j, const CoYield & x);
56135613
5614- void from_json(const json & j, Compl & x);
5615- void to_json(json & j, const Compl & x);
5614+void from_json(const json & j, Compl & x);
5615+void to_json(json & j, const Compl & x);
56165616
5617- void from_json(const json & j, Concept & x);
5618- void to_json(json & j, const Concept & x);
5617+void from_json(const json & j, Concept & x);
5618+void to_json(json & j, const Concept & x);
56195619
5620- void from_json(const json & j, Const & x);
5621- void to_json(json & j, const Const & x);
5620+void from_json(const json & j, Const & x);
5621+void to_json(json & j, const Const & x);
56225622
5623- void from_json(const json & j, ConstCast & x);
5624- void to_json(json & j, const ConstCast & x);
5623+void from_json(const json & j, ConstCast & x);
5624+void to_json(json & j, const ConstCast & x);
56255625
5626- void from_json(const json & j, Constexpr & x);
5627- void to_json(json & j, const Constexpr & x);
5626+void from_json(const json & j, Constexpr & x);
5627+void to_json(json & j, const Constexpr & x);
56285628
5629- void from_json(const json & j, Continue & x);
5630- void to_json(json & j, const Continue & x);
5629+void from_json(const json & j, Continue & x);
5630+void to_json(json & j, const Continue & x);
56315631
5632- void from_json(const json & j, Decltype & x);
5633- void to_json(json & j, const Decltype & x);
5632+void from_json(const json & j, Decltype & x);
5633+void to_json(json & j, const Decltype & x);
56345634
5635- void from_json(const json & j, BoolClass & x);
5636- void to_json(json & j, const BoolClass & x);
5635+void from_json(const json & j, BoolClass & x);
5636+void to_json(json & j, const BoolClass & x);
56375637
5638- void from_json(const json & j, ClassClass & x);
5639- void to_json(json & j, const ClassClass & x);
5638+void from_json(const json & j, ClassClass & x);
5639+void to_json(json & j, const ClassClass & x);
56405640
5641- void from_json(const json & j, Obj1 & x);
5642- void to_json(json & j, const Obj1 & x);
5641+void from_json(const json & j, Obj1 & x);
5642+void to_json(json & j, const Obj1 & x);
56435643
5644- void from_json(const json & j, Def & x);
5645- void to_json(json & j, const Def & x);
5644+void from_json(const json & j, Def & x);
5645+void to_json(json & j, const Def & x);
56465646
5647- void from_json(const json & j, Defer & x);
5648- void to_json(json & j, const Defer & x);
5647+void from_json(const json & j, Defer & x);
5648+void to_json(json & j, const Defer & x);
56495649
5650- void from_json(const json & j, Deinit & x);
5651- void to_json(json & j, const Deinit & x);
5650+void from_json(const json & j, Deinit & x);
5651+void to_json(json & j, const Deinit & x);
56525652
5653- void from_json(const json & j, Del & x);
5654- void to_json(json & j, const Del & x);
5653+void from_json(const json & j, Del & x);
5654+void to_json(json & j, const Del & x);
56555655
5656- void from_json(const json & j, Delegate & x);
5657- void to_json(json & j, const Delegate & x);
5656+void from_json(const json & j, Delegate & x);
5657+void to_json(json & j, const Delegate & x);
56585658
5659- void from_json(const json & j, Dict & x);
5660- void to_json(json & j, const Dict & x);
5659+void from_json(const json & j, Dict & x);
5660+void to_json(json & j, const Dict & x);
56615661
5662- void from_json(const json & j, Dictionary & x);
5663- void to_json(json & j, const Dictionary & x);
5662+void from_json(const json & j, Dictionary & x);
5663+void to_json(json & j, const Dictionary & x);
56645664
5665- void from_json(const json & j, DidSet & x);
5666- void to_json(json & j, const DidSet & x);
5665+void from_json(const json & j, DidSet & x);
5666+void to_json(json & j, const DidSet & x);
56675667
5668- void from_json(const json & j, Dynamic & x);
5669- void to_json(json & j, const Dynamic & x);
5668+void from_json(const json & j, Dynamic & x);
5669+void to_json(json & j, const Dynamic & x);
56705670
5671- void from_json(const json & j, Elif & x);
5672- void to_json(json & j, const Elif & x);
5671+void from_json(const json & j, Elif & x);
5672+void to_json(json & j, const Elif & x);
56735673
5674- void from_json(const json & j, EncodeQuickType & x);
5675- void to_json(json & j, const EncodeQuickType & x);
5674+void from_json(const json & j, EncodeQuickType & x);
5675+void to_json(json & j, const EncodeQuickType & x);
56765676
5677- void from_json(const json & j, EqualityContract & x);
5678- void to_json(json & j, const EqualityContract & x);
5677+void from_json(const json & j, EqualityContract & x);
5678+void to_json(json & j, const EqualityContract & x);
56795679
5680- void from_json(const json & j, Event & x);
5681- void to_json(json & j, const Event & x);
5680+void from_json(const json & j, Event & x);
5681+void to_json(json & j, const Event & x);
56825682
5683- void from_json(const json & j, Except & x);
5684- void to_json(json & j, const Except & x);
5683+void from_json(const json & j, Except & x);
5684+void to_json(json & j, const Except & x);
56855685
5686- void from_json(const json & j, Exception & x);
5687- void to_json(json & j, const Exception & x);
5686+void from_json(const json & j, Exception & x);
5687+void to_json(json & j, const Exception & x);
56885688
5689- void from_json(const json & j, Exposing & x);
5690- void to_json(json & j, const Exposing & x);
5689+void from_json(const json & j, Exposing & x);
5690+void to_json(json & j, const Exposing & x);
56915691
5692- void from_json(const json & j, Extends & x);
5693- void to_json(json & j, const Extends & x);
5692+void from_json(const json & j, Extends & x);
5693+void to_json(json & j, const Extends & x);
56945694
5695- void from_json(const json & j, Extension & x);
5696- void to_json(json & j, const Extension & x);
5695+void from_json(const json & j, Extension & x);
5696+void to_json(json & j, const Extension & x);
56975697
5698- void from_json(const json & j, Fallthrough & x);
5699- void to_json(json & j, const Fallthrough & x);
5698+void from_json(const json & j, Fallthrough & x);
5699+void to_json(json & j, const Fallthrough & x);
57005700
5701- void from_json(const json & j, Fileprivate & x);
5702- void to_json(json & j, const Fileprivate & x);
5701+void from_json(const json & j, Fileprivate & x);
5702+void to_json(json & j, const Fileprivate & x);
57035703
5704- void from_json(const json & j, Finally & x);
5705- void to_json(json & j, const Finally & x);
5704+void from_json(const json & j, Finally & x);
5705+void to_json(json & j, const Finally & x);
57065706
5707- void from_json(const json & j, Fixed & x);
5708- void to_json(json & j, const Fixed & x);
5707+void from_json(const json & j, Fixed & x);
5708+void to_json(json & j, const Fixed & x);
57095709
5710- void from_json(const json & j, Foreach & x);
5711- void to_json(json & j, const Foreach & x);
5710+void from_json(const json & j, Foreach & x);
5711+void to_json(json & j, const Foreach & x);
57125712
5713- void from_json(const json & j, From & x);
5714- void to_json(json & j, const From & x);
5713+void from_json(const json & j, From & x);
5714+void to_json(json & j, const From & x);
57155715
5716- void from_json(const json & j, FromJson & x);
5717- void to_json(json & j, const FromJson & x);
5716+void from_json(const json & j, FromJson & x);
5717+void to_json(json & j, const FromJson & x);
57185718
5719- void from_json(const json & j, Func & x);
5720- void to_json(json & j, const Func & x);
5719+void from_json(const json & j, Func & x);
5720+void to_json(json & j, const Func & x);
57215721
5722- void from_json(const json & j, Function & x);
5723- void to_json(json & j, const Function & x);
5722+void from_json(const json & j, Function & x);
5723+void to_json(json & j, const Function & x);
57245724
5725- void from_json(const json & j, Get & x);
5726- void to_json(json & j, const Get & x);
5725+void from_json(const json & j, Get & x);
5726+void to_json(json & j, const Get & x);
57275727
5728- void from_json(const json & j, Global & x);
5729- void to_json(json & j, const Global & x);
5728+void from_json(const json & j, Global & x);
5729+void to_json(json & j, const Global & x);
57305730
5731- void from_json(const json & j, Go & x);
5732- void to_json(json & j, const Go & x);
5731+void from_json(const json & j, Go & x);
5732+void to_json(json & j, const Go & x);
57335733
5734- void from_json(const json & j, Guard & x);
5735- void to_json(json & j, const Guard & x);
5734+void from_json(const json & j, Guard & x);
5735+void to_json(json & j, const Guard & x);
57365736
5737- void from_json(const json & j, HasOwnProperty & x);
5738- void to_json(json & j, const HasOwnProperty & x);
5737+void from_json(const json & j, HasOwnProperty & x);
5738+void to_json(json & j, const HasOwnProperty & x);
57395739
5740- void from_json(const json & j, Id & x);
5741- void to_json(json & j, const Id & x);
5740+void from_json(const json & j, Id & x);
5741+void to_json(json & j, const Id & x);
57425742
5743- void from_json(const json & j, Imp & x);
5744- void to_json(json & j, const Imp & x);
5743+void from_json(const json & j, Imp & x);
5744+void to_json(json & j, const Imp & x);
57455745
5746- void from_json(const json & j, Implements & x);
5747- void to_json(json & j, const Implements & x);
5746+void from_json(const json & j, Implements & x);
5747+void to_json(json & j, const Implements & x);
57485748
5749- void from_json(const json & j, Implicit & x);
5750- void to_json(json & j, const Implicit & x);
5749+void from_json(const json & j, Implicit & x);
5750+void to_json(json & j, const Implicit & x);
57515751
5752- void from_json(const json & j, In & x);
5753- void to_json(json & j, const In & x);
5752+void from_json(const json & j, In & x);
5753+void to_json(json & j, const In & x);
57545754
5755- void from_json(const json & j, Indirect & x);
5756- void to_json(json & j, const Indirect & x);
5755+void from_json(const json & j, Indirect & x);
5756+void to_json(json & j, const Indirect & x);
57575757
5758- void from_json(const json & j, Infix & x);
5759- void to_json(json & j, const Infix & x);
5758+void from_json(const json & j, Infix & x);
5759+void to_json(json & j, const Infix & x);
57605760
5761- void from_json(const json & j, Init & x);
5762- void to_json(json & j, const Init & x);
5761+void from_json(const json & j, Init & x);
5762+void to_json(json & j, const Init & x);
57635763
5764- void from_json(const json & j, Inout & x);
5765- void to_json(json & j, const Inout & x);
5764+void from_json(const json & j, Inout & x);
5765+void to_json(json & j, const Inout & x);
57665766
5767- void from_json(const json & j, Instanceof & x);
5768- void to_json(json & j, const Instanceof & x);
5767+void from_json(const json & j, Instanceof & x);
5768+void to_json(json & j, const Instanceof & x);
57695769
5770- void from_json(const json & j, Interface & x);
5771- void to_json(json & j, const Interface & x);
5770+void from_json(const json & j, Interface & x);
5771+void to_json(json & j, const Interface & x);
57725772
5773- void from_json(const json & j, Internal & x);
5774- void to_json(json & j, const Internal & x);
5773+void from_json(const json & j, Internal & x);
5774+void to_json(json & j, const Internal & x);
57755775
5776- void from_json(const json & j, Default & x);
5777- void to_json(json & j, const Default & x);
5776+void from_json(const json & j, Default & x);
5777+void to_json(json & j, const Default & x);
57785778
5779- void from_json(const json & j, Delete & x);
5780- void to_json(json & j, const Delete & x);
5779+void from_json(const json & j, Delete & x);
5780+void to_json(json & j, const Delete & x);
57815781
5782- void from_json(const json & j, Do & x);
5783- void to_json(json & j, const Do & x);
5782+void from_json(const json & j, Do & x);
5783+void to_json(json & j, const Do & x);
57845784
5785- void from_json(const json & j, Double & x);
5786- void to_json(json & j, const Double & x);
5785+void from_json(const json & j, Double & x);
5786+void to_json(json & j, const Double & x);
57875787
5788- void from_json(const json & j, DynamicCast & x);
5789- void to_json(json & j, const DynamicCast & x);
5788+void from_json(const json & j, DynamicCast & x);
5789+void to_json(json & j, const DynamicCast & x);
57905790
5791- void from_json(const json & j, Else & x);
5792- void to_json(json & j, const Else & x);
5791+void from_json(const json & j, Else & x);
5792+void to_json(json & j, const Else & x);
57935793
5794- void from_json(const json & j, Enum & x);
5795- void to_json(json & j, const Enum & x);
5794+void from_json(const json & j, Enum & x);
5795+void to_json(json & j, const Enum & x);
57965796
5797- void from_json(const json & j, Explicit & x);
5798- void to_json(json & j, const Explicit & x);
5797+void from_json(const json & j, Explicit & x);
5798+void to_json(json & j, const Explicit & x);
57995799
5800- void from_json(const json & j, Export & x);
5801- void to_json(json & j, const Export & x);
5800+void from_json(const json & j, Export & x);
5801+void to_json(json & j, const Export & x);
58025802
5803- void from_json(const json & j, Extern & x);
5804- void to_json(json & j, const Extern & x);
5803+void from_json(const json & j, Extern & x);
5804+void to_json(json & j, const Extern & x);
58055805
5806- void from_json(const json & j, False & x);
5807- void to_json(json & j, const False & x);
5806+void from_json(const json & j, False & x);
5807+void to_json(json & j, const False & x);
58085808
5809- void from_json(const json & j, Final & x);
5810- void to_json(json & j, const Final & x);
5809+void from_json(const json & j, Final & x);
5810+void to_json(json & j, const Final & x);
58115811
5812- void from_json(const json & j, Float & x);
5813- void to_json(json & j, const Float & x);
5812+void from_json(const json & j, Float & x);
5813+void to_json(json & j, const Float & x);
58145814
5815- void from_json(const json & j, For & x);
5816- void to_json(json & j, const For & x);
5815+void from_json(const json & j, For & x);
5816+void to_json(json & j, const For & x);
58175817
5818- void from_json(const json & j, Friend & x);
5819- void to_json(json & j, const Friend & x);
5818+void from_json(const json & j, Friend & x);
5819+void to_json(json & j, const Friend & x);
58205820
5821- void from_json(const json & j, Goto & x);
5822- void to_json(json & j, const Goto & x);
5821+void from_json(const json & j, Goto & x);
5822+void to_json(json & j, const Goto & x);
58235823
5824- void from_json(const json & j, If & x);
5825- void to_json(json & j, const If & x);
5824+void from_json(const json & j, If & x);
5825+void to_json(json & j, const If & x);
58265826
5827- void from_json(const json & j, Import & x);
5828- void to_json(json & j, const Import & x);
5827+void from_json(const json & j, Import & x);
5828+void to_json(json & j, const Import & x);
58295829
5830- void from_json(const json & j, Inline & x);
5831- void to_json(json & j, const Inline & x);
5830+void from_json(const json & j, Inline & x);
5831+void to_json(json & j, const Inline & x);
58325832
5833- void from_json(const json & j, Int & x);
5834- void to_json(json & j, const Int & x);
5833+void from_json(const json & j, Int & x);
5834+void to_json(json & j, const Int & x);
58355835
5836- void from_json(const json & j, FalseClass & x);
5837- void to_json(json & j, const FalseClass & x);
5836+void from_json(const json & j, FalseClass & x);
5837+void to_json(json & j, const FalseClass & x);
58385838
5839- void from_json(const json & j, Obj2 & x);
5840- void to_json(json & j, const Obj2 & x);
5839+void from_json(const json & j, Obj2 & x);
5840+void to_json(json & j, const Obj2 & x);
58415841
5842- void from_json(const json & j, Is & x);
5843- void to_json(json & j, const Is & x);
5842+void from_json(const json & j, Is & x);
5843+void to_json(json & j, const Is & x);
58445844
5845- void from_json(const json & j, Iterable & x);
5846- void to_json(json & j, const Iterable & x);
5845+void from_json(const json & j, Iterable & x);
5846+void to_json(json & j, const Iterable & x);
58475847
5848- void from_json(const json & j, Jdec & x);
5849- void to_json(json & j, const Jdec & x);
5848+void from_json(const json & j, Jdec & x);
5849+void to_json(json & j, const Jdec & x);
58505850
5851- void from_json(const json & j, Jenc & x);
5852- void to_json(json & j, const Jenc & x);
5851+void from_json(const json & j, Jenc & x);
5852+void to_json(json & j, const Jenc & x);
58535853
5854- void from_json(const json & j, Jpipe & x);
5855- void to_json(json & j, const Jpipe & x);
5854+void from_json(const json & j, Jpipe & x);
5855+void to_json(json & j, const Jpipe & x);
58565856
5857- void from_json(const json & j, Json & x);
5858- void to_json(json & j, const Json & x);
5857+void from_json(const json & j, Json & x);
5858+void to_json(json & j, const Json & x);
58595859
5860- void from_json(const json & j, JsonConverter & x);
5861- void to_json(json & j, const JsonConverter & x);
5860+void from_json(const json & j, JsonConverter & x);
5861+void to_json(json & j, const JsonConverter & x);
58625862
5863- void from_json(const json & j, JsonSerializer & x);
5864- void to_json(json & j, const JsonSerializer & x);
5863+void from_json(const json & j, JsonSerializer & x);
5864+void to_json(json & j, const JsonSerializer & x);
58655865
5866- void from_json(const json & j, JsonToken & x);
5867- void to_json(json & j, const JsonToken & x);
5866+void from_json(const json & j, JsonToken & x);
5867+void to_json(json & j, const JsonToken & x);
58685868
5869- void from_json(const json & j, JsonWriter & x);
5870- void to_json(json & j, const JsonWriter & x);
5869+void from_json(const json & j, JsonWriter & x);
5870+void to_json(json & j, const JsonWriter & x);
58715871
5872- void from_json(const json & j, Lambda & x);
5873- void to_json(json & j, const Lambda & x);
5872+void from_json(const json & j, Lambda & x);
5873+void to_json(json & j, const Lambda & x);
58745874
5875- void from_json(const json & j, Lazy & x);
5876- void to_json(json & j, const Lazy & x);
5875+void from_json(const json & j, Lazy & x);
5876+void to_json(json & j, const Lazy & x);
58775877
5878- void from_json(const json & j, Left & x);
5879- void to_json(json & j, const Left & x);
5878+void from_json(const json & j, Left & x);
5879+void to_json(json & j, const Left & x);
58805880
5881- void from_json(const json & j, Let & x);
5882- void to_json(json & j, const Let & x);
5881+void from_json(const json & j, Let & x);
5882+void to_json(json & j, const Let & x);
58835883
5884- void from_json(const json & j, List & x);
5885- void to_json(json & j, const List & x);
5884+void from_json(const json & j, List & x);
5885+void to_json(json & j, const List & x);
58865886
5887- void from_json(const json & j, Lock & x);
5888- void to_json(json & j, const Lock & x);
5887+void from_json(const json & j, Lock & x);
5888+void to_json(json & j, const Lock & x);
58895889
5890- void from_json(const json & j, Map & x);
5891- void to_json(json & j, const Map & x);
5890+void from_json(const json & j, Map & x);
5891+void to_json(json & j, const Map & x);
58925892
5893- void from_json(const json & j, MetadataPropertyHandling & x);
5894- void to_json(json & j, const MetadataPropertyHandling & x);
5893+void from_json(const json & j, MetadataPropertyHandling & x);
5894+void to_json(json & j, const MetadataPropertyHandling & x);
58955895
5896- void from_json(const json & j, Mutating & x);
5897- void to_json(json & j, const Mutating & x);
5896+void from_json(const json & j, Mutating & x);
5897+void to_json(json & j, const Mutating & x);
58985898
5899- void from_json(const json & j, Native & x);
5900- void to_json(json & j, const Native & x);
5899+void from_json(const json & j, Native & x);
5900+void to_json(json & j, const Native & x);
59015901
5902- void from_json(const json & j, Newtonsoft & x);
5903- void to_json(json & j, const Newtonsoft & x);
5902+void from_json(const json & j, Newtonsoft & x);
5903+void to_json(json & j, const Newtonsoft & x);
59045904
5905- void from_json(const json & j, Nil & x);
5906- void to_json(json & j, const Nil & x);
5905+void from_json(const json & j, Nil & x);
5906+void to_json(json & j, const Nil & x);
59075907
5908- void from_json(const json & j, No & x);
5909- void to_json(json & j, const No & x);
5908+void from_json(const json & j, No & x);
5909+void to_json(json & j, const No & x);
59105910
5911- void from_json(const json & j, Nonatomic & x);
5912- void to_json(json & j, const Nonatomic & x);
5911+void from_json(const json & j, Nonatomic & x);
5912+void to_json(json & j, const Nonatomic & x);
59135913
5914- void from_json(const json & j, None & x);
5915- void to_json(json & j, const None & x);
5914+void from_json(const json & j, None & x);
5915+void to_json(json & j, const None & x);
59165916
5917- void from_json(const json & j, Nonlocal & x);
5918- void to_json(json & j, const Nonlocal & x);
5917+void from_json(const json & j, Nonlocal & x);
5918+void to_json(json & j, const Nonlocal & x);
59195919
5920- void from_json(const json & j, Nonmutating & x);
5921- void to_json(json & j, const Nonmutating & x);
5920+void from_json(const json & j, Nonmutating & x);
5921+void to_json(json & j, const Nonmutating & x);
59225922
5923- void from_json(const json & j, NsString & x);
5924- void to_json(json & j, const NsString & x);
5923+void from_json(const json & j, NsString & x);
5924+void to_json(json & j, const NsString & x);
59255925
5926- void from_json(const json & j, Null & x);
5927- void to_json(json & j, const Null & x);
5926+void from_json(const json & j, Null & x);
5927+void to_json(json & j, const Null & x);
59285928
5929- void from_json(const json & j, Number & x);
5930- void to_json(json & j, const Number & x);
5929+void from_json(const json & j, Number & x);
5930+void to_json(json & j, const Number & x);
59315931
5932- void from_json(const json & j, Long & x);
5933- void to_json(json & j, const Long & x);
5932+void from_json(const json & j, Long & x);
5933+void to_json(json & j, const Long & x);
59345934
5935- void from_json(const json & j, Module & x);
5936- void to_json(json & j, const Module & x);
5935+void from_json(const json & j, Module & x);
5936+void to_json(json & j, const Module & x);
59375937
5938- void from_json(const json & j, Mutable & x);
5939- void to_json(json & j, const Mutable & x);
5938+void from_json(const json & j, Mutable & x);
5939+void to_json(json & j, const Mutable & x);
59405940
5941- void from_json(const json & j, Namespace & x);
5942- void to_json(json & j, const Namespace & x);
5941+void from_json(const json & j, Namespace & x);
5942+void to_json(json & j, const Namespace & x);
59435943
5944- void from_json(const json & j, New & x);
5945- void to_json(json & j, const New & x);
5944+void from_json(const json & j, New & x);
5945+void to_json(json & j, const New & x);
59465946
5947- void from_json(const json & j, Noexcept & x);
5948- void to_json(json & j, const Noexcept & x);
5947+void from_json(const json & j, Noexcept & x);
5948+void to_json(json & j, const Noexcept & x);
59495949
5950- void from_json(const json & j, NoneClass & x);
5951- void to_json(json & j, const NoneClass & x);
5950+void from_json(const json & j, NoneClass & x);
5951+void to_json(json & j, const NoneClass & x);
59525952
5953- void from_json(const json & j, Not & x);
5954- void to_json(json & j, const Not & x);
5953+void from_json(const json & j, Not & x);
5954+void to_json(json & j, const Not & x);
59555955
5956- void from_json(const json & j, NotEq & x);
5957- void to_json(json & j, const NotEq & x);
5956+void from_json(const json & j, NotEq & x);
5957+void to_json(json & j, const NotEq & x);
59585958
5959- void from_json(const json & j, NullClass & x);
5960- void to_json(json & j, const NullClass & x);
5959+void from_json(const json & j, NullClass & x);
5960+void to_json(json & j, const NullClass & x);
59615961
5962- void from_json(const json & j, Nullptr & x);
5963- void to_json(json & j, const Nullptr & x);
5962+void from_json(const json & j, Nullptr & x);
5963+void to_json(json & j, const Nullptr & x);
59645964
5965- void from_json(const json & j, Operator & x);
5966- void to_json(json & j, const Operator & x);
5965+void from_json(const json & j, Operator & x);
5966+void to_json(json & j, const Operator & x);
59675967
5968- void from_json(const json & j, Or & x);
5969- void to_json(json & j, const Or & x);
5968+void from_json(const json & j, Or & x);
5969+void to_json(json & j, const Or & x);
59705970
5971- void from_json(const json & j, OrEq & x);
5972- void to_json(json & j, const OrEq & x);
5971+void from_json(const json & j, OrEq & x);
5972+void to_json(json & j, const OrEq & x);
59735973
5974- void from_json(const json & j, Override & x);
5975- void to_json(json & j, const Override & x);
5974+void from_json(const json & j, Override & x);
5975+void to_json(json & j, const Override & x);
59765976
5977- void from_json(const json & j, Private & x);
5978- void to_json(json & j, const Private & x);
5977+void from_json(const json & j, Private & x);
5978+void to_json(json & j, const Private & x);
59795979
5980- void from_json(const json & j, Protected & x);
5981- void to_json(json & j, const Protected & x);
5980+void from_json(const json & j, Protected & x);
5981+void to_json(json & j, const Protected & x);
59825982
5983- void from_json(const json & j, ProtocolClass & x);
5984- void to_json(json & j, const ProtocolClass & x);
5983+void from_json(const json & j, ProtocolClass & x);
5984+void to_json(json & j, const ProtocolClass & x);
59855985
5986- void from_json(const json & j, Object & x);
5987- void to_json(json & j, const Object & x);
5986+void from_json(const json & j, Object & x);
5987+void to_json(json & j, const Object & x);
59885988
5989- void from_json(const json & j, Of & x);
5990- void to_json(json & j, const Of & x);
5989+void from_json(const json & j, Of & x);
5990+void to_json(json & j, const Of & x);
59915991
5992- void from_json(const json & j, Oneway & x);
5993- void to_json(json & j, const Oneway & x);
5992+void from_json(const json & j, Oneway & x);
5993+void to_json(json & j, const Oneway & x);
59945994
5995- void from_json(const json & j, Open & x);
5996- void to_json(json & j, const Open & x);
5995+void from_json(const json & j, Open & x);
5996+void to_json(json & j, const Open & x);
59975997
5998- void from_json(const json & j, Optional & x);
5999- void to_json(json & j, const Optional & x);
5998+void from_json(const json & j, Optional & x);
5999+void to_json(json & j, const Optional & x);
60006000
6001- void from_json(const json & j, Out & x);
6002- void to_json(json & j, const Out & x);
6001+void from_json(const json & j, Out & x);
6002+void to_json(json & j, const Out & x);
60036003
6004- void from_json(const json & j, Package & x);
6005- void to_json(json & j, const Package & x);
6004+void from_json(const json & j, Package & x);
6005+void to_json(json & j, const Package & x);
60066006
6007- void from_json(const json & j, Params & x);
6008- void to_json(json & j, const Params & x);
6007+void from_json(const json & j, Params & x);
6008+void to_json(json & j, const Params & x);
60096009
6010- void from_json(const json & j, Pass & x);
6011- void to_json(json & j, const Pass & x);
6010+void from_json(const json & j, Pass & x);
6011+void to_json(json & j, const Pass & x);
60126012
6013- void from_json(const json & j, Port & x);
6014- void to_json(json & j, const Port & x);
6013+void from_json(const json & j, Port & x);
6014+void to_json(json & j, const Port & x);
60156015
6016- void from_json(const json & j, Postfix & x);
6017- void to_json(json & j, const Postfix & x);
6016+void from_json(const json & j, Postfix & x);
6017+void to_json(json & j, const Postfix & x);
60186018
6019- void from_json(const json & j, Precedence & x);
6020- void to_json(json & j, const Precedence & x);
6019+void from_json(const json & j, Precedence & x);
6020+void to_json(json & j, const Precedence & x);
60216021
6022- void from_json(const json & j, Prefix & x);
6023- void to_json(json & j, const Prefix & x);
6022+void from_json(const json & j, Prefix & x);
6023+void to_json(json & j, const Prefix & x);
60246024
6025- void from_json(const json & j, Print & x);
6026- void to_json(json & j, const Print & x);
6025+void from_json(const json & j, Print & x);
6026+void to_json(json & j, const Print & x);
60276027
6028- void from_json(const json & j, PrintMembers & x);
6029- void to_json(json & j, const PrintMembers & x);
6028+void from_json(const json & j, PrintMembers & x);
6029+void to_json(json & j, const PrintMembers & x);
60306030
6031- void from_json(const json & j, Printf & x);
6032- void to_json(json & j, const Printf & x);
6031+void from_json(const json & j, Printf & x);
6032+void to_json(json & j, const Printf & x);
60336033
6034- void from_json(const json & j, Protocol & x);
6035- void to_json(json & j, const Protocol & x);
6034+void from_json(const json & j, Protocol & x);
6035+void to_json(json & j, const Protocol & x);
60366036
6037- void from_json(const json & j, Obj3 & x);
6038- void to_json(json & j, const Obj3 & x);
6037+void from_json(const json & j, Obj3 & x);
6038+void to_json(json & j, const Obj3 & x);
60396039
6040- void from_json(const json & j, Public & x);
6041- void to_json(json & j, const Public & x);
6040+void from_json(const json & j, Public & x);
6041+void to_json(json & j, const Public & x);
60426042
6043- void from_json(const json & j, Register & x);
6044- void to_json(json & j, const Register & x);
6043+void from_json(const json & j, Register & x);
6044+void to_json(json & j, const Register & x);
60456045
6046- void from_json(const json & j, ReinterpretCast & x);
6047- void to_json(json & j, const ReinterpretCast & x);
6046+void from_json(const json & j, ReinterpretCast & x);
6047+void to_json(json & j, const ReinterpretCast & x);
60486048
6049- void from_json(const json & j, Requires & x);
6050- void to_json(json & j, const Requires & x);
6049+void from_json(const json & j, Requires & x);
6050+void to_json(json & j, const Requires & x);
60516051
6052- void from_json(const json & j, Return & x);
6053- void to_json(json & j, const Return & x);
6052+void from_json(const json & j, Return & x);
6053+void to_json(json & j, const Return & x);
60546054
6055- void from_json(const json & j, SelfClass & x);
6056- void to_json(json & j, const SelfClass & x);
6055+void from_json(const json & j, SelfClass & x);
6056+void to_json(json & j, const SelfClass & x);
60576057
6058- void from_json(const json & j, Short & x);
6059- void to_json(json & j, const Short & x);
6058+void from_json(const json & j, Short & x);
6059+void to_json(json & j, const Short & x);
60606060
6061- void from_json(const json & j, Signed & x);
6062- void to_json(json & j, const Signed & x);
6061+void from_json(const json & j, Signed & x);
6062+void to_json(json & j, const Signed & x);
60636063
6064- void from_json(const json & j, Sizeof & x);
6065- void to_json(json & j, const Sizeof & x);
6064+void from_json(const json & j, Sizeof & x);
6065+void to_json(json & j, const Sizeof & x);
60666066
6067- void from_json(const json & j, Static & x);
6068- void to_json(json & j, const Static & x);
6067+void from_json(const json & j, Static & x);
6068+void to_json(json & j, const Static & x);
60696069
6070- void from_json(const json & j, StaticAssert & x);
6071- void to_json(json & j, const StaticAssert & x);
6070+void from_json(const json & j, StaticAssert & x);
6071+void to_json(json & j, const StaticAssert & x);
60726072
6073- void from_json(const json & j, StaticCast & x);
6074- void to_json(json & j, const StaticCast & x);
6073+void from_json(const json & j, StaticCast & x);
6074+void to_json(json & j, const StaticCast & x);
60756075
6076- void from_json(const json & j, Struct & x);
6077- void to_json(json & j, const Struct & x);
6076+void from_json(const json & j, Struct & x);
6077+void to_json(json & j, const Struct & x);
60786078
6079- void from_json(const json & j, Switch & x);
6080- void to_json(json & j, const Switch & x);
6079+void from_json(const json & j, Switch & x);
6080+void to_json(json & j, const Switch & x);
60816081
6082- void from_json(const json & j, Synchronized & x);
6083- void to_json(json & j, const Synchronized & x);
6082+void from_json(const json & j, Synchronized & x);
6083+void to_json(json & j, const Synchronized & x);
60846084
6085- void from_json(const json & j, Template & x);
6086- void to_json(json & j, const Template & x);
6085+void from_json(const json & j, Template & x);
6086+void to_json(json & j, const Template & x);
60876087
6088- void from_json(const json & j, This & x);
6089- void to_json(json & j, const This & x);
6088+void from_json(const json & j, This & x);
6089+void to_json(json & j, const This & x);
60906090
6091- void from_json(const json & j, ThreadLocal & x);
6092- void to_json(json & j, const ThreadLocal & x);
6091+void from_json(const json & j, ThreadLocal & x);
6092+void to_json(json & j, const ThreadLocal & x);
60936093
6094- void from_json(const json & j, Throw & x);
6095- void to_json(json & j, const Throw & x);
6094+void from_json(const json & j, Throw & x);
6095+void to_json(json & j, const Throw & x);
60966096
6097- void from_json(const json & j, True & x);
6098- void to_json(json & j, const True & x);
6097+void from_json(const json & j, True & x);
6098+void to_json(json & j, const True & x);
60996099
6100- void from_json(const json & j, Try & x);
6101- void to_json(json & j, const Try & x);
6100+void from_json(const json & j, Try & x);
6101+void to_json(json & j, const Try & x);
61026102
6103- void from_json(const json & j, TypeClass & x);
6104- void to_json(json & j, const TypeClass & x);
6103+void from_json(const json & j, TypeClass & x);
6104+void to_json(json & j, const TypeClass & x);
61056105
6106- void from_json(const json & j, Typedef & x);
6107- void to_json(json & j, const Typedef & x);
6106+void from_json(const json & j, Typedef & x);
6107+void to_json(json & j, const Typedef & x);
61086108
6109- void from_json(const json & j, Typeid & x);
6110- void to_json(json & j, const Typeid & x);
6109+void from_json(const json & j, Typeid & x);
6110+void to_json(json & j, const Typeid & x);
61116111
6112- void from_json(const json & j, Typename & x);
6113- void to_json(json & j, const Typename & x);
6112+void from_json(const json & j, Typename & x);
6113+void to_json(json & j, const Typename & x);
61146114
6115- void from_json(const json & j, TrueClass & x);
6116- void to_json(json & j, const TrueClass & x);
6115+void from_json(const json & j, TrueClass & x);
6116+void to_json(json & j, const TrueClass & x);
61176117
6118- void from_json(const json & j, Quicktype & x);
6119- void to_json(json & j, const Quicktype & x);
6118+void from_json(const json & j, Quicktype & x);
6119+void to_json(json & j, const Quicktype & x);
61206120
6121- void from_json(const json & j, Raise & x);
6122- void to_json(json & j, const Raise & x);
6121+void from_json(const json & j, Raise & x);
6122+void to_json(json & j, const Raise & x);
61236123
6124- void from_json(const json & j, Range & x);
6125- void to_json(json & j, const Range & x);
6124+void from_json(const json & j, Range & x);
6125+void to_json(json & j, const Range & x);
61266126
6127- void from_json(const json & j, Readonly & x);
6128- void to_json(json & j, const Readonly & x);
6127+void from_json(const json & j, Readonly & x);
6128+void to_json(json & j, const Readonly & x);
61296129
6130- void from_json(const json & j, Ref & x);
6131- void to_json(json & j, const Ref & x);
6130+void from_json(const json & j, Ref & x);
6131+void to_json(json & j, const Ref & x);
61326132
6133- void from_json(const json & j, Repeat & x);
6134- void to_json(json & j, const Repeat & x);
6133+void from_json(const json & j, Repeat & x);
6134+void to_json(json & j, const Repeat & x);
61356135
6136- void from_json(const json & j, Require & x);
6137- void to_json(json & j, const Require & x);
6136+void from_json(const json & j, Require & x);
6137+void to_json(json & j, const Require & x);
61386138
6139- void from_json(const json & j, Required & x);
6140- void to_json(json & j, const Required & x);
6139+void from_json(const json & j, Required & x);
6140+void to_json(json & j, const Required & x);
61416141
6142- void from_json(const json & j, Restrict & x);
6143- void to_json(json & j, const Restrict & x);
6142+void from_json(const json & j, Restrict & x);
6143+void to_json(json & j, const Restrict & x);
61446144
6145- void from_json(const json & j, Retain & x);
6146- void to_json(json & j, const Retain & x);
6145+void from_json(const json & j, Retain & x);
6146+void to_json(json & j, const Retain & x);
61476147
6148- void from_json(const json & j, Rethrows & x);
6149- void to_json(json & j, const Rethrows & x);
6148+void from_json(const json & j, Rethrows & x);
6149+void to_json(json & j, const Rethrows & x);
61506150
6151- void from_json(const json & j, Right & x);
6152- void to_json(json & j, const Right & x);
6151+void from_json(const json & j, Right & x);
6152+void to_json(json & j, const Right & x);
61536153
6154- void from_json(const json & j, Sbyte & x);
6155- void to_json(json & j, const Sbyte & x);
6154+void from_json(const json & j, Sbyte & x);
6155+void to_json(json & j, const Sbyte & x);
61566156
6157- void from_json(const json & j, Sealed & x);
6158- void to_json(json & j, const Sealed & x);
6157+void from_json(const json & j, Sealed & x);
6158+void to_json(json & j, const Sealed & x);
61596159
6160- void from_json(const json & j, Sel & x);
6161- void to_json(json & j, const Sel & x);
6160+void from_json(const json & j, Sel & x);
6161+void to_json(json & j, const Sel & x);
61626162
6163- void from_json(const json & j, Select & x);
6164- void to_json(json & j, const Select & x);
6163+void from_json(const json & j, Select & x);
6164+void to_json(json & j, const Select & x);
61656165
6166- void from_json(const json & j, Self & x);
6167- void to_json(json & j, const Self & x);
6166+void from_json(const json & j, Self & x);
6167+void to_json(json & j, const Self & x);
61686168
6169- void from_json(const json & j, Serialize & x);
6170- void to_json(json & j, const Serialize & x);
6169+void from_json(const json & j, Serialize & x);
6170+void to_json(json & j, const Serialize & x);
61716171
6172- void from_json(const json & j, Set & x);
6173- void to_json(json & j, const Set & x);
6172+void from_json(const json & j, Set & x);
6173+void to_json(json & j, const Set & x);
61746174
6175- void from_json(const json & j, Stackalloc & x);
6176- void to_json(json & j, const Stackalloc & x);
6175+void from_json(const json & j, Stackalloc & x);
6176+void to_json(json & j, const Stackalloc & x);
61776177
6178- void from_json(const json & j, Strictfp & x);
6179- void to_json(json & j, const Strictfp & x);
6178+void from_json(const json & j, Strictfp & x);
6179+void to_json(json & j, const Strictfp & x);
61806180
6181- void from_json(const json & j, String & x);
6182- void to_json(json & j, const String & x);
6181+void from_json(const json & j, String & x);
6182+void to_json(json & j, const String & x);
61836183
6184- void from_json(const json & j, Subscript & x);
6185- void to_json(json & j, const Subscript & x);
6184+void from_json(const json & j, Subscript & x);
6185+void to_json(json & j, const Subscript & x);
61866186
6187- void from_json(const json & j, Super & x);
6188- void to_json(json & j, const Super & x);
6187+void from_json(const json & j, Super & x);
6188+void to_json(json & j, const Super & x);
61896189
6190- void from_json(const json & j, Symbol & x);
6191- void to_json(json & j, const Symbol & x);
6190+void from_json(const json & j, Symbol & x);
6191+void to_json(json & j, const Symbol & x);
61926192
6193- void from_json(const json & j, System & x);
6194- void to_json(json & j, const System & x);
6193+void from_json(const json & j, System & x);
6194+void to_json(json & j, const System & x);
61956195
6196- void from_json(const json & j, Then & x);
6197- void to_json(json & j, const Then & x);
6196+void from_json(const json & j, Then & x);
6197+void to_json(json & j, const Then & x);
61986198
6199- void from_json(const json & j, Throws & x);
6200- void to_json(json & j, const Throws & x);
6199+void from_json(const json & j, Throws & x);
6200+void to_json(json & j, const Throws & x);
62016201
6202- void from_json(const json & j, ToJson & x);
6203- void to_json(json & j, const ToJson & x);
6202+void from_json(const json & j, ToJson & x);
6203+void to_json(json & j, const ToJson & x);
62046204
6205- void from_json(const json & j, TopLevelClass & x);
6206- void to_json(json & j, const TopLevelClass & x);
6205+void from_json(const json & j, TopLevelClass & x);
6206+void to_json(json & j, const TopLevelClass & x);
62076207
6208- void from_json(const json & j, Transient & x);
6209- void to_json(json & j, const Transient & x);
6208+void from_json(const json & j, Transient & x);
6209+void to_json(json & j, const Transient & x);
62106210
6211- void from_json(const json & j, Type & x);
6212- void to_json(json & j, const Type & x);
6211+void from_json(const json & j, Type & x);
6212+void to_json(json & j, const Type & x);
62136213
6214- void from_json(const json & j, Typealias & x);
6215- void to_json(json & j, const Typealias & x);
6214+void from_json(const json & j, Typealias & x);
6215+void to_json(json & j, const Typealias & x);
62166216
6217- void from_json(const json & j, Typeof & x);
6218- void to_json(json & j, const Typeof & x);
6217+void from_json(const json & j, Typeof & x);
6218+void to_json(json & j, const Typeof & x);
62196219
6220- void from_json(const json & j, Uint & x);
6221- void to_json(json & j, const Uint & x);
6220+void from_json(const json & j, Uint & x);
6221+void to_json(json & j, const Uint & x);
62226222
6223- void from_json(const json & j, Ulong & x);
6224- void to_json(json & j, const Ulong & x);
6223+void from_json(const json & j, Ulong & x);
6224+void to_json(json & j, const Ulong & x);
62256225
6226- void from_json(const json & j, Unchecked & x);
6227- void to_json(json & j, const Unchecked & x);
6226+void from_json(const json & j, Unchecked & x);
6227+void to_json(json & j, const Unchecked & x);
62286228
6229- void from_json(const json & j, Undefined & x);
6230- void to_json(json & j, const Undefined & x);
6229+void from_json(const json & j, Undefined & x);
6230+void to_json(json & j, const Undefined & x);
62316231
6232- void from_json(const json & j, Obj4 & x);
6233- void to_json(json & j, const Obj4 & x);
6232+void from_json(const json & j, Obj4 & x);
6233+void to_json(json & j, const Obj4 & x);
62346234
6235- void from_json(const json & j, Union & x);
6236- void to_json(json & j, const Union & x);
6235+void from_json(const json & j, Union & x);
6236+void to_json(json & j, const Union & x);
62376237
6238- void from_json(const json & j, Unsigned & x);
6239- void to_json(json & j, const Unsigned & x);
6238+void from_json(const json & j, Unsigned & x);
6239+void to_json(json & j, const Unsigned & x);
62406240
6241- void from_json(const json & j, Using & x);
6242- void to_json(json & j, const Using & x);
6241+void from_json(const json & j, Using & x);
6242+void to_json(json & j, const Using & x);
62436243
6244- void from_json(const json & j, Virtual & x);
6245- void to_json(json & j, const Virtual & x);
6244+void from_json(const json & j, Virtual & x);
6245+void to_json(json & j, const Virtual & x);
62466246
6247- void from_json(const json & j, Void & x);
6248- void to_json(json & j, const Void & x);
6247+void from_json(const json & j, Void & x);
6248+void to_json(json & j, const Void & x);
62496249
6250- void from_json(const json & j, Volatile & x);
6251- void to_json(json & j, const Volatile & x);
6250+void from_json(const json & j, Volatile & x);
6251+void to_json(json & j, const Volatile & x);
62526252
6253- void from_json(const json & j, WcharT & x);
6254- void to_json(json & j, const WcharT & x);
6253+void from_json(const json & j, WcharT & x);
6254+void to_json(json & j, const WcharT & x);
62556255
6256- void from_json(const json & j, While & x);
6257- void to_json(json & j, const While & x);
6256+void from_json(const json & j, While & x);
6257+void to_json(json & j, const While & x);
62586258
6259- void from_json(const json & j, Xor & x);
6260- void to_json(json & j, const Xor & x);
6259+void from_json(const json & j, Xor & x);
6260+void to_json(json & j, const Xor & x);
62616261
6262- void from_json(const json & j, XorEq & x);
6263- void to_json(json & j, const XorEq & x);
6262+void from_json(const json & j, XorEq & x);
6263+void to_json(json & j, const XorEq & x);
62646264
6265- void from_json(const json & j, Unowned & x);
6266- void to_json(json & j, const Unowned & x);
6265+void from_json(const json & j, Unowned & x);
6266+void to_json(json & j, const Unowned & x);
62676267
6268- void from_json(const json & j, Unsafe & x);
6269- void to_json(json & j, const Unsafe & x);
6268+void from_json(const json & j, Unsafe & x);
6269+void to_json(json & j, const Unsafe & x);
62706270
6271- void from_json(const json & j, Ushort & x);
6272- void to_json(json & j, const Ushort & x);
6271+void from_json(const json & j, Ushort & x);
6272+void to_json(json & j, const Ushort & x);
62736273
6274- void from_json(const json & j, Var & x);
6275- void to_json(json & j, const Var & x);
6274+void from_json(const json & j, Var & x);
6275+void to_json(json & j, const Var & x);
62766276
6277- void from_json(const json & j, Weak & x);
6278- void to_json(json & j, const Weak & x);
6277+void from_json(const json & j, Weak & x);
6278+void to_json(json & j, const Weak & x);
62796279
6280- void from_json(const json & j, Where & x);
6281- void to_json(json & j, const Where & x);
6280+void from_json(const json & j, Where & x);
6281+void to_json(json & j, const Where & x);
62826282
6283- void from_json(const json & j, WillSet & x);
6284- void to_json(json & j, const WillSet & x);
6283+void from_json(const json & j, WillSet & x);
6284+void to_json(json & j, const WillSet & x);
62856285
6286- void from_json(const json & j, With & x);
6287- void to_json(json & j, const With & x);
6286+void from_json(const json & j, With & x);
6287+void to_json(json & j, const With & x);
62886288
6289- void from_json(const json & j, Yes & x);
6290- void to_json(json & j, const Yes & x);
6289+void from_json(const json & j, Yes & x);
6290+void to_json(json & j, const Yes & x);
62916291
6292- void from_json(const json & j, Yield & x);
6293- void to_json(json & j, const Yield & x);
6292+void from_json(const json & j, Yield & x);
6293+void to_json(json & j, const Yield & x);
62946294
6295- void from_json(const json & j, Obj5 & x);
6296- void to_json(json & j, const Obj5 & x);
6297-
6298- void from_json(const json & j, TopLevel & x);
6299- void to_json(json & j, const TopLevel & x);
6295+void from_json(const json & j, Obj5 & x);
6296+void to_json(json & j, const Obj5 & x);
63006297
6298+void from_json(const json & j, TopLevel & x);
6299+void to_json(json & j, const TopLevel & x);
6300+}
6301+namespace quicktype {
63016302 inline void from_json(const json & j, Abstract& x) {
63026303 x.set_abstract(j.at("abstract").get<int64_t>());
63036304 }
Test case

test/inputs/json/priority/kotlin-enum-class-case-collision.json

1 generated file · +6 −5
Mcplusplusdefault / quicktype.hpp+6 −5
@@ -51,12 +51,13 @@ namespace quicktype {
5151 }
5252
5353 namespace quicktype {
54- void from_json(const json & j, TopLevelElement & x);
55- void to_json(json & j, const TopLevelElement & x);
56-
57- void from_json(const json & j, Category & x);
58- void to_json(json & j, const Category & x);
54+void from_json(const json & j, TopLevelElement & x);
55+void to_json(json & j, const TopLevelElement & x);
5956
57+void from_json(const json & j, Category & x);
58+void to_json(json & j, const Category & x);
59+}
60+namespace quicktype {
6061 inline void from_json(const json & j, TopLevelElement& x) {
6162 x.set_category(j.at("category").get<Category>());
6263 }
Test case

test/inputs/json/priority/list.json

1 generated file · +4 −3
Mcplusplusdefault / quicktype.hpp+4 −3
@@ -107,9 +107,10 @@ namespace quicktype {
107107 }
108108
109109 namespace quicktype {
110- void from_json(const json & j, TopLevel & x);
111- void to_json(json & j, const TopLevel & x);
112-
110+void from_json(const json & j, TopLevel & x);
111+void to_json(json & j, const TopLevel & x);
112+}
113+namespace quicktype {
113114 inline void from_json(const json & j, TopLevel& x) {
114115 x.set_data(j.at("data").get<int64_t>());
115116 x.set_next(get_heap_optional<TopLevel>(j, "next"));
Test case

test/inputs/json/priority/name-style.json

1 generated file · +4 −3
Mcplusplusdefault / quicktype.hpp+4 −3
@@ -77,9 +77,10 @@ namespace quicktype {
7777 }
7878
7979 namespace quicktype {
80- void from_json(const json & j, TopLevel & x);
81- void to_json(json & j, const TopLevel & x);
82-
80+void from_json(const json & j, TopLevel & x);
81+void to_json(json & j, const TopLevel & x);
82+}
83+namespace quicktype {
8384 inline void from_json(const json & j, TopLevel& x) {
8485 x.set_an_easy_one(j.at("anEasyOne").get<int64_t>());
8586 x.set_is_mnist_letter(j.at("isMNISTLetter").get<bool>());
Test case

test/inputs/json/priority/nested-objects.json

1 generated file · +4 −3
Mcplusplusdefault / quicktype.hpp+4 −3
@@ -52,9 +52,10 @@ namespace quicktype {
5252 }
5353
5454 namespace quicktype {
55- void from_json(const json & j, TopLevel & x);
56- void to_json(json & j, const TopLevel & x);
57-
55+void from_json(const json & j, TopLevel & x);
56+void to_json(json & j, const TopLevel & x);
57+}
58+namespace quicktype {
5859 inline void from_json(const json & j, TopLevel& x) {
5960 x.set_a(j.at("a").get<std::map<std::string, int64_t>>());
6061 x.set_b(j.at("b").get<std::map<std::string, int64_t>>());
Test case

test/inputs/json/priority/number-map.json

1 generated file · +4 −3
Mcplusplusdefault / quicktype.hpp+4 −3
@@ -47,9 +47,10 @@ namespace quicktype {
4747 }
4848
4949 namespace quicktype {
50- void from_json(const json & j, TopLevel & x);
51- void to_json(json & j, const TopLevel & x);
52-
50+void from_json(const json & j, TopLevel & x);
51+void to_json(json & j, const TopLevel & x);
52+}
53+namespace quicktype {
5354 inline void from_json(const json & j, TopLevel& x) {
5455 x.set_foo(j.at("foo").get<std::map<std::string, double>>());
5556 }
Test case

test/inputs/json/priority/omit-empty.json

1 generated file · +6 −5
Mcplusplusdefault / quicktype.hpp+6 −5
@@ -123,12 +123,13 @@ namespace quicktype {
123123 }
124124
125125 namespace quicktype {
126- void from_json(const json & j, Result & x);
127- void to_json(json & j, const Result & x);
128-
129- void from_json(const json & j, TopLevel & x);
130- void to_json(json & j, const TopLevel & x);
126+void from_json(const json & j, Result & x);
127+void to_json(json & j, const Result & x);
131128
129+void from_json(const json & j, TopLevel & x);
130+void to_json(json & j, const TopLevel & x);
131+}
132+namespace quicktype {
132133 inline void from_json(const json & j, Result& x) {
133134 x.set_age(j.at("age").get<int64_t>());
134135 x.set_name(get_untyped(j, "name"));
Test case

test/inputs/json/priority/php-validation.json

1 generated file · +4 −3
Mcplusplusdefault / quicktype.hpp+4 −3
@@ -67,9 +67,10 @@ namespace quicktype {
6767 }
6868
6969 namespace quicktype {
70- void from_json(const json & j, TopLevel & x);
71- void to_json(json & j, const TopLevel & x);
72-
70+void from_json(const json & j, TopLevel & x);
71+void to_json(json & j, const TopLevel & x);
72+}
73+namespace quicktype {
7374 inline void from_json(const json & j, TopLevel& x) {
7475 x.set_boolean(j.at("boolean").get<bool>());
7576 x.set_integer(j.at("integer").get<int64_t>());
Test case

test/inputs/json/priority/recursive.json

1 generated file · +36 −35
Mcplusplusdefault / quicktype.hpp+36 −35
@@ -607,57 +607,58 @@ namespace quicktype {
607607 }
608608
609609 namespace quicktype {
610- void from_json(const json & j, LinkLink & x);
611- void to_json(json & j, const LinkLink & x);
610+void from_json(const json & j, LinkLink & x);
611+void to_json(json & j, const LinkLink & x);
612612
613- void from_json(const json & j, LinkElement & x);
614- void to_json(json & j, const LinkElement & x);
613+void from_json(const json & j, LinkElement & x);
614+void to_json(json & j, const LinkElement & x);
615615
616- void from_json(const json & j, CategoryThumbnail & x);
617- void to_json(json & j, const CategoryThumbnail & x);
616+void from_json(const json & j, CategoryThumbnail & x);
617+void to_json(json & j, const CategoryThumbnail & x);
618618
619- void from_json(const json & j, Category & x);
620- void to_json(json & j, const Category & x);
619+void from_json(const json & j, Category & x);
620+void to_json(json & j, const Category & x);
621621
622- void from_json(const json & j, Eonandyear & x);
623- void to_json(json & j, const Eonandyear & x);
622+void from_json(const json & j, Eonandyear & x);
623+void to_json(json & j, const Eonandyear & x);
624624
625- void from_json(const json & j, Xmlschematype & x);
626- void to_json(json & j, const Xmlschematype & x);
625+void from_json(const json & j, Xmlschematype & x);
626+void to_json(json & j, const Xmlschematype & x);
627627
628- void from_json(const json & j, Date & x);
629- void to_json(json & j, const Date & x);
628+void from_json(const json & j, Date & x);
629+void to_json(json & j, const Date & x);
630630
631- void from_json(const json & j, Details & x);
632- void to_json(json & j, const Details & x);
631+void from_json(const json & j, Details & x);
632+void to_json(json & j, const Details & x);
633633
634- void from_json(const json & j, Currency & x);
635- void to_json(json & j, const Currency & x);
634+void from_json(const json & j, Currency & x);
635+void to_json(json & j, const Currency & x);
636636
637- void from_json(const json & j, Useraveragerating & x);
638- void to_json(json & j, const Useraveragerating & x);
637+void from_json(const json & j, Useraveragerating & x);
638+void to_json(json & j, const Useraveragerating & x);
639639
640- void from_json(const json & j, Rating & x);
641- void to_json(json & j, const Rating & x);
640+void from_json(const json & j, Rating & x);
641+void to_json(json & j, const Rating & x);
642642
643- void from_json(const json & j, Specification & x);
644- void to_json(json & j, const Specification & x);
643+void from_json(const json & j, Specification & x);
644+void to_json(json & j, const Specification & x);
645645
646- void from_json(const json & j, Format & x);
647- void to_json(json & j, const Format & x);
646+void from_json(const json & j, Format & x);
647+void to_json(json & j, const Format & x);
648648
649- void from_json(const json & j, FormatsClass & x);
650- void to_json(json & j, const FormatsClass & x);
649+void from_json(const json & j, FormatsClass & x);
650+void to_json(json & j, const FormatsClass & x);
651651
652- void from_json(const json & j, ProductProduct & x);
653- void to_json(json & j, const ProductProduct & x);
652+void from_json(const json & j, ProductProduct & x);
653+void to_json(json & j, const ProductProduct & x);
654654
655- void from_json(const json & j, ProductElement & x);
656- void to_json(json & j, const ProductElement & x);
657-
658- void from_json(const json & j, TopLevel & x);
659- void to_json(json & j, const TopLevel & x);
655+void from_json(const json & j, ProductElement & x);
656+void to_json(json & j, const ProductElement & x);
660657
658+void from_json(const json & j, TopLevel & x);
659+void to_json(json & j, const TopLevel & x);
660+}
661+namespace quicktype {
661662 inline void from_json(const json & j, LinkLink& x) {
662663 x.set_type(j.at("type").get<std::string>());
663664 x.set_url(j.at("url").get<std::string>());
Test case

test/inputs/json/priority/simple-identifiers.json

1 generated file · +4 −3
Mcplusplusdefault / quicktype.hpp+4 −3
@@ -87,9 +87,10 @@ namespace quicktype {
8787 }
8888
8989 namespace quicktype {
90- void from_json(const json & j, TopLevel & x);
91- void to_json(json & j, const TopLevel & x);
92-
90+void from_json(const json & j, TopLevel & x);
91+void to_json(json & j, const TopLevel & x);
92+}
93+namespace quicktype {
9394 inline void from_json(const json & j, TopLevel& x) {
9495 x.set_empty(j.at("").get<std::string>());
9596 x.set_null(j.at("null").get<std::string>());
Test case

test/inputs/json/priority/url.json

1 generated file · +4 −3
Mcplusplusdefault / quicktype.hpp+4 −3
@@ -52,9 +52,10 @@ namespace quicktype {
5252 }
5353
5454 namespace quicktype {
55- void from_json(const json & j, TopLevel & x);
56- void to_json(json & j, const TopLevel & x);
57-
55+void from_json(const json & j, TopLevel & x);
56+void to_json(json & j, const TopLevel & x);
57+}
58+namespace quicktype {
5859 inline void from_json(const json & j, TopLevel& x) {
5960 x.set_from_url(j.at("fromURL").get<std::string>());
6061 x.set_url(j.at("url").get<std::string>());
Test case

test/inputs/json/priority/uuids.json

1 generated file · +4 −3
Mcplusplusdefault / quicktype.hpp+4 −3
@@ -72,9 +72,10 @@ namespace quicktype {
7272 }
7373
7474 namespace quicktype {
75- void from_json(const json & j, TopLevel & x);
76- void to_json(json & j, const TopLevel & x);
77-
75+void from_json(const json & j, TopLevel & x);
76+void to_json(json & j, const TopLevel & x);
77+}
78+namespace quicktype {
7879 inline void from_json(const json & j, TopLevel& x) {
7980 x.set_boolean_value(j.at("booleanValue").get<bool>());
8081 x.set_double_value(j.at("doubleValue").get<double>());
Test case

test/inputs/json/samples/bitcoin-block.json

1 generated file · +4 −3
Mcplusplusdefault / quicktype.hpp+4 −3
@@ -67,9 +67,10 @@ namespace quicktype {
6767 }
6868
6969 namespace quicktype {
70- void from_json(const json & j, TopLevel & x);
71- void to_json(json & j, const TopLevel & x);
72-
70+void from_json(const json & j, TopLevel & x);
71+void to_json(json & j, const TopLevel & x);
72+}
73+namespace quicktype {
7374 inline void from_json(const json & j, TopLevel& x) {
7475 x.set_block_index(j.at("block_index").get<int64_t>());
7576 x.set_hash(j.at("hash").get<std::string>());
Test case

test/inputs/json/samples/getting-started.json

1 generated file · +4 −3
Mcplusplusdefault / quicktype.hpp+4 −3
@@ -52,9 +52,10 @@ namespace quicktype {
5252 }
5353
5454 namespace quicktype {
55- void from_json(const json & j, TopLevel & x);
56- void to_json(json & j, const TopLevel & x);
57-
55+void from_json(const json & j, TopLevel & x);
56+void to_json(json & j, const TopLevel & x);
57+}
58+namespace quicktype {
5859 inline void from_json(const json & j, TopLevel& x) {
5960 x.set_greeting(j.at("greeting").get<std::string>());
6061 x.set_instructions(j.at("instructions").get<std::vector<std::string>>());
Test case

test/inputs/json/samples/github-events.json

1 generated file · +38 −37
Mcplusplusdefault / quicktype.hpp+38 −37
@@ -1419,60 +1419,61 @@ namespace quicktype {
14191419 }
14201420
14211421 namespace quicktype {
1422- void from_json(const json & j, Actor & x);
1423- void to_json(json & j, const Actor & x);
1422+void from_json(const json & j, Actor & x);
1423+void to_json(json & j, const Actor & x);
14241424
1425- void from_json(const json & j, User & x);
1426- void to_json(json & j, const User & x);
1425+void from_json(const json & j, User & x);
1426+void to_json(json & j, const User & x);
14271427
1428- void from_json(const json & j, Comment & x);
1429- void to_json(json & j, const Comment & x);
1428+void from_json(const json & j, Comment & x);
1429+void to_json(json & j, const Comment & x);
14301430
1431- void from_json(const json & j, Author & x);
1432- void to_json(json & j, const Author & x);
1431+void from_json(const json & j, Author & x);
1432+void to_json(json & j, const Author & x);
14331433
1434- void from_json(const json & j, Commit & x);
1435- void to_json(json & j, const Commit & x);
1434+void from_json(const json & j, Commit & x);
1435+void to_json(json & j, const Commit & x);
14361436
1437- void from_json(const json & j, Label & x);
1438- void to_json(json & j, const Label & x);
1437+void from_json(const json & j, Label & x);
1438+void to_json(json & j, const Label & x);
14391439
1440- void from_json(const json & j, Milestone & x);
1441- void to_json(json & j, const Milestone & x);
1440+void from_json(const json & j, Milestone & x);
1441+void to_json(json & j, const Milestone & x);
14421442
1443- void from_json(const json & j, IssuePullRequest & x);
1444- void to_json(json & j, const IssuePullRequest & x);
1443+void from_json(const json & j, IssuePullRequest & x);
1444+void to_json(json & j, const IssuePullRequest & x);
14451445
1446- void from_json(const json & j, Issue & x);
1447- void to_json(json & j, const Issue & x);
1446+void from_json(const json & j, Issue & x);
1447+void to_json(json & j, const Issue & x);
14481448
1449- void from_json(const json & j, BaseRepo & x);
1450- void to_json(json & j, const BaseRepo & x);
1449+void from_json(const json & j, BaseRepo & x);
1450+void to_json(json & j, const BaseRepo & x);
14511451
1452- void from_json(const json & j, Base & x);
1453- void to_json(json & j, const Base & x);
1452+void from_json(const json & j, Base & x);
1453+void to_json(json & j, const Base & x);
14541454
1455- void from_json(const json & j, Comments & x);
1456- void to_json(json & j, const Comments & x);
1455+void from_json(const json & j, Comments & x);
1456+void to_json(json & j, const Comments & x);
14571457
1458- void from_json(const json & j, Links & x);
1459- void to_json(json & j, const Links & x);
1458+void from_json(const json & j, Links & x);
1459+void to_json(json & j, const Links & x);
14601460
1461- void from_json(const json & j, PayloadPullRequest & x);
1462- void to_json(json & j, const PayloadPullRequest & x);
1461+void from_json(const json & j, PayloadPullRequest & x);
1462+void to_json(json & j, const PayloadPullRequest & x);
14631463
1464- void from_json(const json & j, Payload & x);
1465- void to_json(json & j, const Payload & x);
1464+void from_json(const json & j, Payload & x);
1465+void to_json(json & j, const Payload & x);
14661466
1467- void from_json(const json & j, TopLevelRepo & x);
1468- void to_json(json & j, const TopLevelRepo & x);
1467+void from_json(const json & j, TopLevelRepo & x);
1468+void to_json(json & j, const TopLevelRepo & x);
14691469
1470- void from_json(const json & j, TopLevelElement & x);
1471- void to_json(json & j, const TopLevelElement & x);
1472-
1473- void from_json(const json & j, Type & x);
1474- void to_json(json & j, const Type & x);
1470+void from_json(const json & j, TopLevelElement & x);
1471+void to_json(json & j, const TopLevelElement & x);
14751472
1473+void from_json(const json & j, Type & x);
1474+void to_json(json & j, const Type & x);
1475+}
1476+namespace quicktype {
14761477 inline void from_json(const json & j, Actor& x) {
14771478 x.set_avatar_url(j.at("avatar_url").get<std::string>());
14781479 x.set_display_login(get_stack_optional<std::string>(j, "display_login"));
Test case

test/inputs/json/samples/null-safe.json

1 generated file · +8 −7
Mcplusplusdefault / quicktype.hpp+8 −7
@@ -156,15 +156,16 @@ namespace quicktype {
156156 }
157157
158158 namespace quicktype {
159- void from_json(const json & j, Address & x);
160- void to_json(json & j, const Address & x);
159+void from_json(const json & j, Address & x);
160+void to_json(json & j, const Address & x);
161161
162- void from_json(const json & j, Item & x);
163- void to_json(json & j, const Item & x);
164-
165- void from_json(const json & j, TopLevel & x);
166- void to_json(json & j, const TopLevel & x);
162+void from_json(const json & j, Item & x);
163+void to_json(json & j, const Item & x);
167164
165+void from_json(const json & j, TopLevel & x);
166+void to_json(json & j, const TopLevel & x);
167+}
168+namespace quicktype {
168169 inline void from_json(const json & j, Address& x) {
169170 x.set_city(j.at("city").get<std::string>());
170171 x.set_country(j.at("country").get<std::string>());
Test case

test/inputs/json/samples/pokedex.json

3 generated files · +36 −33
Mcplusplus-multi-sourcedefault / Generators.hpp+12 −11
@@ -19,21 +19,22 @@
1919 #include "Egg.hpp"
2020
2121 namespace quicktype {
22- void from_json(const json & j, Evolution & x);
23- void to_json(json & j, const Evolution & x);
22+void from_json(const json & j, Evolution & x);
23+void to_json(json & j, const Evolution & x);
2424
25- void from_json(const json & j, Pokemon & x);
26- void to_json(json & j, const Pokemon & x);
25+void from_json(const json & j, Pokemon & x);
26+void to_json(json & j, const Pokemon & x);
2727
28- void from_json(const json & j, TopLevel & x);
29- void to_json(json & j, const TopLevel & x);
28+void from_json(const json & j, TopLevel & x);
29+void to_json(json & j, const TopLevel & x);
3030
31- void from_json(const json & j, Egg & x);
32- void to_json(json & j, const Egg & x);
33-
34- void from_json(const json & j, Type & x);
35- void to_json(json & j, const Type & x);
31+void from_json(const json & j, Egg & x);
32+void to_json(json & j, const Egg & x);
3633
34+void from_json(const json & j, Type & x);
35+void to_json(json & j, const Type & x);
36+}
37+namespace quicktype {
3738 inline void from_json(const json & j, Evolution& x) {
3839 x.set_name(j.at("name").get<std::string>());
3940 x.set_num(j.at("num").get<std::string>());
Mcplusplusboost-true--bed8626e10e6 / quicktype.hpp+12 −11
@@ -222,21 +222,22 @@ namespace quicktype {
222222 }
223223
224224 namespace quicktype {
225- void from_json(const json & j, Evolution & x);
226- void to_json(json & j, const Evolution & x);
225+void from_json(const json & j, Evolution & x);
226+void to_json(json & j, const Evolution & x);
227227
228- void from_json(const json & j, Pokemon & x);
229- void to_json(json & j, const Pokemon & x);
228+void from_json(const json & j, Pokemon & x);
229+void to_json(json & j, const Pokemon & x);
230230
231- void from_json(const json & j, TopLevel & x);
232- void to_json(json & j, const TopLevel & x);
231+void from_json(const json & j, TopLevel & x);
232+void to_json(json & j, const TopLevel & x);
233233
234- void from_json(const json & j, Egg & x);
235- void to_json(json & j, const Egg & x);
236-
237- void from_json(const json & j, Type & x);
238- void to_json(json & j, const Type & x);
234+void from_json(const json & j, Egg & x);
235+void to_json(json & j, const Egg & x);
239236
237+void from_json(const json & j, Type & x);
238+void to_json(json & j, const Type & x);
239+}
240+namespace quicktype {
240241 inline void from_json(const json & j, Evolution& x) {
241242 x.set_name(j.at("name").get<std::string>());
242243 x.set_num(j.at("num").get<std::string>());
Mcplusplusdefault / quicktype.hpp+12 −11
@@ -221,21 +221,22 @@ namespace quicktype {
221221 }
222222
223223 namespace quicktype {
224- void from_json(const json & j, Evolution & x);
225- void to_json(json & j, const Evolution & x);
224+void from_json(const json & j, Evolution & x);
225+void to_json(json & j, const Evolution & x);
226226
227- void from_json(const json & j, Pokemon & x);
228- void to_json(json & j, const Pokemon & x);
227+void from_json(const json & j, Pokemon & x);
228+void to_json(json & j, const Pokemon & x);
229229
230- void from_json(const json & j, TopLevel & x);
231- void to_json(json & j, const TopLevel & x);
230+void from_json(const json & j, TopLevel & x);
231+void to_json(json & j, const TopLevel & x);
232232
233- void from_json(const json & j, Egg & x);
234- void to_json(json & j, const Egg & x);
235-
236- void from_json(const json & j, Type & x);
237- void to_json(json & j, const Type & x);
233+void from_json(const json & j, Egg & x);
234+void to_json(json & j, const Egg & x);
238235
236+void from_json(const json & j, Type & x);
237+void to_json(json & j, const Type & x);
238+}
239+namespace quicktype {
239240 inline void from_json(const json & j, Evolution& x) {
240241 x.set_name(j.at("name").get<std::string>());
241242 x.set_num(j.at("num").get<std::string>());
Test case

test/inputs/json/samples/reddit.json

1 generated file · +38 −37
Mcplusplusdefault / quicktype.hpp+38 −37
@@ -627,60 +627,61 @@ namespace quicktype {
627627 }
628628
629629 namespace quicktype {
630- void from_json(const json & j, MediaEmbed & x);
631- void to_json(json & j, const MediaEmbed & x);
630+void from_json(const json & j, MediaEmbed & x);
631+void to_json(json & j, const MediaEmbed & x);
632632
633- void from_json(const json & j, Source & x);
634- void to_json(json & j, const Source & x);
633+void from_json(const json & j, Source & x);
634+void to_json(json & j, const Source & x);
635635
636- void from_json(const json & j, Gif & x);
637- void to_json(json & j, const Gif & x);
636+void from_json(const json & j, Gif & x);
637+void to_json(json & j, const Gif & x);
638638
639- void from_json(const json & j, Variants & x);
640- void to_json(json & j, const Variants & x);
639+void from_json(const json & j, Variants & x);
640+void to_json(json & j, const Variants & x);
641641
642- void from_json(const json & j, Image & x);
643- void to_json(json & j, const Image & x);
642+void from_json(const json & j, Image & x);
643+void to_json(json & j, const Image & x);
644644
645- void from_json(const json & j, Preview & x);
646- void to_json(json & j, const Preview & x);
645+void from_json(const json & j, Preview & x);
646+void to_json(json & j, const Preview & x);
647647
648- void from_json(const json & j, ChildData & x);
649- void to_json(json & j, const ChildData & x);
648+void from_json(const json & j, ChildData & x);
649+void to_json(json & j, const ChildData & x);
650650
651- void from_json(const json & j, Child & x);
652- void to_json(json & j, const Child & x);
651+void from_json(const json & j, Child & x);
652+void to_json(json & j, const Child & x);
653653
654- void from_json(const json & j, TopLevelData & x);
655- void to_json(json & j, const TopLevelData & x);
654+void from_json(const json & j, TopLevelData & x);
655+void to_json(json & j, const TopLevelData & x);
656656
657- void from_json(const json & j, TopLevel & x);
658- void to_json(json & j, const TopLevel & x);
657+void from_json(const json & j, TopLevel & x);
658+void to_json(json & j, const TopLevel & x);
659659
660- void from_json(const json & j, Domain & x);
661- void to_json(json & j, const Domain & x);
660+void from_json(const json & j, Domain & x);
661+void to_json(json & j, const Domain & x);
662662
663- void from_json(const json & j, WhitelistStatus & x);
664- void to_json(json & j, const WhitelistStatus & x);
663+void from_json(const json & j, WhitelistStatus & x);
664+void to_json(json & j, const WhitelistStatus & x);
665665
666- void from_json(const json & j, PostHint & x);
667- void to_json(json & j, const PostHint & x);
666+void from_json(const json & j, PostHint & x);
667+void to_json(json & j, const PostHint & x);
668668
669- void from_json(const json & j, Subreddit & x);
670- void to_json(json & j, const Subreddit & x);
669+void from_json(const json & j, Subreddit & x);
670+void to_json(json & j, const Subreddit & x);
671671
672- void from_json(const json & j, SubredditId & x);
673- void to_json(json & j, const SubredditId & x);
672+void from_json(const json & j, SubredditId & x);
673+void to_json(json & j, const SubredditId & x);
674674
675- void from_json(const json & j, SubredditNamePrefixed & x);
676- void to_json(json & j, const SubredditNamePrefixed & x);
675+void from_json(const json & j, SubredditNamePrefixed & x);
676+void to_json(json & j, const SubredditNamePrefixed & x);
677677
678- void from_json(const json & j, SubredditType & x);
679- void to_json(json & j, const SubredditType & x);
680-
681- void from_json(const json & j, Kind & x);
682- void to_json(json & j, const Kind & x);
678+void from_json(const json & j, SubredditType & x);
679+void to_json(json & j, const SubredditType & x);
683680
681+void from_json(const json & j, Kind & x);
682+void to_json(json & j, const Kind & x);
683+}
684+namespace quicktype {
684685 inline void from_json(const json & j, MediaEmbed& x) {
685686 (void)j;
686687 (void)x;
Test case

test/inputs/json/samples/simple-object.json

1 generated file · +4 −3
Mcplusplusdefault / quicktype.hpp+4 −3
@@ -57,9 +57,10 @@ namespace quicktype {
5757 }
5858
5959 namespace quicktype {
60- void from_json(const json & j, TopLevel & x);
61- void to_json(json & j, const TopLevel & x);
62-
60+void from_json(const json & j, TopLevel & x);
61+void to_json(json & j, const TopLevel & x);
62+}
63+namespace quicktype {
6364 inline void from_json(const json & j, TopLevel& x) {
6465 x.set_date(j.at("date").get<int64_t>());
6566 x.set_title(j.at("title").get<std::string>());
Test case

test/inputs/json/samples/spotify-album.json

1 generated file · +18 −17
Mcplusplusdefault / quicktype.hpp+18 −17
@@ -355,30 +355,31 @@ namespace quicktype {
355355 }
356356
357357 namespace quicktype {
358- void from_json(const json & j, ExternalUrls & x);
359- void to_json(json & j, const ExternalUrls & x);
358+void from_json(const json & j, ExternalUrls & x);
359+void to_json(json & j, const ExternalUrls & x);
360360
361- void from_json(const json & j, Artist & x);
362- void to_json(json & j, const Artist & x);
361+void from_json(const json & j, Artist & x);
362+void to_json(json & j, const Artist & x);
363363
364- void from_json(const json & j, Copyright & x);
365- void to_json(json & j, const Copyright & x);
364+void from_json(const json & j, Copyright & x);
365+void to_json(json & j, const Copyright & x);
366366
367- void from_json(const json & j, ExternalIds & x);
368- void to_json(json & j, const ExternalIds & x);
367+void from_json(const json & j, ExternalIds & x);
368+void to_json(json & j, const ExternalIds & x);
369369
370- void from_json(const json & j, Image & x);
371- void to_json(json & j, const Image & x);
370+void from_json(const json & j, Image & x);
371+void to_json(json & j, const Image & x);
372372
373- void from_json(const json & j, Item & x);
374- void to_json(json & j, const Item & x);
373+void from_json(const json & j, Item & x);
374+void to_json(json & j, const Item & x);
375375
376- void from_json(const json & j, Tracks & x);
377- void to_json(json & j, const Tracks & x);
378-
379- void from_json(const json & j, TopLevel & x);
380- void to_json(json & j, const TopLevel & x);
376+void from_json(const json & j, Tracks & x);
377+void to_json(json & j, const Tracks & x);
381378
379+void from_json(const json & j, TopLevel & x);
380+void to_json(json & j, const TopLevel & x);
381+}
382+namespace quicktype {
382383 inline void from_json(const json & j, ExternalUrls& x) {
383384 x.set_spotify(j.at("spotify").get<std::string>());
384385 }
Test case

test/inputs/json/samples/us-avg-temperatures.json

1 generated file · +8 −7
Mcplusplusdefault / quicktype.hpp+8 −7
@@ -100,15 +100,16 @@ namespace quicktype {
100100 }
101101
102102 namespace quicktype {
103- void from_json(const json & j, Datum & x);
104- void to_json(json & j, const Datum & x);
103+void from_json(const json & j, Datum & x);
104+void to_json(json & j, const Datum & x);
105105
106- void from_json(const json & j, Description & x);
107- void to_json(json & j, const Description & x);
108-
109- void from_json(const json & j, TopLevel & x);
110- void to_json(json & j, const TopLevel & x);
106+void from_json(const json & j, Description & x);
107+void to_json(json & j, const Description & x);
111108
109+void from_json(const json & j, TopLevel & x);
110+void to_json(json & j, const TopLevel & x);
111+}
112+namespace quicktype {
112113 inline void from_json(const json & j, Datum& x) {
113114 x.set_anomaly(j.at("anomaly").get<std::string>());
114115 x.set_value(j.at("value").get<std::string>());
Test case

test/inputs/json/samples/us-senators.json

1 generated file · +34 −33
Mcplusplusdefault / quicktype.hpp+34 −33
@@ -398,54 +398,55 @@ namespace quicktype {
398398 }
399399
400400 namespace quicktype {
401- void from_json(const json & j, Meta & x);
402- void to_json(json & j, const Meta & x);
401+void from_json(const json & j, Meta & x);
402+void to_json(json & j, const Meta & x);
403403
404- void from_json(const json & j, Extra & x);
405- void to_json(json & j, const Extra & x);
404+void from_json(const json & j, Extra & x);
405+void to_json(json & j, const Extra & x);
406406
407- void from_json(const json & j, Person & x);
408- void to_json(json & j, const Person & x);
407+void from_json(const json & j, Person & x);
408+void to_json(json & j, const Person & x);
409409
410- void from_json(const json & j, Object & x);
411- void to_json(json & j, const Object & x);
410+void from_json(const json & j, Object & x);
411+void to_json(json & j, const Object & x);
412412
413- void from_json(const json & j, TopLevel & x);
414- void to_json(json & j, const TopLevel & x);
413+void from_json(const json & j, TopLevel & x);
414+void to_json(json & j, const TopLevel & x);
415415
416- void from_json(const json & j, Party & x);
417- void to_json(json & j, const Party & x);
416+void from_json(const json & j, Party & x);
417+void to_json(json & j, const Party & x);
418418
419- void from_json(const json & j, Gender & x);
420- void to_json(json & j, const Gender & x);
419+void from_json(const json & j, Gender & x);
420+void to_json(json & j, const Gender & x);
421421
422- void from_json(const json & j, GenderLabel & x);
423- void to_json(json & j, const GenderLabel & x);
422+void from_json(const json & j, GenderLabel & x);
423+void to_json(json & j, const GenderLabel & x);
424424
425- void from_json(const json & j, Namemod & x);
426- void to_json(json & j, const Namemod & x);
425+void from_json(const json & j, Namemod & x);
426+void to_json(json & j, const Namemod & x);
427427
428- void from_json(const json & j, RoleType & x);
429- void to_json(json & j, const RoleType & x);
428+void from_json(const json & j, RoleType & x);
429+void to_json(json & j, const RoleType & x);
430430
431- void from_json(const json & j, RoleTypeLabel & x);
432- void to_json(json & j, const RoleTypeLabel & x);
431+void from_json(const json & j, RoleTypeLabel & x);
432+void to_json(json & j, const RoleTypeLabel & x);
433433
434- void from_json(const json & j, SenatorClass & x);
435- void to_json(json & j, const SenatorClass & x);
434+void from_json(const json & j, SenatorClass & x);
435+void to_json(json & j, const SenatorClass & x);
436436
437- void from_json(const json & j, SenatorClassLabel & x);
438- void to_json(json & j, const SenatorClassLabel & x);
437+void from_json(const json & j, SenatorClassLabel & x);
438+void to_json(json & j, const SenatorClassLabel & x);
439439
440- void from_json(const json & j, SenatorRank & x);
441- void to_json(json & j, const SenatorRank & x);
440+void from_json(const json & j, SenatorRank & x);
441+void to_json(json & j, const SenatorRank & x);
442442
443- void from_json(const json & j, SenatorRankLabel & x);
444- void to_json(json & j, const SenatorRankLabel & x);
445-
446- void from_json(const json & j, Title & x);
447- void to_json(json & j, const Title & x);
443+void from_json(const json & j, SenatorRankLabel & x);
444+void to_json(json & j, const SenatorRankLabel & x);
448445
446+void from_json(const json & j, Title & x);
447+void to_json(json & j, const Title & x);
448+}
449+namespace quicktype {
449450 inline void from_json(const json & j, Meta& x) {
450451 x.set_limit(j.at("limit").get<int64_t>());
451452 x.set_offset(j.at("offset").get<int64_t>());
Test case

test/inputs/schema/all-of-additional-properties-false.schema

1 generated file · +8 −7
Mschema-cplusplusdefault / quicktype.hpp+8 −7
@@ -123,15 +123,16 @@ namespace quicktype {
123123 }
124124
125125 namespace quicktype {
126- void from_json(const json & j, TopLevel & x);
127- void to_json(json & j, const TopLevel & x);
126+void from_json(const json & j, TopLevel & x);
127+void to_json(json & j, const TopLevel & x);
128128
129- void from_json(const json & j, Frequency & x);
130- void to_json(json & j, const Frequency & x);
131-
132- void from_json(const json & j, Type & x);
133- void to_json(json & j, const Type & x);
129+void from_json(const json & j, Frequency & x);
130+void to_json(json & j, const Frequency & x);
134131
132+void from_json(const json & j, Type & x);
133+void to_json(json & j, const Type & x);
134+}
135+namespace quicktype {
135136 inline void from_json(const json & j, TopLevel& x) {
136137 x.set_amount(j.at("amount").get<double>());
137138 x.set_frequency(j.at("frequency").get<Frequency>());
Test case

test/inputs/schema/any.schema

1 generated file · +4 −3
Mschema-cplusplusdefault / quicktype.hpp+4 −3
@@ -52,9 +52,10 @@ namespace quicktype {
5252 }
5353
5454 namespace quicktype {
55- void from_json(const json & j, TopLevel & x);
56- void to_json(json & j, const TopLevel & x);
57-
55+void from_json(const json & j, TopLevel & x);
56+void to_json(json & j, const TopLevel & x);
57+}
58+namespace quicktype {
5859 inline void from_json(const json & j, TopLevel& x) {
5960 x.set_foo(get_untyped(j, "foo"));
6061 x.set_values(j.at("values").get<std::map<std::string, nlohmann::json>>());
Test case

test/inputs/schema/boolean-subschema.schema

1 generated file · +4 −3
Mschema-cplusplusdefault / quicktype.hpp+4 −3
@@ -119,9 +119,10 @@ namespace quicktype {
119119 }
120120
121121 namespace quicktype {
122- void from_json(const json & j, TopLevel & x);
123- void to_json(json & j, const TopLevel & x);
124-
122+void from_json(const json & j, TopLevel & x);
123+void to_json(json & j, const TopLevel & x);
124+}
125+namespace quicktype {
125126 inline void from_json(const json & j, TopLevel& x) {
126127 x.set_disallowed(get_untyped(j, "disallowed"));
127128 x.set_empty(j.at("empty").get<std::vector<nlohmann::json>>());
Test case

test/inputs/schema/camelCase.schema

1 generated file · +4 −3
Mschema-cplusplusdefault / quicktype.hpp+4 −3
@@ -109,9 +109,10 @@ namespace quicktype {
109109 }
110110
111111 namespace quicktype {
112- void from_json(const json & j, TopLevel & x);
113- void to_json(json & j, const TopLevel & x);
114-
112+void from_json(const json & j, TopLevel & x);
113+void to_json(json & j, const TopLevel & x);
114+}
115+namespace quicktype {
115116 inline void from_json(const json & j, TopLevel& x) {
116117 x.set_my_property(get_stack_optional<std::string>(j, "myProperty"));
117118 x.set_second_property(get_stack_optional<std::string>(j, "secondProperty"));
Test case

test/inputs/schema/comment-injection-enum-nested-comment.schema

1 generated file · +6 −5
Mschema-cplusplusdefault / quicktype.hpp+6 −5
@@ -61,12 +61,13 @@ namespace quicktype {
6161 }
6262
6363 namespace quicktype {
64- void from_json(const json & j, TopLevel & x);
65- void to_json(json & j, const TopLevel & x);
66-
67- void from_json(const json & j, Kind & x);
68- void to_json(json & j, const Kind & x);
64+void from_json(const json & j, TopLevel & x);
65+void to_json(json & j, const TopLevel & x);
6966
67+void from_json(const json & j, Kind & x);
68+void to_json(json & j, const Kind & x);
69+}
70+namespace quicktype {
7071 inline void from_json(const json & j, TopLevel& x) {
7172 x.set_kind(j.at("kind").get<Kind>());
7273 }
Test case

test/inputs/schema/comment-injection-enum.schema

1 generated file · +6 −5
Mschema-cplusplusdefault / quicktype.hpp+6 −5
@@ -67,12 +67,13 @@ namespace quicktype {
6767 }
6868
6969 namespace quicktype {
70- void from_json(const json & j, TopLevel & x);
71- void to_json(json & j, const TopLevel & x);
72-
73- void from_json(const json & j, Kind & x);
74- void to_json(json & j, const Kind & x);
70+void from_json(const json & j, TopLevel & x);
71+void to_json(json & j, const TopLevel & x);
7572
73+void from_json(const json & j, Kind & x);
74+void to_json(json & j, const Kind & x);
75+}
76+namespace quicktype {
7677 inline void from_json(const json & j, TopLevel& x) {
7778 x.set_kind(j.at("kind").get<Kind>());
7879 }
Test case

test/inputs/schema/comment-injection-nested-comment.schema

1 generated file · +4 −3
Mschema-cplusplusdefault / quicktype.hpp+4 −3
@@ -59,9 +59,10 @@ namespace quicktype {
5959 }
6060
6161 namespace quicktype {
62- void from_json(const json & j, TopLevel & x);
63- void to_json(json & j, const TopLevel & x);
64-
62+void from_json(const json & j, TopLevel & x);
63+void to_json(json & j, const TopLevel & x);
64+}
65+namespace quicktype {
6566 inline void from_json(const json & j, TopLevel& x) {
6667 x.set_value(j.at("value").get<std::string>());
6768 }
Test case

test/inputs/schema/comment-injection.schema

1 generated file · +4 −3
Mschema-cplusplusdefault / quicktype.hpp+4 −3
@@ -156,9 +156,10 @@ namespace quicktype {
156156 }
157157
158158 namespace quicktype {
159- void from_json(const json & j, TopLevel & x);
160- void to_json(json & j, const TopLevel & x);
161-
159+void from_json(const json & j, TopLevel & x);
160+void to_json(json & j, const TopLevel & x);
161+}
162+namespace quicktype {
162163 inline void from_json(const json & j, TopLevel& x) {
163164 x.set_trailing_backslash(get_stack_optional<std::string>(j, "trailingBackslash"));
164165 x.set_trailing_quote(get_stack_optional<std::string>(j, "trailingQuote"));
Test case

test/inputs/schema/const-non-string.schema

1 generated file · +6 −5
Mschema-cplusplusdefault / quicktype.hpp+6 −5
@@ -69,12 +69,13 @@ namespace quicktype {
6969 }
7070
7171 namespace quicktype {
72- void from_json(const json & j, TopLevel & x);
73- void to_json(json & j, const TopLevel & x);
74-
75- void from_json(const json & j, Kind & x);
76- void to_json(json & j, const Kind & x);
72+void from_json(const json & j, TopLevel & x);
73+void to_json(json & j, const TopLevel & x);
7774
75+void from_json(const json & j, Kind & x);
76+void to_json(json & j, const Kind & x);
77+}
78+namespace quicktype {
7879 inline void from_json(const json & j, TopLevel& x) {
7980 x.set_amount(j.at("amount").get<int64_t>());
8081 x.set_enabled(j.at("enabled").get<bool>());
Test case

test/inputs/schema/cut-enum.schema

1 generated file · +4 −3
Mschema-cplusplusdefault / quicktype.hpp+4 −3
@@ -47,9 +47,10 @@ namespace quicktype {
4747 }
4848
4949 namespace quicktype {
50- void from_json(const json & j, TopLevel & x);
51- void to_json(json & j, const TopLevel & x);
52-
50+void from_json(const json & j, TopLevel & x);
51+void to_json(json & j, const TopLevel & x);
52+}
53+namespace quicktype {
5354 inline void from_json(const json & j, TopLevel& x) {
5455 x.set_foo(j.at("foo").get<int64_t>());
5556 }
Test case

test/inputs/schema/date-time-or-string.schema

1 generated file · +4 −3
Mschema-cplusplusdefault / quicktype.hpp+4 −3
@@ -52,9 +52,10 @@ namespace quicktype {
5252 }
5353
5454 namespace quicktype {
55- void from_json(const json & j, TopLevel & x);
56- void to_json(json & j, const TopLevel & x);
57-
55+void from_json(const json & j, TopLevel & x);
56+void to_json(json & j, const TopLevel & x);
57+}
58+namespace quicktype {
5859 inline void from_json(const json & j, TopLevel& x) {
5960 x.set_bar(j.at("bar").get<std::string>());
6061 x.set_foo(j.at("foo").get<std::string>());
Test case

test/inputs/schema/default-value.schema

1 generated file · +4 −3
Mschema-cplusplusdefault / quicktype.hpp+4 −3
@@ -50,9 +50,10 @@ namespace quicktype {
5050 }
5151
5252 namespace quicktype {
53- void from_json(const json & j, TopLevel & x);
54- void to_json(json & j, const TopLevel & x);
55-
53+void from_json(const json & j, TopLevel & x);
54+void to_json(json & j, const TopLevel & x);
55+}
56+namespace quicktype {
5657 inline void from_json(const json & j, TopLevel& x) {
5758 x.set_id(j.at("id").get<int64_t>());
5859 }
Test case

test/inputs/schema/description-with-double-quotes.schema

1 generated file · +4 −3
Mschema-cplusplusdefault / quicktype.hpp+4 −3
@@ -107,9 +107,10 @@ namespace quicktype {
107107 }
108108
109109 namespace quicktype {
110- void from_json(const json & j, TopLevel & x);
111- void to_json(json & j, const TopLevel & x);
112-
110+void from_json(const json & j, TopLevel & x);
111+void to_json(json & j, const TopLevel & x);
112+}
113+namespace quicktype {
113114 inline void from_json(const json & j, TopLevel& x) {
114115 x.set_foo(get_stack_optional<bool>(j, "foo"));
115116 }
Test case

test/inputs/schema/enum-large.schema

1 generated file · +8 −7
Mschema-cplusplusdefault / quicktype.hpp+8 −7
@@ -57,15 +57,16 @@ namespace quicktype {
5757 }
5858
5959 namespace quicktype {
60- void from_json(const json & j, TopLevel & x);
61- void to_json(json & j, const TopLevel & x);
60+void from_json(const json & j, TopLevel & x);
61+void to_json(json & j, const TopLevel & x);
6262
63- void from_json(const json & j, Callsign & x);
64- void to_json(json & j, const Callsign & x);
65-
66- void from_json(const json & j, Priority & x);
67- void to_json(json & j, const Priority & x);
63+void from_json(const json & j, Callsign & x);
64+void to_json(json & j, const Callsign & x);
6865
66+void from_json(const json & j, Priority & x);
67+void to_json(json & j, const Priority & x);
68+}
69+namespace quicktype {
6970 inline void from_json(const json & j, TopLevel& x) {
7071 x.set_callsign(j.at("callsign").get<Callsign>());
7172 x.set_priority(j.at("priority").get<Priority>());
Test case

test/inputs/schema/enum-with-null.schema

1 generated file · +6 −5
Mschema-cplusplusdefault / quicktype.hpp+6 −5
@@ -104,12 +104,13 @@ namespace quicktype {
104104 }
105105
106106 namespace quicktype {
107- void from_json(const json & j, TopLevel & x);
108- void to_json(json & j, const TopLevel & x);
109-
110- void from_json(const json & j, Enum & x);
111- void to_json(json & j, const Enum & x);
107+void from_json(const json & j, TopLevel & x);
108+void to_json(json & j, const TopLevel & x);
112109
110+void from_json(const json & j, Enum & x);
111+void to_json(json & j, const Enum & x);
112+}
113+namespace quicktype {
113114 inline void from_json(const json & j, TopLevel& x) {
114115 x.set_top_level_enum(get_stack_optional<Enum>(j, "enum"));
115116 }
Test case

test/inputs/schema/enum-with-values.schema

1 generated file · +6 −5
Mschema-cplusplusdefault / quicktype.hpp+6 −5
@@ -49,12 +49,13 @@ namespace quicktype {
4949 }
5050
5151 namespace quicktype {
52- void from_json(const json & j, TopLevel & x);
53- void to_json(json & j, const TopLevel & x);
54-
55- void from_json(const json & j, Weekdays & x);
56- void to_json(json & j, const Weekdays & x);
52+void from_json(const json & j, TopLevel & x);
53+void to_json(json & j, const TopLevel & x);
5754
55+void from_json(const json & j, Weekdays & x);
56+void to_json(json & j, const Weekdays & x);
57+}
58+namespace quicktype {
5859 inline void from_json(const json & j, TopLevel& x) {
5960 x.set_weekdays(j.at("weekdays").get<Weekdays>());
6061 }
Test case

test/inputs/schema/go-schema-pattern-properties.schema

1 generated file · +4 −3
Mschema-cplusplusdefault / quicktype.hpp+4 −3
@@ -47,9 +47,10 @@ namespace quicktype {
4747 }
4848
4949 namespace quicktype {
50- void from_json(const json & j, TopLevel & x);
51- void to_json(json & j, const TopLevel & x);
52-
50+void from_json(const json & j, TopLevel & x);
51+void to_json(json & j, const TopLevel & x);
52+}
53+namespace quicktype {
5354 inline void from_json(const json & j, TopLevel& x) {
5455 x.set_map(j.at("map").get<std::map<std::string, int64_t>>());
5556 }
Test case

test/inputs/schema/haskell-enum-forbidden.schema

1 generated file · +6 −5
Mschema-cplusplusdefault / quicktype.hpp+6 −5
@@ -49,12 +49,13 @@ namespace quicktype {
4949 }
5050
5151 namespace quicktype {
52- void from_json(const json & j, TopLevel & x);
53- void to_json(json & j, const TopLevel & x);
54-
55- void from_json(const json & j, Health & x);
56- void to_json(json & j, const Health & x);
52+void from_json(const json & j, TopLevel & x);
53+void to_json(json & j, const TopLevel & x);
5754
55+void from_json(const json & j, Health & x);
56+void to_json(json & j, const Health & x);
57+}
58+namespace quicktype {
5859 inline void from_json(const json & j, TopLevel& x) {
5960 x.set_health(j.at("health").get<Health>());
6061 }
Test case

test/inputs/schema/id-no-address.schema

1 generated file · +4 −3
Mschema-cplusplusdefault / quicktype.hpp+4 −3
@@ -47,9 +47,10 @@ namespace quicktype {
4747 }
4848
4949 namespace quicktype {
50- void from_json(const json & j, TopLevel & x);
51- void to_json(json & j, const TopLevel & x);
52-
50+void from_json(const json & j, TopLevel & x);
51+void to_json(json & j, const TopLevel & x);
52+}
53+namespace quicktype {
5354 inline void from_json(const json & j, TopLevel& x) {
5455 x.set_item(j.at("item").get<int64_t>());
5556 }
Test case

test/inputs/schema/id-root.schema

1 generated file · +4 −3
Mschema-cplusplusdefault / quicktype.hpp+4 −3
@@ -47,9 +47,10 @@ namespace quicktype {
4747 }
4848
4949 namespace quicktype {
50- void from_json(const json & j, TopLevel & x);
51- void to_json(json & j, const TopLevel & x);
52-
50+void from_json(const json & j, TopLevel & x);
51+void to_json(json & j, const TopLevel & x);
52+}
53+namespace quicktype {
5354 inline void from_json(const json & j, TopLevel& x) {
5455 x.set_bar(j.at("bar").get<int64_t>());
5556 }
Test case

test/inputs/schema/ie-suffix-singularization.schema

1 generated file · +6 −5
Mschema-cplusplusdefault / quicktype.hpp+6 −5
@@ -66,12 +66,13 @@ namespace quicktype {
6666 }
6767
6868 namespace quicktype {
69- void from_json(const json & j, Cookie & x);
70- void to_json(json & j, const Cookie & x);
71-
72- void from_json(const json & j, TopLevel & x);
73- void to_json(json & j, const TopLevel & x);
69+void from_json(const json & j, Cookie & x);
70+void to_json(json & j, const Cookie & x);
7471
72+void from_json(const json & j, TopLevel & x);
73+void to_json(json & j, const TopLevel & x);
74+}
75+namespace quicktype {
7576 inline void from_json(const json & j, Cookie& x) {
7677 x.set_name(j.at("name").get<std::string>());
7778 x.set_value(j.at("value").get<std::string>());
Test case

test/inputs/schema/implicit-all-of.schema

1 generated file · +4 −3
Mschema-cplusplusdefault / quicktype.hpp+4 −3
@@ -57,9 +57,10 @@ namespace quicktype {
5757 }
5858
5959 namespace quicktype {
60- void from_json(const json & j, TopLevel & x);
61- void to_json(json & j, const TopLevel & x);
62-
60+void from_json(const json & j, TopLevel & x);
61+void to_json(json & j, const TopLevel & x);
62+}
63+namespace quicktype {
6364 inline void from_json(const json & j, TopLevel& x) {
6465 x.set_foo(j.at("foo").get<int64_t>());
6566 x.set_bar(j.at("bar").get<bool>());
Test case

test/inputs/schema/implicit-one-of.schema

1 generated file · +4 −3
Mschema-cplusplusdefault / quicktype.hpp+4 −3
@@ -114,9 +114,10 @@ namespace quicktype {
114114 }
115115
116116 namespace quicktype {
117- void from_json(const json & j, TopLevel & x);
118- void to_json(json & j, const TopLevel & x);
119-
117+void from_json(const json & j, TopLevel & x);
118+void to_json(json & j, const TopLevel & x);
119+}
120+namespace quicktype {
120121 inline void from_json(const json & j, TopLevel& x) {
121122 x.set_foo(j.at("foo").get<int64_t>());
122123 x.set_bar(get_stack_optional<bool>(j, "bar"));
Test case

test/inputs/schema/integer-type.schema

1 generated file · +4 −3
Mschema-cplusplusdefault / quicktype.hpp+4 −3
@@ -235,9 +235,10 @@ namespace quicktype {
235235 }
236236
237237 namespace quicktype {
238- void from_json(const json & j, TopLevel & x);
239- void to_json(json & j, const TopLevel & x);
240-
238+void from_json(const json & j, TopLevel & x);
239+void to_json(json & j, const TopLevel & x);
240+}
241+namespace quicktype {
241242 inline void from_json(const json & j, TopLevel& x) {
242243 x.set_above_i32_max(j.at("above_i32_max").get<int64_t>());
243244 x.set_below_i32_min(j.at("below_i32_min").get<int64_t>());
Test case

test/inputs/schema/intersection-nested.schema

1 generated file · +4 −3
Mschema-cplusplusdefault / quicktype.hpp+4 −3
@@ -104,9 +104,10 @@ namespace quicktype {
104104 }
105105
106106 namespace quicktype {
107- void from_json(const json & j, TopLevel & x);
108- void to_json(json & j, const TopLevel & x);
109-
107+void from_json(const json & j, TopLevel & x);
108+void to_json(json & j, const TopLevel & x);
109+}
110+namespace quicktype {
110111 inline void from_json(const json & j, TopLevel& x) {
111112 x.set_intersection(get_stack_optional<double>(j, "intersection"));
112113 }
Test case

test/inputs/schema/intersection.schema

1 generated file · +6 −5
Mschema-cplusplusdefault / quicktype.hpp+6 −5
@@ -123,12 +123,13 @@ namespace quicktype {
123123 }
124124
125125 namespace quicktype {
126- void from_json(const json & j, Intersection & x);
127- void to_json(json & j, const Intersection & x);
128-
129- void from_json(const json & j, TopLevel & x);
130- void to_json(json & j, const TopLevel & x);
126+void from_json(const json & j, Intersection & x);
127+void to_json(json & j, const Intersection & x);
131128
129+void from_json(const json & j, TopLevel & x);
130+void to_json(json & j, const TopLevel & x);
131+}
132+namespace quicktype {
132133 inline void from_json(const json & j, Intersection& x) {
133134 x.set_foo(j.at("foo").get<double>());
134135 x.set_bar(get_stack_optional<std::string>(j, "bar"));
Test case

test/inputs/schema/keyword-enum.schema

1 generated file · +6 −5
Mschema-cplusplusdefault / quicktype.hpp+6 −5
@@ -107,12 +107,13 @@ namespace quicktype {
107107 }
108108
109109 namespace quicktype {
110- void from_json(const json & j, TopLevel & x);
111- void to_json(json & j, const TopLevel & x);
112-
113- void from_json(const json & j, Enum & x);
114- void to_json(json & j, const Enum & x);
110+void from_json(const json & j, TopLevel & x);
111+void to_json(json & j, const TopLevel & x);
115112
113+void from_json(const json & j, Enum & x);
114+void to_json(json & j, const Enum & x);
115+}
116+namespace quicktype {
116117 inline void from_json(const json & j, TopLevel& x) {
117118 x.set_top_level_enum(get_stack_optional<Enum>(j, "enum"));
118119 }
Test case

test/inputs/schema/light.schema

1 generated file · +6 −5
Mschema-cplusplusdefault / quicktype.hpp+6 −5
@@ -71,12 +71,13 @@ namespace quicktype {
7171 }
7272
7373 namespace quicktype {
74- void from_json(const json & j, LightParams & x);
75- void to_json(json & j, const LightParams & x);
76-
77- void from_json(const json & j, TopLevel & x);
78- void to_json(json & j, const TopLevel & x);
74+void from_json(const json & j, LightParams & x);
75+void to_json(json & j, const LightParams & x);
7976
77+void from_json(const json & j, TopLevel & x);
78+void to_json(json & j, const TopLevel & x);
79+}
80+namespace quicktype {
8081 inline void from_json(const json & j, LightParams& x) {
8182 x.set_app_id(j.at("app_id").get<std::string>());
8283 x.set_outlet_id(j.at("outlet_id").get<std::string>());
Test case

test/inputs/schema/list.schema

1 generated file · +4 −3
Mschema-cplusplusdefault / quicktype.hpp+4 −3
@@ -107,9 +107,10 @@ namespace quicktype {
107107 }
108108
109109 namespace quicktype {
110- void from_json(const json & j, TopLevel & x);
111- void to_json(json & j, const TopLevel & x);
112-
110+void from_json(const json & j, TopLevel & x);
111+void to_json(json & j, const TopLevel & x);
112+}
113+namespace quicktype {
113114 inline void from_json(const json & j, TopLevel& x) {
114115 x.set_next(get_heap_optional<TopLevel>(j, "next"));
115116 }
Test case

test/inputs/schema/minmax-integer.schema

1 generated file · +4 −3
Mschema-cplusplusdefault / quicktype.hpp+4 −3
@@ -226,9 +226,10 @@ namespace quicktype {
226226 }
227227
228228 namespace quicktype {
229- void from_json(const json & j, TopLevel & x);
230- void to_json(json & j, const TopLevel & x);
231-
229+void from_json(const json & j, TopLevel & x);
230+void to_json(json & j, const TopLevel & x);
231+}
232+namespace quicktype {
232233 inline void from_json(const json & j, TopLevel& x) {
233234 x.set_free(j.at("free").get<int64_t>());
234235 x.set_intersection(j.at("intersection").get<int64_t>());
Test case

test/inputs/schema/minmax.schema

1 generated file · +4 −3
Mschema-cplusplusdefault / quicktype.hpp+4 −3
@@ -226,9 +226,10 @@ namespace quicktype {
226226 }
227227
228228 namespace quicktype {
229- void from_json(const json & j, TopLevel & x);
230- void to_json(json & j, const TopLevel & x);
231-
229+void from_json(const json & j, TopLevel & x);
230+void to_json(json & j, const TopLevel & x);
231+}
232+namespace quicktype {
232233 inline void from_json(const json & j, TopLevel& x) {
233234 x.set_free(j.at("free").get<double>());
234235 x.set_intersection(j.at("intersection").get<double>());
Test case

test/inputs/schema/non-standard-ref.schema

1 generated file · +4 −3
Mschema-cplusplusdefault / quicktype.hpp+4 −3
@@ -57,9 +57,10 @@ namespace quicktype {
5757 }
5858
5959 namespace quicktype {
60- void from_json(const json & j, TopLevel & x);
61- void to_json(json & j, const TopLevel & x);
62-
60+void from_json(const json & j, TopLevel & x);
61+void to_json(json & j, const TopLevel & x);
62+}
63+namespace quicktype {
6364 inline void from_json(const json & j, TopLevel& x) {
6465 x.set_bar(j.at("bar").get<int64_t>());
6566 x.set_foo(j.at("foo").get<int64_t>());
Test case

test/inputs/schema/nullable-optional-one-of.schema

1 generated file · +6 −5
Mschema-cplusplusdefault / quicktype.hpp+6 −5
@@ -110,12 +110,13 @@ namespace quicktype {
110110 }
111111
112112 namespace quicktype {
113- void from_json(const json & j, TopLevel & x);
114- void to_json(json & j, const TopLevel & x);
115-
116- void from_json(const json & j, Kind & x);
117- void to_json(json & j, const Kind & x);
113+void from_json(const json & j, TopLevel & x);
114+void to_json(json & j, const TopLevel & x);
118115
116+void from_json(const json & j, Kind & x);
117+void to_json(json & j, const Kind & x);
118+}
119+namespace quicktype {
119120 inline void from_json(const json & j, TopLevel& x) {
120121 x.set_b(get_stack_optional<std::string>(j, "b"));
121122 x.set_kind(j.at("kind").get<Kind>());
Test case

test/inputs/schema/object-type-required.schema

1 generated file · +4 −3
Mschema-cplusplusdefault / quicktype.hpp+4 −3
@@ -109,9 +109,10 @@ namespace quicktype {
109109 }
110110
111111 namespace quicktype {
112- void from_json(const json & j, TopLevel & x);
113- void to_json(json & j, const TopLevel & x);
114-
112+void from_json(const json & j, TopLevel & x);
113+void to_json(json & j, const TopLevel & x);
114+}
115+namespace quicktype {
115116 inline void from_json(const json & j, TopLevel& x) {
116117 x.set_foo(j.at("foo").get<std::string>());
117118 x.set_bar(get_stack_optional<std::string>(j, "bar"));
Test case

test/inputs/schema/optional-any.schema

2 generated files · +8 −6
Mschema-cplusplusdefault / quicktype.hpp+4 −3
@@ -109,9 +109,10 @@ namespace quicktype {
109109 }
110110
111111 namespace quicktype {
112- void from_json(const json & j, TopLevel & x);
113- void to_json(json & j, const TopLevel & x);
114-
112+void from_json(const json & j, TopLevel & x);
113+void to_json(json & j, const TopLevel & x);
114+}
115+namespace quicktype {
115116 inline void from_json(const json & j, TopLevel& x) {
116117 x.set_bar(j.at("bar").get<bool>());
117118 x.set_foo(get_untyped(j, "foo"));
Mschema-cplusplushide-null-optional-true--b100cdb5877d / quicktype.hpp+4 −3
@@ -109,9 +109,10 @@ namespace quicktype {
109109 }
110110
111111 namespace quicktype {
112- void from_json(const json & j, TopLevel & x);
113- void to_json(json & j, const TopLevel & x);
114-
112+void from_json(const json & j, TopLevel & x);
113+void to_json(json & j, const TopLevel & x);
114+}
115+namespace quicktype {
115116 inline void from_json(const json & j, TopLevel& x) {
116117 x.set_bar(j.at("bar").get<bool>());
117118 x.set_foo(get_untyped(j, "foo"));
Test case

test/inputs/schema/optional-const-ref.schema

1 generated file · +6 −5
Mschema-cplusplusdefault / quicktype.hpp+6 −5
@@ -295,12 +295,13 @@ namespace quicktype {
295295 }
296296
297297 namespace quicktype {
298- void from_json(const json & j, Coordinate & x);
299- void to_json(json & j, const Coordinate & x);
300-
301- void from_json(const json & j, TopLevel & x);
302- void to_json(json & j, const TopLevel & x);
298+void from_json(const json & j, Coordinate & x);
299+void to_json(json & j, const Coordinate & x);
303300
301+void from_json(const json & j, TopLevel & x);
302+void to_json(json & j, const TopLevel & x);
303+}
304+namespace quicktype {
304305 inline void from_json(const json & j, Coordinate& x) {
305306 x.set_latitude(j.at("latitude").get<double>());
306307 x.set_longitude(j.at("longitude").get<double>());
Test case

test/inputs/schema/optional-constraints.schema

1 generated file · +4 −3
Mschema-cplusplusdefault / quicktype.hpp+4 −3
@@ -266,9 +266,10 @@ namespace quicktype {
266266 }
267267
268268 namespace quicktype {
269- void from_json(const json & j, TopLevel & x);
270- void to_json(json & j, const TopLevel & x);
271-
269+void from_json(const json & j, TopLevel & x);
270+void to_json(json & j, const TopLevel & x);
271+}
272+namespace quicktype {
272273 inline void from_json(const json & j, TopLevel& x) {
273274 x.set_opt_double(get_stack_optional<double>(j, "optDouble"));
274275 x.set_opt_int(get_stack_optional<int64_t>(j, "optInt"));
Test case

test/inputs/schema/optional-date-time.schema

1 generated file · +4 −3
Mschema-cplusplusdefault / quicktype.hpp+4 −3
@@ -129,9 +129,10 @@ namespace quicktype {
129129 }
130130
131131 namespace quicktype {
132- void from_json(const json & j, TopLevel & x);
133- void to_json(json & j, const TopLevel & x);
134-
132+void from_json(const json & j, TopLevel & x);
133+void to_json(json & j, const TopLevel & x);
134+}
135+namespace quicktype {
135136 inline void from_json(const json & j, TopLevel& x) {
136137 x.set_optional_date(get_stack_optional<std::string>(j, "optional-date"));
137138 x.set_optional_date_time(get_stack_optional<std::string>(j, "optional-date-time"));
Test case

test/inputs/schema/optional-enum.schema

1 generated file · +6 −5
Mschema-cplusplusdefault / quicktype.hpp+6 −5
@@ -111,12 +111,13 @@ namespace quicktype {
111111 }
112112
113113 namespace quicktype {
114- void from_json(const json & j, TopLevel & x);
115- void to_json(json & j, const TopLevel & x);
116-
117- void from_json(const json & j, Shortcut & x);
118- void to_json(json & j, const Shortcut & x);
114+void from_json(const json & j, TopLevel & x);
115+void to_json(json & j, const TopLevel & x);
119116
117+void from_json(const json & j, Shortcut & x);
118+void to_json(json & j, const Shortcut & x);
119+}
120+namespace quicktype {
120121 inline void from_json(const json & j, TopLevel& x) {
121122 x.set_name(j.at("name").get<std::string>());
122123 x.set_shortcut(get_stack_optional<Shortcut>(j, "shortcut"));
Test case

test/inputs/schema/pattern.schema

1 generated file · +4 −3
Mschema-cplusplusdefault / quicktype.hpp+4 −3
@@ -195,9 +195,10 @@ namespace quicktype {
195195 }
196196
197197 namespace quicktype {
198- void from_json(const json & j, TopLevel & x);
199- void to_json(json & j, const TopLevel & x);
200-
198+void from_json(const json & j, TopLevel & x);
199+void to_json(json & j, const TopLevel & x);
200+}
201+namespace quicktype {
201202 inline void from_json(const json & j, TopLevel& x) {
202203 x.set_pattern1(j.at("pattern1").get<std::string>());
203204 x.set_pattern2(j.at("pattern2").get<std::string>());
Test case

test/inputs/schema/postman-collection.schema

1 generated file · +6 −5
Mschema-cplusplusdefault / quicktype.hpp+6 −5
@@ -131,12 +131,13 @@ namespace quicktype {
131131 }
132132
133133 namespace quicktype {
134- void from_json(const json & j, Response & x);
135- void to_json(json & j, const Response & x);
136-
137- void from_json(const json & j, TopLevel & x);
138- void to_json(json & j, const TopLevel & x);
134+void from_json(const json & j, Response & x);
135+void to_json(json & j, const Response & x);
139136
137+void from_json(const json & j, TopLevel & x);
138+void to_json(json & j, const TopLevel & x);
139+}
140+namespace quicktype {
140141 inline void from_json(const json & j, Response& x) {
141142 x.set_body(get_stack_optional<std::string>(j, "body"));
142143 }
Test case

test/inputs/schema/ref-id-files.schema

1 generated file · +4 −3
Mschema-cplusplusdefault / quicktype.hpp+4 −3
@@ -47,9 +47,10 @@ namespace quicktype {
4747 }
4848
4949 namespace quicktype {
50- void from_json(const json & j, TopLevel & x);
51- void to_json(json & j, const TopLevel & x);
52-
50+void from_json(const json & j, TopLevel & x);
51+void to_json(json & j, const TopLevel & x);
52+}
53+namespace quicktype {
5354 inline void from_json(const json & j, TopLevel& x) {
5455 x.set_foo(j.at("foo").get<int64_t>());
5556 }
Test case

test/inputs/schema/ref-remote.schema

1 generated file · +4 −3
Mschema-cplusplusdefault / quicktype.hpp+4 −3
@@ -107,9 +107,10 @@ namespace quicktype {
107107 }
108108
109109 namespace quicktype {
110- void from_json(const json & j, TopLevel & x);
111- void to_json(json & j, const TopLevel & x);
112-
110+void from_json(const json & j, TopLevel & x);
111+void to_json(json & j, const TopLevel & x);
112+}
113+namespace quicktype {
113114 inline void from_json(const json & j, TopLevel& x) {
114115 x.set_next(get_heap_optional<TopLevel>(j, "next"));
115116 }
Test case

test/inputs/schema/renaming-bug.schema

1 generated file · +34 −33
Mschema-cplusplusdefault / quicktype.hpp+34 −33
@@ -520,54 +520,55 @@ namespace quicktype {
520520 }
521521
522522 namespace quicktype {
523- void from_json(const json & j, Color & x);
524- void to_json(json & j, const Color & x);
523+void from_json(const json & j, Color & x);
524+void to_json(json & j, const Color & x);
525525
526- void from_json(const json & j, CircularShape & x);
527- void to_json(json & j, const CircularShape & x);
526+void from_json(const json & j, CircularShape & x);
527+void to_json(json & j, const CircularShape & x);
528528
529- void from_json(const json & j, Part & x);
530- void to_json(json & j, const Part & x);
529+void from_json(const json & j, Part & x);
530+void to_json(json & j, const Part & x);
531531
532- void from_json(const json & j, RectShape & x);
533- void to_json(json & j, const RectShape & x);
532+void from_json(const json & j, RectShape & x);
533+void to_json(json & j, const RectShape & x);
534534
535- void from_json(const json & j, Geometry & x);
536- void to_json(json & j, const Geometry & x);
535+void from_json(const json & j, Geometry & x);
536+void to_json(json & j, const Geometry & x);
537537
538- void from_json(const json & j, History & x);
539- void to_json(json & j, const History & x);
538+void from_json(const json & j, History & x);
539+void to_json(json & j, const History & x);
540540
541- void from_json(const json & j, Shape & x);
542- void to_json(json & j, const Shape & x);
541+void from_json(const json & j, Shape & x);
542+void to_json(json & j, const Shape & x);
543543
544- void from_json(const json & j, Berry & x);
545- void to_json(json & j, const Berry & x);
544+void from_json(const json & j, Berry & x);
545+void to_json(json & j, const Berry & x);
546546
547- void from_json(const json & j, Fruit & x);
548- void to_json(json & j, const Fruit & x);
547+void from_json(const json & j, Fruit & x);
548+void to_json(json & j, const Fruit & x);
549549
550- void from_json(const json & j, Limit & x);
551- void to_json(json & j, const Limit & x);
550+void from_json(const json & j, Limit & x);
551+void to_json(json & j, const Limit & x);
552552
553- void from_json(const json & j, Speed & x);
554- void to_json(json & j, const Speed & x);
553+void from_json(const json & j, Speed & x);
554+void to_json(json & j, const Speed & x);
555555
556- void from_json(const json & j, VehicleType & x);
557- void to_json(json & j, const VehicleType & x);
556+void from_json(const json & j, VehicleType & x);
557+void to_json(json & j, const VehicleType & x);
558558
559- void from_json(const json & j, Vehicle & x);
560- void to_json(json & j, const Vehicle & x);
559+void from_json(const json & j, Vehicle & x);
560+void to_json(json & j, const Vehicle & x);
561561
562- void from_json(const json & j, TopLevel & x);
563- void to_json(json & j, const TopLevel & x);
562+void from_json(const json & j, TopLevel & x);
563+void to_json(json & j, const TopLevel & x);
564564
565- void from_json(const json & j, Axis & x);
566- void to_json(json & j, const Axis & x);
567-
568- void from_json(const json & j, Name & x);
569- void to_json(json & j, const Name & x);
565+void from_json(const json & j, Axis & x);
566+void to_json(json & j, const Axis & x);
570567
568+void from_json(const json & j, Name & x);
569+void to_json(json & j, const Name & x);
570+}
571+namespace quicktype {
571572 inline void from_json(const json & j, Color& x) {
572573 x.set_rgb(get_stack_optional<double>(j, "rgb"));
573574 }
Test case

test/inputs/schema/required-draft3.schema

1 generated file · +4 −3
Mschema-cplusplusdefault / quicktype.hpp+4 −3
@@ -47,9 +47,10 @@ namespace quicktype {
4747 }
4848
4949 namespace quicktype {
50- void from_json(const json & j, TopLevel & x);
51- void to_json(json & j, const TopLevel & x);
52-
50+void from_json(const json & j, TopLevel & x);
51+void to_json(json & j, const TopLevel & x);
52+}
53+namespace quicktype {
5354 inline void from_json(const json & j, TopLevel& x) {
5455 x.set_longitude(j.at("longitude").get<double>());
5556 }
Test case

test/inputs/schema/required-non-properties.schema

1 generated file · +4 −3
Mschema-cplusplusdefault / quicktype.hpp+4 −3
@@ -52,9 +52,10 @@ namespace quicktype {
5252 }
5353
5454 namespace quicktype {
55- void from_json(const json & j, TopLevel & x);
56- void to_json(json & j, const TopLevel & x);
57-
55+void from_json(const json & j, TopLevel & x);
56+void to_json(json & j, const TopLevel & x);
57+}
58+namespace quicktype {
5859 inline void from_json(const json & j, TopLevel& x) {
5960 x.set_foo(j.at("foo").get<int64_t>());
6061 x.set_bar(get_untyped(j, "bar"));
Test case

test/inputs/schema/required.schema

1 generated file · +4 −3
Mschema-cplusplusdefault / quicktype.hpp+4 −3
@@ -47,9 +47,10 @@ namespace quicktype {
4747 }
4848
4949 namespace quicktype {
50- void from_json(const json & j, TopLevel & x);
51- void to_json(json & j, const TopLevel & x);
52-
50+void from_json(const json & j, TopLevel & x);
51+void to_json(json & j, const TopLevel & x);
52+}
53+namespace quicktype {
5354 inline void from_json(const json & j, TopLevel& x) {
5455 x.set_longitude(j.at("longitude").get<double>());
5556 }
Test case

test/inputs/schema/schema-constraints.schema

1 generated file · +4 −3
Mschema-cplusplusdefault / quicktype.hpp+4 −3
@@ -188,9 +188,10 @@ namespace quicktype {
188188 }
189189
190190 namespace quicktype {
191- void from_json(const json & j, TopLevel & x);
192- void to_json(json & j, const TopLevel & x);
193-
191+void from_json(const json & j, TopLevel & x);
192+void to_json(json & j, const TopLevel & x);
193+}
194+namespace quicktype {
194195 inline void from_json(const json & j, TopLevel& x) {
195196 x.set_min_max_length(j.at("minMaxLength").get<std::string>());
196197 x.set_percent(j.at("percent").get<double>());
Test case

test/inputs/schema/simple-ref.schema

1 generated file · +4 −3
Mschema-cplusplusdefault / quicktype.hpp+4 −3
@@ -107,9 +107,10 @@ namespace quicktype {
107107 }
108108
109109 namespace quicktype {
110- void from_json(const json & j, TopLevel & x);
111- void to_json(json & j, const TopLevel & x);
112-
110+void from_json(const json & j, TopLevel & x);
111+void to_json(json & j, const TopLevel & x);
112+}
113+namespace quicktype {
113114 inline void from_json(const json & j, TopLevel& x) {
114115 x.set_next(get_heap_optional<TopLevel>(j, "next"));
115116 }
Test case

test/inputs/schema/strict-optional.schema

1 generated file · +4 −3
Mschema-cplusplusdefault / quicktype.hpp+4 −3
@@ -102,9 +102,10 @@ namespace quicktype {
102102 }
103103
104104 namespace quicktype {
105- void from_json(const json & j, TopLevel & x);
106- void to_json(json & j, const TopLevel & x);
107-
105+void from_json(const json & j, TopLevel & x);
106+void to_json(json & j, const TopLevel & x);
107+}
108+namespace quicktype {
108109 inline void from_json(const json & j, TopLevel& x) {
109110 x.set_foo(get_stack_optional<double>(j, "foo"));
110111 }
Test case

test/inputs/schema/top-level-array.schema

1 generated file · +4 −3
Mschema-cplusplusdefault / quicktype.hpp+4 −3
@@ -54,9 +54,10 @@ namespace quicktype {
5454 }
5555
5656 namespace quicktype {
57- void from_json(const json & j, TextClassificationOutputElement & x);
58- void to_json(json & j, const TextClassificationOutputElement & x);
59-
57+void from_json(const json & j, TextClassificationOutputElement & x);
58+void to_json(json & j, const TextClassificationOutputElement & x);
59+}
60+namespace quicktype {
6061 inline void from_json(const json & j, TextClassificationOutputElement& x) {
6162 x.set_label(j.at("label").get<std::string>());
6263 x.set_score(j.at("score").get<double>());
Test case

test/inputs/schema/top-level-enum.schema

1 generated file · +4 −3
Mschema-cplusplusdefault / quicktype.hpp+4 −3
@@ -35,9 +35,10 @@ namespace quicktype {
3535 }
3636
3737 namespace quicktype {
38- void from_json(const json & j, TopLevel & x);
39- void to_json(json & j, const TopLevel & x);
40-
38+void from_json(const json & j, TopLevel & x);
39+void to_json(json & j, const TopLevel & x);
40+}
41+namespace quicktype {
4142 inline void from_json(const json & j, TopLevel & x) {
4243 if (j == "one") x = TopLevel::ONE;
4344 else if (j == "three") x = TopLevel::THREE;
Test case

test/inputs/schema/union.schema

1 generated file · +4 −3
Mschema-cplusplusdefault / quicktype.hpp+4 −3
@@ -116,9 +116,10 @@ namespace quicktype {
116116 }
117117
118118 namespace quicktype {
119- void from_json(const json & j, TopLevelElement & x);
120- void to_json(json & j, const TopLevelElement & x);
121-
119+void from_json(const json & j, TopLevelElement & x);
120+void to_json(json & j, const TopLevelElement & x);
121+}
122+namespace quicktype {
122123 inline void from_json(const json & j, TopLevelElement& x) {
123124 x.set_one(get_stack_optional<int64_t>(j, "one"));
124125 x.set_two(j.at("two").get<bool>());
Test case

test/inputs/schema/uuid.schema

1 generated file · +4 −3
Mschema-cplusplusdefault / quicktype.hpp+4 −3
@@ -128,9 +128,10 @@ namespace quicktype {
128128 }
129129
130130 namespace quicktype {
131- void from_json(const json & j, TopLevel & x);
132- void to_json(json & j, const TopLevel & x);
133-
131+void from_json(const json & j, TopLevel & x);
132+void to_json(json & j, const TopLevel & x);
133+}
134+namespace quicktype {
134135 inline void from_json(const json & j, TopLevel& x) {
135136 x.set_arr_nullable(get_stack_optional<std::vector<std::optional<std::string>>>(j, "arrNullable"));
136137 x.set_arr_one(get_stack_optional<std::vector<std::string>>(j, "arrOne"));
No generated files match these filters.