Generated-output differences

quicktype output changed between the PR base and tested PR merge revisions.
← Back to the pull request
50test cases
52files differ
52modified
0new
0deleted
167changed lines
+167 −0insertions / deletions
Base 7cc8d8a58955a00fa24b69cb53f71f3a32fc4f5e · PR merge 370be9c5885bdf641d17fd6c92e10a24570b0b8a · Head 439e24077486f9dddf53de4e72fae22e32cc354d · raw patch
Test case

test/inputs/graphql/github1.graphql

1 generated file · +2 −0
Mgraphql-cplusplusdefault / quicktype.hpp+2 −0
@@ -169,6 +169,7 @@ namespace quicktype {
169169 inline void from_json(const json & j, User& x) {
170170 if (!j.is_object()) throw std::runtime_error("Expected object");
171171 x.set_login(j.at("login").get<std::string>());
172+ j.at("realName");
172173 x.set_real_name(get_stack_optional<std::string>(j, "realName"));
173174 }
174175
@@ -200,6 +201,7 @@ namespace quicktype {
200201
201202 inline void from_json(const json & j, TopLevel& x) {
202203 if (!j.is_object()) throw std::runtime_error("Expected object");
204+ j.at("data");
203205 x.set_data(get_stack_optional<Data>(j, "data"));
204206 x.set_errors(get_stack_optional<std::vector<Error>>(j, "errors"));
205207 }
Test case

test/inputs/graphql/github2.graphql

1 generated file · +2 −0
Mgraphql-cplusplusdefault / quicktype.hpp+2 −0
@@ -218,6 +218,7 @@ namespace quicktype {
218218 inline void from_json(const json & j, RepositoryConnection& x) {
219219 if (!j.is_object()) throw std::runtime_error("Expected object");
220220 x.set_total_count(j.at("totalCount").get<int64_t>());
221+ j.at("nodes");
221222 x.set_nodes(get_stack_optional<std::vector<std::optional<Repository>>>(j, "nodes"));
222223 }
223224
@@ -261,6 +262,7 @@ namespace quicktype {
261262
262263 inline void from_json(const json & j, TopLevel& x) {
263264 if (!j.is_object()) throw std::runtime_error("Expected object");
265+ j.at("data");
264266 x.set_data(get_stack_optional<Data>(j, "data"));
265267 x.set_errors(get_stack_optional<std::vector<Error>>(j, "errors"));
266268 }
Test case

test/inputs/graphql/github3.graphql

1 generated file · +3 −0
Mgraphql-cplusplusdefault / quicktype.hpp+3 −0
@@ -233,6 +233,7 @@ namespace quicktype {
233233
234234 inline void from_json(const json & j, PullRequestConnection& x) {
235235 if (!j.is_object()) throw std::runtime_error("Expected object");
236+ j.at("nodes");
236237 x.set_nodes(get_stack_optional<std::vector<std::optional<PullRequest>>>(j, "nodes"));
237238 }
238239
@@ -254,6 +255,7 @@ namespace quicktype {
254255 inline void from_json(const json & j, User& x) {
255256 if (!j.is_object()) throw std::runtime_error("Expected object");
256257 x.set_login(j.at("login").get<std::string>());
258+ j.at("repository");
257259 x.set_repository(get_stack_optional<Repository>(j, "repository"));
258260 }
259261
@@ -285,6 +287,7 @@ namespace quicktype {
285287
286288 inline void from_json(const json & j, TopLevel& x) {
287289 if (!j.is_object()) throw std::runtime_error("Expected object");
290+ j.at("data");
288291 x.set_data(get_stack_optional<Data>(j, "data"));
289292 x.set_errors(get_stack_optional<std::vector<Error>>(j, "errors"));
290293 }
Test case

test/inputs/graphql/github4.graphql

1 generated file · +4 −0
Mgraphql-cplusplusdefault / quicktype.hpp+4 −0
@@ -237,6 +237,7 @@ namespace quicktype {
237237
238238 inline void from_json(const json & j, PullRequestConnection& x) {
239239 if (!j.is_object()) throw std::runtime_error("Expected object");
240+ j.at("nodes");
240241 x.set_nodes(get_stack_optional<std::vector<std::optional<PullRequest>>>(j, "nodes"));
241242 }
242243
@@ -258,7 +259,9 @@ namespace quicktype {
258259 inline void from_json(const json & j, User& x) {
259260 if (!j.is_object()) throw std::runtime_error("Expected object");
260261 x.set_login(j.at("login").get<std::string>());
262+ j.at("name");
261263 x.set_name(get_stack_optional<std::string>(j, "name"));
264+ j.at("repository");
262265 x.set_repository(get_stack_optional<Repository>(j, "repository"));
263266 }
264267
@@ -291,6 +294,7 @@ namespace quicktype {
291294
292295 inline void from_json(const json & j, TopLevel& x) {
293296 if (!j.is_object()) throw std::runtime_error("Expected object");
297+ j.at("data");
294298 x.set_data(get_stack_optional<Data>(j, "data"));
295299 x.set_errors(get_stack_optional<std::vector<Error>>(j, "errors"));
296300 }
Test case

test/inputs/graphql/github5.graphql

1 generated file · +1 −0
Mgraphql-cplusplusdefault / quicktype.hpp+1 −0
@@ -200,6 +200,7 @@ namespace quicktype {
200200
201201 inline void from_json(const json & j, TopLevel& x) {
202202 if (!j.is_object()) throw std::runtime_error("Expected object");
203+ j.at("data");
203204 x.set_data(get_stack_optional<Data>(j, "data"));
204205 x.set_errors(get_stack_optional<std::vector<Error>>(j, "errors"));
205206 }
Test case

test/inputs/graphql/github6.graphql

1 generated file · +2 −0
Mgraphql-cplusplusdefault / quicktype.hpp+2 −0
@@ -180,6 +180,7 @@ namespace quicktype {
180180
181181 inline void from_json(const json & j, Data& x) {
182182 if (!j.is_object()) throw std::runtime_error("Expected object");
183+ j.at("resource");
183184 x.set_resource(get_stack_optional<UniformResourceLocatable>(j, "resource"));
184185 }
185186
@@ -200,6 +201,7 @@ namespace quicktype {
200201
201202 inline void from_json(const json & j, TopLevel& x) {
202203 if (!j.is_object()) throw std::runtime_error("Expected object");
204+ j.at("data");
203205 x.set_data(get_stack_optional<Data>(j, "data"));
204206 x.set_errors(get_stack_optional<std::vector<Error>>(j, "errors"));
205207 }
Test case

test/inputs/graphql/github7.graphql

1 generated file · +3 −0
Mgraphql-cplusplusdefault / quicktype.hpp+3 −0
@@ -288,6 +288,7 @@ namespace quicktype {
288288
289289 inline void from_json(const json & j, RepositoryEdge& x) {
290290 if (!j.is_object()) throw std::runtime_error("Expected object");
291+ j.at("node");
291292 x.set_node(get_stack_optional<Repository>(j, "node"));
292293 }
293294
@@ -298,6 +299,7 @@ namespace quicktype {
298299
299300 inline void from_json(const json & j, RepositoryConnection& x) {
300301 if (!j.is_object()) throw std::runtime_error("Expected object");
302+ j.at("edges");
301303 x.set_edges(get_stack_optional<std::vector<std::optional<RepositoryEdge>>>(j, "edges"));
302304 }
303305
@@ -342,6 +344,7 @@ namespace quicktype {
342344
343345 inline void from_json(const json & j, TopLevel& x) {
344346 if (!j.is_object()) throw std::runtime_error("Expected object");
347+ j.at("data");
345348 x.set_data(get_stack_optional<Data>(j, "data"));
346349 x.set_errors(get_stack_optional<std::vector<Error>>(j, "errors"));
347350 }
Test case

test/inputs/graphql/github8.graphql

1 generated file · +4 −0
Mgraphql-cplusplusdefault / quicktype.hpp+4 −0
@@ -218,7 +218,9 @@ namespace quicktype {
218218 inline void from_json(const json & j, Repository& x) {
219219 if (!j.is_object()) throw std::runtime_error("Expected object");
220220 x.set_name_with_owner(j.at("nameWithOwner").get<std::string>());
221+ j.at("n303");
221222 x.set_n303(get_stack_optional<IssueOrPullRequest>(j, "n303"));
223+ j.at("n307");
222224 x.set_n307(get_stack_optional<IssueOrPullRequest>(j, "n307"));
223225 }
224226
@@ -231,6 +233,7 @@ namespace quicktype {
231233
232234 inline void from_json(const json & j, Data& x) {
233235 if (!j.is_object()) throw std::runtime_error("Expected object");
236+ j.at("repository");
234237 x.set_repository(get_stack_optional<Repository>(j, "repository"));
235238 }
236239
@@ -251,6 +254,7 @@ namespace quicktype {
251254
252255 inline void from_json(const json & j, TopLevel& x) {
253256 if (!j.is_object()) throw std::runtime_error("Expected object");
257+ j.at("data");
254258 x.set_data(get_stack_optional<Data>(j, "data"));
255259 x.set_errors(get_stack_optional<std::vector<Error>>(j, "errors"));
256260 }
Test case

test/inputs/graphql/github9.graphql

1 generated file · +4 −0
Mgraphql-cplusplusdefault / quicktype.hpp+4 −0
@@ -226,6 +226,7 @@ namespace quicktype {
226226 inline void from_json(const json & j, Reactable& x) {
227227 if (!j.is_object()) throw std::runtime_error("Expected object");
228228 x.set_viewer_can_react(j.at("viewerCanReact").get<bool>());
229+ j.at("reactionGroups");
229230 x.set_reaction_groups(get_stack_optional<std::vector<Reaction>>(j, "reactionGroups"));
230231 }
231232
@@ -237,6 +238,7 @@ namespace quicktype {
237238
238239 inline void from_json(const json & j, AddReactionPayload& x) {
239240 if (!j.is_object()) throw std::runtime_error("Expected object");
241+ j.at("clientMutationId");
240242 x.set_client_mutation_id(get_stack_optional<std::string>(j, "clientMutationId"));
241243 x.set_reaction(j.at("reaction").get<Reaction>());
242244 x.set_subject(j.at("subject").get<Reactable>());
@@ -251,6 +253,7 @@ namespace quicktype {
251253
252254 inline void from_json(const json & j, Data& x) {
253255 if (!j.is_object()) throw std::runtime_error("Expected object");
256+ j.at("addReaction");
254257 x.set_add_reaction(get_stack_optional<AddReactionPayload>(j, "addReaction"));
255258 }
256259
@@ -271,6 +274,7 @@ namespace quicktype {
271274
272275 inline void from_json(const json & j, TopLevel& x) {
273276 if (!j.is_object()) throw std::runtime_error("Expected object");
277+ j.at("data");
274278 x.set_data(get_stack_optional<Data>(j, "data"));
275279 x.set_errors(get_stack_optional<std::vector<Error>>(j, "errors"));
276280 }
Test case

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

1 generated file · +2 −0
Mcplusplusdefault / quicktype.hpp+2 −0
@@ -286,6 +286,7 @@ namespace quicktype {
286286 inline void from_json(const json & j, OtherName& x) {
287287 if (!j.is_object()) throw std::runtime_error("Expected object");
288288 x.set_name(j.at("name").get<std::string>());
289+ j.at("note");
289290 x.set_note(get_stack_optional<std::string>(j, "note"));
290291 }
291292
@@ -317,6 +318,7 @@ namespace quicktype {
317318 x.set_links(j.at("links").get<std::vector<Link>>());
318319 x.set_name(j.at("name").get<std::string>());
319320 x.set_other_names(j.at("other_names").get<std::vector<OtherName>>());
321+ j.at("superseded_by");
320322 x.set_superseded_by(get_stack_optional<std::string>(j, "superseded_by"));
321323 x.set_text(j.at("text").get<std::vector<Text>>());
322324 }
Test case

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

1 generated file · +1 −0
Mcplusplusdefault / quicktype.hpp+1 −0
@@ -536,6 +536,7 @@ namespace quicktype {
536536 x.set_language(j.at("language").get<ResultLanguage>());
537537 x.set_release_date(j.at("release_date").get<std::string>());
538538 x.set_stars(j.at("stars").get<int64_t>());
539+ j.at("tags");
539540 x.set_tags(get_stack_optional<std::vector<nlohmann::json>>(j, "tags"));
540541 x.set_title(j.at("title").get<std::string>());
541542 x.set_videos(j.at("videos").get<std::vector<Video>>());
Test case

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

1 generated file · +2 −0
Mcplusplusdefault / quicktype.hpp+2 −0
@@ -286,6 +286,7 @@ namespace quicktype {
286286 inline void from_json(const json & j, OtherName& x) {
287287 if (!j.is_object()) throw std::runtime_error("Expected object");
288288 x.set_name(j.at("name").get<std::string>());
289+ j.at("note");
289290 x.set_note(get_stack_optional<std::string>(j, "note"));
290291 }
291292
@@ -317,6 +318,7 @@ namespace quicktype {
317318 x.set_links(j.at("links").get<std::vector<Link>>());
318319 x.set_name(j.at("name").get<std::string>());
319320 x.set_other_names(j.at("other_names").get<std::vector<OtherName>>());
321+ j.at("superseded_by");
320322 x.set_superseded_by(get_stack_optional<std::string>(j, "superseded_by"));
321323 x.set_text(j.at("text").get<std::vector<Text>>());
322324 }
Test case

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

1 generated file · +4 −0
Mcplusplusdefault / quicktype.hpp+4 −0
@@ -473,9 +473,12 @@ namespace quicktype {
473473 x.set_namemod(j.at("namemod").get<Namemod>());
474474 x.set_nickname(j.at("nickname").get<std::string>());
475475 x.set_osid(j.at("osid").get<std::string>());
476+ j.at("pvsid");
476477 x.set_pvsid(get_stack_optional<std::string>(j, "pvsid"));
477478 x.set_sortname(j.at("sortname").get<std::string>());
479+ j.at("twitterid");
478480 x.set_twitterid(get_stack_optional<std::string>(j, "twitterid"));
481+ j.at("youtubeid");
479482 x.set_youtubeid(get_stack_optional<std::string>(j, "youtubeid"));
480483 }
481484
@@ -511,6 +514,7 @@ namespace quicktype {
511514 x.set_enddate(j.at("enddate").get<std::string>());
512515 x.set_extra(j.at("extra").get<Extra>());
513516 x.set_id(j.at("id").get<int64_t>());
517+ j.at("leadership_title");
514518 x.set_leadership_title(get_stack_optional<std::string>(j, "leadership_title"));
515519 x.set_party(j.at("party").get<Party>());
516520 x.set_person(j.at("person").get<Person>());
Test case

test/inputs/json/misc/27332.json

1 generated file · +10 −0
Mcplusplusdefault / quicktype.hpp+10 −0
@@ -862,7 +862,9 @@ namespace quicktype {
862862 x.set_approved_by(get_untyped(j, "approved_by"));
863863 x.set_archived(j.at("archived").get<bool>());
864864 x.set_author(j.at("author").get<std::string>());
865+ j.at("author_flair_css_class");
865866 x.set_author_flair_css_class(get_stack_optional<std::string>(j, "author_flair_css_class"));
867+ j.at("author_flair_text");
866868 x.set_author_flair_text(get_stack_optional<std::string>(j, "author_flair_text"));
867869 x.set_banned_at_utc(get_untyped(j, "banned_at_utc"));
868870 x.set_banned_by(get_untyped(j, "banned_by"));
@@ -873,6 +875,7 @@ namespace quicktype {
873875 x.set_contest_mode(j.at("contest_mode").get<bool>());
874876 x.set_created(j.at("created").get<double>());
875877 x.set_created_utc(j.at("created_utc").get<double>());
878+ j.at("distinguished");
876879 x.set_distinguished(get_stack_optional<std::string>(j, "distinguished"));
877880 x.set_domain(j.at("domain").get<Domain>());
878881 x.set_downs(j.at("downs").get<int64_t>());
@@ -884,9 +887,12 @@ namespace quicktype {
884887 x.set_is_self(j.at("is_self").get<bool>());
885888 x.set_is_video(j.at("is_video").get<bool>());
886889 x.set_likes(get_untyped(j, "likes"));
890+ j.at("link_flair_css_class");
887891 x.set_link_flair_css_class(get_stack_optional<std::string>(j, "link_flair_css_class"));
892+ j.at("link_flair_text");
888893 x.set_link_flair_text(get_stack_optional<std::string>(j, "link_flair_text"));
889894 x.set_locked(j.at("locked").get<bool>());
895+ j.at("media");
890896 x.set_media(get_stack_optional<Media>(j, "media"));
891897 x.set_media_embed(j.at("media_embed").get<MediaEmbed>());
892898 x.set_mod_reports(j.at("mod_reports").get<std::vector<nlohmann::json>>());
@@ -902,9 +908,11 @@ namespace quicktype {
902908 x.set_report_reasons(get_untyped(j, "report_reasons"));
903909 x.set_saved(j.at("saved").get<bool>());
904910 x.set_score(j.at("score").get<int64_t>());
911+ j.at("secure_media");
905912 x.set_secure_media(get_stack_optional<Media>(j, "secure_media"));
906913 x.set_secure_media_embed(j.at("secure_media_embed").get<MediaEmbed>());
907914 x.set_selftext(j.at("selftext").get<std::string>());
915+ j.at("selftext_html");
908916 x.set_selftext_html(get_stack_optional<std::string>(j, "selftext_html"));
909917 x.set_spoiler(j.at("spoiler").get<bool>());
910918 x.set_stickied(j.at("stickied").get<bool>());
@@ -914,7 +922,9 @@ namespace quicktype {
914922 x.set_subreddit_type(j.at("subreddit_type").get<SubredditType>());
915923 x.set_suggested_sort(get_untyped(j, "suggested_sort"));
916924 x.set_thumbnail(j.at("thumbnail").get<std::string>());
925+ j.at("thumbnail_height");
917926 x.set_thumbnail_height(get_stack_optional<int64_t>(j, "thumbnail_height"));
927+ j.at("thumbnail_width");
918928 x.set_thumbnail_width(get_stack_optional<int64_t>(j, "thumbnail_width"));
919929 x.set_title(j.at("title").get<std::string>());
920930 x.set_ups(j.at("ups").get<int64_t>());
Test case

test/inputs/json/misc/29f47.json

1 generated file · +4 −0
Mcplusplusdefault / quicktype.hpp+4 −0
@@ -809,6 +809,7 @@ namespace quicktype {
809809 x.set_secure_media(get_untyped(j, "secure_media"));
810810 x.set_secure_media_embed(j.at("secure_media_embed").get<MediaEmbed>());
811811 x.set_selftext(j.at("selftext").get<std::string>());
812+ j.at("selftext_html");
812813 x.set_selftext_html(get_stack_optional<std::string>(j, "selftext_html"));
813814 x.set_spoiler(j.at("spoiler").get<bool>());
814815 x.set_stickied(j.at("stickied").get<bool>());
@@ -816,9 +817,12 @@ namespace quicktype {
816817 x.set_subreddit_id(j.at("subreddit_id").get<SubredditId>());
817818 x.set_subreddit_name_prefixed(j.at("subreddit_name_prefixed").get<SubredditNamePrefixed>());
818819 x.set_subreddit_type(j.at("subreddit_type").get<SubredditType>());
820+ j.at("suggested_sort");
819821 x.set_suggested_sort(get_stack_optional<std::string>(j, "suggested_sort"));
820822 x.set_thumbnail(j.at("thumbnail").get<std::string>());
823+ j.at("thumbnail_height");
821824 x.set_thumbnail_height(get_stack_optional<int64_t>(j, "thumbnail_height"));
825+ j.at("thumbnail_width");
822826 x.set_thumbnail_width(get_stack_optional<int64_t>(j, "thumbnail_width"));
823827 x.set_title(j.at("title").get<std::string>());
824828 x.set_ups(j.at("ups").get<int64_t>());
Test case

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

1 generated file · +4 −0
Mcplusplusdefault / quicktype.hpp+4 −0
@@ -506,7 +506,9 @@ namespace quicktype {
506506 x.set_osid(j.at("osid").get<std::string>());
507507 x.set_pvsid(j.at("pvsid").get<std::string>());
508508 x.set_sortname(j.at("sortname").get<std::string>());
509+ j.at("twitterid");
509510 x.set_twitterid(get_stack_optional<std::string>(j, "twitterid"));
511+ j.at("youtubeid");
510512 x.set_youtubeid(get_stack_optional<std::string>(j, "youtubeid"));
511513 }
512514
@@ -534,6 +536,7 @@ namespace quicktype {
534536
535537 inline void from_json(const json & j, Object& x) {
536538 if (!j.is_object()) throw std::runtime_error("Expected object");
539+ j.at("caucus");
537540 x.set_caucus(get_stack_optional<Party>(j, "caucus"));
538541 x.set_congress_numbers(j.at("congress_numbers").get<std::vector<int64_t>>());
539542 x.set_current(j.at("current").get<bool>());
@@ -542,6 +545,7 @@ namespace quicktype {
542545 x.set_enddate(j.at("enddate").get<std::string>());
543546 x.set_extra(j.at("extra").get<Extra>());
544547 x.set_id(j.at("id").get<int64_t>());
548+ j.at("leadership_title");
545549 x.set_leadership_title(get_stack_optional<std::string>(j, "leadership_title"));
546550 x.set_party(j.at("party").get<Party>());
547551 x.set_person(j.at("person").get<Person>());
Test case

test/inputs/json/misc/32431.json

1 generated file · +3 −0
Mcplusplusdefault / quicktype.hpp+3 −0
@@ -399,14 +399,17 @@ namespace quicktype {
399399 x.set_cdi(get_untyped(j, "cdi"));
400400 x.set_code(j.at("code").get<std::string>());
401401 x.set_detail(j.at("detail").get<std::string>());
402+ j.at("dmin");
402403 x.set_dmin(get_stack_optional<double>(j, "dmin"));
403404 x.set_felt(get_untyped(j, "felt"));
405+ j.at("gap");
404406 x.set_gap(get_stack_optional<int64_t>(j, "gap"));
405407 x.set_ids(j.at("ids").get<std::string>());
406408 x.set_mag(j.at("mag").get<double>());
407409 x.set_mag_type(j.at("magType").get<MagType>());
408410 x.set_mmi(get_untyped(j, "mmi"));
409411 x.set_net(j.at("net").get<std::string>());
412+ j.at("nst");
410413 x.set_nst(get_stack_optional<int64_t>(j, "nst"));
411414 x.set_place(j.at("place").get<std::string>());
412415 x.set_rms(j.at("rms").get<double>());
Test case

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

1 generated file · +1 −0
Mcplusplusdefault / quicktype.hpp+1 −0
@@ -144,6 +144,7 @@ namespace quicktype {
144144
145145 inline void from_json(const json & j, TopLevelElement& x) {
146146 if (!j.is_object()) throw std::runtime_error("Expected object");
147+ j.at("BirthDate");
147148 x.set_birth_date(get_stack_optional<std::string>(j, "BirthDate"));
148149 x.set_birth_date_is_protected(j.at("BirthDateIsProtected").get<bool>());
149150 x.set_gender_type_id(j.at("GenderTypeID").get<int64_t>());
Test case

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

1 generated file · +17 −0
Mcplusplusdefault / quicktype.hpp+17 −0
@@ -408,8 +408,11 @@ namespace quicktype {
408408
409409 inline void from_json(const json & j, Result& x) {
410410 if (!j.is_object()) throw std::runtime_error("Expected object");
411+ j.at("cost_absolute");
411412 x.set_cost_absolute(get_stack_optional<int64_t>(j, "cost_absolute"));
413+ j.at("cost_max");
412414 x.set_cost_max(get_stack_optional<int64_t>(j, "cost_max"));
415+ j.at("cost_min");
413416 x.set_cost_min(get_stack_optional<int64_t>(j, "cost_min"));
414417 x.set_created_at(j.at("created_at").get<std::string>());
415418 x.set_custom_incomes(j.at("customIncomes").get<std::vector<CustomIncome>>());
@@ -417,25 +420,39 @@ namespace quicktype {
417420 x.set_direct_rep_costs_min(get_untyped(j, "direct_rep_costs_min"));
418421 x.set_end_date(j.at("end_date").get<std::string>());
419422 x.set_eur_sources_grants(j.at("eur_sources_grants").get<int64_t>());
423+ j.at("eur_sources_grants_src");
420424 x.set_eur_sources_grants_src(get_stack_optional<std::string>(j, "eur_sources_grants_src"));
421425 x.set_eur_sources_procurement(j.at("eur_sources_procurement").get<int64_t>());
426+ j.at("eur_sources_procurement_src");
422427 x.set_eur_sources_procurement_src(get_stack_optional<std::string>(j, "eur_sources_procurement_src"));
423428 x.set_id(j.at("id").get<std::string>());
424429 x.set_new_organisation(get_untyped(j, "new_organisation"));
430+ j.at("no_clients");
425431 x.set_no_clients(get_stack_optional<std::string>(j, "no_clients"));
432+ j.at("other_financial_information");
426433 x.set_other_financial_information(get_stack_optional<std::string>(j, "other_financial_information"));
434+ j.at("other_sources_contributions");
427435 x.set_other_sources_contributions(get_stack_optional<int64_t>(j, "other_sources_contributions"));
436+ j.at("other_sources_donation");
428437 x.set_other_sources_donation(get_stack_optional<int64_t>(j, "other_sources_donation"));
438+ j.at("other_sources_total");
429439 x.set_other_sources_total(get_stack_optional<int64_t>(j, "other_sources_total"));
440+ j.at("public_financing_infranational");
430441 x.set_public_financing_infranational(get_stack_optional<int64_t>(j, "public_financing_infranational"));
442+ j.at("public_financing_national");
431443 x.set_public_financing_national(get_stack_optional<int64_t>(j, "public_financing_national"));
444+ j.at("public_financing_total");
432445 x.set_public_financing_total(get_stack_optional<int64_t>(j, "public_financing_total"));
433446 x.set_representative(j.at("representative").get<std::string>());
434447 x.set_start_date(j.at("start_date").get<std::string>());
435448 x.set_status(j.at("status").get<Status>());
449+ j.at("total_budget");
436450 x.set_total_budget(get_stack_optional<int64_t>(j, "total_budget"));
451+ j.at("turnover_absolute");
437452 x.set_turnover_absolute(get_stack_optional<int64_t>(j, "turnover_absolute"));
453+ j.at("turnover_max");
438454 x.set_turnover_max(get_stack_optional<int64_t>(j, "turnover_max"));
455+ j.at("turnover_min");
439456 x.set_turnover_min(get_stack_optional<int64_t>(j, "turnover_min"));
440457 x.set_type(j.at("type").get<ResultType>());
441458 x.set_updated_at(j.at("updated_at").get<std::string>());
Test case

test/inputs/json/misc/34702.json

1 generated file · +3 −0
Mcplusplusdefault / quicktype.hpp+3 −0
@@ -372,10 +372,12 @@ namespace quicktype {
372372 if (!j.is_object()) throw std::runtime_error("Expected object");
373373 x.set_division(j.at("division").get<std::string>());
374374 x.set_fax(j.at("fax").get<double>());
375+ j.at("fire_ban_r");
375376 x.set_fire_ban_r(get_stack_optional<FireBanR>(j, "fire_ban_r"));
376377 x.set_latitude(j.at("latitude").get<double>());
377378 x.set_local_govt(j.at("local_govt").get<std::string>());
378379 x.set_longitude(j.at("longitude").get<double>());
380+ j.at("no");
379381 x.set_no(get_stack_optional<std::string>(j, "no"));
380382 x.set_phone(j.at("phone").get<double>());
381383 x.set_postcode(j.at("postcode").get<int64_t>());
@@ -384,6 +386,7 @@ namespace quicktype {
384386 x.set_station(j.at("station").get<std::string>());
385387 x.set_street(j.at("street").get<std::string>());
386388 x.set_suburb(j.at("suburb").get<std::string>());
389+ j.at("type");
387390 x.set_type(get_stack_optional<PropertiesType>(j, "type"));
388391 }
Test case

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

1 generated file · +4 −0
Mcplusplusdefault / quicktype.hpp+4 −0
@@ -895,6 +895,7 @@ namespace quicktype {
895895 x.set_link_flair_css_class(get_untyped(j, "link_flair_css_class"));
896896 x.set_link_flair_text(get_untyped(j, "link_flair_text"));
897897 x.set_locked(j.at("locked").get<bool>());
898+ j.at("media");
898899 x.set_media(get_stack_optional<Media>(j, "media"));
899900 x.set_media_embed(j.at("media_embed").get<MediaEmbed>());
900901 x.set_mod_reports(j.at("mod_reports").get<std::vector<nlohmann::json>>());
@@ -910,6 +911,7 @@ namespace quicktype {
910911 x.set_report_reasons(get_untyped(j, "report_reasons"));
911912 x.set_saved(j.at("saved").get<bool>());
912913 x.set_score(j.at("score").get<int64_t>());
914+ j.at("secure_media");
913915 x.set_secure_media(get_stack_optional<Media>(j, "secure_media"));
914916 x.set_secure_media_embed(j.at("secure_media_embed").get<MediaEmbed>());
915917 x.set_selftext(j.at("selftext").get<std::string>());
@@ -922,7 +924,9 @@ namespace quicktype {
922924 x.set_subreddit_type(j.at("subreddit_type").get<SubredditType>());
923925 x.set_suggested_sort(get_untyped(j, "suggested_sort"));
924926 x.set_thumbnail(j.at("thumbnail").get<std::string>());
927+ j.at("thumbnail_height");
925928 x.set_thumbnail_height(get_stack_optional<int64_t>(j, "thumbnail_height"));
929+ j.at("thumbnail_width");
926930 x.set_thumbnail_width(get_stack_optional<int64_t>(j, "thumbnail_width"));
927931 x.set_title(j.at("title").get<std::string>());
928932 x.set_ups(j.at("ups").get<int64_t>());
Test case

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

1 generated file · +1 −0
Mcplusplusdefault / quicktype.hpp+1 −0
@@ -267,6 +267,7 @@ namespace quicktype {
267267 inline void from_json(const json & j, OtherName& x) {
268268 if (!j.is_object()) throw std::runtime_error("Expected object");
269269 x.set_name(j.at("name").get<std::string>());
270+ j.at("note");
270271 x.set_note(get_stack_optional<std::string>(j, "note"));
271272 }
Test case

test/inputs/json/misc/66121.json

1 generated file · +1 −0
Mcplusplusdefault / quicktype.hpp+1 −0
@@ -284,6 +284,7 @@ namespace quicktype {
284284 x.set_links(j.at("links").get<std::vector<Link>>());
285285 x.set_name(j.at("name").get<std::string>());
286286 x.set_other_names(j.at("other_names").get<std::vector<nlohmann::json>>());
287+ j.at("superseded_by");
287288 x.set_superseded_by(get_stack_optional<std::string>(j, "superseded_by"));
288289 x.set_text(j.at("text").get<std::vector<Text>>());
289290 }
Test case

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

1 generated file · +10 −0
Mcplusplusdefault / quicktype.hpp+10 −0
@@ -900,7 +900,9 @@ namespace quicktype {
900900 x.set_approved_by(get_untyped(j, "approved_by"));
901901 x.set_archived(j.at("archived").get<bool>());
902902 x.set_author(j.at("author").get<std::string>());
903+ j.at("author_flair_css_class");
903904 x.set_author_flair_css_class(get_stack_optional<std::string>(j, "author_flair_css_class"));
905+ j.at("author_flair_text");
904906 x.set_author_flair_text(get_stack_optional<std::string>(j, "author_flair_text"));
905907 x.set_banned_at_utc(get_untyped(j, "banned_at_utc"));
906908 x.set_banned_by(get_untyped(j, "banned_by"));
@@ -922,9 +924,12 @@ namespace quicktype {
922924 x.set_is_self(j.at("is_self").get<bool>());
923925 x.set_is_video(j.at("is_video").get<bool>());
924926 x.set_likes(get_untyped(j, "likes"));
927+ j.at("link_flair_css_class");
925928 x.set_link_flair_css_class(get_stack_optional<std::string>(j, "link_flair_css_class"));
929+ j.at("link_flair_text");
926930 x.set_link_flair_text(get_stack_optional<std::string>(j, "link_flair_text"));
927931 x.set_locked(j.at("locked").get<bool>());
932+ j.at("media");
928933 x.set_media(get_stack_optional<Media>(j, "media"));
929934 x.set_media_embed(j.at("media_embed").get<MediaEmbed>());
930935 x.set_mod_reports(j.at("mod_reports").get<std::vector<nlohmann::json>>());
@@ -940,9 +945,11 @@ namespace quicktype {
940945 x.set_report_reasons(get_untyped(j, "report_reasons"));
941946 x.set_saved(j.at("saved").get<bool>());
942947 x.set_score(j.at("score").get<int64_t>());
948+ j.at("secure_media");
943949 x.set_secure_media(get_stack_optional<Media>(j, "secure_media"));
944950 x.set_secure_media_embed(j.at("secure_media_embed").get<MediaEmbed>());
945951 x.set_selftext(j.at("selftext").get<std::string>());
952+ j.at("selftext_html");
946953 x.set_selftext_html(get_stack_optional<std::string>(j, "selftext_html"));
947954 x.set_spoiler(j.at("spoiler").get<bool>());
948955 x.set_stickied(j.at("stickied").get<bool>());
@@ -950,9 +957,12 @@ namespace quicktype {
950957 x.set_subreddit_id(j.at("subreddit_id").get<std::string>());
951958 x.set_subreddit_name_prefixed(j.at("subreddit_name_prefixed").get<std::string>());
952959 x.set_subreddit_type(j.at("subreddit_type").get<SubredditType>());
960+ j.at("suggested_sort");
953961 x.set_suggested_sort(get_stack_optional<std::string>(j, "suggested_sort"));
954962 x.set_thumbnail(j.at("thumbnail").get<std::string>());
963+ j.at("thumbnail_height");
955964 x.set_thumbnail_height(get_stack_optional<int64_t>(j, "thumbnail_height"));
965+ j.at("thumbnail_width");
956966 x.set_thumbnail_width(get_stack_optional<int64_t>(j, "thumbnail_width"));
957967 x.set_title(j.at("title").get<std::string>());
958968 x.set_ups(j.at("ups").get<int64_t>());
Test case

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

1 generated file · +14 −0
Mcplusplusdefault / quicktype.hpp+14 −0
@@ -452,6 +452,7 @@ namespace quicktype {
452452
453453 inline void from_json(const json & j, Result& x) {
454454 if (!j.is_object()) throw std::runtime_error("Expected object");
455+ j.at("acronym");
455456 x.set_acronym(get_stack_optional<std::string>(j, "acronym"));
456457 x.set_activity_consult_committees(j.at("activity_consult_committees").get<std::string>());
457458 x.set_activity_eu_legislative(j.at("activity_eu_legislative").get<std::string>());
@@ -459,6 +460,7 @@ namespace quicktype {
459460 x.set_activity_high_level_groups(j.at("activity_high_level_groups").get<std::string>());
460461 x.set_activity_industry_forums(j.at("activity_industry_forums").get<std::string>());
461462 x.set_activity_inter_groups(j.at("activity_inter_groups").get<std::string>());
463+ j.at("activity_other");
462464 x.set_activity_other(get_stack_optional<std::string>(j, "activity_other"));
463465 x.set_activity_relevant_comm(j.at("activity_relevant_comm").get<std::string>());
464466 x.set_be_office_country(get_stack_optional<std::string>(j, "be_office_country"));
@@ -476,10 +478,14 @@ namespace quicktype {
476478 x.set_goals(j.at("goals").get<std::string>());
477479 x.set_head(j.at("head").get<std::string>());
478480 x.set_head_office_country(j.at("head_office_country").get<std::string>());
481+ j.at("head_office_lat");
479482 x.set_head_office_lat(get_stack_optional<double>(j, "head_office_lat"));
483+ j.at("head_office_lon");
480484 x.set_head_office_lon(get_stack_optional<double>(j, "head_office_lon"));
481485 x.set_head_office_phone(j.at("head_office_phone").get<std::string>());
486+ j.at("head_office_post_code");
482487 x.set_head_office_post_code(get_stack_optional<std::string>(j, "head_office_post_code"));
488+ j.at("head_office_postbox");
483489 x.set_head_office_postbox(get_stack_optional<std::string>(j, "head_office_postbox"));
484490 x.set_head_office_street(j.at("head_office_street").get<std::string>());
485491 x.set_head_office_town(j.at("head_office_town").get<std::string>());
@@ -492,15 +498,22 @@ namespace quicktype {
492498 x.set_main_category(j.at("main_category").get<int64_t>());
493499 x.set_main_category_title(j.at("main_category_title").get<std::string>());
494500 x.set_members(j.at("members").get<int64_t>());
501+ j.at("members_100");
495502 x.set_members_100(get_stack_optional<int64_t>(j, "members_100"));
503+ j.at("members_25");
496504 x.set_members_25(get_stack_optional<int64_t>(j, "members_25"));
505+ j.at("members_50");
497506 x.set_members_50(get_stack_optional<int64_t>(j, "members_50"));
507+ j.at("members_75");
498508 x.set_members_75(get_stack_optional<int64_t>(j, "members_75"));
499509 x.set_members_fte(j.at("members_fte").get<double>());
500510 x.set_name(j.at("name").get<std::string>());
501511 x.set_native_name(get_untyped(j, "native_name"));
512+ j.at("networking");
502513 x.set_networking(get_stack_optional<std::string>(j, "networking"));
514+ j.at("number_of_natural_persons");
503515 x.set_number_of_natural_persons(get_stack_optional<int64_t>(j, "number_of_natural_persons"));
516+ j.at("other_code_of_conduct");
504517 x.set_other_code_of_conduct(get_stack_optional<std::string>(j, "other_code_of_conduct"));
505518 x.set_registration_date(j.at("registration_date").get<std::string>());
506519 x.set_status(j.at("status").get<Status>());
@@ -509,6 +522,7 @@ namespace quicktype {
509522 x.set_sub_category_title(j.at("sub_category_title").get<std::string>());
510523 x.set_updated_at(j.at("updated_at").get<std::string>());
511524 x.set_uri(j.at("uri").get<std::string>());
525+ j.at("web_site_url");
512526 x.set_web_site_url(get_stack_optional<std::string>(j, "web_site_url"));
513527 }
Test case

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

1 generated file · +2 −0
Mcplusplusdefault / quicktype.hpp+2 −0
@@ -231,6 +231,7 @@ namespace quicktype {
231231 inline void from_json(const json & j, File& x) {
232232 if (!j.is_object()) throw std::runtime_error("Expected object");
233233 x.set_filename(j.at("filename").get<std::string>());
234+ j.at("language");
234235 x.set_language(get_stack_optional<Language>(j, "language"));
235236 x.set_raw_url(j.at("raw_url").get<std::string>());
236237 x.set_size(j.at("size").get<int64_t>());
@@ -252,6 +253,7 @@ namespace quicktype {
252253 x.set_comments_url(j.at("comments_url").get<std::string>());
253254 x.set_commits_url(j.at("commits_url").get<std::string>());
254255 x.set_created_at(j.at("created_at").get<std::string>());
256+ j.at("description");
255257 x.set_description(get_stack_optional<std::string>(j, "description"));
256258 x.set_files(j.at("files").get<std::map<std::string, File>>());
257259 x.set_forks_url(j.at("forks_url").get<std::string>());
Test case

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

1 generated file · +1 −0
Mcplusplusdefault / quicktype.hpp+1 −0
@@ -212,6 +212,7 @@ namespace quicktype {
212212 x.set_id(j.at("id").get<int64_t>());
213213 x.set_items(j.at("items").get<int64_t>());
214214 x.set_name(j.at("name").get<std::string>());
215+ j.at("parent");
215216 x.set_parent(get_stack_optional<int64_t>(j, "parent"));
216217 x.set_updated_at(j.at("updated_at").get<std::string>());
217218 x.set_uri(j.at("uri").get<std::string>());
Test case

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

1 generated file · +5 −0
Mcplusplusdefault / quicktype.hpp+5 −0
@@ -681,7 +681,9 @@ namespace quicktype {
681681 x.set_approved_by(get_untyped(j, "approved_by"));
682682 x.set_archived(j.at("archived").get<bool>());
683683 x.set_author(j.at("author").get<std::string>());
684+ j.at("author_flair_css_class");
684685 x.set_author_flair_css_class(get_stack_optional<std::string>(j, "author_flair_css_class"));
686+ j.at("author_flair_text");
685687 x.set_author_flair_text(get_stack_optional<std::string>(j, "author_flair_text"));
686688 x.set_banned_at_utc(get_untyped(j, "banned_at_utc"));
687689 x.set_banned_by(get_untyped(j, "banned_by"));
@@ -724,6 +726,7 @@ namespace quicktype {
724726 x.set_secure_media(get_untyped(j, "secure_media"));
725727 x.set_secure_media_embed(j.at("secure_media_embed").get<MediaEmbed>());
726728 x.set_selftext(j.at("selftext").get<std::string>());
729+ j.at("selftext_html");
727730 x.set_selftext_html(get_stack_optional<std::string>(j, "selftext_html"));
728731 x.set_spoiler(j.at("spoiler").get<bool>());
729732 x.set_stickied(j.at("stickied").get<bool>());
@@ -733,7 +736,9 @@ namespace quicktype {
733736 x.set_subreddit_type(j.at("subreddit_type").get<SubredditType>());
734737 x.set_suggested_sort(j.at("suggested_sort").get<SuggestedSort>());
735738 x.set_thumbnail(j.at("thumbnail").get<std::string>());
739+ j.at("thumbnail_height");
736740 x.set_thumbnail_height(get_stack_optional<int64_t>(j, "thumbnail_height"));
741+ j.at("thumbnail_width");
737742 x.set_thumbnail_width(get_stack_optional<int64_t>(j, "thumbnail_width"));
738743 x.set_title(j.at("title").get<std::string>());
739744 x.set_ups(j.at("ups").get<int64_t>());
Test case

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

1 generated file · +1 −0
Mcplusplusdefault / quicktype.hpp+1 −0
@@ -279,6 +279,7 @@ namespace quicktype {
279279 x.set_links(j.at("links").get<std::vector<Link>>());
280280 x.set_name(j.at("name").get<std::string>());
281281 x.set_other_names(j.at("other_names").get<std::vector<nlohmann::json>>());
282+ j.at("superseded_by");
282283 x.set_superseded_by(get_stack_optional<std::string>(j, "superseded_by"));
283284 x.set_text(j.at("text").get<std::vector<Text>>());
284285 }
Test case

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

1 generated file · +2 −0
Mcplusplusdefault / quicktype.hpp+2 −0
@@ -243,8 +243,10 @@ namespace quicktype {
243243 x.set_id(j.at("id").get<std::string>());
244244 x.set_last_name(j.at("last_name").get<std::string>());
245245 x.set_name(j.at("name").get<std::string>());
246+ j.at("position");
246247 x.set_position(get_stack_optional<std::string>(j, "position"));
247248 x.set_status(j.at("status").get<Status>());
249+ j.at("title");
248250 x.set_title(get_stack_optional<Title>(j, "title"));
249251 x.set_updated_at(j.at("updated_at").get<std::string>());
250252 x.set_uri(j.at("uri").get<std::string>());
Test case

test/inputs/json/misc/ad8be.json

1 generated file · +2 −0
Mcplusplusdefault / quicktype.hpp+2 −0
@@ -286,6 +286,7 @@ namespace quicktype {
286286 inline void from_json(const json & j, OtherName& x) {
287287 if (!j.is_object()) throw std::runtime_error("Expected object");
288288 x.set_name(j.at("name").get<std::string>());
289+ j.at("note");
289290 x.set_note(get_stack_optional<std::string>(j, "note"));
290291 }
291292
@@ -317,6 +318,7 @@ namespace quicktype {
317318 x.set_links(j.at("links").get<std::vector<Link>>());
318319 x.set_name(j.at("name").get<std::string>());
319320 x.set_other_names(j.at("other_names").get<std::vector<OtherName>>());
321+ j.at("superseded_by");
320322 x.set_superseded_by(get_stack_optional<std::string>(j, "superseded_by"));
321323 x.set_text(j.at("text").get<std::vector<Text>>());
322324 }
Test case

test/inputs/json/misc/ae7f0.json

1 generated file · +2 −0
Mcplusplusdefault / quicktype.hpp+2 −0
@@ -557,7 +557,9 @@ namespace quicktype {
557557 x.set_is_self(j.at("is_self").get<bool>());
558558 x.set_is_video(j.at("is_video").get<bool>());
559559 x.set_likes(get_untyped(j, "likes"));
560+ j.at("link_flair_css_class");
560561 x.set_link_flair_css_class(get_stack_optional<std::string>(j, "link_flair_css_class"));
562+ j.at("link_flair_text");
561563 x.set_link_flair_text(get_stack_optional<std::string>(j, "link_flair_text"));
562564 x.set_locked(j.at("locked").get<bool>());
563565 x.set_media(get_untyped(j, "media"));
Test case

test/inputs/json/misc/af2d1.json

1 generated file · +13 −0
Mcplusplusdefault / quicktype.hpp+13 −0
@@ -494,33 +494,45 @@ namespace quicktype {
494494
495495 inline void from_json(const json & j, FeatureProperties& x) {
496496 if (!j.is_object()) throw std::runtime_error("Expected object");
497+ j.at("add_improv");
497498 x.set_add_improv(get_stack_optional<AddImprov>(j, "add_improv"));
498499 x.set_area(j.at("area_").get<double>());
499500 x.set_asset_numb(j.at("asset_numb").get<std::string>());
501+ j.at("comments");
500502 x.set_comments(get_stack_optional<std::string>(j, "comments"));
501503 x.set_condition(j.at("condition").get<int64_t>());
504+ j.at("constructi");
502505 x.set_constructi(get_stack_optional<std::string>(j, "constructi"));
503506 x.set_createdate(get_untyped(j, "createdate"));
504507 x.set_createuser(get_untyped(j, "createuser"));
505508 x.set_disposal_d(get_untyped(j, "disposal_d"));
506509 x.set_documents(j.at("documents").get<std::string>());
510+ j.at("drawing_nu");
507511 x.set_drawing_nu(get_stack_optional<std::string>(j, "drawing_nu"));
512+ j.at("file_numbe");
508513 x.set_file_numbe(get_stack_optional<std::string>(j, "file_numbe"));
514+ j.at("folder_num");
509515 x.set_folder_num(get_stack_optional<std::string>(j, "folder_num"));
516+ j.at("funding_ba");
510517 x.set_funding_ba(get_stack_optional<FundingBa>(j, "funding_ba"));
511518 x.set_historic_c(j.at("historic_c").get<int64_t>());
512519 x.set_inspection(j.at("inspection").get<std::string>());
513520 x.set_inspectors(get_untyped(j, "inspectors"));
514521 x.set_last_updat(get_untyped(j, "last_updat"));
522+ j.at("level_accu");
515523 x.set_level_accu(get_stack_optional<LevelAccu>(j, "level_accu"));
516524 x.set_material(j.at("material").get<Material>());
517525 x.set_mi_prinx(j.at("mi_prinx").get<int64_t>());
518526 x.set_mi_symbolo(j.at("mi_symbolo").get<MiSymbolo>());
519527 x.set_number_lan(j.at("number_lan").get<int64_t>());
528+ j.at("owner");
520529 x.set_owner(get_stack_optional<std::string>(j, "owner"));
530+ j.at("positional");
521531 x.set_positional(get_stack_optional<LevelAccu>(j, "positional"));
532+ j.at("project_nu");
522533 x.set_project_nu(get_stack_optional<std::string>(j, "project_nu"));
523534 x.set_rec_id(j.at("rec_id").get<int64_t>());
535+ j.at("record_cre");
524536 x.set_record_cre(get_stack_optional<std::string>(j, "record_cre"));
525537 x.set_shape_area(j.at("shape_area").get<double>());
526538 x.set_shape_leng(j.at("shape_leng").get<double>());
@@ -528,6 +540,7 @@ namespace quicktype {
528540 x.set_survey_num(get_untyped(j, "survey_num"));
529541 x.set_toe_rl(j.at("toe_rl").get<double>());
530542 x.set_top_rl(j.at("top_rl").get<double>());
543+ j.at("type");
531544 x.set_type(get_stack_optional<PropertiesType>(j, "type"));
532545 x.set_update_dat(j.at("update_dat").get<std::string>());
533546 x.set_updatedate(get_untyped(j, "updatedate"));
Test case

test/inputs/json/misc/be234.json

1 generated file · +4 −0
Mcplusplusdefault / quicktype.hpp+4 −0
@@ -913,6 +913,7 @@ namespace quicktype {
913913 x.set_archived(j.at("archived").get<bool>());
914914 x.set_author(j.at("author").get<std::string>());
915915 x.set_author_flair_css_class(get_untyped(j, "author_flair_css_class"));
916+ j.at("author_flair_text");
916917 x.set_author_flair_text(get_stack_optional<std::string>(j, "author_flair_text"));
917918 x.set_banned_at_utc(get_untyped(j, "banned_at_utc"));
918919 x.set_banned_by(get_untyped(j, "banned_by"));
@@ -923,6 +924,7 @@ namespace quicktype {
923924 x.set_contest_mode(j.at("contest_mode").get<bool>());
924925 x.set_created(j.at("created").get<double>());
925926 x.set_created_utc(j.at("created_utc").get<double>());
927+ j.at("distinguished");
926928 x.set_distinguished(get_stack_optional<std::string>(j, "distinguished"));
927929 x.set_domain(j.at("domain").get<Domain>());
928930 x.set_downs(j.at("downs").get<int64_t>());
@@ -937,6 +939,7 @@ namespace quicktype {
937939 x.set_link_flair_css_class(get_untyped(j, "link_flair_css_class"));
938940 x.set_link_flair_text(get_untyped(j, "link_flair_text"));
939941 x.set_locked(j.at("locked").get<bool>());
942+ j.at("media");
940943 x.set_media(get_stack_optional<Media>(j, "media"));
941944 x.set_media_embed(j.at("media_embed").get<MediaEmbed>());
942945 x.set_mod_reports(j.at("mod_reports").get<std::vector<nlohmann::json>>());
@@ -952,6 +955,7 @@ namespace quicktype {
952955 x.set_report_reasons(get_untyped(j, "report_reasons"));
953956 x.set_saved(j.at("saved").get<bool>());
954957 x.set_score(j.at("score").get<int64_t>());
958+ j.at("secure_media");
955959 x.set_secure_media(get_stack_optional<Media>(j, "secure_media"));
956960 x.set_secure_media_embed(j.at("secure_media_embed").get<MediaEmbed>());
957961 x.set_selftext(j.at("selftext").get<std::string>());
Test case

test/inputs/json/misc/d23d5.json

1 generated file · +1 −0
Mcplusplusdefault / quicktype.hpp+1 −0
@@ -203,6 +203,7 @@ namespace quicktype {
203203
204204 inline void from_json(const json & j, Result& x) {
205205 if (!j.is_object()) throw std::runtime_error("Expected object");
206+ j.at("acronym");
206207 x.set_acronym(get_stack_optional<std::string>(j, "acronym"));
207208 x.set_created_at(j.at("created_at").get<std::string>());
208209 x.set_id(j.at("id").get<std::string>());
Test case

test/inputs/json/misc/f22f5.json

1 generated file · +2 −0
Mcplusplusdefault / quicktype.hpp+2 −0
@@ -552,7 +552,9 @@ namespace quicktype {
552552 x.set_is_self(j.at("is_self").get<bool>());
553553 x.set_is_video(j.at("is_video").get<bool>());
554554 x.set_likes(get_untyped(j, "likes"));
555+ j.at("link_flair_css_class");
555556 x.set_link_flair_css_class(get_stack_optional<std::string>(j, "link_flair_css_class"));
557+ j.at("link_flair_text");
556558 x.set_link_flair_text(get_stack_optional<std::string>(j, "link_flair_text"));
557559 x.set_locked(j.at("locked").get<bool>());
558560 x.set_media(get_untyped(j, "media"));
Test case

test/inputs/json/priority/bug2590.json

1 generated file · +2 −0
Mcplusplusdefault / quicktype.hpp+2 −0
@@ -133,7 +133,9 @@ namespace quicktype {
133133
134134 inline void from_json(const json & j, Invoice& x) {
135135 if (!j.is_object()) throw std::runtime_error("Expected object");
136+ j.at("createdAt");
136137 x.set_created_at(get_stack_optional<std::string>(j, "createdAt"));
138+ j.at("dueDate");
137139 x.set_due_date(get_stack_optional<std::string>(j, "dueDate"));
138140 x.set_name(j.at("name").get<std::string>());
139141 }
Test case

test/inputs/json/priority/list.json

1 generated file · +1 −0
Mcplusplusdefault / quicktype.hpp+1 −0
@@ -113,6 +113,7 @@ namespace quicktype {
113113 inline void from_json(const json & j, TopLevel& x) {
114114 if (!j.is_object()) throw std::runtime_error("Expected object");
115115 x.set_data(j.at("data").get<int64_t>());
116+ j.at("next");
116117 x.set_next(get_heap_optional<TopLevel>(j, "next"));
117118 }
Test case

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

1 generated file · +3 −0
Mcplusplusdefault / quicktype.hpp+3 −0
@@ -1614,6 +1614,7 @@ namespace quicktype {
16141614 x.set_created_at(j.at("created_at").get<std::string>());
16151615 x.set_creator(j.at("creator").get<User>());
16161616 x.set_description(j.at("description").get<std::string>());
1617+ j.at("due_on");
16171618 x.set_due_on(get_stack_optional<std::string>(j, "due_on"));
16181619 x.set_html_url(j.at("html_url").get<std::string>());
16191620 x.set_id(j.at("id").get<int64_t>());
@@ -1666,6 +1667,7 @@ namespace quicktype {
16661667 x.set_assignee(get_untyped(j, "assignee"));
16671668 x.set_assignees(j.at("assignees").get<std::vector<nlohmann::json>>());
16681669 x.set_body(j.at("body").get<std::string>());
1670+ j.at("closed_at");
16691671 x.set_closed_at(get_stack_optional<std::string>(j, "closed_at"));
16701672 x.set_comments(j.at("comments").get<int64_t>());
16711673 x.set_comments_url(j.at("comments_url").get<std::string>());
@@ -1676,6 +1678,7 @@ namespace quicktype {
16761678 x.set_labels(j.at("labels").get<std::vector<Label>>());
16771679 x.set_labels_url(j.at("labels_url").get<std::string>());
16781680 x.set_locked(j.at("locked").get<bool>());
1681+ j.at("milestone");
16791682 x.set_milestone(get_stack_optional<Milestone>(j, "milestone"));
16801683 x.set_number(j.at("number").get<int64_t>());
16811684 x.set_pull_request(get_stack_optional<IssuePullRequest>(j, "pull_request"));
Test case

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

1 generated file · +1 −0
Mcplusplusdefault / quicktype.hpp+1 −0
@@ -184,6 +184,7 @@ namespace quicktype {
184184 x.set_address(get_stack_optional<Address>(j, "address"));
185185 x.set_created_at(get_stack_optional<std::string>(j, "created_at"));
186186 x.set_name(j.at("name").get<std::string>());
187+ j.at("sex");
187188 x.set_sex(get_stack_optional<int64_t>(j, "sex"));
188189 }
Test case

test/inputs/json/samples/pokedex.json

3 generated files · +3 −0
Mcplusplus-multi-sourcedefault / Generators.hpp+1 −0
@@ -55,6 +55,7 @@ namespace quicktype {
5555 x.set_height(j.at("height").get<std::string>());
5656 x.set_id(j.at("id").get<int64_t>());
5757 x.set_img(j.at("img").get<std::string>());
58+ j.at("multipliers");
5859 x.set_multipliers(get_stack_optional<std::vector<double>>(j, "multipliers"));
5960 x.set_name(j.at("name").get<std::string>());
6061 x.set_next_evolution(get_stack_optional<std::vector<Evolution>>(j, "next_evolution"));
Mcplusplusboost-true--bed8626e10e6 / quicktype.hpp+1 −0
@@ -258,6 +258,7 @@ namespace quicktype {
258258 x.set_height(j.at("height").get<std::string>());
259259 x.set_id(j.at("id").get<int64_t>());
260260 x.set_img(j.at("img").get<std::string>());
261+ j.at("multipliers");
261262 x.set_multipliers(get_stack_optional<std::vector<double>>(j, "multipliers"));
262263 x.set_name(j.at("name").get<std::string>());
263264 x.set_next_evolution(get_stack_optional<std::vector<Evolution>>(j, "next_evolution"));
Mcplusplusdefault / quicktype.hpp+1 −0
@@ -257,6 +257,7 @@ namespace quicktype {
257257 x.set_height(j.at("height").get<std::string>());
258258 x.set_id(j.at("id").get<int64_t>());
259259 x.set_img(j.at("img").get<std::string>());
260+ j.at("multipliers");
260261 x.set_multipliers(get_stack_optional<std::vector<double>>(j, "multipliers"));
261262 x.set_name(j.at("name").get<std::string>());
262263 x.set_next_evolution(get_stack_optional<std::vector<Evolution>>(j, "next_evolution"));
Test case

test/inputs/json/samples/reddit.json

1 generated file · +5 −0
Mcplusplusdefault / quicktype.hpp+5 −0
@@ -764,7 +764,9 @@ namespace quicktype {
764764 x.set_approved_by(get_untyped(j, "approved_by"));
765765 x.set_archived(j.at("archived").get<bool>());
766766 x.set_author(j.at("author").get<std::string>());
767+ j.at("author_flair_css_class");
767768 x.set_author_flair_css_class(get_stack_optional<std::string>(j, "author_flair_css_class"));
769+ j.at("author_flair_text");
768770 x.set_author_flair_text(get_stack_optional<std::string>(j, "author_flair_text"));
769771 x.set_banned_at_utc(get_untyped(j, "banned_at_utc"));
770772 x.set_banned_by(get_untyped(j, "banned_by"));
@@ -775,6 +777,7 @@ namespace quicktype {
775777 x.set_contest_mode(j.at("contest_mode").get<bool>());
776778 x.set_created(j.at("created").get<int64_t>());
777779 x.set_created_utc(j.at("created_utc").get<int64_t>());
780+ j.at("distinguished");
778781 x.set_distinguished(get_stack_optional<std::string>(j, "distinguished"));
779782 x.set_domain(j.at("domain").get<Domain>());
780783 x.set_downs(j.at("downs").get<int64_t>());
@@ -786,7 +789,9 @@ namespace quicktype {
786789 x.set_is_self(j.at("is_self").get<bool>());
787790 x.set_is_video(j.at("is_video").get<bool>());
788791 x.set_likes(get_untyped(j, "likes"));
792+ j.at("link_flair_css_class");
789793 x.set_link_flair_css_class(get_stack_optional<std::string>(j, "link_flair_css_class"));
794+ j.at("link_flair_text");
790795 x.set_link_flair_text(get_stack_optional<std::string>(j, "link_flair_text"));
791796 x.set_locked(j.at("locked").get<bool>());
792797 x.set_media(get_untyped(j, "media"));
Test case

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

1 generated file · +4 −0
Mcplusplusdefault / quicktype.hpp+4 −0
@@ -495,7 +495,9 @@ namespace quicktype {
495495 x.set_osid(j.at("osid").get<std::string>());
496496 x.set_pvsid(j.at("pvsid").get<std::string>());
497497 x.set_sortname(j.at("sortname").get<std::string>());
498+ j.at("twitterid");
498499 x.set_twitterid(get_stack_optional<std::string>(j, "twitterid"));
500+ j.at("youtubeid");
499501 x.set_youtubeid(get_stack_optional<std::string>(j, "youtubeid"));
500502 }
501503
@@ -522,6 +524,7 @@ namespace quicktype {
522524
523525 inline void from_json(const json & j, Object& x) {
524526 if (!j.is_object()) throw std::runtime_error("Expected object");
527+ j.at("caucus");
525528 x.set_caucus(get_stack_optional<Party>(j, "caucus"));
526529 x.set_congress_numbers(j.at("congress_numbers").get<std::vector<int64_t>>());
527530 x.set_current(j.at("current").get<bool>());
@@ -529,6 +532,7 @@ namespace quicktype {
529532 x.set_district(get_untyped(j, "district"));
530533 x.set_enddate(j.at("enddate").get<std::string>());
531534 x.set_extra(j.at("extra").get<Extra>());
535+ j.at("leadership_title");
532536 x.set_leadership_title(get_stack_optional<std::string>(j, "leadership_title"));
533537 x.set_party(j.at("party").get<Party>());
534538 x.set_person(j.at("person").get<Person>());
Test case

test/inputs/schema/bool-string.schema

1 generated file · +1 −0
Mschema-cplusplusdefault / quicktype.hpp+1 −0
@@ -151,6 +151,7 @@ namespace quicktype {
151151 if (!j.is_object()) throw std::runtime_error("Expected object");
152152 x.set_arr_nullable(get_stack_optional<std::vector<std::optional<std::string>>>(j, "arrNullable"));
153153 x.set_arr_one(get_stack_optional<std::vector<std::string>>(j, "arrOne"));
154+ j.at("nullable");
154155 x.set_nullable(get_stack_optional<std::string>(j, "nullable"));
155156 x.set_one(j.at("one").get<std::string>());
156157 x.set_optional(get_stack_optional<std::string>(j, "optional"));
Test case

test/inputs/schema/direct-union.schema

1 generated file · +1 −0
Mschema-cplusplusdefault / quicktype.hpp+1 −0
@@ -141,6 +141,7 @@ namespace quicktype {
141141 inline void from_json(const json & j, Thing& x) {
142142 if (!j.is_object()) throw std::runtime_error("Expected object");
143143 x.set_optional(get_stack_optional<std::variant<std::vector<nlohmann::json>, bool, double, int64_t, std::map<std::string, nlohmann::json>, std::string>>(j, "optional"));
144+ j.at("required");
144145 x.set_required(get_stack_optional<std::variant<std::vector<nlohmann::json>, bool, double, int64_t, std::map<std::string, nlohmann::json>, std::string>>(j, "required"));
145146 }
Test case

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

1 generated file · +1 −0
Mschema-cplusplusdefault / quicktype.hpp+1 −0
@@ -112,6 +112,7 @@ namespace quicktype {
112112
113113 inline void from_json(const json & j, TopLevel& x) {
114114 if (!j.is_object()) throw std::runtime_error("Expected object");
115+ j.at("enum");
115116 x.set_top_level_enum(get_stack_optional<Enum>(j, "enum"));
116117 }
Test case

test/inputs/schema/implicit-class-array-union.schema

1 generated file · +1 −0
Mschema-cplusplusdefault / quicktype.hpp+1 −0
@@ -145,6 +145,7 @@ namespace quicktype {
145145
146146 inline void from_json(const json & j, TopLevel& x) {
147147 if (!j.is_object()) throw std::runtime_error("Expected object");
148+ j.at("foo");
148149 x.set_foo(get_stack_optional<std::variant<std::vector<int64_t>, bool, FooClass, double, int64_t, std::string>>(j, "foo"));
149150 }
Test case

test/inputs/schema/integer-string.schema

1 generated file · +1 −0
Mschema-cplusplusdefault / quicktype.hpp+1 −0
@@ -151,6 +151,7 @@ namespace quicktype {
151151 if (!j.is_object()) throw std::runtime_error("Expected object");
152152 x.set_arr_nullable(get_stack_optional<std::vector<std::optional<std::string>>>(j, "arrNullable"));
153153 x.set_arr_one(get_stack_optional<std::vector<std::string>>(j, "arrOne"));
154+ j.at("nullable");
154155 x.set_nullable(get_stack_optional<std::string>(j, "nullable"));
155156 x.set_one(j.at("one").get<std::string>());
156157 x.set_optional(get_stack_optional<std::string>(j, "optional"));
Test case

test/inputs/schema/strict-optional.schema

1 generated file · +1 −0
Mschema-cplusplusdefault / quicktype.hpp+1 −0
@@ -107,6 +107,7 @@ namespace quicktype {
107107
108108 inline void from_json(const json & j, TopLevel& x) {
109109 if (!j.is_object()) throw std::runtime_error("Expected object");
110+ j.at("foo");
110111 x.set_foo(get_stack_optional<double>(j, "foo"));
111112 }
Test case

test/inputs/schema/uuid.schema

1 generated file · +1 −0
Mschema-cplusplusdefault / quicktype.hpp+1 −0
@@ -135,6 +135,7 @@ namespace quicktype {
135135 if (!j.is_object()) throw std::runtime_error("Expected object");
136136 x.set_arr_nullable(get_stack_optional<std::vector<std::optional<std::string>>>(j, "arrNullable"));
137137 x.set_arr_one(get_stack_optional<std::vector<std::string>>(j, "arrOne"));
138+ j.at("nullable");
138139 x.set_nullable(get_stack_optional<std::string>(j, "nullable"));
139140 x.set_one(j.at("one").get<std::string>());
140141 x.set_optional(get_stack_optional<std::string>(j, "optional"));
No generated files match these filters.