From c0b55a0162d897c240ad69a0e9704030768ac8ba Mon Sep 17 00:00:00 2001 From: Niels Date: Mon, 21 Dec 2015 08:52:53 +0100 Subject: [PATCH] Update --- Nodes.xml | 10 + Tokens.xml | 24 + annotated.html | 2 +- classes.html | 2 +- classnlohmann_1_1basic__json-members.html | 6 +- classnlohmann_1_1basic__json.html | 9 +- ...asic__json_1_1const__iterator-members.html | 2 +- ...ann_1_1basic__json_1_1const__iterator.html | 4 +- ...tor_a019087161350d393f3e4ac841cdd3dbd.html | 4 +- ...tor_a17e5f5d3598e6901f3c1c1f7dc60589f.html | 4 +- ...tor_a1cba94e5a67ee52bc66b898a4e08359d.html | 4 +- ...tor_a211523a57024a43965862b497b89ab91.html | 4 +- ...tor_a301749e9779adafd395369ac36df93df.html | 4 +- ...tor_a36086a699b95e06976c11367b7d6ba53.html | 4 +- ...tor_a4632d8307fc315f21e2ecc9ba5aa6346.html | 4 +- ...tor_a4f7ac43b0ab34c387b1ae1a8e9c08467.html | 4 +- ...tor_a5aff013c03c1bdc248346c249bec7b67.html | 4 +- ...tor_a62cad59e006eb7fa594c2c5b65a76610.html | 4 +- ...tor_a67848d4b7bfa576434ad9807147b5870.html | 4 +- ...tor_a6b3e43d2f45fa611825dbdf4e88fffe2.html | 4 +- ...tor_a83454954e4e16be3d5316f9322e91a34.html | 4 +- ...tor_a86a1771e6658d0b14868df6c197d2353.html | 2 +- ...tor_a8d024cbc99db0d8106899f9fd9973735.html | 4 +- ...tor_ab74b39747a9dad60650a57133fca85b3.html | 4 +- ...tor_ab7dacd8e3ee9b3756bfcdb87dd55a515.html | 4 +- ...tor_ab9d31bf0d0b4d7310c858a04ce84a52f.html | 4 +- ...tor_abb1921cbf0ad4036c83bc6303e22171f.html | 4 +- ...tor_abbacd95955c602efc9a58ed1ffdb46c4.html | 4 +- ...tor_ac36b9187de43721a4bf1b052578bb80b.html | 4 +- ...tor_ac634a659837f5aebc97125e031de23b5.html | 4 +- ...tor_acea5b75d1087e2a92833946d9dc547ff.html | 4 +- ...tor_ada3100cdb8700566051828f1355fa745.html | 4 +- ...tor_adb50d6043ace464d9f694869724d7fb2.html | 4 +- ...tor_adda9a4bd7f0edb9cb39dc0dca3d4a286.html | 4 +- ...tor_adf6f9d3f8f8d8b1ccedabb4f04c098ad.html | 4 +- ...tor_ae480d5c86e5e1129d53d1e19782017a6.html | 4 +- ...tor_aebd099d9a70ffe760242ef24046c9002.html | 4 +- ...tor_af34f68f1ce670e7f25ce267b2b1e64ab.html | 4 +- ...tor_af55564e391b23e41abe78bc4bbe4edcb.html | 4 +- ...nn_1_1basic__json_1_1iterator-members.html | 2 +- classnlohmann_1_1basic__json_1_1iterator.html | 4 +- ...ic__json_1_1iterator__wrapper-members.html | 2 +- ...n_1_1basic__json_1_1iterator__wrapper.html | 4 +- ...per_a784f17dec56c1ec90b0b73eb8307ea7d.html | 4 +- ...per_a80305d6ac43b6fb53c62256e450485ac.html | 4 +- ...per_ab5951e20b05998e768943acd0b418c81.html | 4 +- ...tor_a037e5f3de196ff4cea8a95a8a4e35882.html | 4 +- ...tor_a0a43bd93e6e46645ed0b93d3af7bfe22.html | 4 +- ...tor_a0c0acb68cc2a50a0e8782f860184883f.html | 4 +- ...tor_a0eb7ac9b746fb6f931ae728f70f92a8e.html | 4 +- ...tor_a1220b360a07b0605f7d2f4b3cfd16736.html | 4 +- ...tor_a21d32a4547ba4cbadd8b435a6a0d0e1b.html | 4 +- ...tor_a302d810a0685f8d39368eaa65c833acf.html | 4 +- ...tor_a33277dbf06ac5c1e7102e26f6b5e2c00.html | 4 +- ...tor_a4ae612fa9eb59784047b40f0419db65d.html | 4 +- ...tor_a4f6e03ae3bb674ebf0b727f74957c12f.html | 2 +- ...tor_a6e91e9d94a0e14d2fc28cfdf3beac2b1.html | 4 +- ...tor_a7031e759ee52d1283aada0ff81108a5e.html | 4 +- ...tor_a94285e2ade0bfef829b81377bbbca6cf.html | 4 +- ...tor_a9fcfda575b08d0c73b6274cdbbe7f184.html | 4 +- ...tor_aa2bd10afdcfc70acb8eaabbd2f6496f0.html | 4 +- ...tor_ab220a0cc3fe410fbae4524208bd5834f.html | 4 +- ...tor_ab5cf753cb2f8ce53b9f3e54c39e50ee3.html | 4 +- ...tor_abaebf4e21956dd20d9f862fa5647d32d.html | 4 +- ...tor_af64127418c567660d92b1afdfe9676db.html | 4 +- ...tor_afe65b5a0572c7bfdd7ccc942bb8e9fe2.html | 4 +- ...on_1_1json__reverse__iterator-members.html | 2 +- ...asic__json_1_1json__reverse__iterator.html | 2 +- ...tor_a03e542423284327d3801cf078f1c2b44.html | 4 +- ...tor_a0b494ef7570d031216f907d2c85ec323.html | 4 +- ...tor_a15e9cf4c5a43238e82ab69c4a295c491.html | 4 +- ...tor_a1c84e6d1f047ab4105fa665f455158a7.html | 4 +- ...tor_a2a1dc92fbec862883c8b89755c787c99.html | 4 +- ...tor_a5ee9ec91a6ddcd8d72278d681361626f.html | 4 +- ...tor_a61d31531e0dfc5448e7fa15678b05bbe.html | 4 +- ...tor_a6bd38ed124df0332ba3263a9176b0101.html | 4 +- ...tor_a70086e392779ecbbc9e6845b2be126a0.html | 4 +- ...tor_aa82b48aee07baee284f8340b37ec6864.html | 4 +- ...tor_ab6245ab29d8481ef2a2351c02cc31d4d.html | 4 +- ...tor_ac427d8f61858c13b7c16649bfbf75e76.html | 4 +- ...tor_ad3d6837b6f97065625c6c65f62f4b6d4.html | 4 +- ...tor_ae988bd36b7d098b1157871f83b2d6265.html | 4 +- ...tor_af972fce017b24906236ab235857a11a8.html | 4 +- ...son_a01a2643289b69cd71d9b3f3fc209b748.html | 8 +- ...son_a0703ae5cbd2daac5e6c0ae01d3a1b114.html | 8 +- ...son_a07c9c38a1f01675759e05d5d34627343.html | 10 +- ...son_a088460b5d95f384a4f2ec9e52f4f66ba.html | 4 +- ...son_a0afa4512f03406db0d0432657e9c7361.html | 4 +- ...son_a114095c452ca2f4ba976548df3da68be.html | 4 +- ...son_a11c3dd843c21c58daa651e84046a82af.html | 4 +- ...son_a122640e7e2db1814fc7bbb3c122ec76e.html | 6 +- ...son_a13e5642dbfa1602c937d295a085413cc.html | 4 +- ...son_a1683189bd539313b5559f07961166c8b.html | 4 +- ...son_a16a275d0201e9aedc87c933c764b8869.html | 4 +- ...son_a1dc0c521042807e216d11110d2f002ff.html | 4 +- ...son_a231b02148577b69a154b2ce2c87a5522.html | 4 +- ...son_a234f03dce002783748ca401a42bc6472.html | 6 +- ...son_a266c4dd24d11a86e4831523af5d9df4d.html | 6 +- ...son_a26b7e4876af25eae5800ce43f93aaef2.html | 8 +- ...son_a2adfc8d24bea3908398cbf325b5dc1d7.html | 8 +- ...son_a2f07bcf7e75c34396476dd1790f26ce8.html | 8 +- ...son_a3173944e7b1809a333def4078a0b92a3.html | 8 +- ...son_a3287df6546c905fb0a5786deb4b1cf32.html | 8 +- ...son_a33f1632cfdbf460b4913f4e8a43dd9e4.html | 4 +- ...son_a34d6a60dd99e9f33b8273a1c8db5669b.html | 6 +- ...son_a3d4e4bab95b24ccab42ed37e0ede2d98.html | 4 +- ...son_a42f9133f978dde4cce5851b2c2434a0c.html | 4 +- ...son_a4361aa791f3980abb239e4155a3450cb.html | 10 +- ...son_a457fec897d7b6283c60ca236ebb1f5e8.html | 4 +- ...son_a48c8d153bc2fd1af655063a4b984feac.html | 4 +- ...son_a4943b7f16ddc4e0df33c0cae7ef14471.html | 8 +- ...son_a4ad3f27ecece8f644e8dca69a97eb67f.html | 8 +- ...son_a4bf695ddf4a00ea8feea2c725ec847f1.html | 8 +- ...son_a4d688b5ff534d3ab4e284b3191061529.html | 8 +- ...son_a5114ed5eb394a2805da0bd1acba95ae2.html | 8 +- ...son_a53a2abfdd4f72c7df5aba1155bf03e48.html | 4 +- ...son_a57703688bee6b9736ab3a430d8d246f2.html | 4 +- ...son_a57a96ab3ff1ce7b48a754129fb12c982.html | 8 +- ...son_a5a2d4dbcdbc8ea065b87daf52cd786b9.html | 4 +- ...son_a5c8bb5200f5eac10d31e26be46e5b1ac.html | 6 +- ...son_a5d428360d75a52f6af74751d1cc912c6.html | 4 +- ...son_a5e34c5435e557d0bf666bd7311211405.html | 6 +- ...son_a5f0aad50ed7e8aec3128fe018c18b3fe.html | 4 +- ...son_a5fd8b54389698edf0c08e2dd001f610b.html | 4 +- ...son_a60ca396028b8d9714c6e10efbf475af6.html | 6 +- ...son_a63691315292df8e1522b00d37ebb1ffc.html | 4 +- ...son_a652414dd930cb3af3b6f454cc535a23e.html | 4 +- ...son_a656939a3dc9a6047e4afacd9e11b83a6.html | 6 +- ...son_a66f936cfbd252f85bd3dc2598e37a64b.html | 8 +- ...son_a6944904b3b59769b1cf62ac2532cbe33.html | 4 +- ...son_a696ced74d8edc0b63a000a72907ab109.html | 4 +- ...son_a6a7f45095675ac6fd1d018a0e41874be.html | 10 +- ...son_a6b7428e8c1169497f47b81667001cbfb.html | 10 +- ...son_a6bbd3e72a870f1ba81ff6886b063b0fe.html | 4 +- ...son_a6dff6a02a2be250b8f8dc2f47be65544.html | 8 +- ...son_a6e2e21da48f5d9471716cd868a068327.html | 6 +- ...son_a71eba33d906745e66f340952b79fbce3.html | 4 +- ...son_a72442ccbb378b4464a24a2da1e784041.html | 8 +- ...son_a72ba20783ecb3eec98bd6a3b870d565c.html | 10 +- ...son_a74472977b798c7b7989e6e7cb960ecff.html | 4 +- ...son_a74a943800c7f103d0990d7eef82c6453.html | 6 +- ...son_a74ccfa471a0c061876b247f820f3c741.html | 12 +- ...son_a75a1754e0d39f33095d3102a8bdb9881.html | 12 +- ...son_a76cfc5062bf6223396ab82c753cd4634.html | 6 +- ...son_a7c08f966200af98db0313a3b517ce0a9.html | 8 +- ...son_a7c19a5c3be6cc755377ee41eade78baf.html | 10 +- ...son_a7d0db3b728d820d4984df78d97d2b104.html | 4 +- ...son_a7d1b990f2c12fecb57db1504fdadd0bb.html | 8 +- ...son_a7dab69b10b98e7bc694339720e37fb2b.html | 10 +- ...son_a7f97a91ad8f1d5cf0b9213bd24f247c4.html | 6 +- ...son_a80ceaa3bdd346292273b309e08525c1c.html | 4 +- ...son_a83cbbfbf5d3ecbad6de8ece0be6b36c4.html | 8 +- ...son_a87db51b6b936fb2ea293cdbc8702dcb8.html | 6 +- ...son_a8b526709d395142b68d21abfbfff17c3.html | 8 +- ...son_a8c40cd9ead4de7c82f28268bdf0ec98a.html | 8 +- ...son_a8e34088252a3ee6b2377f3a1f26dd1ba.html | 126 +- ...son_a8fa74698f4061e18ec664009f3af1ddf.html | 12 +- ...son_a930e14150ffa067bcf56d35cb00271e1.html | 4 +- ...son_a960962c683909619d1d2fbbe856c022e.html | 8 +- ...son_a9730b9f7bc2150e641fe20198d4477c7.html | 6 +- ...son_a98e05a2c9b8f74bd60442772cddeee52.html | 6 +- ...son_a9993148cb0473365e52998c7315f9ada.html | 4 +- ...son_a9a73d1b71c9e913aa2888d8b40c72ee9.html | 6 +- ...son_a9c26c5d0f4a519c7236149b9aeb3ef9e.html | 4 +- ...son_a9daafb4c15ed5a008cb825bbd8c29d87.html | 126 +- ...son_a9f17a0690155e3a5603246ccec81499e.html | 4 +- ...son_aa0422e861b4cbd7cdcaad7a11a1304a9.html | 12 +- ...son_aa1f3b3f1dca79392d6727b81f9668c6c.html | 8 +- ...son_aa5413178b8041f7ac685dec4b040dd2c.html | 10 +- ...son_aa6a24b176f9599a21d662cc5f8e1ca76.html | 4 +- ...son_aa6c32f669a2e523666072003d0ea46f4.html | 4 +- ...son_aa71e977d31f470689883ac60d16ea4ac.html | 10 +- ...son_aabe4661644ea549089f0886c2551d2ac.html | 4 +- ...son_aac185a137428a7337aa620de07bfbbd7.html | 6 +- ...son_aacd442b66140c764c594ac8ad7dfd5b3.html | 6 +- ...son_aacf6c869f6a9c66ac1bc99e93f310044.html | 4 +- ...son_aaf363408931d76472ded14017e59c9e8.html | 6 +- ...son_aafa839f2a74dc1b5060314b3423143b8.html | 4 +- ...son_ab14e3503305622fb5ab01a7f490916e8.html | 10 +- ...son_ab2162bc76e10d8736cab9b2039956054.html | 10 +- ...son_ab74b2398f29acc6ffbf48f1b8974a848.html | 4 +- ...son_ab7d60fb6cb8e8f5740e588f9dc953819.html | 4 +- ...son_ab9a20bd1d391e9cb968db50c246f728d.html | 8 +- ...son_ab9da2afc6f77295f25252725fde142a6.html | 8 +- ...son_abe8f3224ca4041908ddb466cb9caecf1.html | 8 +- ...son_ac160789f17d206a5404981ca0957e303.html | 4 +- ...son_ac4011bd0781e51afe4994d2b09fd27e9.html | 4 +- ...son_ac8163abe518595f19dbee68db1caaaf7.html | 4 +- ...son_ac82abedf356d252e0589850c3d8b35ba.html | 4 +- ...son_ac943391891fcde0a71a15ce990e0f7f4.html | 4 +- ...son_acd08f9179c8c1e9f2cd7575a724ce27e.html | 4 +- ...son_acdf4445333649ec94198f09a62144884.html | 10 +- ...son_ace8338e57fdb11e1955c2a0c2d782069.html | 4 +- ...son_ad1f617d29e8923dd40c89153f792b1bc.html | 4 +- ...son_ad2c4513cef5d8db760c4b2d871eea42c.html | 4 +- ...son_ad497cbc4f80c8d79662ee6e19bf145dd.html | 14 +- ...son_ad6734c2b91b1b77aa2b43b65c3619c05.html | 4 +- ...son_ad8e0c5d04f016d1b3ac7369e5c73bedf.html | 10 +- ...son_ada8e01109a60088e4db2a670d4903b54.html | 4 +- ...son_adbd4c16c9ac641b2a4736bc2c6787d83.html | 4 +- ...son_ade7bd6e0fe221fec9d3fa9b430f5ce76.html | 4 +- ...son_adeaef2ab021997a11a826c378c2365e1.html | 4 +- ...son_adf5dea6fa9d7075ff89ca0796ab47a7e.html | 4 +- ...son_ae347859ec88176ef76a0cbe5b4514fcf.html | 6 +- ...son_ae50f22a1c646b8627e88f1313cceffd4.html | 6 +- ...son_ae874cfc1746b560c53a03bcf5b7bbeed.html | 4 +- ...son_ae928414b2805cf6ef56b4e4f8d235416.html | 4 +- ...son_ae960d2d6bc7b94fe39cc5e9f106edfa9.html | 4 +- ...son_aea1c863b719b4ca5b77188c171bbfafe.html | 4 +- ...son_af073eec08d2e68924098aef09e9a10ba.html | 8 +- ...son_af0ebd1757acb971a6504b4acabf88584.html | 8 +- ...son_af127fb69c580c17821da5f5be57e3585.html | 4 +- ...son_af1e3f9e079136abca2530c8191c56292.html | 6 +- ...son_af2730bc8ffa6b28916875c13ee7b83f5.html | 10 +- ...son_af661bc209bf22097e2f76607a11b56bf.html | 4 +- ...son_af6b6050ccd906dddf7c9f47fe3ad62a5.html | 4 +- ...son_af709c079de0ac3507143ea2c60699bd0.html | 4 +- ...son_af74581d177dafc38df5a126ccd358999.html | 4 +- ...son_af7d0adc984d04fc70c3d29fcd63e096a.html | 10 +- ...son_afc4223b5ad03b1b76e925374a8fff98e.html | 4 +- dir_68267d1309a1af8e8297ef4c3efbcdba.html | 2 +- functions.html | 2 +- functions_b.html | 2 +- functions_c.html | 2 +- functions_d.html | 2 +- functions_e.html | 2 +- functions_enum.html | 2 +- functions_f.html | 2 +- functions_func.html | 4 +- functions_g.html | 2 +- functions_i.html | 2 +- functions_j.html | 2 +- functions_k.html | 2 +- functions_m.html | 2 +- functions_n.html | 2 +- functions_o.html | 8 +- functions_p.html | 2 +- functions_r.html | 2 +- functions_rela.html | 2 +- functions_s.html | 2 +- functions_t.html | 2 +- functions_type.html | 2 +- functions_v.html | 2 +- functions_~.html | 2 +- graph_legend.html | 2 +- hierarchy.html | 2 +- index.html | 2 +- json_8hpp_source.html | 6913 +++++++++-------- namespacemembers.html | 2 +- namespacemembers_type.html | 2 +- namespacenlohmann.html | 2 +- ..._1anonymous__namespace_02json_8hpp_03.html | 2 +- ...ann_a2bfd99e845a2e5cd90aeaf1b1431f474.html | 4 +- search/all_d.js | 2 +- search/functions_b.js | 2 +- ...ash_3_01nlohmann_1_1json_01_4-members.html | 2 +- ...std_1_1hash_3_01nlohmann_1_1json_01_4.html | 4 +- ...1_4_afd03f6ad53db22868ca4163a8200b2f9.html | 4 +- 258 files changed, 4395 insertions(+), 4033 deletions(-) diff --git a/Nodes.xml b/Nodes.xml index 5d656de46..1fadb9b8e 100644 --- a/Nodes.xml +++ b/Nodes.xml @@ -983,11 +983,21 @@ classnlohmann_1_1basic__json_af74581d177dafc38df5a126ccd358999.html af74581d177dafc38df5a126ccd358999 + + operator[] + classnlohmann_1_1basic__json_a8e34088252a3ee6b2377f3a1f26dd1ba.html + a8e34088252a3ee6b2377f3a1f26dd1ba + operator[] classnlohmann_1_1basic__json_a266c4dd24d11a86e4831523af5d9df4d.html a266c4dd24d11a86e4831523af5d9df4d + + operator[] + classnlohmann_1_1basic__json_a9daafb4c15ed5a008cb825bbd8c29d87.html + a9daafb4c15ed5a008cb825bbd8c29d87 + parse classnlohmann_1_1basic__json_af2730bc8ffa6b28916875c13ee7b83f5.html diff --git a/Tokens.xml b/Tokens.xml index e34be9023..9fc9e1b7b 100644 --- a/Tokens.xml +++ b/Tokens.xml @@ -856,6 +856,18 @@ access specified object element json.hpp + + + operator[] + cpp + instm + nlohmann::basic_json + + classnlohmann_1_1basic__json_a8e34088252a3ee6b2377f3a1f26dd1ba.html + a8e34088252a3ee6b2377f3a1f26dd1ba + read-only access specified object element + json.hpp + operator[] @@ -868,6 +880,18 @@ access specified object element json.hpp + + + operator[] + cpp + instm + nlohmann::basic_json + + classnlohmann_1_1basic__json_a9daafb4c15ed5a008cb825bbd8c29d87.html + a9daafb4c15ed5a008cb825bbd8c29d87 + read-only access specified object element + json.hpp + value diff --git a/annotated.html b/annotated.html index e2605ea28..105a66dfd 100644 --- a/annotated.html +++ b/annotated.html @@ -102,7 +102,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/classes.html b/classes.html index 632a74a49..15e18c2a7 100644 --- a/classes.html +++ b/classes.html @@ -106,7 +106,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/classnlohmann_1_1basic__json-members.html b/classnlohmann_1_1basic__json-members.html index d83907f71..bb7ccd98f 100644 --- a/classnlohmann_1_1basic__json-members.html +++ b/classnlohmann_1_1basic__json-members.html @@ -200,7 +200,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[](size_type idx)nlohmann::basic_jsoninline operator[](size_type idx) const nlohmann::basic_jsoninline operator[](const typename object_t::key_type &key)nlohmann::basic_jsoninline - operator[](const T(&key)[n])nlohmann::basic_jsoninline + operator[](const typename object_t::key_type &key) const nlohmann::basic_jsoninline + operator[](const T(&key)[n])nlohmann::basic_jsoninline + operator[](const T(&key)[n]) const nlohmann::basic_jsoninline parse(const string_t &s, parser_callback_t cb=nullptr)nlohmann::basic_jsoninlinestatic parse(std::istream &i, parser_callback_t cb=nullptr)nlohmann::basic_jsoninlinestatic parse(std::istream &&i, parser_callback_t cb=nullptr)nlohmann::basic_jsoninlinestatic @@ -232,7 +234,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/classnlohmann_1_1basic__json.html b/classnlohmann_1_1basic__json.html index f8fe93216..200bd5936 100644 --- a/classnlohmann_1_1basic__json.html +++ b/classnlohmann_1_1basic__json.html @@ -389,10 +389,17 @@ element access reference operator[] (const typename object_t::key_type &key)  access specified object element More...
  +const_reference operator[] (const typename object_t::key_type &key) const + read-only access specified object element More...
+  template<typename T , std::size_t n> reference operator[] (const T(&key)[n])  access specified object element More...
  +template<typename T , std::size_t n> +const_reference operator[] (const T(&key)[n]) const + read-only access specified object element More...
+  template<class ValueType , typename std::enable_if< std::is_convertible< basic_json_t, ValueType >::value , int >::type = 0> ValueType value (const typename object_t::key_type &key, ValueType default_value) const  access specified object element with default value More...
@@ -652,7 +659,7 @@ class nlohmann::basic_json diff --git a/classnlohmann_1_1basic__json_1_1const__iterator-members.html b/classnlohmann_1_1basic__json_1_1const__iterator-members.html index 14e920195..f26f62e0e 100644 --- a/classnlohmann_1_1basic__json_1_1const__iterator-members.html +++ b/classnlohmann_1_1basic__json_1_1const__iterator-members.html @@ -128,7 +128,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/classnlohmann_1_1basic__json_1_1const__iterator.html b/classnlohmann_1_1basic__json_1_1const__iterator.html index a34c48d7b..a7104c538 100644 --- a/classnlohmann_1_1basic__json_1_1const__iterator.html +++ b/classnlohmann_1_1basic__json_1_1const__iterator.html @@ -215,11 +215,11 @@ class nlohmann::basic_json::const_iterator
Since
version 1.0
-

Definition at line 5306 of file json.hpp.

+

Definition at line 5387 of file json.hpp.

diff --git a/classnlohmann_1_1basic__json_1_1const__iterator_a019087161350d393f3e4ac841cdd3dbd.html b/classnlohmann_1_1basic__json_1_1const__iterator_a019087161350d393f3e4ac841cdd3dbd.html index b61093caf..fe8fb6434 100644 --- a/classnlohmann_1_1basic__json_1_1const__iterator_a019087161350d393f3e4ac841cdd3dbd.html +++ b/classnlohmann_1_1basic__json_1_1const__iterator_a019087161350d393f3e4ac841cdd3dbd.html @@ -143,7 +143,7 @@ template<template< typename U, typename V, typename...Args > class Obje
-

Definition at line 5552 of file json.hpp.

+

Definition at line 5633 of file json.hpp.

@@ -153,7 +153,7 @@ template<template< typename U, typename V, typename...Args > class Obje diff --git a/classnlohmann_1_1basic__json_1_1const__iterator_a17e5f5d3598e6901f3c1c1f7dc60589f.html b/classnlohmann_1_1basic__json_1_1const__iterator_a17e5f5d3598e6901f3c1c1f7dc60589f.html index 0d028ba61..06ab82cb8 100644 --- a/classnlohmann_1_1basic__json_1_1const__iterator_a17e5f5d3598e6901f3c1c1f7dc60589f.html +++ b/classnlohmann_1_1basic__json_1_1const__iterator_a17e5f5d3598e6901f3c1c1f7dc60589f.html @@ -143,7 +143,7 @@ template<template< typename U, typename V, typename...Args > class Obje
-

Definition at line 5655 of file json.hpp.

+

Definition at line 5736 of file json.hpp.

@@ -153,7 +153,7 @@ template<template< typename U, typename V, typename...Args > class Obje diff --git a/classnlohmann_1_1basic__json_1_1const__iterator_a1cba94e5a67ee52bc66b898a4e08359d.html b/classnlohmann_1_1basic__json_1_1const__iterator_a1cba94e5a67ee52bc66b898a4e08359d.html index a2ac19dae..09f8686de 100644 --- a/classnlohmann_1_1basic__json_1_1const__iterator_a1cba94e5a67ee52bc66b898a4e08359d.html +++ b/classnlohmann_1_1basic__json_1_1const__iterator_a1cba94e5a67ee52bc66b898a4e08359d.html @@ -143,7 +143,7 @@ template<template< typename U, typename V, typename...Args > class Obje
-

Definition at line 5737 of file json.hpp.

+

Definition at line 5818 of file json.hpp.

@@ -153,7 +153,7 @@ template<template< typename U, typename V, typename...Args > class Obje diff --git a/classnlohmann_1_1basic__json_1_1const__iterator_a211523a57024a43965862b497b89ab91.html b/classnlohmann_1_1basic__json_1_1const__iterator_a211523a57024a43965862b497b89ab91.html index e8d693a7b..dccb0284d 100644 --- a/classnlohmann_1_1basic__json_1_1const__iterator_a211523a57024a43965862b497b89ab91.html +++ b/classnlohmann_1_1basic__json_1_1const__iterator_a211523a57024a43965862b497b89ab91.html @@ -143,7 +143,7 @@ template<template< typename U, typename V, typename...Args > class Obje
-

Definition at line 5382 of file json.hpp.

+

Definition at line 5463 of file json.hpp.

@@ -153,7 +153,7 @@ template<template< typename U, typename V, typename...Args > class Obje diff --git a/classnlohmann_1_1basic__json_1_1const__iterator_a301749e9779adafd395369ac36df93df.html b/classnlohmann_1_1basic__json_1_1const__iterator_a301749e9779adafd395369ac36df93df.html index d47e0ae15..0b0c30533 100644 --- a/classnlohmann_1_1basic__json_1_1const__iterator_a301749e9779adafd395369ac36df93df.html +++ b/classnlohmann_1_1basic__json_1_1const__iterator_a301749e9779adafd395369ac36df93df.html @@ -142,7 +142,7 @@ template<template< typename U, typename V, typename...Args > class Obje
-

Definition at line 5488 of file json.hpp.

+

Definition at line 5569 of file json.hpp.

@@ -152,7 +152,7 @@ template<template< typename U, typename V, typename...Args > class Obje diff --git a/classnlohmann_1_1basic__json_1_1const__iterator_a36086a699b95e06976c11367b7d6ba53.html b/classnlohmann_1_1basic__json_1_1const__iterator_a36086a699b95e06976c11367b7d6ba53.html index fd928c19f..a76dd768c 100644 --- a/classnlohmann_1_1basic__json_1_1const__iterator_a36086a699b95e06976c11367b7d6ba53.html +++ b/classnlohmann_1_1basic__json_1_1const__iterator_a36086a699b95e06976c11367b7d6ba53.html @@ -143,7 +143,7 @@ template<template< typename U, typename V, typename...Args > class Obje
-

Definition at line 5587 of file json.hpp.

+

Definition at line 5668 of file json.hpp.

@@ -153,7 +153,7 @@ template<template< typename U, typename V, typename...Args > class Obje diff --git a/classnlohmann_1_1basic__json_1_1const__iterator_a4632d8307fc315f21e2ecc9ba5aa6346.html b/classnlohmann_1_1basic__json_1_1const__iterator_a4632d8307fc315f21e2ecc9ba5aa6346.html index ff1146eb5..e8618707e 100644 --- a/classnlohmann_1_1basic__json_1_1const__iterator_a4632d8307fc315f21e2ecc9ba5aa6346.html +++ b/classnlohmann_1_1basic__json_1_1const__iterator_a4632d8307fc315f21e2ecc9ba5aa6346.html @@ -142,7 +142,7 @@ template<template< typename U, typename V, typename...Args > class Obje
-

Definition at line 5454 of file json.hpp.

+

Definition at line 5535 of file json.hpp.

@@ -152,7 +152,7 @@ template<template< typename U, typename V, typename...Args > class Obje diff --git a/classnlohmann_1_1basic__json_1_1const__iterator_a4f7ac43b0ab34c387b1ae1a8e9c08467.html b/classnlohmann_1_1basic__json_1_1const__iterator_a4f7ac43b0ab34c387b1ae1a8e9c08467.html index fb523484e..0c2b07d00 100644 --- a/classnlohmann_1_1basic__json_1_1const__iterator_a4f7ac43b0ab34c387b1ae1a8e9c08467.html +++ b/classnlohmann_1_1basic__json_1_1const__iterator_a4f7ac43b0ab34c387b1ae1a8e9c08467.html @@ -131,7 +131,7 @@ template<template< typename U, typename V, typename...Args > class Obje
-

Definition at line 5317 of file json.hpp.

+

Definition at line 5398 of file json.hpp.

@@ -141,7 +141,7 @@ template<template< typename U, typename V, typename...Args > class Obje diff --git a/classnlohmann_1_1basic__json_1_1const__iterator_a5aff013c03c1bdc248346c249bec7b67.html b/classnlohmann_1_1basic__json_1_1const__iterator_a5aff013c03c1bdc248346c249bec7b67.html index 3426e96c6..791929975 100644 --- a/classnlohmann_1_1basic__json_1_1const__iterator_a5aff013c03c1bdc248346c249bec7b67.html +++ b/classnlohmann_1_1basic__json_1_1const__iterator_a5aff013c03c1bdc248346c249bec7b67.html @@ -143,7 +143,7 @@ template<template< typename U, typename V, typename...Args > class Obje
-

Definition at line 5352 of file json.hpp.

+

Definition at line 5433 of file json.hpp.

@@ -153,7 +153,7 @@ template<template< typename U, typename V, typename...Args > class Obje diff --git a/classnlohmann_1_1basic__json_1_1const__iterator_a62cad59e006eb7fa594c2c5b65a76610.html b/classnlohmann_1_1basic__json_1_1const__iterator_a62cad59e006eb7fa594c2c5b65a76610.html index 69b9878d8..445e0cb2e 100644 --- a/classnlohmann_1_1basic__json_1_1const__iterator_a62cad59e006eb7fa594c2c5b65a76610.html +++ b/classnlohmann_1_1basic__json_1_1const__iterator_a62cad59e006eb7fa594c2c5b65a76610.html @@ -143,7 +143,7 @@ template<template< typename U, typename V, typename...Args > class Obje
-

Definition at line 5707 of file json.hpp.

+

Definition at line 5788 of file json.hpp.

@@ -153,7 +153,7 @@ template<template< typename U, typename V, typename...Args > class Obje diff --git a/classnlohmann_1_1basic__json_1_1const__iterator_a67848d4b7bfa576434ad9807147b5870.html b/classnlohmann_1_1basic__json_1_1const__iterator_a67848d4b7bfa576434ad9807147b5870.html index f8d828053..ea2a62968 100644 --- a/classnlohmann_1_1basic__json_1_1const__iterator_a67848d4b7bfa576434ad9807147b5870.html +++ b/classnlohmann_1_1basic__json_1_1const__iterator_a67848d4b7bfa576434ad9807147b5870.html @@ -131,7 +131,7 @@ template<template< typename U, typename V, typename...Args > class Obje
-

Definition at line 5313 of file json.hpp.

+

Definition at line 5394 of file json.hpp.

@@ -141,7 +141,7 @@ template<template< typename U, typename V, typename...Args > class Obje diff --git a/classnlohmann_1_1basic__json_1_1const__iterator_a6b3e43d2f45fa611825dbdf4e88fffe2.html b/classnlohmann_1_1basic__json_1_1const__iterator_a6b3e43d2f45fa611825dbdf4e88fffe2.html index 3f369ebe3..a808395b5 100644 --- a/classnlohmann_1_1basic__json_1_1const__iterator_a6b3e43d2f45fa611825dbdf4e88fffe2.html +++ b/classnlohmann_1_1basic__json_1_1const__iterator_a6b3e43d2f45fa611825dbdf4e88fffe2.html @@ -143,7 +143,7 @@ template<template< typename U, typename V, typename...Args > class Obje
-

Definition at line 5661 of file json.hpp.

+

Definition at line 5742 of file json.hpp.

@@ -153,7 +153,7 @@ template<template< typename U, typename V, typename...Args > class Obje diff --git a/classnlohmann_1_1basic__json_1_1const__iterator_a83454954e4e16be3d5316f9322e91a34.html b/classnlohmann_1_1basic__json_1_1const__iterator_a83454954e4e16be3d5316f9322e91a34.html index 76c055eab..4ca030160 100644 --- a/classnlohmann_1_1basic__json_1_1const__iterator_a83454954e4e16be3d5316f9322e91a34.html +++ b/classnlohmann_1_1basic__json_1_1const__iterator_a83454954e4e16be3d5316f9322e91a34.html @@ -143,7 +143,7 @@ template<template< typename U, typename V, typename...Args > class Obje
-

Definition at line 5327 of file json.hpp.

+

Definition at line 5408 of file json.hpp.

@@ -153,7 +153,7 @@ template<template< typename U, typename V, typename...Args > class Obje diff --git a/classnlohmann_1_1basic__json_1_1const__iterator_a86a1771e6658d0b14868df6c197d2353.html b/classnlohmann_1_1basic__json_1_1const__iterator_a86a1771e6658d0b14868df6c197d2353.html index 72d1bddf3..85ede5e5a 100644 --- a/classnlohmann_1_1basic__json_1_1const__iterator_a86a1771e6658d0b14868df6c197d2353.html +++ b/classnlohmann_1_1basic__json_1_1const__iterator_a86a1771e6658d0b14868df6c197d2353.html @@ -150,7 +150,7 @@ template<template< typename U, typename V, typename...Args > class Obje diff --git a/classnlohmann_1_1basic__json_1_1const__iterator_a8d024cbc99db0d8106899f9fd9973735.html b/classnlohmann_1_1basic__json_1_1const__iterator_a8d024cbc99db0d8106899f9fd9973735.html index 6fb88ac60..b6a52745c 100644 --- a/classnlohmann_1_1basic__json_1_1const__iterator_a8d024cbc99db0d8106899f9fd9973735.html +++ b/classnlohmann_1_1basic__json_1_1const__iterator_a8d024cbc99db0d8106899f9fd9973735.html @@ -142,7 +142,7 @@ template<template< typename U, typename V, typename...Args > class Obje
-

Definition at line 5771 of file json.hpp.

+

Definition at line 5852 of file json.hpp.

@@ -152,7 +152,7 @@ template<template< typename U, typename V, typename...Args > class Obje diff --git a/classnlohmann_1_1basic__json_1_1const__iterator_ab74b39747a9dad60650a57133fca85b3.html b/classnlohmann_1_1basic__json_1_1const__iterator_ab74b39747a9dad60650a57133fca85b3.html index 5946175f3..2436d767a 100644 --- a/classnlohmann_1_1basic__json_1_1const__iterator_ab74b39747a9dad60650a57133fca85b3.html +++ b/classnlohmann_1_1basic__json_1_1const__iterator_ab74b39747a9dad60650a57133fca85b3.html @@ -143,7 +143,7 @@ template<template< typename U, typename V, typename...Args > class Obje
-

Definition at line 5667 of file json.hpp.

+

Definition at line 5748 of file json.hpp.

@@ -153,7 +153,7 @@ template<template< typename U, typename V, typename...Args > class Obje diff --git a/classnlohmann_1_1basic__json_1_1const__iterator_ab7dacd8e3ee9b3756bfcdb87dd55a515.html b/classnlohmann_1_1basic__json_1_1const__iterator_ab7dacd8e3ee9b3756bfcdb87dd55a515.html index 1b441df0a..d8fb18aaa 100644 --- a/classnlohmann_1_1basic__json_1_1const__iterator_ab7dacd8e3ee9b3756bfcdb87dd55a515.html +++ b/classnlohmann_1_1basic__json_1_1const__iterator_ab7dacd8e3ee9b3756bfcdb87dd55a515.html @@ -142,7 +142,7 @@ template<template< typename U, typename V, typename...Args > class Obje
-

Definition at line 5784 of file json.hpp.

+

Definition at line 5865 of file json.hpp.

@@ -152,7 +152,7 @@ template<template< typename U, typename V, typename...Args > class Obje diff --git a/classnlohmann_1_1basic__json_1_1const__iterator_ab9d31bf0d0b4d7310c858a04ce84a52f.html b/classnlohmann_1_1basic__json_1_1const__iterator_ab9d31bf0d0b4d7310c858a04ce84a52f.html index 35e8004c8..0f8320aeb 100644 --- a/classnlohmann_1_1basic__json_1_1const__iterator_ab9d31bf0d0b4d7310c858a04ce84a52f.html +++ b/classnlohmann_1_1basic__json_1_1const__iterator_ab9d31bf0d0b4d7310c858a04ce84a52f.html @@ -143,7 +143,7 @@ template<template< typename U, typename V, typename...Args > class Obje
-

Definition at line 5615 of file json.hpp.

+

Definition at line 5696 of file json.hpp.

@@ -153,7 +153,7 @@ template<template< typename U, typename V, typename...Args > class Obje diff --git a/classnlohmann_1_1basic__json_1_1const__iterator_abb1921cbf0ad4036c83bc6303e22171f.html b/classnlohmann_1_1basic__json_1_1const__iterator_abb1921cbf0ad4036c83bc6303e22171f.html index 2990bde96..6110a8248 100644 --- a/classnlohmann_1_1basic__json_1_1const__iterator_abb1921cbf0ad4036c83bc6303e22171f.html +++ b/classnlohmann_1_1basic__json_1_1const__iterator_abb1921cbf0ad4036c83bc6303e22171f.html @@ -142,7 +142,7 @@ template<template< typename U, typename V, typename...Args > class Obje
-

Definition at line 5560 of file json.hpp.

+

Definition at line 5641 of file json.hpp.

@@ -152,7 +152,7 @@ template<template< typename U, typename V, typename...Args > class Obje diff --git a/classnlohmann_1_1basic__json_1_1const__iterator_abbacd95955c602efc9a58ed1ffdb46c4.html b/classnlohmann_1_1basic__json_1_1const__iterator_abbacd95955c602efc9a58ed1ffdb46c4.html index 4ac1dc292..212257170 100644 --- a/classnlohmann_1_1basic__json_1_1const__iterator_abbacd95955c602efc9a58ed1ffdb46c4.html +++ b/classnlohmann_1_1basic__json_1_1const__iterator_abbacd95955c602efc9a58ed1ffdb46c4.html @@ -142,7 +142,7 @@ template<template< typename U, typename V, typename...Args > class Obje
-

Definition at line 5525 of file json.hpp.

+

Definition at line 5606 of file json.hpp.

@@ -152,7 +152,7 @@ template<template< typename U, typename V, typename...Args > class Obje diff --git a/classnlohmann_1_1basic__json_1_1const__iterator_ac36b9187de43721a4bf1b052578bb80b.html b/classnlohmann_1_1basic__json_1_1const__iterator_ac36b9187de43721a4bf1b052578bb80b.html index 31613087a..311069cc7 100644 --- a/classnlohmann_1_1basic__json_1_1const__iterator_ac36b9187de43721a4bf1b052578bb80b.html +++ b/classnlohmann_1_1basic__json_1_1const__iterator_ac36b9187de43721a4bf1b052578bb80b.html @@ -131,7 +131,7 @@ template<template< typename U, typename V, typename...Args > class Obje
-

Definition at line 5315 of file json.hpp.

+

Definition at line 5396 of file json.hpp.

@@ -141,7 +141,7 @@ template<template< typename U, typename V, typename...Args > class Obje diff --git a/classnlohmann_1_1basic__json_1_1const__iterator_ac634a659837f5aebc97125e031de23b5.html b/classnlohmann_1_1basic__json_1_1const__iterator_ac634a659837f5aebc97125e031de23b5.html index 3cce3d7cb..66ed2d101 100644 --- a/classnlohmann_1_1basic__json_1_1const__iterator_ac634a659837f5aebc97125e031de23b5.html +++ b/classnlohmann_1_1basic__json_1_1const__iterator_ac634a659837f5aebc97125e031de23b5.html @@ -143,7 +143,7 @@ template<template< typename U, typename V, typename...Args > class Obje
-

Definition at line 5699 of file json.hpp.

+

Definition at line 5780 of file json.hpp.

@@ -153,7 +153,7 @@ template<template< typename U, typename V, typename...Args > class Obje diff --git a/classnlohmann_1_1basic__json_1_1const__iterator_acea5b75d1087e2a92833946d9dc547ff.html b/classnlohmann_1_1basic__json_1_1const__iterator_acea5b75d1087e2a92833946d9dc547ff.html index c5687fd96..6e82d50e0 100644 --- a/classnlohmann_1_1basic__json_1_1const__iterator_acea5b75d1087e2a92833946d9dc547ff.html +++ b/classnlohmann_1_1basic__json_1_1const__iterator_acea5b75d1087e2a92833946d9dc547ff.html @@ -143,7 +143,7 @@ template<template< typename U, typename V, typename...Args > class Obje
-

Definition at line 5621 of file json.hpp.

+

Definition at line 5702 of file json.hpp.

@@ -153,7 +153,7 @@ template<template< typename U, typename V, typename...Args > class Obje diff --git a/classnlohmann_1_1basic__json_1_1const__iterator_ada3100cdb8700566051828f1355fa745.html b/classnlohmann_1_1basic__json_1_1const__iterator_ada3100cdb8700566051828f1355fa745.html index 56b2a6544..bc6f1e488 100644 --- a/classnlohmann_1_1basic__json_1_1const__iterator_ada3100cdb8700566051828f1355fa745.html +++ b/classnlohmann_1_1basic__json_1_1const__iterator_ada3100cdb8700566051828f1355fa745.html @@ -139,7 +139,7 @@ template<template< typename U, typename V, typename...Args > class Obje
-

Definition at line 5309 of file json.hpp.

+

Definition at line 5390 of file json.hpp.

@@ -149,7 +149,7 @@ template<template< typename U, typename V, typename...Args > class Obje diff --git a/classnlohmann_1_1basic__json_1_1const__iterator_adb50d6043ace464d9f694869724d7fb2.html b/classnlohmann_1_1basic__json_1_1const__iterator_adb50d6043ace464d9f694869724d7fb2.html index 6a85e7b61..9547f7cc7 100644 --- a/classnlohmann_1_1basic__json_1_1const__iterator_adb50d6043ace464d9f694869724d7fb2.html +++ b/classnlohmann_1_1basic__json_1_1const__iterator_adb50d6043ace464d9f694869724d7fb2.html @@ -131,7 +131,7 @@ template<template< typename U, typename V, typename...Args > class Obje
-

Definition at line 5319 of file json.hpp.

+

Definition at line 5400 of file json.hpp.

@@ -141,7 +141,7 @@ template<template< typename U, typename V, typename...Args > class Obje diff --git a/classnlohmann_1_1basic__json_1_1const__iterator_adda9a4bd7f0edb9cb39dc0dca3d4a286.html b/classnlohmann_1_1basic__json_1_1const__iterator_adda9a4bd7f0edb9cb39dc0dca3d4a286.html index b6a132144..f95f57915 100644 --- a/classnlohmann_1_1basic__json_1_1const__iterator_adda9a4bd7f0edb9cb39dc0dca3d4a286.html +++ b/classnlohmann_1_1basic__json_1_1const__iterator_adda9a4bd7f0edb9cb39dc0dca3d4a286.html @@ -143,7 +143,7 @@ template<template< typename U, typename V, typename...Args > class Obje
-

Definition at line 5715 of file json.hpp.

+

Definition at line 5796 of file json.hpp.

@@ -153,7 +153,7 @@ template<template< typename U, typename V, typename...Args > class Obje diff --git a/classnlohmann_1_1basic__json_1_1const__iterator_adf6f9d3f8f8d8b1ccedabb4f04c098ad.html b/classnlohmann_1_1basic__json_1_1const__iterator_adf6f9d3f8f8d8b1ccedabb4f04c098ad.html index 2d8cd25f7..9f6a9d2d0 100644 --- a/classnlohmann_1_1basic__json_1_1const__iterator_adf6f9d3f8f8d8b1ccedabb4f04c098ad.html +++ b/classnlohmann_1_1basic__json_1_1const__iterator_adf6f9d3f8f8d8b1ccedabb4f04c098ad.html @@ -143,7 +143,7 @@ template<template< typename U, typename V, typename...Args > class Obje
-

Definition at line 5517 of file json.hpp.

+

Definition at line 5598 of file json.hpp.

@@ -153,7 +153,7 @@ template<template< typename U, typename V, typename...Args > class Obje diff --git a/classnlohmann_1_1basic__json_1_1const__iterator_ae480d5c86e5e1129d53d1e19782017a6.html b/classnlohmann_1_1basic__json_1_1const__iterator_ae480d5c86e5e1129d53d1e19782017a6.html index 03d5ddd0f..79f68dbb1 100644 --- a/classnlohmann_1_1basic__json_1_1const__iterator_ae480d5c86e5e1129d53d1e19782017a6.html +++ b/classnlohmann_1_1basic__json_1_1const__iterator_ae480d5c86e5e1129d53d1e19782017a6.html @@ -131,7 +131,7 @@ template<template< typename U, typename V, typename...Args > class Obje
-

Definition at line 5321 of file json.hpp.

+

Definition at line 5402 of file json.hpp.

@@ -141,7 +141,7 @@ template<template< typename U, typename V, typename...Args > class Obje diff --git a/classnlohmann_1_1basic__json_1_1const__iterator_aebd099d9a70ffe760242ef24046c9002.html b/classnlohmann_1_1basic__json_1_1const__iterator_aebd099d9a70ffe760242ef24046c9002.html index 94b371e53..7299be978 100644 --- a/classnlohmann_1_1basic__json_1_1const__iterator_aebd099d9a70ffe760242ef24046c9002.html +++ b/classnlohmann_1_1basic__json_1_1const__iterator_aebd099d9a70ffe760242ef24046c9002.html @@ -143,7 +143,7 @@ template<template< typename U, typename V, typename...Args > class Obje
-

Definition at line 5649 of file json.hpp.

+

Definition at line 5730 of file json.hpp.

@@ -153,7 +153,7 @@ template<template< typename U, typename V, typename...Args > class Obje diff --git a/classnlohmann_1_1basic__json_1_1const__iterator_af34f68f1ce670e7f25ce267b2b1e64ab.html b/classnlohmann_1_1basic__json_1_1const__iterator_af34f68f1ce670e7f25ce267b2b1e64ab.html index 2e616cf7e..31be78492 100644 --- a/classnlohmann_1_1basic__json_1_1const__iterator_af34f68f1ce670e7f25ce267b2b1e64ab.html +++ b/classnlohmann_1_1basic__json_1_1const__iterator_af34f68f1ce670e7f25ce267b2b1e64ab.html @@ -143,7 +143,7 @@ template<template< typename U, typename V, typename...Args > class Obje
-

Definition at line 5693 of file json.hpp.

+

Definition at line 5774 of file json.hpp.

@@ -153,7 +153,7 @@ template<template< typename U, typename V, typename...Args > class Obje diff --git a/classnlohmann_1_1basic__json_1_1const__iterator_af55564e391b23e41abe78bc4bbe4edcb.html b/classnlohmann_1_1basic__json_1_1const__iterator_af55564e391b23e41abe78bc4bbe4edcb.html index d0fd61056..2f1b79701 100644 --- a/classnlohmann_1_1basic__json_1_1const__iterator_af55564e391b23e41abe78bc4bbe4edcb.html +++ b/classnlohmann_1_1basic__json_1_1const__iterator_af55564e391b23e41abe78bc4bbe4edcb.html @@ -143,7 +143,7 @@ template<template< typename U, typename V, typename...Args > class Obje
-

Definition at line 5377 of file json.hpp.

+

Definition at line 5458 of file json.hpp.

@@ -153,7 +153,7 @@ template<template< typename U, typename V, typename...Args > class Obje diff --git a/classnlohmann_1_1basic__json_1_1iterator-members.html b/classnlohmann_1_1basic__json_1_1iterator-members.html index 0286f8745..bc95c6377 100644 --- a/classnlohmann_1_1basic__json_1_1iterator-members.html +++ b/classnlohmann_1_1basic__json_1_1iterator-members.html @@ -135,7 +135,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/classnlohmann_1_1basic__json_1_1iterator.html b/classnlohmann_1_1basic__json_1_1iterator.html index 2083bd823..8b59817fd 100644 --- a/classnlohmann_1_1basic__json_1_1iterator.html +++ b/classnlohmann_1_1basic__json_1_1iterator.html @@ -266,11 +266,11 @@ class nlohmann::basic_json::iterator
Since
version 1.0
-

Definition at line 5808 of file json.hpp.

+

Definition at line 5889 of file json.hpp.

diff --git a/classnlohmann_1_1basic__json_1_1iterator__wrapper-members.html b/classnlohmann_1_1basic__json_1_1iterator__wrapper-members.html index d8a0c6098..33ad97614 100644 --- a/classnlohmann_1_1basic__json_1_1iterator__wrapper-members.html +++ b/classnlohmann_1_1basic__json_1_1iterator__wrapper-members.html @@ -100,7 +100,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/classnlohmann_1_1basic__json_1_1iterator__wrapper.html b/classnlohmann_1_1basic__json_1_1iterator__wrapper.html index b9acf48f0..c38ea9568 100644 --- a/classnlohmann_1_1basic__json_1_1iterator__wrapper.html +++ b/classnlohmann_1_1basic__json_1_1iterator__wrapper.html @@ -119,11 +119,11 @@ class nlohmann::basic_json::iterator_wrapper

This class allows to access iterator::key() and iterator::value() during range-based for loops. In these loops, a reference to the JSON values is returned, so there is no access to the underlying iterator.

-

Definition at line 6045 of file json.hpp.

+

Definition at line 6126 of file json.hpp.

diff --git a/classnlohmann_1_1basic__json_1_1iterator__wrapper_a784f17dec56c1ec90b0b73eb8307ea7d.html b/classnlohmann_1_1basic__json_1_1iterator__wrapper_a784f17dec56c1ec90b0b73eb8307ea7d.html index f96b46d76..dfcf0ffd3 100644 --- a/classnlohmann_1_1basic__json_1_1iterator__wrapper_a784f17dec56c1ec90b0b73eb8307ea7d.html +++ b/classnlohmann_1_1basic__json_1_1iterator__wrapper_a784f17dec56c1ec90b0b73eb8307ea7d.html @@ -115,7 +115,7 @@ template<template< typename U, typename V, typename...Args > class Obje
-

Definition at line 6122 of file json.hpp.

+

Definition at line 6203 of file json.hpp.

@@ -125,7 +125,7 @@ template<template< typename U, typename V, typename...Args > class Obje diff --git a/classnlohmann_1_1basic__json_1_1iterator__wrapper_a80305d6ac43b6fb53c62256e450485ac.html b/classnlohmann_1_1basic__json_1_1iterator__wrapper_a80305d6ac43b6fb53c62256e450485ac.html index 9f7e9b4da..2adba8312 100644 --- a/classnlohmann_1_1basic__json_1_1iterator__wrapper_a80305d6ac43b6fb53c62256e450485ac.html +++ b/classnlohmann_1_1basic__json_1_1iterator__wrapper_a80305d6ac43b6fb53c62256e450485ac.html @@ -114,7 +114,7 @@ template<template< typename U, typename V, typename...Args > class Obje
-

Definition at line 6127 of file json.hpp.

+

Definition at line 6208 of file json.hpp.

@@ -124,7 +124,7 @@ template<template< typename U, typename V, typename...Args > class Obje diff --git a/classnlohmann_1_1basic__json_1_1iterator__wrapper_ab5951e20b05998e768943acd0b418c81.html b/classnlohmann_1_1basic__json_1_1iterator__wrapper_ab5951e20b05998e768943acd0b418c81.html index a908d5b8f..02296a1bd 100644 --- a/classnlohmann_1_1basic__json_1_1iterator__wrapper_ab5951e20b05998e768943acd0b418c81.html +++ b/classnlohmann_1_1basic__json_1_1iterator__wrapper_ab5951e20b05998e768943acd0b418c81.html @@ -114,7 +114,7 @@ template<template< typename U, typename V, typename...Args > class Obje
-

Definition at line 6133 of file json.hpp.

+

Definition at line 6214 of file json.hpp.

@@ -124,7 +124,7 @@ template<template< typename U, typename V, typename...Args > class Obje diff --git a/classnlohmann_1_1basic__json_1_1iterator_a037e5f3de196ff4cea8a95a8a4e35882.html b/classnlohmann_1_1basic__json_1_1iterator_a037e5f3de196ff4cea8a95a8a4e35882.html index ee2398a5b..436d20c92 100644 --- a/classnlohmann_1_1basic__json_1_1iterator_a037e5f3de196ff4cea8a95a8a4e35882.html +++ b/classnlohmann_1_1basic__json_1_1iterator_a037e5f3de196ff4cea8a95a8a4e35882.html @@ -131,7 +131,7 @@ template<template< typename U, typename V, typename...Args > class Obje
-

Definition at line 5860 of file json.hpp.

+

Definition at line 5941 of file json.hpp.

@@ -141,7 +141,7 @@ template<template< typename U, typename V, typename...Args > class Obje diff --git a/classnlohmann_1_1basic__json_1_1iterator_a0a43bd93e6e46645ed0b93d3af7bfe22.html b/classnlohmann_1_1basic__json_1_1iterator_a0a43bd93e6e46645ed0b93d3af7bfe22.html index 88bca0242..20dc028c3 100644 --- a/classnlohmann_1_1basic__json_1_1iterator_a0a43bd93e6e46645ed0b93d3af7bfe22.html +++ b/classnlohmann_1_1basic__json_1_1iterator_a0a43bd93e6e46645ed0b93d3af7bfe22.html @@ -132,7 +132,7 @@ template<template< typename U, typename V, typename...Args > class Obje
-

Definition at line 5889 of file json.hpp.

+

Definition at line 5970 of file json.hpp.

@@ -142,7 +142,7 @@ template<template< typename U, typename V, typename...Args > class Obje diff --git a/classnlohmann_1_1basic__json_1_1iterator_a0c0acb68cc2a50a0e8782f860184883f.html b/classnlohmann_1_1basic__json_1_1iterator_a0c0acb68cc2a50a0e8782f860184883f.html index 37e83d18e..cdec5ae4f 100644 --- a/classnlohmann_1_1basic__json_1_1iterator_a0c0acb68cc2a50a0e8782f860184883f.html +++ b/classnlohmann_1_1basic__json_1_1iterator_a0c0acb68cc2a50a0e8782f860184883f.html @@ -132,7 +132,7 @@ template<template< typename U, typename V, typename...Args > class Obje
-

Definition at line 5904 of file json.hpp.

+

Definition at line 5985 of file json.hpp.

@@ -142,7 +142,7 @@ template<template< typename U, typename V, typename...Args > class Obje diff --git a/classnlohmann_1_1basic__json_1_1iterator_a0eb7ac9b746fb6f931ae728f70f92a8e.html b/classnlohmann_1_1basic__json_1_1iterator_a0eb7ac9b746fb6f931ae728f70f92a8e.html index 8149cf21c..21c2b9456 100644 --- a/classnlohmann_1_1basic__json_1_1iterator_a0eb7ac9b746fb6f931ae728f70f92a8e.html +++ b/classnlohmann_1_1basic__json_1_1iterator_a0eb7ac9b746fb6f931ae728f70f92a8e.html @@ -132,7 +132,7 @@ template<template< typename U, typename V, typename...Args > class Obje
-

Definition at line 5917 of file json.hpp.

+

Definition at line 5998 of file json.hpp.

@@ -142,7 +142,7 @@ template<template< typename U, typename V, typename...Args > class Obje diff --git a/classnlohmann_1_1basic__json_1_1iterator_a1220b360a07b0605f7d2f4b3cfd16736.html b/classnlohmann_1_1basic__json_1_1iterator_a1220b360a07b0605f7d2f4b3cfd16736.html index d94acb76d..e059c9340 100644 --- a/classnlohmann_1_1basic__json_1_1iterator_a1220b360a07b0605f7d2f4b3cfd16736.html +++ b/classnlohmann_1_1basic__json_1_1iterator_a1220b360a07b0605f7d2f4b3cfd16736.html @@ -131,7 +131,7 @@ template<template< typename U, typename V, typename...Args > class Obje
-

Definition at line 5846 of file json.hpp.

+

Definition at line 5927 of file json.hpp.

@@ -141,7 +141,7 @@ template<template< typename U, typename V, typename...Args > class Obje diff --git a/classnlohmann_1_1basic__json_1_1iterator_a21d32a4547ba4cbadd8b435a6a0d0e1b.html b/classnlohmann_1_1basic__json_1_1iterator_a21d32a4547ba4cbadd8b435a6a0d0e1b.html index d13259cd6..7dbfbb596 100644 --- a/classnlohmann_1_1basic__json_1_1iterator_a21d32a4547ba4cbadd8b435a6a0d0e1b.html +++ b/classnlohmann_1_1basic__json_1_1iterator_a21d32a4547ba4cbadd8b435a6a0d0e1b.html @@ -131,7 +131,7 @@ template<template< typename U, typename V, typename...Args > class Obje
-

Definition at line 5875 of file json.hpp.

+

Definition at line 5956 of file json.hpp.

@@ -141,7 +141,7 @@ template<template< typename U, typename V, typename...Args > class Obje diff --git a/classnlohmann_1_1basic__json_1_1iterator_a302d810a0685f8d39368eaa65c833acf.html b/classnlohmann_1_1basic__json_1_1iterator_a302d810a0685f8d39368eaa65c833acf.html index 0d7720059..298175b0b 100644 --- a/classnlohmann_1_1basic__json_1_1iterator_a302d810a0685f8d39368eaa65c833acf.html +++ b/classnlohmann_1_1basic__json_1_1iterator_a302d810a0685f8d39368eaa65c833acf.html @@ -132,7 +132,7 @@ template<template< typename U, typename V, typename...Args > class Obje
-

Definition at line 5911 of file json.hpp.

+

Definition at line 5992 of file json.hpp.

@@ -142,7 +142,7 @@ template<template< typename U, typename V, typename...Args > class Obje diff --git a/classnlohmann_1_1basic__json_1_1iterator_a33277dbf06ac5c1e7102e26f6b5e2c00.html b/classnlohmann_1_1basic__json_1_1iterator_a33277dbf06ac5c1e7102e26f6b5e2c00.html index db2510fa9..e0a49f76d 100644 --- a/classnlohmann_1_1basic__json_1_1iterator_a33277dbf06ac5c1e7102e26f6b5e2c00.html +++ b/classnlohmann_1_1basic__json_1_1iterator_a33277dbf06ac5c1e7102e26f6b5e2c00.html @@ -131,7 +131,7 @@ template<template< typename U, typename V, typename...Args > class Obje
-

Definition at line 5840 of file json.hpp.

+

Definition at line 5921 of file json.hpp.

@@ -141,7 +141,7 @@ template<template< typename U, typename V, typename...Args > class Obje diff --git a/classnlohmann_1_1basic__json_1_1iterator_a4ae612fa9eb59784047b40f0419db65d.html b/classnlohmann_1_1basic__json_1_1iterator_a4ae612fa9eb59784047b40f0419db65d.html index 7ad757854..7f7b64075 100644 --- a/classnlohmann_1_1basic__json_1_1iterator_a4ae612fa9eb59784047b40f0419db65d.html +++ b/classnlohmann_1_1basic__json_1_1iterator_a4ae612fa9eb59784047b40f0419db65d.html @@ -132,7 +132,7 @@ template<template< typename U, typename V, typename...Args > class Obje
-

Definition at line 5867 of file json.hpp.

+

Definition at line 5948 of file json.hpp.

@@ -142,7 +142,7 @@ template<template< typename U, typename V, typename...Args > class Obje diff --git a/classnlohmann_1_1basic__json_1_1iterator_a4f6e03ae3bb674ebf0b727f74957c12f.html b/classnlohmann_1_1basic__json_1_1iterator_a4f6e03ae3bb674ebf0b727f74957c12f.html index e93b03af0..fc7098840 100644 --- a/classnlohmann_1_1basic__json_1_1iterator_a4f6e03ae3bb674ebf0b727f74957c12f.html +++ b/classnlohmann_1_1basic__json_1_1iterator_a4f6e03ae3bb674ebf0b727f74957c12f.html @@ -139,7 +139,7 @@ template<template< typename U, typename V, typename...Args > class Obje diff --git a/classnlohmann_1_1basic__json_1_1iterator_a6e91e9d94a0e14d2fc28cfdf3beac2b1.html b/classnlohmann_1_1basic__json_1_1iterator_a6e91e9d94a0e14d2fc28cfdf3beac2b1.html index 07d581922..11872af9a 100644 --- a/classnlohmann_1_1basic__json_1_1iterator_a6e91e9d94a0e14d2fc28cfdf3beac2b1.html +++ b/classnlohmann_1_1basic__json_1_1iterator_a6e91e9d94a0e14d2fc28cfdf3beac2b1.html @@ -132,7 +132,7 @@ template<template< typename U, typename V, typename...Args > class Obje
-

Definition at line 5828 of file json.hpp.

+

Definition at line 5909 of file json.hpp.

@@ -142,7 +142,7 @@ template<template< typename U, typename V, typename...Args > class Obje diff --git a/classnlohmann_1_1basic__json_1_1iterator_a7031e759ee52d1283aada0ff81108a5e.html b/classnlohmann_1_1basic__json_1_1iterator_a7031e759ee52d1283aada0ff81108a5e.html index 44cb15bd7..170b3ce2a 100644 --- a/classnlohmann_1_1basic__json_1_1iterator_a7031e759ee52d1283aada0ff81108a5e.html +++ b/classnlohmann_1_1basic__json_1_1iterator_a7031e759ee52d1283aada0ff81108a5e.html @@ -132,7 +132,7 @@ template<template< typename U, typename V, typename...Args > class Obje
-

Definition at line 5882 of file json.hpp.

+

Definition at line 5963 of file json.hpp.

@@ -142,7 +142,7 @@ template<template< typename U, typename V, typename...Args > class Obje diff --git a/classnlohmann_1_1basic__json_1_1iterator_a94285e2ade0bfef829b81377bbbca6cf.html b/classnlohmann_1_1basic__json_1_1iterator_a94285e2ade0bfef829b81377bbbca6cf.html index e8205976c..b237a9df3 100644 --- a/classnlohmann_1_1basic__json_1_1iterator_a94285e2ade0bfef829b81377bbbca6cf.html +++ b/classnlohmann_1_1basic__json_1_1iterator_a94285e2ade0bfef829b81377bbbca6cf.html @@ -132,7 +132,7 @@ template<template< typename U, typename V, typename...Args > class Obje
-

Definition at line 5823 of file json.hpp.

+

Definition at line 5904 of file json.hpp.

@@ -142,7 +142,7 @@ template<template< typename U, typename V, typename...Args > class Obje diff --git a/classnlohmann_1_1basic__json_1_1iterator_a9fcfda575b08d0c73b6274cdbbe7f184.html b/classnlohmann_1_1basic__json_1_1iterator_a9fcfda575b08d0c73b6274cdbbe7f184.html index d93885b83..cbf4ed87a 100644 --- a/classnlohmann_1_1basic__json_1_1iterator_a9fcfda575b08d0c73b6274cdbbe7f184.html +++ b/classnlohmann_1_1basic__json_1_1iterator_a9fcfda575b08d0c73b6274cdbbe7f184.html @@ -132,7 +132,7 @@ template<template< typename U, typename V, typename...Args > class Obje
-

Definition at line 5852 of file json.hpp.

+

Definition at line 5933 of file json.hpp.

@@ -142,7 +142,7 @@ template<template< typename U, typename V, typename...Args > class Obje diff --git a/classnlohmann_1_1basic__json_1_1iterator_aa2bd10afdcfc70acb8eaabbd2f6496f0.html b/classnlohmann_1_1basic__json_1_1iterator_aa2bd10afdcfc70acb8eaabbd2f6496f0.html index 2ba1c1a6e..cc597645e 100644 --- a/classnlohmann_1_1basic__json_1_1iterator_aa2bd10afdcfc70acb8eaabbd2f6496f0.html +++ b/classnlohmann_1_1basic__json_1_1iterator_aa2bd10afdcfc70acb8eaabbd2f6496f0.html @@ -120,7 +120,7 @@ template<template< typename U, typename V, typename...Args > class Obje
-

Definition at line 5813 of file json.hpp.

+

Definition at line 5894 of file json.hpp.

@@ -130,7 +130,7 @@ template<template< typename U, typename V, typename...Args > class Obje diff --git a/classnlohmann_1_1basic__json_1_1iterator_ab220a0cc3fe410fbae4524208bd5834f.html b/classnlohmann_1_1basic__json_1_1iterator_ab220a0cc3fe410fbae4524208bd5834f.html index 6f0009f1d..fffbecedc 100644 --- a/classnlohmann_1_1basic__json_1_1iterator_ab220a0cc3fe410fbae4524208bd5834f.html +++ b/classnlohmann_1_1basic__json_1_1iterator_ab220a0cc3fe410fbae4524208bd5834f.html @@ -132,7 +132,7 @@ template<template< typename U, typename V, typename...Args > class Obje
-

Definition at line 5819 of file json.hpp.

+

Definition at line 5900 of file json.hpp.

@@ -142,7 +142,7 @@ template<template< typename U, typename V, typename...Args > class Obje diff --git a/classnlohmann_1_1basic__json_1_1iterator_ab5cf753cb2f8ce53b9f3e54c39e50ee3.html b/classnlohmann_1_1basic__json_1_1iterator_ab5cf753cb2f8ce53b9f3e54c39e50ee3.html index c6f1e8257..7c16f5ff5 100644 --- a/classnlohmann_1_1basic__json_1_1iterator_ab5cf753cb2f8ce53b9f3e54c39e50ee3.html +++ b/classnlohmann_1_1basic__json_1_1iterator_ab5cf753cb2f8ce53b9f3e54c39e50ee3.html @@ -132,7 +132,7 @@ template<template< typename U, typename V, typename...Args > class Obje
-

Definition at line 5896 of file json.hpp.

+

Definition at line 5977 of file json.hpp.

@@ -142,7 +142,7 @@ template<template< typename U, typename V, typename...Args > class Obje diff --git a/classnlohmann_1_1basic__json_1_1iterator_abaebf4e21956dd20d9f862fa5647d32d.html b/classnlohmann_1_1basic__json_1_1iterator_abaebf4e21956dd20d9f862fa5647d32d.html index 8f46489ed..aa89ecb53 100644 --- a/classnlohmann_1_1basic__json_1_1iterator_abaebf4e21956dd20d9f862fa5647d32d.html +++ b/classnlohmann_1_1basic__json_1_1iterator_abaebf4e21956dd20d9f862fa5647d32d.html @@ -120,7 +120,7 @@ template<template< typename U, typename V, typename...Args > class Obje
-

Definition at line 5811 of file json.hpp.

+

Definition at line 5892 of file json.hpp.

@@ -130,7 +130,7 @@ template<template< typename U, typename V, typename...Args > class Obje diff --git a/classnlohmann_1_1basic__json_1_1iterator_af64127418c567660d92b1afdfe9676db.html b/classnlohmann_1_1basic__json_1_1iterator_af64127418c567660d92b1afdfe9676db.html index 1187b1904..0c9524eb0 100644 --- a/classnlohmann_1_1basic__json_1_1iterator_af64127418c567660d92b1afdfe9676db.html +++ b/classnlohmann_1_1basic__json_1_1iterator_af64127418c567660d92b1afdfe9676db.html @@ -131,7 +131,7 @@ template<template< typename U, typename V, typename...Args > class Obje
-

Definition at line 5923 of file json.hpp.

+

Definition at line 6004 of file json.hpp.

@@ -141,7 +141,7 @@ template<template< typename U, typename V, typename...Args > class Obje diff --git a/classnlohmann_1_1basic__json_1_1iterator_afe65b5a0572c7bfdd7ccc942bb8e9fe2.html b/classnlohmann_1_1basic__json_1_1iterator_afe65b5a0572c7bfdd7ccc942bb8e9fe2.html index f421e5ff1..bf9ae6df1 100644 --- a/classnlohmann_1_1basic__json_1_1iterator_afe65b5a0572c7bfdd7ccc942bb8e9fe2.html +++ b/classnlohmann_1_1basic__json_1_1iterator_afe65b5a0572c7bfdd7ccc942bb8e9fe2.html @@ -120,7 +120,7 @@ template<template< typename U, typename V, typename...Args > class Obje
-

Definition at line 5812 of file json.hpp.

+

Definition at line 5893 of file json.hpp.

@@ -130,7 +130,7 @@ template<template< typename U, typename V, typename...Args > class Obje diff --git a/classnlohmann_1_1basic__json_1_1json__reverse__iterator-members.html b/classnlohmann_1_1basic__json_1_1json__reverse__iterator-members.html index 9f2214aea..0c56be781 100644 --- a/classnlohmann_1_1basic__json_1_1json__reverse__iterator-members.html +++ b/classnlohmann_1_1basic__json_1_1json__reverse__iterator-members.html @@ -112,7 +112,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/classnlohmann_1_1basic__json_1_1json__reverse__iterator.html b/classnlohmann_1_1basic__json_1_1json__reverse__iterator.html index 157f08ce3..031f8310a 100644 --- a/classnlohmann_1_1basic__json_1_1json__reverse__iterator.html +++ b/classnlohmann_1_1basic__json_1_1json__reverse__iterator.html @@ -174,7 +174,7 @@ class nlohmann::basic_json::json_reverse_iterator< Base > diff --git a/classnlohmann_1_1basic__json_1_1json__reverse__iterator_a03e542423284327d3801cf078f1c2b44.html b/classnlohmann_1_1basic__json_1_1json__reverse__iterator_a03e542423284327d3801cf078f1c2b44.html index 5d24fb566..46c6dbe96 100644 --- a/classnlohmann_1_1basic__json_1_1json__reverse__iterator_a03e542423284327d3801cf078f1c2b44.html +++ b/classnlohmann_1_1basic__json_1_1json__reverse__iterator_a03e542423284327d3801cf078f1c2b44.html @@ -129,7 +129,7 @@ template<typename Base >
-

Definition at line 6004 of file json.hpp.

+

Definition at line 6085 of file json.hpp.

@@ -139,7 +139,7 @@ template<typename Base > diff --git a/classnlohmann_1_1basic__json_1_1json__reverse__iterator_a0b494ef7570d031216f907d2c85ec323.html b/classnlohmann_1_1basic__json_1_1json__reverse__iterator_a0b494ef7570d031216f907d2c85ec323.html index 79b549b12..13cb3111f 100644 --- a/classnlohmann_1_1basic__json_1_1json__reverse__iterator_a0b494ef7570d031216f907d2c85ec323.html +++ b/classnlohmann_1_1basic__json_1_1json__reverse__iterator_a0b494ef7570d031216f907d2c85ec323.html @@ -129,7 +129,7 @@ template<typename Base >
-

Definition at line 5956 of file json.hpp.

+

Definition at line 6037 of file json.hpp.

@@ -139,7 +139,7 @@ template<typename Base > diff --git a/classnlohmann_1_1basic__json_1_1json__reverse__iterator_a15e9cf4c5a43238e82ab69c4a295c491.html b/classnlohmann_1_1basic__json_1_1json__reverse__iterator_a15e9cf4c5a43238e82ab69c4a295c491.html index e4c95e488..61efb1e7c 100644 --- a/classnlohmann_1_1basic__json_1_1json__reverse__iterator_a15e9cf4c5a43238e82ab69c4a295c491.html +++ b/classnlohmann_1_1basic__json_1_1json__reverse__iterator_a15e9cf4c5a43238e82ab69c4a295c491.html @@ -128,7 +128,7 @@ template<typename Base >
-

Definition at line 5969 of file json.hpp.

+

Definition at line 6050 of file json.hpp.

@@ -138,7 +138,7 @@ template<typename Base > diff --git a/classnlohmann_1_1basic__json_1_1json__reverse__iterator_a1c84e6d1f047ab4105fa665f455158a7.html b/classnlohmann_1_1basic__json_1_1json__reverse__iterator_a1c84e6d1f047ab4105fa665f455158a7.html index b99843ff9..3bfb5274f 100644 --- a/classnlohmann_1_1basic__json_1_1json__reverse__iterator_a1c84e6d1f047ab4105fa665f455158a7.html +++ b/classnlohmann_1_1basic__json_1_1json__reverse__iterator_a1c84e6d1f047ab4105fa665f455158a7.html @@ -129,7 +129,7 @@ template<typename Base >
-

Definition at line 5996 of file json.hpp.

+

Definition at line 6077 of file json.hpp.

@@ -139,7 +139,7 @@ template<typename Base > diff --git a/classnlohmann_1_1basic__json_1_1json__reverse__iterator_a2a1dc92fbec862883c8b89755c787c99.html b/classnlohmann_1_1basic__json_1_1json__reverse__iterator_a2a1dc92fbec862883c8b89755c787c99.html index b28292c85..b1f3b7abe 100644 --- a/classnlohmann_1_1basic__json_1_1json__reverse__iterator_a2a1dc92fbec862883c8b89755c787c99.html +++ b/classnlohmann_1_1basic__json_1_1json__reverse__iterator_a2a1dc92fbec862883c8b89755c787c99.html @@ -129,7 +129,7 @@ template<typename Base >
-

Definition at line 5989 of file json.hpp.

+

Definition at line 6070 of file json.hpp.

@@ -139,7 +139,7 @@ template<typename Base > diff --git a/classnlohmann_1_1basic__json_1_1json__reverse__iterator_a5ee9ec91a6ddcd8d72278d681361626f.html b/classnlohmann_1_1basic__json_1_1json__reverse__iterator_a5ee9ec91a6ddcd8d72278d681361626f.html index 1238fdfe2..6045797f3 100644 --- a/classnlohmann_1_1basic__json_1_1json__reverse__iterator_a5ee9ec91a6ddcd8d72278d681361626f.html +++ b/classnlohmann_1_1basic__json_1_1json__reverse__iterator_a5ee9ec91a6ddcd8d72278d681361626f.html @@ -117,7 +117,7 @@ template<typename Base >
-

Definition at line 5953 of file json.hpp.

+

Definition at line 6034 of file json.hpp.

@@ -127,7 +127,7 @@ template<typename Base > diff --git a/classnlohmann_1_1basic__json_1_1json__reverse__iterator_a61d31531e0dfc5448e7fa15678b05bbe.html b/classnlohmann_1_1basic__json_1_1json__reverse__iterator_a61d31531e0dfc5448e7fa15678b05bbe.html index 44e548cbd..1a34fcb6f 100644 --- a/classnlohmann_1_1basic__json_1_1json__reverse__iterator_a61d31531e0dfc5448e7fa15678b05bbe.html +++ b/classnlohmann_1_1basic__json_1_1json__reverse__iterator_a61d31531e0dfc5448e7fa15678b05bbe.html @@ -128,7 +128,7 @@ template<typename Base >
-

Definition at line 6031 of file json.hpp.

+

Definition at line 6112 of file json.hpp.

@@ -138,7 +138,7 @@ template<typename Base > diff --git a/classnlohmann_1_1basic__json_1_1json__reverse__iterator_a6bd38ed124df0332ba3263a9176b0101.html b/classnlohmann_1_1basic__json_1_1json__reverse__iterator_a6bd38ed124df0332ba3263a9176b0101.html index 95c2de30b..db4fbb56a 100644 --- a/classnlohmann_1_1basic__json_1_1json__reverse__iterator_a6bd38ed124df0332ba3263a9176b0101.html +++ b/classnlohmann_1_1basic__json_1_1json__reverse__iterator_a6bd38ed124df0332ba3263a9176b0101.html @@ -129,7 +129,7 @@ template<typename Base >
-

Definition at line 5976 of file json.hpp.

+

Definition at line 6057 of file json.hpp.

@@ -139,7 +139,7 @@ template<typename Base > diff --git a/classnlohmann_1_1basic__json_1_1json__reverse__iterator_a70086e392779ecbbc9e6845b2be126a0.html b/classnlohmann_1_1basic__json_1_1json__reverse__iterator_a70086e392779ecbbc9e6845b2be126a0.html index 2e8cf43bb..bafabe78a 100644 --- a/classnlohmann_1_1basic__json_1_1json__reverse__iterator_a70086e392779ecbbc9e6845b2be126a0.html +++ b/classnlohmann_1_1basic__json_1_1json__reverse__iterator_a70086e392779ecbbc9e6845b2be126a0.html @@ -129,7 +129,7 @@ template<typename Base >
-

Definition at line 5960 of file json.hpp.

+

Definition at line 6041 of file json.hpp.

@@ -139,7 +139,7 @@ template<typename Base > diff --git a/classnlohmann_1_1basic__json_1_1json__reverse__iterator_aa82b48aee07baee284f8340b37ec6864.html b/classnlohmann_1_1basic__json_1_1json__reverse__iterator_aa82b48aee07baee284f8340b37ec6864.html index 68ad88fee..f3ef741a7 100644 --- a/classnlohmann_1_1basic__json_1_1json__reverse__iterator_aa82b48aee07baee284f8340b37ec6864.html +++ b/classnlohmann_1_1basic__json_1_1json__reverse__iterator_aa82b48aee07baee284f8340b37ec6864.html @@ -129,7 +129,7 @@ template<typename Base >
-

Definition at line 5963 of file json.hpp.

+

Definition at line 6044 of file json.hpp.

@@ -139,7 +139,7 @@ template<typename Base > diff --git a/classnlohmann_1_1basic__json_1_1json__reverse__iterator_ab6245ab29d8481ef2a2351c02cc31d4d.html b/classnlohmann_1_1basic__json_1_1json__reverse__iterator_ab6245ab29d8481ef2a2351c02cc31d4d.html index cf04bef2d..b4ad8e06e 100644 --- a/classnlohmann_1_1basic__json_1_1json__reverse__iterator_ab6245ab29d8481ef2a2351c02cc31d4d.html +++ b/classnlohmann_1_1basic__json_1_1json__reverse__iterator_ab6245ab29d8481ef2a2351c02cc31d4d.html @@ -117,7 +117,7 @@ template<typename Base >
-

Definition at line 5951 of file json.hpp.

+

Definition at line 6032 of file json.hpp.

@@ -127,7 +127,7 @@ template<typename Base > diff --git a/classnlohmann_1_1basic__json_1_1json__reverse__iterator_ac427d8f61858c13b7c16649bfbf75e76.html b/classnlohmann_1_1basic__json_1_1json__reverse__iterator_ac427d8f61858c13b7c16649bfbf75e76.html index 98025e7e3..78e20d55b 100644 --- a/classnlohmann_1_1basic__json_1_1json__reverse__iterator_ac427d8f61858c13b7c16649bfbf75e76.html +++ b/classnlohmann_1_1basic__json_1_1json__reverse__iterator_ac427d8f61858c13b7c16649bfbf75e76.html @@ -129,7 +129,7 @@ template<typename Base >
-

Definition at line 6012 of file json.hpp.

+

Definition at line 6093 of file json.hpp.

@@ -139,7 +139,7 @@ template<typename Base > diff --git a/classnlohmann_1_1basic__json_1_1json__reverse__iterator_ad3d6837b6f97065625c6c65f62f4b6d4.html b/classnlohmann_1_1basic__json_1_1json__reverse__iterator_ad3d6837b6f97065625c6c65f62f4b6d4.html index 4b6ff3c12..d9ab8e99a 100644 --- a/classnlohmann_1_1basic__json_1_1json__reverse__iterator_ad3d6837b6f97065625c6c65f62f4b6d4.html +++ b/classnlohmann_1_1basic__json_1_1json__reverse__iterator_ad3d6837b6f97065625c6c65f62f4b6d4.html @@ -128,7 +128,7 @@ template<typename Base >
-

Definition at line 5982 of file json.hpp.

+

Definition at line 6063 of file json.hpp.

@@ -138,7 +138,7 @@ template<typename Base > diff --git a/classnlohmann_1_1basic__json_1_1json__reverse__iterator_ae988bd36b7d098b1157871f83b2d6265.html b/classnlohmann_1_1basic__json_1_1json__reverse__iterator_ae988bd36b7d098b1157871f83b2d6265.html index e3545aa7c..2e88918f7 100644 --- a/classnlohmann_1_1basic__json_1_1json__reverse__iterator_ae988bd36b7d098b1157871f83b2d6265.html +++ b/classnlohmann_1_1basic__json_1_1json__reverse__iterator_ae988bd36b7d098b1157871f83b2d6265.html @@ -129,7 +129,7 @@ template<typename Base >
-

Definition at line 6018 of file json.hpp.

+

Definition at line 6099 of file json.hpp.

@@ -139,7 +139,7 @@ template<typename Base > diff --git a/classnlohmann_1_1basic__json_1_1json__reverse__iterator_af972fce017b24906236ab235857a11a8.html b/classnlohmann_1_1basic__json_1_1json__reverse__iterator_af972fce017b24906236ab235857a11a8.html index b158240d5..520079684 100644 --- a/classnlohmann_1_1basic__json_1_1json__reverse__iterator_af972fce017b24906236ab235857a11a8.html +++ b/classnlohmann_1_1basic__json_1_1json__reverse__iterator_af972fce017b24906236ab235857a11a8.html @@ -128,7 +128,7 @@ template<typename Base >
-

Definition at line 6024 of file json.hpp.

+

Definition at line 6105 of file json.hpp.

@@ -138,7 +138,7 @@ template<typename Base > diff --git a/classnlohmann_1_1basic__json_a01a2643289b69cd71d9b3f3fc209b748.html b/classnlohmann_1_1basic__json_a01a2643289b69cd71d9b3f3fc209b748.html index 9050c3f20..cde2ca098 100644 --- a/classnlohmann_1_1basic__json_a01a2643289b69cd71d9b3f3fc209b748.html +++ b/classnlohmann_1_1basic__json_a01a2643289b69cd71d9b3f3fc209b748.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -275,13 +277,13 @@ template<template< typename U, typename V, typename...Args > class Obje
18 }
a class to store JSON values
Definition: json.hpp:187
namespace for Niels Lohmann
Definition: json.hpp:78
-
size_type count(typename object_t::key_type key) const
returns the number of occurrences of a key in a JSON object
Definition: json.hpp:3412
+
size_type count(typename object_t::key_type key) const
returns the number of occurrences of a key in a JSON object
Definition: json.hpp:3493
Output (play with this example online):
number of elements with key "two": 1
 number of elements with key "three": 0
 
The example code above can be translated with
g++ -std=c++11 -Isrc doc/examples/count.cpp -o count 
Since
version 1.0
-

Definition at line 3412 of file json.hpp.

+

Definition at line 3493 of file json.hpp.

@@ -291,7 +293,7 @@ number of elements with key "three": 0 diff --git a/classnlohmann_1_1basic__json_a0703ae5cbd2daac5e6c0ae01d3a1b114.html b/classnlohmann_1_1basic__json_a0703ae5cbd2daac5e6c0ae01d3a1b114.html index 202a74bd9..85cff4472 100644 --- a/classnlohmann_1_1basic__json_a0703ae5cbd2daac5e6c0ae01d3a1b114.html +++ b/classnlohmann_1_1basic__json_a0703ae5cbd2daac5e6c0ae01d3a1b114.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -285,7 +287,7 @@ template<template< typename U, typename V, typename...Args > class Obje
23  std::cout << null << '\n';
24 }
a class to store JSON values
Definition: json.hpp:187
-
void push_back(basic_json &&val)
add an object to an array
Definition: json.hpp:3932
+
void push_back(basic_json &&val)
add an object to an array
Definition: json.hpp:4013
namespace for Niels Lohmann
Definition: json.hpp:78
Output (play with this example online):
{"one":1,"two":2}
 null
@@ -294,7 +296,7 @@ null
 
The example code above can be translated with
g++ -std=c++11 -Isrc doc/examples/push_back__object_t__value.cpp -o push_back__object_t__value 
Since
version 1.0
-

Definition at line 4039 of file json.hpp.

+

Definition at line 4120 of file json.hpp.

@@ -304,7 +306,7 @@ null diff --git a/classnlohmann_1_1basic__json_a07c9c38a1f01675759e05d5d34627343.html b/classnlohmann_1_1basic__json_a07c9c38a1f01675759e05d5d34627343.html index 4be320d1c..24d5f694c 100644 --- a/classnlohmann_1_1basic__json_a07c9c38a1f01675759e05d5d34627343.html +++ b/classnlohmann_1_1basic__json_a07c9c38a1f01675759e05d5d34627343.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -290,15 +292,15 @@ template<template< typename U, typename V, typename...Args > class Obje
15  std::cout << v << '\n';
16 }
a class to store JSON values
Definition: json.hpp:187
-
iterator begin()
returns an iterator to the first element
Definition: json.hpp:3446
+
iterator begin()
returns an iterator to the first element
Definition: json.hpp:3527
namespace for Niels Lohmann
Definition: json.hpp:78
-
iterator insert(const_iterator pos, const basic_json &val)
inserts element
Definition: json.hpp:4065
+
iterator insert(const_iterator pos, const basic_json &val)
inserts element
Definition: json.hpp:4146
Output (play with this example online):
10
 [1,2,10,3,4]
 
The example code above can be translated with
g++ -std=c++11 -Isrc doc/examples/insert.cpp -o insert 
Since
version 1.0
-

Definition at line 4091 of file json.hpp.

+

Definition at line 4172 of file json.hpp.

@@ -308,7 +310,7 @@ template<template< typename U, typename V, typename...Args > class Obje diff --git a/classnlohmann_1_1basic__json_a088460b5d95f384a4f2ec9e52f4f66ba.html b/classnlohmann_1_1basic__json_a088460b5d95f384a4f2ec9e52f4f66ba.html index f9f81ded9..e67771f28 100644 --- a/classnlohmann_1_1basic__json_a088460b5d95f384a4f2ec9e52f4f66ba.html +++ b/classnlohmann_1_1basic__json_a088460b5d95f384a4f2ec9e52f4f66ba.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -296,7 +298,7 @@ true diff --git a/classnlohmann_1_1basic__json_a0afa4512f03406db0d0432657e9c7361.html b/classnlohmann_1_1basic__json_a0afa4512f03406db0d0432657e9c7361.html index 41a95bdc9..ef899b1dd 100644 --- a/classnlohmann_1_1basic__json_a0afa4512f03406db0d0432657e9c7361.html +++ b/classnlohmann_1_1basic__json_a0afa4512f03406db0d0432657e9c7361.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -342,7 +344,7 @@ false diff --git a/classnlohmann_1_1basic__json_a114095c452ca2f4ba976548df3da68be.html b/classnlohmann_1_1basic__json_a114095c452ca2f4ba976548df3da68be.html index 79d4076ca..f905953b3 100644 --- a/classnlohmann_1_1basic__json_a114095c452ca2f4ba976548df3da68be.html +++ b/classnlohmann_1_1basic__json_a114095c452ca2f4ba976548df3da68be.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -296,7 +298,7 @@ false diff --git a/classnlohmann_1_1basic__json_a11c3dd843c21c58daa651e84046a82af.html b/classnlohmann_1_1basic__json_a11c3dd843c21c58daa651e84046a82af.html index d135c566e..2967be70e 100644 --- a/classnlohmann_1_1basic__json_a11c3dd843c21c58daa651e84046a82af.html +++ b/classnlohmann_1_1basic__json_a11c3dd843c21c58daa651e84046a82af.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -296,7 +298,7 @@ false diff --git a/classnlohmann_1_1basic__json_a122640e7e2db1814fc7bbb3c122ec76e.html b/classnlohmann_1_1basic__json_a122640e7e2db1814fc7bbb3c122ec76e.html index 6f63b151e..76feb4915 100644 --- a/classnlohmann_1_1basic__json_a122640e7e2db1814fc7bbb3c122ec76e.html +++ b/classnlohmann_1_1basic__json_a122640e7e2db1814fc7bbb3c122ec76e.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -302,7 +304,7 @@ template<template< typename U, typename V, typename...Args > class Obje The example code above can be translated with
g++ -std=c++11 -Isrc doc/examples/operator__equal.cpp -o operator__equal 
Since
version 1.0
-

Definition at line 4430 of file json.hpp.

+

Definition at line 4511 of file json.hpp.

@@ -312,7 +314,7 @@ template<template< typename U, typename V, typename...Args > class Obje diff --git a/classnlohmann_1_1basic__json_a13e5642dbfa1602c937d295a085413cc.html b/classnlohmann_1_1basic__json_a13e5642dbfa1602c937d295a085413cc.html index eb4b868b6..5e10df11f 100644 --- a/classnlohmann_1_1basic__json_a13e5642dbfa1602c937d295a085413cc.html +++ b/classnlohmann_1_1basic__json_a13e5642dbfa1602c937d295a085413cc.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -245,7 +247,7 @@ template<template< typename U, typename V, typename...Args > class Obje diff --git a/classnlohmann_1_1basic__json_a1683189bd539313b5559f07961166c8b.html b/classnlohmann_1_1basic__json_a1683189bd539313b5559f07961166c8b.html index 3971741f3..1cfba327f 100644 --- a/classnlohmann_1_1basic__json_a1683189bd539313b5559f07961166c8b.html +++ b/classnlohmann_1_1basic__json_a1683189bd539313b5559f07961166c8b.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -245,7 +247,7 @@ template<template< typename U, typename V, typename...Args > class Obje diff --git a/classnlohmann_1_1basic__json_a16a275d0201e9aedc87c933c764b8869.html b/classnlohmann_1_1basic__json_a16a275d0201e9aedc87c933c764b8869.html index f4f67e2fc..b0f102dae 100644 --- a/classnlohmann_1_1basic__json_a16a275d0201e9aedc87c933c764b8869.html +++ b/classnlohmann_1_1basic__json_a16a275d0201e9aedc87c933c764b8869.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -310,7 +312,7 @@ out of range diff --git a/classnlohmann_1_1basic__json_a1dc0c521042807e216d11110d2f002ff.html b/classnlohmann_1_1basic__json_a1dc0c521042807e216d11110d2f002ff.html index 476366e39..7f9de7965 100644 --- a/classnlohmann_1_1basic__json_a1dc0c521042807e216d11110d2f002ff.html +++ b/classnlohmann_1_1basic__json_a1dc0c521042807e216d11110d2f002ff.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -302,7 +304,7 @@ template<class CompatibleStringType , typename std::enable_if< diff --git a/classnlohmann_1_1basic__json_a231b02148577b69a154b2ce2c87a5522.html b/classnlohmann_1_1basic__json_a231b02148577b69a154b2ce2c87a5522.html index 12677f6d5..6c348621b 100644 --- a/classnlohmann_1_1basic__json_a231b02148577b69a154b2ce2c87a5522.html +++ b/classnlohmann_1_1basic__json_a231b02148577b69a154b2ce2c87a5522.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -281,7 +283,7 @@ template<template< typename U, typename V, typename...Args > class Obje diff --git a/classnlohmann_1_1basic__json_a234f03dce002783748ca401a42bc6472.html b/classnlohmann_1_1basic__json_a234f03dce002783748ca401a42bc6472.html index 26b015470..29bee8bf8 100644 --- a/classnlohmann_1_1basic__json_a234f03dce002783748ca401a42bc6472.html +++ b/classnlohmann_1_1basic__json_a234f03dce002783748ca401a42bc6472.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -278,7 +280,7 @@ template<typename PointerType , typename std::enable_if<
19  std::cout << std::boolalpha << (p5 == nullptr) << '\n';
20 }
a class to store JSON values
Definition: json.hpp:187
-
ValueType value(const typename object_t::key_type &key, ValueType default_value) const
access specified object element with default value
Definition: json.hpp:2965
+
ValueType value(const typename object_t::key_type &key, ValueType default_value) const
access specified object element with default value
Definition: json.hpp:3046
namespace for Niels Lohmann
Definition: json.hpp:78
PointerType get_ptr() noexcept
get a pointer value (implicit)
Definition: json.hpp:2524
NumberIntegerType number_integer_t
a type for a number (integer)
Definition: json.hpp:527
@@ -298,7 +300,7 @@ true diff --git a/classnlohmann_1_1basic__json_a266c4dd24d11a86e4831523af5d9df4d.html b/classnlohmann_1_1basic__json_a266c4dd24d11a86e4831523af5d9df4d.html index f3ca934d2..21eb8b518 100644 --- a/classnlohmann_1_1basic__json_a266c4dd24d11a86e4831523af5d9df4d.html +++ b/classnlohmann_1_1basic__json_a266c4dd24d11a86e4831523af5d9df4d.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -323,7 +325,7 @@ This function is required for compatibility reasons with Clang. value() for access by value with a default value
Since
version 1.0
-

Definition at line 2894 of file json.hpp.

+

Definition at line 2933 of file json.hpp.

@@ -333,7 +335,7 @@ This function is required for compatibility reasons with Clang. diff --git a/classnlohmann_1_1basic__json_a26b7e4876af25eae5800ce43f93aaef2.html b/classnlohmann_1_1basic__json_a26b7e4876af25eae5800ce43f93aaef2.html index 5c8f403b6..db9c5eaa1 100644 --- a/classnlohmann_1_1basic__json_a26b7e4876af25eae5800ce43f93aaef2.html +++ b/classnlohmann_1_1basic__json_a26b7e4876af25eae5800ce43f93aaef2.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -318,7 +320,7 @@ Unlike 28  << " " << v_string << " " << v_boolean << "\n";
29 }
a class to store JSON values
Definition: json.hpp:187
-
ValueType value(const typename object_t::key_type &key, ValueType default_value) const
access specified object element with default value
Definition: json.hpp:2965
+
ValueType value(const typename object_t::key_type &key, ValueType default_value) const
access specified object element with default value
Definition: json.hpp:3046
namespace for Niels Lohmann
Definition: json.hpp:78
Output (play with this example online):
1 42.23 oops false
 
The example code above can be translated with
g++ -std=c++11 -Isrc doc/examples/basic_json__value.cpp -o basic_json__value 
@@ -327,7 +329,7 @@ Unlike operator[](const typename object_t::key_type&) for unchecked access by reference
Since
version 1.0
-

Definition at line 2965 of file json.hpp.

+

Definition at line 3046 of file json.hpp.

@@ -337,7 +339,7 @@ Unlike diff --git a/classnlohmann_1_1basic__json_a2adfc8d24bea3908398cbf325b5dc1d7.html b/classnlohmann_1_1basic__json_a2adfc8d24bea3908398cbf325b5dc1d7.html index a7fac376e..9eaee5276 100644 --- a/classnlohmann_1_1basic__json_a2adfc8d24bea3908398cbf325b5dc1d7.html +++ b/classnlohmann_1_1basic__json_a2adfc8d24bea3908398cbf325b5dc1d7.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -273,13 +275,13 @@ Illustration from cppreference.com
15 }
a class to store JSON values
Definition: json.hpp:187
namespace for Niels Lohmann
Definition: json.hpp:78
-
const_reverse_iterator crbegin() const
returns a const reverse iterator to the last element
Definition: json.hpp:3625
+
const_reverse_iterator crbegin() const
returns a const reverse iterator to the last element
Definition: json.hpp:3706
a template for a reverse iterator class
Definition: json.hpp:232
Output (play with this example online):
5
 
The example code above can be translated with
g++ -std=c++11 -Isrc doc/examples/crbegin.cpp -o crbegin 
Since
version 1.0
-

Definition at line 3571 of file json.hpp.

+

Definition at line 3652 of file json.hpp.

@@ -289,7 +291,7 @@ Illustration from cppreference.com diff --git a/classnlohmann_1_1basic__json_a2f07bcf7e75c34396476dd1790f26ce8.html b/classnlohmann_1_1basic__json_a2f07bcf7e75c34396476dd1790f26ce8.html index 3fd9da152..423342b30 100644 --- a/classnlohmann_1_1basic__json_a2f07bcf7e75c34396476dd1790f26ce8.html +++ b/classnlohmann_1_1basic__json_a2f07bcf7e75c34396476dd1790f26ce8.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -285,7 +287,7 @@ template<template< typename U, typename V, typename...Args > class Obje
23  std::cout << null << '\n';
24 }
a class to store JSON values
Definition: json.hpp:187
-
void push_back(basic_json &&val)
add an object to an array
Definition: json.hpp:3932
+
void push_back(basic_json &&val)
add an object to an array
Definition: json.hpp:4013
namespace for Niels Lohmann
Definition: json.hpp:78
Output (play with this example online):
{"one":1,"two":2}
 null
@@ -294,7 +296,7 @@ null
 
The example code above can be translated with
g++ -std=c++11 -Isrc doc/examples/push_back__object_t__value.cpp -o push_back__object_t__value 
Since
version 1.0
-

Definition at line 4016 of file json.hpp.

+

Definition at line 4097 of file json.hpp.

@@ -304,7 +306,7 @@ null diff --git a/classnlohmann_1_1basic__json_a3173944e7b1809a333def4078a0b92a3.html b/classnlohmann_1_1basic__json_a3173944e7b1809a333def4078a0b92a3.html index 80dbd71d5..da820c0e6 100644 --- a/classnlohmann_1_1basic__json_a3173944e7b1809a333def4078a0b92a3.html +++ b/classnlohmann_1_1basic__json_a3173944e7b1809a333def4078a0b92a3.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -285,7 +287,7 @@ template<template< typename U, typename V, typename...Args > class Obje
23  std::cout << null << '\n';
24 }
a class to store JSON values
Definition: json.hpp:187
-
void push_back(basic_json &&val)
add an object to an array
Definition: json.hpp:3932
+
void push_back(basic_json &&val)
add an object to an array
Definition: json.hpp:4013
namespace for Niels Lohmann
Definition: json.hpp:78
Output (play with this example online):
[1,2,3,4,5]
 null
@@ -294,7 +296,7 @@ null
 
The example code above can be translated with
g++ -std=c++11 -Isrc doc/examples/push_back.cpp -o push_back 
Since
version 1.0
-

Definition at line 3957 of file json.hpp.

+

Definition at line 4038 of file json.hpp.

@@ -304,7 +306,7 @@ null diff --git a/classnlohmann_1_1basic__json_a3287df6546c905fb0a5786deb4b1cf32.html b/classnlohmann_1_1basic__json_a3287df6546c905fb0a5786deb4b1cf32.html index 9170d3cab..97141f9b5 100644 --- a/classnlohmann_1_1basic__json_a3287df6546c905fb0a5786deb4b1cf32.html +++ b/classnlohmann_1_1basic__json_a3287df6546c905fb0a5786deb4b1cf32.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -302,7 +304,7 @@ template<template< typename U, typename V, typename...Args > class Obje
object (unordered set of name/value pairs)
namespace for Niels Lohmann
Definition: json.hpp:78
array (ordered collection of values)
-
bool empty() const noexcept
checks whether the container is empty
Definition: json.hpp:3692
+
bool empty() const noexcept
checks whether the container is empty
Definition: json.hpp:3773
Output (play with this example online):
true
 false
 false
@@ -315,7 +317,7 @@ false
 
The example code above can be translated with
g++ -std=c++11 -Isrc doc/examples/empty.cpp -o empty 
Since
version 1.0
-

Definition at line 3692 of file json.hpp.

+

Definition at line 3773 of file json.hpp.

@@ -325,7 +327,7 @@ false diff --git a/classnlohmann_1_1basic__json_a33f1632cfdbf460b4913f4e8a43dd9e4.html b/classnlohmann_1_1basic__json_a33f1632cfdbf460b4913f4e8a43dd9e4.html index 0cf27058b..271da71a0 100644 --- a/classnlohmann_1_1basic__json_a33f1632cfdbf460b4913f4e8a43dd9e4.html +++ b/classnlohmann_1_1basic__json_a33f1632cfdbf460b4913f4e8a43dd9e4.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -288,7 +290,7 @@ template<template< typename U, typename V, typename...Args > class Obje diff --git a/classnlohmann_1_1basic__json_a34d6a60dd99e9f33b8273a1c8db5669b.html b/classnlohmann_1_1basic__json_a34d6a60dd99e9f33b8273a1c8db5669b.html index 77f8ae396..25d1c84b5 100644 --- a/classnlohmann_1_1basic__json_a34d6a60dd99e9f33b8273a1c8db5669b.html +++ b/classnlohmann_1_1basic__json_a34d6a60dd99e9f33b8273a1c8db5669b.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -306,7 +308,7 @@ template<template< typename U, typename V, typename...Args > class Obje The example code above can be translated with
g++ -std=c++11 -Isrc doc/examples/operator_serialize.cpp -o operator_serialize 
Since
version 1.0
-

Definition at line 4739 of file json.hpp.

+

Definition at line 4820 of file json.hpp.

@@ -316,7 +318,7 @@ template<template< typename U, typename V, typename...Args > class Obje diff --git a/classnlohmann_1_1basic__json_a3d4e4bab95b24ccab42ed37e0ede2d98.html b/classnlohmann_1_1basic__json_a3d4e4bab95b24ccab42ed37e0ede2d98.html index e26de5929..45e4f699d 100644 --- a/classnlohmann_1_1basic__json_a3d4e4bab95b24ccab42ed37e0ede2d98.html +++ b/classnlohmann_1_1basic__json_a3d4e4bab95b24ccab42ed37e0ede2d98.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -293,7 +295,7 @@ template<template< typename U, typename V, typename...Args > class Obje diff --git a/classnlohmann_1_1basic__json_a42f9133f978dde4cce5851b2c2434a0c.html b/classnlohmann_1_1basic__json_a42f9133f978dde4cce5851b2c2434a0c.html index 2625150e7..7afa1151f 100644 --- a/classnlohmann_1_1basic__json_a42f9133f978dde4cce5851b2c2434a0c.html +++ b/classnlohmann_1_1basic__json_a42f9133f978dde4cce5851b2c2434a0c.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -303,7 +305,7 @@ true diff --git a/classnlohmann_1_1basic__json_a4361aa791f3980abb239e4155a3450cb.html b/classnlohmann_1_1basic__json_a4361aa791f3980abb239e4155a3450cb.html index 68cd230c7..7a5988738 100644 --- a/classnlohmann_1_1basic__json_a4361aa791f3980abb239e4155a3450cb.html +++ b/classnlohmann_1_1basic__json_a4361aa791f3980abb239e4155a3450cb.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -273,14 +275,14 @@ Illustration from cppreference.com
14  std::cout << *it << '\n';
15 }
a class to store JSON values
Definition: json.hpp:187
-
const_iterator cbegin() const
returns a const iterator to the first element
Definition: json.hpp:3480
+
const_iterator cbegin() const
returns a const iterator to the first element
Definition: json.hpp:3561
namespace for Niels Lohmann
Definition: json.hpp:78
-
a const random access iterator for the basic_json class
Definition: json.hpp:5306
+
a const random access iterator for the basic_json class
Definition: json.hpp:5387
Output (play with this example online):
1
 
The example code above can be translated with
g++ -std=c++11 -Isrc doc/examples/cbegin.cpp -o cbegin 
Since
version 1.0
-

Definition at line 3456 of file json.hpp.

+

Definition at line 3537 of file json.hpp.

@@ -290,7 +292,7 @@ Illustration from cppreference.com diff --git a/classnlohmann_1_1basic__json_a457fec897d7b6283c60ca236ebb1f5e8.html b/classnlohmann_1_1basic__json_a457fec897d7b6283c60ca236ebb1f5e8.html index c73d6f389..aa7e18280 100644 --- a/classnlohmann_1_1basic__json_a457fec897d7b6283c60ca236ebb1f5e8.html +++ b/classnlohmann_1_1basic__json_a457fec897d7b6283c60ca236ebb1f5e8.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -293,7 +295,7 @@ template<template< typename U, typename V, typename...Args > class Obje diff --git a/classnlohmann_1_1basic__json_a48c8d153bc2fd1af655063a4b984feac.html b/classnlohmann_1_1basic__json_a48c8d153bc2fd1af655063a4b984feac.html index 9cc97d186..4a13d4114 100644 --- a/classnlohmann_1_1basic__json_a48c8d153bc2fd1af655063a4b984feac.html +++ b/classnlohmann_1_1basic__json_a48c8d153bc2fd1af655063a4b984feac.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -295,7 +297,7 @@ template<template< typename U, typename V, typename...Args > class Obje diff --git a/classnlohmann_1_1basic__json_a4943b7f16ddc4e0df33c0cae7ef14471.html b/classnlohmann_1_1basic__json_a4943b7f16ddc4e0df33c0cae7ef14471.html index 37faa2e22..69cb493c2 100644 --- a/classnlohmann_1_1basic__json_a4943b7f16ddc4e0df33c0cae7ef14471.html +++ b/classnlohmann_1_1basic__json_a4943b7f16ddc4e0df33c0cae7ef14471.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -276,13 +278,13 @@ Illustration from cppreference.com
18 }
a class to store JSON values
Definition: json.hpp:187
namespace for Niels Lohmann
Definition: json.hpp:78
-
const_reverse_iterator crend() const
returns a const reverse iterator to one before the first
Definition: json.hpp:3648
+
const_reverse_iterator crend() const
returns a const reverse iterator to one before the first
Definition: json.hpp:3729
a template for a reverse iterator class
Definition: json.hpp:232
Output (play with this example online):
1
 
The example code above can be translated with
g++ -std=c++11 -Isrc doc/examples/crend.cpp -o crend 
Since
version 1.0
-

Definition at line 3648 of file json.hpp.

+

Definition at line 3729 of file json.hpp.

@@ -292,7 +294,7 @@ Illustration from cppreference.com diff --git a/classnlohmann_1_1basic__json_a4ad3f27ecece8f644e8dca69a97eb67f.html b/classnlohmann_1_1basic__json_a4ad3f27ecece8f644e8dca69a97eb67f.html index b2fca277f..a6eb115ed 100644 --- a/classnlohmann_1_1basic__json_a4ad3f27ecece8f644e8dca69a97eb67f.html +++ b/classnlohmann_1_1basic__json_a4ad3f27ecece8f644e8dca69a97eb67f.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -276,13 +278,13 @@ Illustration from cppreference.com
18 }
a class to store JSON values
Definition: json.hpp:187
namespace for Niels Lohmann
Definition: json.hpp:78
-
const_reverse_iterator crend() const
returns a const reverse iterator to one before the first
Definition: json.hpp:3648
+
const_reverse_iterator crend() const
returns a const reverse iterator to one before the first
Definition: json.hpp:3729
a template for a reverse iterator class
Definition: json.hpp:232
Output (play with this example online):
1
 
The example code above can be translated with
g++ -std=c++11 -Isrc doc/examples/crend.cpp -o crend 
Since
version 1.0
-

Definition at line 3602 of file json.hpp.

+

Definition at line 3683 of file json.hpp.

@@ -292,7 +294,7 @@ Illustration from cppreference.com diff --git a/classnlohmann_1_1basic__json_a4bf695ddf4a00ea8feea2c725ec847f1.html b/classnlohmann_1_1basic__json_a4bf695ddf4a00ea8feea2c725ec847f1.html index a9437c2d3..37dbe3a43 100644 --- a/classnlohmann_1_1basic__json_a4bf695ddf4a00ea8feea2c725ec847f1.html +++ b/classnlohmann_1_1basic__json_a4bf695ddf4a00ea8feea2c725ec847f1.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -282,13 +284,13 @@ template<template< typename U, typename V, typename...Args > class Obje
a class to store JSON values
Definition: json.hpp:187
ObjectType< StringType, basic_json, std::less< StringType >, AllocatorType< std::pair< const StringType, basic_json >>> object_t
a type for an object
Definition: json.hpp:340
namespace for Niels Lohmann
Definition: json.hpp:78
-
void swap(reference other) noexcept( std::is_nothrow_move_constructible< value_t >::value and std::is_nothrow_move_assignable< value_t >::value and std::is_nothrow_move_constructible< json_value >::value and std::is_nothrow_move_assignable< json_value >::value )
exchanges the values
Definition: json.hpp:4257
+
void swap(reference other) noexcept( std::is_nothrow_move_constructible< value_t >::value and std::is_nothrow_move_assignable< value_t >::value and std::is_nothrow_move_constructible< json_value >::value and std::is_nothrow_move_assignable< json_value >::value )
exchanges the values
Definition: json.hpp:4338
Output (play with this example online):
value = {"translation":{"cow":"Kuh","dog":"Hund"}}
 object = {"one":"eins","two":"zwei"}
 
The example code above can be translated with
g++ -std=c++11 -Isrc doc/examples/swap__object_t.cpp -o swap__object_t 
Since
version 1.0
-

Definition at line 4319 of file json.hpp.

+

Definition at line 4400 of file json.hpp.

@@ -298,7 +300,7 @@ object = {"one":"eins","two":"zwei"} diff --git a/classnlohmann_1_1basic__json_a4d688b5ff534d3ab4e284b3191061529.html b/classnlohmann_1_1basic__json_a4d688b5ff534d3ab4e284b3191061529.html index a32ca02f8..476355dd1 100644 --- a/classnlohmann_1_1basic__json_a4d688b5ff534d3ab4e284b3191061529.html +++ b/classnlohmann_1_1basic__json_a4d688b5ff534d3ab4e284b3191061529.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -273,13 +275,13 @@ Illustration from cppreference.com
15 }
a class to store JSON values
Definition: json.hpp:187
namespace for Niels Lohmann
Definition: json.hpp:78
-
const_reverse_iterator crbegin() const
returns a const reverse iterator to the last element
Definition: json.hpp:3625
+
const_reverse_iterator crbegin() const
returns a const reverse iterator to the last element
Definition: json.hpp:3706
a template for a reverse iterator class
Definition: json.hpp:232
Output (play with this example online):
5
 
The example code above can be translated with
g++ -std=c++11 -Isrc doc/examples/crbegin.cpp -o crbegin 
Since
version 1.0
-

Definition at line 3625 of file json.hpp.

+

Definition at line 3706 of file json.hpp.

@@ -289,7 +291,7 @@ Illustration from cppreference.com diff --git a/classnlohmann_1_1basic__json_a5114ed5eb394a2805da0bd1acba95ae2.html b/classnlohmann_1_1basic__json_a5114ed5eb394a2805da0bd1acba95ae2.html index d6caa48c4..44de443e4 100644 --- a/classnlohmann_1_1basic__json_a5114ed5eb394a2805da0bd1acba95ae2.html +++ b/classnlohmann_1_1basic__json_a5114ed5eb394a2805da0bd1acba95ae2.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -285,7 +287,7 @@ template<template< typename U, typename V, typename...Args > class Obje
23  std::cout << null << '\n';
24 }
a class to store JSON values
Definition: json.hpp:187
-
void push_back(basic_json &&val)
add an object to an array
Definition: json.hpp:3932
+
void push_back(basic_json &&val)
add an object to an array
Definition: json.hpp:4013
namespace for Niels Lohmann
Definition: json.hpp:78
Output (play with this example online):
[1,2,3,4,5]
 null
@@ -294,7 +296,7 @@ null
 
The example code above can be translated with
g++ -std=c++11 -Isrc doc/examples/push_back.cpp -o push_back 
Since
version 1.0
-

Definition at line 3967 of file json.hpp.

+

Definition at line 4048 of file json.hpp.

@@ -304,7 +306,7 @@ null diff --git a/classnlohmann_1_1basic__json_a53a2abfdd4f72c7df5aba1155bf03e48.html b/classnlohmann_1_1basic__json_a53a2abfdd4f72c7df5aba1155bf03e48.html index f2f5e269a..e9ad2e062 100644 --- a/classnlohmann_1_1basic__json_a53a2abfdd4f72c7df5aba1155bf03e48.html +++ b/classnlohmann_1_1basic__json_a53a2abfdd4f72c7df5aba1155bf03e48.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -297,7 +299,7 @@ false diff --git a/classnlohmann_1_1basic__json_a57703688bee6b9736ab3a430d8d246f2.html b/classnlohmann_1_1basic__json_a57703688bee6b9736ab3a430d8d246f2.html index 35723cc6a..66129cb4e 100644 --- a/classnlohmann_1_1basic__json_a57703688bee6b9736ab3a430d8d246f2.html +++ b/classnlohmann_1_1basic__json_a57703688bee6b9736ab3a430d8d246f2.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -304,7 +306,7 @@ template<template< typename U, typename V, typename...Args > class Obje diff --git a/classnlohmann_1_1basic__json_a57a96ab3ff1ce7b48a754129fb12c982.html b/classnlohmann_1_1basic__json_a57a96ab3ff1ce7b48a754129fb12c982.html index a2a77f8bf..bc6f8670c 100644 --- a/classnlohmann_1_1basic__json_a57a96ab3ff1ce7b48a754129fb12c982.html +++ b/classnlohmann_1_1basic__json_a57a96ab3ff1ce7b48a754129fb12c982.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -282,13 +284,13 @@ template<template< typename U, typename V, typename...Args > class Obje
StringType string_t
a type for a string
Definition: json.hpp:433
a class to store JSON values
Definition: json.hpp:187
namespace for Niels Lohmann
Definition: json.hpp:78
-
void swap(reference other) noexcept( std::is_nothrow_move_constructible< value_t >::value and std::is_nothrow_move_assignable< value_t >::value and std::is_nothrow_move_constructible< json_value >::value and std::is_nothrow_move_assignable< json_value >::value )
exchanges the values
Definition: json.hpp:4257
+
void swap(reference other) noexcept( std::is_nothrow_move_constructible< value_t >::value and std::is_nothrow_move_assignable< value_t >::value and std::is_nothrow_move_constructible< json_value >::value and std::is_nothrow_move_assignable< json_value >::value )
exchanges the values
Definition: json.hpp:4338
Output (play with this example online):
value = ["the good","the fast","the ugly"]
 string = the bad
 
The example code above can be translated with
g++ -std=c++11 -Isrc doc/examples/swap__string_t.cpp -o swap__string_t 
Since
version 1.0
-

Definition at line 4351 of file json.hpp.

+

Definition at line 4432 of file json.hpp.

@@ -298,7 +300,7 @@ string = the bad diff --git a/classnlohmann_1_1basic__json_a5a2d4dbcdbc8ea065b87daf52cd786b9.html b/classnlohmann_1_1basic__json_a5a2d4dbcdbc8ea065b87daf52cd786b9.html index a318cad31..b559f7654 100644 --- a/classnlohmann_1_1basic__json_a5a2d4dbcdbc8ea065b87daf52cd786b9.html +++ b/classnlohmann_1_1basic__json_a5a2d4dbcdbc8ea065b87daf52cd786b9.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -279,7 +281,7 @@ template<template< typename U, typename V, typename...Args > class Obje diff --git a/classnlohmann_1_1basic__json_a5c8bb5200f5eac10d31e26be46e5b1ac.html b/classnlohmann_1_1basic__json_a5c8bb5200f5eac10d31e26be46e5b1ac.html index 6ebb25dd1..8aa588310 100644 --- a/classnlohmann_1_1basic__json_a5c8bb5200f5eac10d31e26be46e5b1ac.html +++ b/classnlohmann_1_1basic__json_a5c8bb5200f5eac10d31e26be46e5b1ac.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -298,7 +300,7 @@ template<template< typename U, typename V, typename...Args > class Obje The example code above can be translated with
g++ -std=c++11 -Isrc doc/examples/operator__greater.cpp -o operator__greater 
Since
version 1.0
-

Definition at line 4640 of file json.hpp.

+

Definition at line 4721 of file json.hpp.

@@ -308,7 +310,7 @@ template<template< typename U, typename V, typename...Args > class Obje diff --git a/classnlohmann_1_1basic__json_a5d428360d75a52f6af74751d1cc912c6.html b/classnlohmann_1_1basic__json_a5d428360d75a52f6af74751d1cc912c6.html index 0dc9e9266..ca4a7c3ee 100644 --- a/classnlohmann_1_1basic__json_a5d428360d75a52f6af74751d1cc912c6.html +++ b/classnlohmann_1_1basic__json_a5d428360d75a52f6af74751d1cc912c6.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -312,7 +314,7 @@ true diff --git a/classnlohmann_1_1basic__json_a5e34c5435e557d0bf666bd7311211405.html b/classnlohmann_1_1basic__json_a5e34c5435e557d0bf666bd7311211405.html index d28f9ea7e..c29feb39f 100644 --- a/classnlohmann_1_1basic__json_a5e34c5435e557d0bf666bd7311211405.html +++ b/classnlohmann_1_1basic__json_a5e34c5435e557d0bf666bd7311211405.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -306,7 +308,7 @@ template<template< typename U, typename V, typename...Args > class Obje The example code above can be translated with
g++ -std=c++11 -Isrc doc/examples/operator_serialize.cpp -o operator_serialize 
Since
version 1.0
-

Definition at line 4721 of file json.hpp.

+

Definition at line 4802 of file json.hpp.

@@ -316,7 +318,7 @@ template<template< typename U, typename V, typename...Args > class Obje diff --git a/classnlohmann_1_1basic__json_a5f0aad50ed7e8aec3128fe018c18b3fe.html b/classnlohmann_1_1basic__json_a5f0aad50ed7e8aec3128fe018c18b3fe.html index 5baec4c20..ef5caec99 100644 --- a/classnlohmann_1_1basic__json_a5f0aad50ed7e8aec3128fe018c18b3fe.html +++ b/classnlohmann_1_1basic__json_a5f0aad50ed7e8aec3128fe018c18b3fe.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -341,7 +343,7 @@ array: [1,2,3,4,5] diff --git a/classnlohmann_1_1basic__json_a5fd8b54389698edf0c08e2dd001f610b.html b/classnlohmann_1_1basic__json_a5fd8b54389698edf0c08e2dd001f610b.html index 7c7879d30..849f425a8 100644 --- a/classnlohmann_1_1basic__json_a5fd8b54389698edf0c08e2dd001f610b.html +++ b/classnlohmann_1_1basic__json_a5fd8b54389698edf0c08e2dd001f610b.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -245,7 +247,7 @@ template<template< typename U, typename V, typename...Args > class Obje diff --git a/classnlohmann_1_1basic__json_a60ca396028b8d9714c6e10efbf475af6.html b/classnlohmann_1_1basic__json_a60ca396028b8d9714c6e10efbf475af6.html index 187bbcde3..a15815331 100644 --- a/classnlohmann_1_1basic__json_a60ca396028b8d9714c6e10efbf475af6.html +++ b/classnlohmann_1_1basic__json_a60ca396028b8d9714c6e10efbf475af6.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -314,7 +316,7 @@ template<template< typename U, typename V, typename...Args > class Obje
See also
parse(std::istream&, parser_callback_t) for a variant with a parser callback function to filter values while parsing
Since
version 1.0
-

Definition at line 4843 of file json.hpp.

+

Definition at line 4924 of file json.hpp.

@@ -324,7 +326,7 @@ template<template< typename U, typename V, typename...Args > class Obje diff --git a/classnlohmann_1_1basic__json_a63691315292df8e1522b00d37ebb1ffc.html b/classnlohmann_1_1basic__json_a63691315292df8e1522b00d37ebb1ffc.html index e3872b2d0..fa2faa759 100644 --- a/classnlohmann_1_1basic__json_a63691315292df8e1522b00d37ebb1ffc.html +++ b/classnlohmann_1_1basic__json_a63691315292df8e1522b00d37ebb1ffc.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -282,7 +284,7 @@ template<template< typename U, typename V, typename...Args > class Obje diff --git a/classnlohmann_1_1basic__json_a652414dd930cb3af3b6f454cc535a23e.html b/classnlohmann_1_1basic__json_a652414dd930cb3af3b6f454cc535a23e.html index 1951e2866..402bc178e 100644 --- a/classnlohmann_1_1basic__json_a652414dd930cb3af3b6f454cc535a23e.html +++ b/classnlohmann_1_1basic__json_a652414dd930cb3af3b6f454cc535a23e.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -317,7 +319,7 @@ out of range diff --git a/classnlohmann_1_1basic__json_a656939a3dc9a6047e4afacd9e11b83a6.html b/classnlohmann_1_1basic__json_a656939a3dc9a6047e4afacd9e11b83a6.html index e55aa3f37..f7d2bc496 100644 --- a/classnlohmann_1_1basic__json_a656939a3dc9a6047e4afacd9e11b83a6.html +++ b/classnlohmann_1_1basic__json_a656939a3dc9a6047e4afacd9e11b83a6.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -278,7 +280,7 @@ template<typename PointerType , typename std::enable_if<
19  std::cout << std::boolalpha << (p5 == nullptr) << '\n';
20 }
a class to store JSON values
Definition: json.hpp:187
-
ValueType value(const typename object_t::key_type &key, ValueType default_value) const
access specified object element with default value
Definition: json.hpp:2965
+
ValueType value(const typename object_t::key_type &key, ValueType default_value) const
access specified object element with default value
Definition: json.hpp:3046
namespace for Niels Lohmann
Definition: json.hpp:78
PointerType get_ptr() noexcept
get a pointer value (implicit)
Definition: json.hpp:2524
NumberIntegerType number_integer_t
a type for a number (integer)
Definition: json.hpp:527
@@ -298,7 +300,7 @@ true diff --git a/classnlohmann_1_1basic__json_a66f936cfbd252f85bd3dc2598e37a64b.html b/classnlohmann_1_1basic__json_a66f936cfbd252f85bd3dc2598e37a64b.html index ea2373510..48cd6acc9 100644 --- a/classnlohmann_1_1basic__json_a66f936cfbd252f85bd3dc2598e37a64b.html +++ b/classnlohmann_1_1basic__json_a66f936cfbd252f85bd3dc2598e37a64b.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -285,7 +287,7 @@ template<template< typename U, typename V, typename...Args > class Obje
23  std::cout << null << '\n';
24 }
a class to store JSON values
Definition: json.hpp:187
-
void push_back(basic_json &&val)
add an object to an array
Definition: json.hpp:3932
+
void push_back(basic_json &&val)
add an object to an array
Definition: json.hpp:4013
namespace for Niels Lohmann
Definition: json.hpp:78
Output (play with this example online):
[1,2,3,4,5]
 null
@@ -294,7 +296,7 @@ null
 
The example code above can be translated with
g++ -std=c++11 -Isrc doc/examples/push_back.cpp -o push_back 
Since
version 1.0
-

Definition at line 3932 of file json.hpp.

+

Definition at line 4013 of file json.hpp.

@@ -304,7 +306,7 @@ null diff --git a/classnlohmann_1_1basic__json_a6944904b3b59769b1cf62ac2532cbe33.html b/classnlohmann_1_1basic__json_a6944904b3b59769b1cf62ac2532cbe33.html index b154ef19d..3225d7a1d 100644 --- a/classnlohmann_1_1basic__json_a6944904b3b59769b1cf62ac2532cbe33.html +++ b/classnlohmann_1_1basic__json_a6944904b3b59769b1cf62ac2532cbe33.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -271,7 +273,7 @@ template<template< typename U, typename V, typename...Args > class Obje diff --git a/classnlohmann_1_1basic__json_a696ced74d8edc0b63a000a72907ab109.html b/classnlohmann_1_1basic__json_a696ced74d8edc0b63a000a72907ab109.html index ffe93e90d..79fcc85de 100644 --- a/classnlohmann_1_1basic__json_a696ced74d8edc0b63a000a72907ab109.html +++ b/classnlohmann_1_1basic__json_a696ced74d8edc0b63a000a72907ab109.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -299,7 +301,7 @@ false diff --git a/classnlohmann_1_1basic__json_a6a7f45095675ac6fd1d018a0e41874be.html b/classnlohmann_1_1basic__json_a6a7f45095675ac6fd1d018a0e41874be.html index 9d1c7a308..7fdaf4f54 100644 --- a/classnlohmann_1_1basic__json_a6a7f45095675ac6fd1d018a0e41874be.html +++ b/classnlohmann_1_1basic__json_a6a7f45095675ac6fd1d018a0e41874be.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -308,9 +310,9 @@ template<class InputIT , typename std::enable_if<
20  std::cout << j_object_range << '\n';
21 }
a class to store JSON values
Definition: json.hpp:187
-
iterator end()
returns an iterator to one past the last element
Definition: json.hpp:3505
-
iterator begin()
returns an iterator to the first element
Definition: json.hpp:3446
-
iterator find(typename object_t::key_type key)
find an element in a JSON object
Definition: json.hpp:3366
+
iterator end()
returns an iterator to one past the last element
Definition: json.hpp:3586
+
iterator begin()
returns an iterator to the first element
Definition: json.hpp:3527
+
iterator find(typename object_t::key_type key)
find an element in a JSON object
Definition: json.hpp:3447
namespace for Niels Lohmann
Definition: json.hpp:78
Output (play with this example online):
["bravo","charly"]
 42
@@ -328,7 +330,7 @@ template<class InputIT , typename std::enable_if<
 
 
 
diff --git a/classnlohmann_1_1basic__json_a6b7428e8c1169497f47b81667001cbfb.html b/classnlohmann_1_1basic__json_a6b7428e8c1169497f47b81667001cbfb.html
index 963a6b46a..cd18d2a75 100644
--- a/classnlohmann_1_1basic__json_a6b7428e8c1169497f47b81667001cbfb.html
+++ b/classnlohmann_1_1basic__json_a6b7428e8c1169497f47b81667001cbfb.html
@@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
           operator[]
           operator[]
           operator[]
+          operator[]
           operator[]
+          operator[]
           parse
           parse
           parse
@@ -297,15 +299,15 @@ template<template< typename U, typename V, typename...Args > class Obje
 
15  std::cout << v << '\n';
16 }
a class to store JSON values
Definition: json.hpp:187
-
iterator begin()
returns an iterator to the first element
Definition: json.hpp:3446
+
iterator begin()
returns an iterator to the first element
Definition: json.hpp:3527
namespace for Niels Lohmann
Definition: json.hpp:78
-
iterator insert(const_iterator pos, const basic_json &val)
inserts element
Definition: json.hpp:4065
+
iterator insert(const_iterator pos, const basic_json &val)
inserts element
Definition: json.hpp:4146
Output (play with this example online):
7
 [1,2,7,7,7,7,7,7,7,3,4]
 
The example code above can be translated with
g++ -std=c++11 -Isrc doc/examples/insert__count.cpp -o insert__count 
Since
version 1.0
-

Definition at line 4118 of file json.hpp.

+

Definition at line 4199 of file json.hpp.

@@ -315,7 +317,7 @@ template<template< typename U, typename V, typename...Args > class Obje diff --git a/classnlohmann_1_1basic__json_a6bbd3e72a870f1ba81ff6886b063b0fe.html b/classnlohmann_1_1basic__json_a6bbd3e72a870f1ba81ff6886b063b0fe.html index 50bce130f..166f4cd66 100644 --- a/classnlohmann_1_1basic__json_a6bbd3e72a870f1ba81ff6886b063b0fe.html +++ b/classnlohmann_1_1basic__json_a6bbd3e72a870f1ba81ff6886b063b0fe.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -245,7 +247,7 @@ template<template< typename U, typename V, typename...Args > class Obje diff --git a/classnlohmann_1_1basic__json_a6dff6a02a2be250b8f8dc2f47be65544.html b/classnlohmann_1_1basic__json_a6dff6a02a2be250b8f8dc2f47be65544.html index d9277c348..449524b8d 100644 --- a/classnlohmann_1_1basic__json_a6dff6a02a2be250b8f8dc2f47be65544.html +++ b/classnlohmann_1_1basic__json_a6dff6a02a2be250b8f8dc2f47be65544.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -278,7 +280,7 @@ template<template< typename U, typename V, typename...Args > class Obje
15 }
a class to store JSON values
Definition: json.hpp:187
namespace for Niels Lohmann
Definition: json.hpp:78
-
InteratorType erase(InteratorType pos)
remove element given an iterator
Definition: json.hpp:3115
+
InteratorType erase(InteratorType pos)
remove element given an iterator
Definition: json.hpp:3196
Output (play with this example online):
[0,1,3,4,5]
 
The example code above can be translated with
g++ -std=c++11 -Isrc doc/examples/erase__size_type.cpp -o erase__size_type 
See also
erase(InteratorType) – removes the element at a given position
@@ -288,7 +290,7 @@ template<template< typename U, typename V, typename...Args > class Obje erase(const typename object_t::key_type&) – remvoes the element from an object at the given key
Since
version 1.0
-

Definition at line 3331 of file json.hpp.

+

Definition at line 3412 of file json.hpp.

@@ -298,7 +300,7 @@ template<template< typename U, typename V, typename...Args > class Obje diff --git a/classnlohmann_1_1basic__json_a6e2e21da48f5d9471716cd868a068327.html b/classnlohmann_1_1basic__json_a6e2e21da48f5d9471716cd868a068327.html index f056c5ee0..f982f5ecd 100644 --- a/classnlohmann_1_1basic__json_a6e2e21da48f5d9471716cd868a068327.html +++ b/classnlohmann_1_1basic__json_a6e2e21da48f5d9471716cd868a068327.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -298,7 +300,7 @@ template<template< typename U, typename V, typename...Args > class Obje
The example code above can be translated with
g++ -std=c++11 -Isrc doc/examples/operator__notequal.cpp -o operator__notequal 
Since
version 1.0
-

Definition at line 4518 of file json.hpp.

+

Definition at line 4599 of file json.hpp.

@@ -308,7 +310,7 @@ template<template< typename U, typename V, typename...Args > class Obje diff --git a/classnlohmann_1_1basic__json_a71eba33d906745e66f340952b79fbce3.html b/classnlohmann_1_1basic__json_a71eba33d906745e66f340952b79fbce3.html index a4421d0fb..ed5c5c1b8 100644 --- a/classnlohmann_1_1basic__json_a71eba33d906745e66f340952b79fbce3.html +++ b/classnlohmann_1_1basic__json_a71eba33d906745e66f340952b79fbce3.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -245,7 +247,7 @@ template<template< typename U, typename V, typename...Args > class Obje diff --git a/classnlohmann_1_1basic__json_a72442ccbb378b4464a24a2da1e784041.html b/classnlohmann_1_1basic__json_a72442ccbb378b4464a24a2da1e784041.html index 6370fc5b1..526ba5b6a 100644 --- a/classnlohmann_1_1basic__json_a72442ccbb378b4464a24a2da1e784041.html +++ b/classnlohmann_1_1basic__json_a72442ccbb378b4464a24a2da1e784041.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -316,7 +318,7 @@ Unlike 28  << " " << v_string << " " << v_boolean << "\n";
29 }
a class to store JSON values
Definition: json.hpp:187
-
ValueType value(const typename object_t::key_type &key, ValueType default_value) const
access specified object element with default value
Definition: json.hpp:2965
+
ValueType value(const typename object_t::key_type &key, ValueType default_value) const
access specified object element with default value
Definition: json.hpp:3046
namespace for Niels Lohmann
Definition: json.hpp:78
Output (play with this example online):
1 42.23 oops false
 
The example code above can be translated with
g++ -std=c++11 -Isrc doc/examples/basic_json__value.cpp -o basic_json__value 
@@ -325,7 +327,7 @@ Unlike operator[](const typename object_t::key_type&) for unchecked access by reference
Since
version 1.0
-

Definition at line 2991 of file json.hpp.

+

Definition at line 3072 of file json.hpp.

@@ -335,7 +337,7 @@ Unlike diff --git a/classnlohmann_1_1basic__json_a72ba20783ecb3eec98bd6a3b870d565c.html b/classnlohmann_1_1basic__json_a72ba20783ecb3eec98bd6a3b870d565c.html index ad530c415..c456eb3aa 100644 --- a/classnlohmann_1_1basic__json_a72ba20783ecb3eec98bd6a3b870d565c.html +++ b/classnlohmann_1_1basic__json_a72ba20783ecb3eec98bd6a3b870d565c.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -276,14 +278,14 @@ Illustration from cppreference.com
17  std::cout << *it << '\n';
18 }
a class to store JSON values
Definition: json.hpp:187
-
const_iterator cend() const
returns a const iterator to one past the last element
Definition: json.hpp:3539
+
const_iterator cend() const
returns a const iterator to one past the last element
Definition: json.hpp:3620
namespace for Niels Lohmann
Definition: json.hpp:78
-
a const random access iterator for the basic_json class
Definition: json.hpp:5306
+
a const random access iterator for the basic_json class
Definition: json.hpp:5387
Output (play with this example online):
5
 
The example code above can be translated with
g++ -std=c++11 -Isrc doc/examples/cend.cpp -o cend 
Since
version 1.0
-

Definition at line 3539 of file json.hpp.

+

Definition at line 3620 of file json.hpp.

@@ -293,7 +295,7 @@ Illustration from cppreference.com diff --git a/classnlohmann_1_1basic__json_a74472977b798c7b7989e6e7cb960ecff.html b/classnlohmann_1_1basic__json_a74472977b798c7b7989e6e7cb960ecff.html index 551265dbb..16e96051e 100644 --- a/classnlohmann_1_1basic__json_a74472977b798c7b7989e6e7cb960ecff.html +++ b/classnlohmann_1_1basic__json_a74472977b798c7b7989e6e7cb960ecff.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -299,7 +301,7 @@ null diff --git a/classnlohmann_1_1basic__json_a74a943800c7f103d0990d7eef82c6453.html b/classnlohmann_1_1basic__json_a74a943800c7f103d0990d7eef82c6453.html index f1a84a49e..e8456a2fe 100644 --- a/classnlohmann_1_1basic__json_a74a943800c7f103d0990d7eef82c6453.html +++ b/classnlohmann_1_1basic__json_a74a943800c7f103d0990d7eef82c6453.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -298,7 +300,7 @@ template<template< typename U, typename V, typename...Args > class Obje The example code above can be translated with
g++ -std=c++11 -Isrc doc/examples/operator__greaterequal.cpp -o operator__greaterequal 
Since
version 1.0
-

Definition at line 4684 of file json.hpp.

+

Definition at line 4765 of file json.hpp.

@@ -308,7 +310,7 @@ template<template< typename U, typename V, typename...Args > class Obje diff --git a/classnlohmann_1_1basic__json_a74ccfa471a0c061876b247f820f3c741.html b/classnlohmann_1_1basic__json_a74ccfa471a0c061876b247f820f3c741.html index 889ef8e01..fcd766cea 100644 --- a/classnlohmann_1_1basic__json_a74ccfa471a0c061876b247f820f3c741.html +++ b/classnlohmann_1_1basic__json_a74ccfa471a0c061876b247f820f3c741.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -321,13 +323,13 @@ template<template< typename U, typename V, typename...Args > class Obje
53  json j_filtered = json::parse(ss, cb);
54  std::cout << std::setw(4) << j_filtered << '\n';
55 }
-
basic_json<> json
default JSON class
Definition: json.hpp:7631
+
basic_json<> json
default JSON class
Definition: json.hpp:7712
a class to store JSON values
Definition: json.hpp:187
std::function< bool(int depth, parse_event_t event, basic_json &parsed)> parser_callback_t
per-element parser callback type
Definition: json.hpp:819
namespace for Niels Lohmann
Definition: json.hpp:78
-
void clear() noexcept
clears the contents
Definition: json.hpp:3866
+
void clear() noexcept
clears the contents
Definition: json.hpp:3947
the parser read a key of a value in an object
-
static basic_json parse(const string_t &s, parser_callback_t cb=nullptr)
deserialize from string
Definition: json.hpp:4778
+
static basic_json parse(const string_t &s, parser_callback_t cb=nullptr)
deserialize from string
Definition: json.hpp:4859
parse_event_t
JSON callback events.
Definition: json.hpp:754
Output (play with this example online):
{
     "Image": {
@@ -367,7 +369,7 @@ template<template< typename U, typename V, typename...Args > class Obje
 
See also
parse(const string_t&, parser_callback_t) for a version that reads from a string
Since
version 1.0
-

Definition at line 4807 of file json.hpp.

+

Definition at line 4888 of file json.hpp.

@@ -377,7 +379,7 @@ template<template< typename U, typename V, typename...Args > class Obje diff --git a/classnlohmann_1_1basic__json_a75a1754e0d39f33095d3102a8bdb9881.html b/classnlohmann_1_1basic__json_a75a1754e0d39f33095d3102a8bdb9881.html index ededbe8b0..b7e725b5c 100644 --- a/classnlohmann_1_1basic__json_a75a1754e0d39f33095d3102a8bdb9881.html +++ b/classnlohmann_1_1basic__json_a75a1754e0d39f33095d3102a8bdb9881.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -309,10 +311,10 @@ template<class InteratorType , typename std::enable_if<
29  std::cout << j_string << '\n';
30 }
a class to store JSON values
Definition: json.hpp:187
-
iterator begin()
returns an iterator to the first element
Definition: json.hpp:3446
-
iterator find(typename object_t::key_type key)
find an element in a JSON object
Definition: json.hpp:3366
+
iterator begin()
returns an iterator to the first element
Definition: json.hpp:3527
+
iterator find(typename object_t::key_type key)
find an element in a JSON object
Definition: json.hpp:3447
namespace for Niels Lohmann
Definition: json.hpp:78
-
InteratorType erase(InteratorType pos)
remove element given an iterator
Definition: json.hpp:3115
+
InteratorType erase(InteratorType pos)
remove element given an iterator
Definition: json.hpp:3196
Output (play with this example online):
null
 null
 null
@@ -327,7 +329,7 @@ null
 erase(const size_type) – removes the element from an array at the given index
 
Since
version 1.0
-

Definition at line 3115 of file json.hpp.

+

Definition at line 3196 of file json.hpp.

@@ -337,7 +339,7 @@ null diff --git a/classnlohmann_1_1basic__json_a76cfc5062bf6223396ab82c753cd4634.html b/classnlohmann_1_1basic__json_a76cfc5062bf6223396ab82c753cd4634.html index c75592b25..4fdea0da1 100644 --- a/classnlohmann_1_1basic__json_a76cfc5062bf6223396ab82c753cd4634.html +++ b/classnlohmann_1_1basic__json_a76cfc5062bf6223396ab82c753cd4634.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -278,7 +280,7 @@ template<typename PointerType , typename std::enable_if<
19  std::cout << std::boolalpha << (p5 == nullptr) << '\n';
20 }
a class to store JSON values
Definition: json.hpp:187
-
ValueType value(const typename object_t::key_type &key, ValueType default_value) const
access specified object element with default value
Definition: json.hpp:2965
+
ValueType value(const typename object_t::key_type &key, ValueType default_value) const
access specified object element with default value
Definition: json.hpp:3046
namespace for Niels Lohmann
Definition: json.hpp:78
ValueType get() const
get a value (explicit)
Definition: json.hpp:2440
NumberIntegerType number_integer_t
a type for a number (integer)
Definition: json.hpp:527
@@ -299,7 +301,7 @@ true diff --git a/classnlohmann_1_1basic__json_a7c08f966200af98db0313a3b517ce0a9.html b/classnlohmann_1_1basic__json_a7c08f966200af98db0313a3b517ce0a9.html index b05bfd659..8fa1864fe 100644 --- a/classnlohmann_1_1basic__json_a7c08f966200af98db0313a3b517ce0a9.html +++ b/classnlohmann_1_1basic__json_a7c08f966200af98db0313a3b517ce0a9.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -275,14 +277,14 @@ Illustration from cppreference.com
17  std::cout << *it << '\n';
18 }
a class to store JSON values
Definition: json.hpp:187
-
reverse_iterator rend()
returns an iterator to the reverse-end
Definition: json.hpp:3594
+
reverse_iterator rend()
returns an iterator to the reverse-end
Definition: json.hpp:3675
namespace for Niels Lohmann
Definition: json.hpp:78
a template for a reverse iterator class
Definition: json.hpp:232
Output (play with this example online):
1
 
The example code above can be translated with
g++ -std=c++11 -Isrc doc/examples/rend.cpp -o rend 
Since
version 1.0
-

Definition at line 3594 of file json.hpp.

+

Definition at line 3675 of file json.hpp.

@@ -292,7 +294,7 @@ Illustration from cppreference.com diff --git a/classnlohmann_1_1basic__json_a7c19a5c3be6cc755377ee41eade78baf.html b/classnlohmann_1_1basic__json_a7c19a5c3be6cc755377ee41eade78baf.html index 2e39182c9..28a228eb0 100644 --- a/classnlohmann_1_1basic__json_a7c19a5c3be6cc755377ee41eade78baf.html +++ b/classnlohmann_1_1basic__json_a7c19a5c3be6cc755377ee41eade78baf.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -275,8 +277,8 @@ template<template< typename U, typename V, typename...Args > class Obje
18  std::cout << "\"three\" was found: " << (it_three != j_object.end()) << '\n';
19 }
a class to store JSON values
Definition: json.hpp:187
-
iterator end()
returns an iterator to one past the last element
Definition: json.hpp:3505
-
iterator find(typename object_t::key_type key)
find an element in a JSON object
Definition: json.hpp:3366
+
iterator end()
returns an iterator to one past the last element
Definition: json.hpp:3586
+
iterator find(typename object_t::key_type key)
find an element in a JSON object
Definition: json.hpp:3447
namespace for Niels Lohmann
Definition: json.hpp:78
Output (play with this example online):
"two" was found: true
 value at key "two": 2
@@ -284,7 +286,7 @@ value at key "two": 2
 
The example code above can be translated with
g++ -std=c++11 -Isrc doc/examples/find__key_type.cpp -o find__key_type 
Since
version 1.0
-

Definition at line 3382 of file json.hpp.

+

Definition at line 3463 of file json.hpp.

@@ -294,7 +296,7 @@ value at key "two": 2 diff --git a/classnlohmann_1_1basic__json_a7d0db3b728d820d4984df78d97d2b104.html b/classnlohmann_1_1basic__json_a7d0db3b728d820d4984df78d97d2b104.html index 9244aebc2..1f2f2dadf 100644 --- a/classnlohmann_1_1basic__json_a7d0db3b728d820d4984df78d97d2b104.html +++ b/classnlohmann_1_1basic__json_a7d0db3b728d820d4984df78d97d2b104.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -245,7 +247,7 @@ template<template< typename U, typename V, typename...Args > class Obje diff --git a/classnlohmann_1_1basic__json_a7d1b990f2c12fecb57db1504fdadd0bb.html b/classnlohmann_1_1basic__json_a7d1b990f2c12fecb57db1504fdadd0bb.html index 7c6613d31..03dc3017a 100644 --- a/classnlohmann_1_1basic__json_a7d1b990f2c12fecb57db1504fdadd0bb.html +++ b/classnlohmann_1_1basic__json_a7d1b990f2c12fecb57db1504fdadd0bb.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -280,7 +282,7 @@ template<template< typename U, typename V, typename...Args > class Obje
17 }
a class to store JSON values
Definition: json.hpp:187
namespace for Niels Lohmann
Definition: json.hpp:78
-
InteratorType erase(InteratorType pos)
remove element given an iterator
Definition: json.hpp:3115
+
InteratorType erase(InteratorType pos)
remove element given an iterator
Definition: json.hpp:3196
Output (play with this example online):
{"two":2}
 1 0
 
The example code above can be translated with
g++ -std=c++11 -Isrc doc/examples/erase__key_type.cpp -o erase__key_type 
@@ -291,7 +293,7 @@ template<template< typename U, typename V, typename...Args > class Obje erase(const size_type) – removes the element from an array at the given index
Since
version 1.0
-

Definition at line 3296 of file json.hpp.

+

Definition at line 3377 of file json.hpp.

@@ -301,7 +303,7 @@ template<template< typename U, typename V, typename...Args > class Obje diff --git a/classnlohmann_1_1basic__json_a7dab69b10b98e7bc694339720e37fb2b.html b/classnlohmann_1_1basic__json_a7dab69b10b98e7bc694339720e37fb2b.html index 40ef736c3..7f9607f14 100644 --- a/classnlohmann_1_1basic__json_a7dab69b10b98e7bc694339720e37fb2b.html +++ b/classnlohmann_1_1basic__json_a7dab69b10b98e7bc694339720e37fb2b.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -275,8 +277,8 @@ template<template< typename U, typename V, typename...Args > class Obje
18  std::cout << "\"three\" was found: " << (it_three != j_object.end()) << '\n';
19 }
a class to store JSON values
Definition: json.hpp:187
-
iterator end()
returns an iterator to one past the last element
Definition: json.hpp:3505
-
iterator find(typename object_t::key_type key)
find an element in a JSON object
Definition: json.hpp:3366
+
iterator end()
returns an iterator to one past the last element
Definition: json.hpp:3586
+
iterator find(typename object_t::key_type key)
find an element in a JSON object
Definition: json.hpp:3447
namespace for Niels Lohmann
Definition: json.hpp:78
Output (play with this example online):
"two" was found: true
 value at key "two": 2
@@ -284,7 +286,7 @@ value at key "two": 2
 
The example code above can be translated with
g++ -std=c++11 -Isrc doc/examples/find__key_type.cpp -o find__key_type 
Since
version 1.0
-

Definition at line 3366 of file json.hpp.

+

Definition at line 3447 of file json.hpp.

@@ -294,7 +296,7 @@ value at key "two": 2 diff --git a/classnlohmann_1_1basic__json_a7f97a91ad8f1d5cf0b9213bd24f247c4.html b/classnlohmann_1_1basic__json_a7f97a91ad8f1d5cf0b9213bd24f247c4.html index 1634f4bfe..5598789b7 100644 --- a/classnlohmann_1_1basic__json_a7f97a91ad8f1d5cf0b9213bd24f247c4.html +++ b/classnlohmann_1_1basic__json_a7f97a91ad8f1d5cf0b9213bd24f247c4.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -296,7 +298,7 @@ template<template< typename U, typename V, typename...Args > class Obje null != nullptr false

The example code above can be translated with

g++ -std=c++11 -Isrc doc/examples/operator__notequal__nullptr_t.cpp -o operator__notequal__nullptr_t 
Since
version 1.0
-

Definition at line 4550 of file json.hpp.

+

Definition at line 4631 of file json.hpp.

@@ -306,7 +308,7 @@ null != nullptr false diff --git a/classnlohmann_1_1basic__json_a80ceaa3bdd346292273b309e08525c1c.html b/classnlohmann_1_1basic__json_a80ceaa3bdd346292273b309e08525c1c.html index 3fb72ce91..de344a544 100644 --- a/classnlohmann_1_1basic__json_a80ceaa3bdd346292273b309e08525c1c.html +++ b/classnlohmann_1_1basic__json_a80ceaa3bdd346292273b309e08525c1c.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -245,7 +247,7 @@ template<template< typename U, typename V, typename...Args > class Obje diff --git a/classnlohmann_1_1basic__json_a83cbbfbf5d3ecbad6de8ece0be6b36c4.html b/classnlohmann_1_1basic__json_a83cbbfbf5d3ecbad6de8ece0be6b36c4.html index 84911511b..c22ff6c14 100644 --- a/classnlohmann_1_1basic__json_a83cbbfbf5d3ecbad6de8ece0be6b36c4.html +++ b/classnlohmann_1_1basic__json_a83cbbfbf5d3ecbad6de8ece0be6b36c4.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -283,7 +285,7 @@ template<template< typename U, typename V, typename...Args > class Obje
26  //std::cout << j_array_empty.front() << '\n'; // would throw
27  std::cout << j_string.front() << '\n';
28 }
-
reference front()
access the first element
Definition: json.hpp:3016
+
reference front()
access the first element
Definition: json.hpp:3097
a class to store JSON values
Definition: json.hpp:187
object (unordered set of name/value pairs)
namespace for Niels Lohmann
Definition: json.hpp:78
@@ -297,7 +299,7 @@ template<template< typename U, typename V, typename...Args > class Obje
The example code above can be translated with
g++ -std=c++11 -Isrc doc/examples/front.cpp -o front 
Since
version 1.0
-

Definition at line 3016 of file json.hpp.

+

Definition at line 3097 of file json.hpp.

@@ -307,7 +309,7 @@ template<template< typename U, typename V, typename...Args > class Obje diff --git a/classnlohmann_1_1basic__json_a87db51b6b936fb2ea293cdbc8702dcb8.html b/classnlohmann_1_1basic__json_a87db51b6b936fb2ea293cdbc8702dcb8.html index 0db5fa5a8..73598cd0a 100644 --- a/classnlohmann_1_1basic__json_a87db51b6b936fb2ea293cdbc8702dcb8.html +++ b/classnlohmann_1_1basic__json_a87db51b6b936fb2ea293cdbc8702dcb8.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -298,7 +300,7 @@ template<template< typename U, typename V, typename...Args > class Obje The example code above can be translated with
g++ -std=c++11 -Isrc doc/examples/operator__lessequal.cpp -o operator__lessequal 
Since
version 1.0
-

Definition at line 4662 of file json.hpp.

+

Definition at line 4743 of file json.hpp.

@@ -308,7 +310,7 @@ template<template< typename U, typename V, typename...Args > class Obje diff --git a/classnlohmann_1_1basic__json_a8b526709d395142b68d21abfbfff17c3.html b/classnlohmann_1_1basic__json_a8b526709d395142b68d21abfbfff17c3.html index 6d790e95e..c9c646bc1 100644 --- a/classnlohmann_1_1basic__json_a8b526709d395142b68d21abfbfff17c3.html +++ b/classnlohmann_1_1basic__json_a8b526709d395142b68d21abfbfff17c3.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -283,7 +285,7 @@ template<template< typename U, typename V, typename...Args > class Obje
26  //std::cout << j_array_empty.front() << '\n'; // would throw
27  std::cout << j_string.front() << '\n';
28 }
-
reference front()
access the first element
Definition: json.hpp:3016
+
reference front()
access the first element
Definition: json.hpp:3097
a class to store JSON values
Definition: json.hpp:187
object (unordered set of name/value pairs)
namespace for Niels Lohmann
Definition: json.hpp:78
@@ -297,7 +299,7 @@ template<template< typename U, typename V, typename...Args > class Obje The example code above can be translated with
g++ -std=c++11 -Isrc doc/examples/front.cpp -o front 
Since
version 1.0
-

Definition at line 3024 of file json.hpp.

+

Definition at line 3105 of file json.hpp.

@@ -307,7 +309,7 @@ template<template< typename U, typename V, typename...Args > class Obje diff --git a/classnlohmann_1_1basic__json_a8c40cd9ead4de7c82f28268bdf0ec98a.html b/classnlohmann_1_1basic__json_a8c40cd9ead4de7c82f28268bdf0ec98a.html index 42da7507d..d1d92ff87 100644 --- a/classnlohmann_1_1basic__json_a8c40cd9ead4de7c82f28268bdf0ec98a.html +++ b/classnlohmann_1_1basic__json_a8c40cd9ead4de7c82f28268bdf0ec98a.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -299,7 +301,7 @@ template<template< typename U, typename V, typename...Args > class Obje
33 }
a class to store JSON values
Definition: json.hpp:187
namespace for Niels Lohmann
Definition: json.hpp:78
-
void clear() noexcept
clears the contents
Definition: json.hpp:3866
+
void clear() noexcept
clears the contents
Definition: json.hpp:3947
Output (play with this example online):
null
 false
 0
@@ -310,7 +312,7 @@ false
 
The example code above can be translated with
g++ -std=c++11 -Isrc doc/examples/clear.cpp -o clear 
Since
version 1.0
-

Definition at line 3866 of file json.hpp.

+

Definition at line 3947 of file json.hpp.

@@ -320,7 +322,7 @@ false diff --git a/classnlohmann_1_1basic__json_a8e34088252a3ee6b2377f3a1f26dd1ba.html b/classnlohmann_1_1basic__json_a8e34088252a3ee6b2377f3a1f26dd1ba.html index 6b3ca6d53..910172f9d 100644 --- a/classnlohmann_1_1basic__json_a8e34088252a3ee6b2377f3a1f26dd1ba.html +++ b/classnlohmann_1_1basic__json_a8e34088252a3ee6b2377f3a1f26dd1ba.html @@ -3,7 +3,7 @@ - + JSON for Modern C++: nlohmann::basic_json::operator[] @@ -23,7 +23,7 @@ -
+
JSON for Modern C++  1.0.0-rc1
@@ -33,7 +33,7 @@
- + @@ -93,24 +93,24 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); at back back - basic_json + basic_json basic_json basic_json - basic_json - basic_json - basic_json - basic_json - basic_json - basic_json - basic_json - basic_json - basic_json - basic_json - basic_json - basic_json - basic_json + basic_json + basic_json + basic_json + basic_json + basic_json + basic_json + basic_json + basic_json + basic_json + basic_json + basic_json + basic_json + basic_json basic_json - basic_json + basic_json basic_json basic_json basic_json @@ -128,7 +128,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); crend difference_type dump - empty + empty end end erase @@ -141,45 +141,45 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); front get get - get + get get_allocator get_ptr - get_ptr - insert - insert - insert + get_ptr + insert + insert + insert insert insert - is_array - is_boolean - is_discarded - is_null - is_number - is_number_float - is_number_integer - is_object - is_primitive - is_string - is_structured - max_size + is_array + is_boolean + is_discarded + is_null + is_number + is_number_float + is_number_integer + is_object + is_primitive + is_string + is_structured + max_size number_float_t number_integer_t object object_t - operator value_t + operator value_t operator ValueType operator!= operator!= operator!= - operator+= - operator+= - operator+= + operator+= + operator+= + operator+= operator< operator< operator<< operator<< operator<= - operator= + operator= operator== operator== operator== @@ -195,26 +195,29 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] parse parse + parse parse_event_t - parser_callback_t + parser_callback_t pointer - push_back - push_back - push_back + push_back + push_back + push_back rbegin rbegin reference rend rend reverse_iterator - size + size size_type string_t - swap + swap swap swap swap - type + type + value + value value_t value_type ~basic_json @@ -245,17 +248,18 @@ template<template< typename U, typename V, typename...Args > class Obje
-

Returns a reference to the element at with specified key key.

+

Returns a const reference to the element at with specified key key. No bounds checking is performed.

+
Warning
If the element with key key does not exist, the behavior is undefined.
Parameters
[in]keykey of the element to access
-
Returns
reference to the element at key key
+
Returns
const reference to the element at key key
Exceptions
- +
std::domain_errorif JSON is not an object or null
std::domain_errorif JSON is not an object
@@ -267,7 +271,7 @@ template<template< typename U, typename V, typename...Args > class Obje
5 int main()
6 {
7  // create a JSON object
-
8  json object =
+
8  const json object =
9  {
10  {"one", 1}, {"two", 2}, {"three", 2.9}
11  };
@@ -275,10 +279,16 @@ template<template< typename U, typename V, typename...Args > class Obje
13  // output element with key "two"
14  std::cout << object["two"] << '\n';
15 }
-
a class to store JSON values
Definition: json.hpp:182
-
namespace for Niels Lohmann
Definition: json.hpp:78
-
Output (play with this example online):
2
-
The example code above can be translated with
g++ -std=c++11 -Isrc doc/examples/operatorarray__key_type_const.cpp -o operatorarray__key_type_const 
+
a class to store JSON values
Definition: json.hpp:187
+
namespace for Niels Lohmann
Definition: json.hpp:78
+ Output (play with this example online):
2
+
The example code above can be translated with
g++ -std=c++11 -Isrc doc/examples/operatorarray__key_type_const.cpp -o operatorarray__key_type_const 
+
See also
at(const typename object_t::key_type&) for access by reference with range checking
+
+value() for access by value with a default value
+
Since
version 1.0
+ +

Definition at line 2891 of file json.hpp.

@@ -288,9 +298,9 @@ template<template< typename U, typename V, typename...Args > class Obje diff --git a/classnlohmann_1_1basic__json_a8fa74698f4061e18ec664009f3af1ddf.html b/classnlohmann_1_1basic__json_a8fa74698f4061e18ec664009f3af1ddf.html index e380b5921..ce97e5de7 100644 --- a/classnlohmann_1_1basic__json_a8fa74698f4061e18ec664009f3af1ddf.html +++ b/classnlohmann_1_1basic__json_a8fa74698f4061e18ec664009f3af1ddf.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -302,16 +304,16 @@ template<template< typename U, typename V, typename...Args > class Obje
18  std::cout << v << '\n';
19 }
a class to store JSON values
Definition: json.hpp:187
-
iterator end()
returns an iterator to one past the last element
Definition: json.hpp:3505
-
iterator begin()
returns an iterator to the first element
Definition: json.hpp:3446
+
iterator end()
returns an iterator to one past the last element
Definition: json.hpp:3586
+
iterator begin()
returns an iterator to the first element
Definition: json.hpp:3527
namespace for Niels Lohmann
Definition: json.hpp:78
-
iterator insert(const_iterator pos, const basic_json &val)
inserts element
Definition: json.hpp:4065
+
iterator insert(const_iterator pos, const basic_json &val)
inserts element
Definition: json.hpp:4146
Output (play with this example online):
"one"
 [1,2,3,4,"one","two","three","four"]
 
The example code above can be translated with
g++ -std=c++11 -Isrc doc/examples/insert__range.cpp -o insert__range 
Since
version 1.0
-

Definition at line 4166 of file json.hpp.

+

Definition at line 4247 of file json.hpp.

@@ -321,7 +323,7 @@ template<template< typename U, typename V, typename...Args > class Obje diff --git a/classnlohmann_1_1basic__json_a930e14150ffa067bcf56d35cb00271e1.html b/classnlohmann_1_1basic__json_a930e14150ffa067bcf56d35cb00271e1.html index ab6d44c89..68c83420d 100644 --- a/classnlohmann_1_1basic__json_a930e14150ffa067bcf56d35cb00271e1.html +++ b/classnlohmann_1_1basic__json_a930e14150ffa067bcf56d35cb00271e1.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -277,7 +279,7 @@ template<template< typename U, typename V, typename...Args > class Obje diff --git a/classnlohmann_1_1basic__json_a960962c683909619d1d2fbbe856c022e.html b/classnlohmann_1_1basic__json_a960962c683909619d1d2fbbe856c022e.html index b3622a36e..04aa35887 100644 --- a/classnlohmann_1_1basic__json_a960962c683909619d1d2fbbe856c022e.html +++ b/classnlohmann_1_1basic__json_a960962c683909619d1d2fbbe856c022e.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -285,7 +287,7 @@ template<template< typename U, typename V, typename...Args > class Obje
23  std::cout << null << '\n';
24 }
a class to store JSON values
Definition: json.hpp:187
-
void push_back(basic_json &&val)
add an object to an array
Definition: json.hpp:3932
+
void push_back(basic_json &&val)
add an object to an array
Definition: json.hpp:4013
namespace for Niels Lohmann
Definition: json.hpp:78
Output (play with this example online):
[1,2,3,4,5]
 null
@@ -294,7 +296,7 @@ null
 
The example code above can be translated with
g++ -std=c++11 -Isrc doc/examples/push_back.cpp -o push_back 
Since
version 1.0
-

Definition at line 3990 of file json.hpp.

+

Definition at line 4071 of file json.hpp.

@@ -304,7 +306,7 @@ null diff --git a/classnlohmann_1_1basic__json_a9730b9f7bc2150e641fe20198d4477c7.html b/classnlohmann_1_1basic__json_a9730b9f7bc2150e641fe20198d4477c7.html index e73c20f7b..53773e3ec 100644 --- a/classnlohmann_1_1basic__json_a9730b9f7bc2150e641fe20198d4477c7.html +++ b/classnlohmann_1_1basic__json_a9730b9f7bc2150e641fe20198d4477c7.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -296,7 +298,7 @@ template<template< typename U, typename V, typename...Args > class Obje null == nullptr true

The example code above can be translated with

g++ -std=c++11 -Isrc doc/examples/operator__equal__nullptr_t.cpp -o operator__equal__nullptr_t 
Since
version 1.0
-

Definition at line 4488 of file json.hpp.

+

Definition at line 4569 of file json.hpp.

@@ -306,7 +308,7 @@ null == nullptr true diff --git a/classnlohmann_1_1basic__json_a98e05a2c9b8f74bd60442772cddeee52.html b/classnlohmann_1_1basic__json_a98e05a2c9b8f74bd60442772cddeee52.html index c2eb6ba22..e2510af73 100644 --- a/classnlohmann_1_1basic__json_a98e05a2c9b8f74bd60442772cddeee52.html +++ b/classnlohmann_1_1basic__json_a98e05a2c9b8f74bd60442772cddeee52.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -296,7 +298,7 @@ template<template< typename U, typename V, typename...Args > class Obje null == nullptr true

The example code above can be translated with

g++ -std=c++11 -Isrc doc/examples/operator__equal__nullptr_t.cpp -o operator__equal__nullptr_t 
Since
version 1.0
-

Definition at line 4497 of file json.hpp.

+

Definition at line 4578 of file json.hpp.

@@ -306,7 +308,7 @@ null == nullptr true diff --git a/classnlohmann_1_1basic__json_a9993148cb0473365e52998c7315f9ada.html b/classnlohmann_1_1basic__json_a9993148cb0473365e52998c7315f9ada.html index 38237543d..fdd2db078 100644 --- a/classnlohmann_1_1basic__json_a9993148cb0473365e52998c7315f9ada.html +++ b/classnlohmann_1_1basic__json_a9993148cb0473365e52998c7315f9ada.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -299,7 +301,7 @@ false diff --git a/classnlohmann_1_1basic__json_a9a73d1b71c9e913aa2888d8b40c72ee9.html b/classnlohmann_1_1basic__json_a9a73d1b71c9e913aa2888d8b40c72ee9.html index a7d99de63..eec5970e7 100644 --- a/classnlohmann_1_1basic__json_a9a73d1b71c9e913aa2888d8b40c72ee9.html +++ b/classnlohmann_1_1basic__json_a9a73d1b71c9e913aa2888d8b40c72ee9.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -282,7 +284,7 @@ template<template< typename U, typename V, typename...Args > class Obje
15  std::cout << array_1 << '\n';
16  std::cout << array_5 << '\n';
17 }
-
basic_json<> json
default JSON class
Definition: json.hpp:7631
+
basic_json<> json
default JSON class
Definition: json.hpp:7712
a class to store JSON values
Definition: json.hpp:187
namespace for Niels Lohmann
Definition: json.hpp:78
Output (play with this example online):
[]
@@ -301,7 +303,7 @@ template<template< typename U, typename V, typename...Args > class Obje
 
 
 
diff --git a/classnlohmann_1_1basic__json_a9c26c5d0f4a519c7236149b9aeb3ef9e.html b/classnlohmann_1_1basic__json_a9c26c5d0f4a519c7236149b9aeb3ef9e.html
index cb1f2637d..d2311d78e 100644
--- a/classnlohmann_1_1basic__json_a9c26c5d0f4a519c7236149b9aeb3ef9e.html
+++ b/classnlohmann_1_1basic__json_a9c26c5d0f4a519c7236149b9aeb3ef9e.html
@@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
           operator[]
           operator[]
           operator[]
+          operator[]
           operator[]
+          operator[]
           parse
           parse
           parse
@@ -299,7 +301,7 @@ false
 
 
 
diff --git a/classnlohmann_1_1basic__json_a9daafb4c15ed5a008cb825bbd8c29d87.html b/classnlohmann_1_1basic__json_a9daafb4c15ed5a008cb825bbd8c29d87.html
index aa145a338..4ad08d7b8 100644
--- a/classnlohmann_1_1basic__json_a9daafb4c15ed5a008cb825bbd8c29d87.html
+++ b/classnlohmann_1_1basic__json_a9daafb4c15ed5a008cb825bbd8c29d87.html
@@ -3,7 +3,7 @@
 
 
 
-
+
 JSON for Modern C++: nlohmann::basic_json::operator[]
 
 
@@ -23,7 +23,7 @@
 
-  
+
JSON for Modern C++  1.0.0-rc1
@@ -33,7 +33,7 @@
- + @@ -93,24 +93,24 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); at back back - basic_json + basic_json basic_json basic_json - basic_json - basic_json - basic_json - basic_json - basic_json - basic_json - basic_json - basic_json - basic_json - basic_json - basic_json - basic_json - basic_json + basic_json + basic_json + basic_json + basic_json + basic_json + basic_json + basic_json + basic_json + basic_json + basic_json + basic_json + basic_json + basic_json basic_json - basic_json + basic_json basic_json basic_json basic_json @@ -128,7 +128,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); crend difference_type dump - empty + empty end end erase @@ -141,45 +141,45 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); front get get - get + get get_allocator get_ptr - get_ptr - insert - insert - insert + get_ptr + insert + insert + insert insert insert - is_array - is_boolean - is_discarded - is_null - is_number - is_number_float - is_number_integer - is_object - is_primitive - is_string - is_structured - max_size + is_array + is_boolean + is_discarded + is_null + is_number + is_number_float + is_number_integer + is_object + is_primitive + is_string + is_structured + max_size number_float_t number_integer_t object object_t - operator value_t + operator value_t operator ValueType operator!= operator!= operator!= - operator+= - operator+= - operator+= + operator+= + operator+= + operator+= operator< operator< operator<< operator<< operator<= - operator= + operator= operator== operator== operator== @@ -195,26 +195,29 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] parse parse + parse parse_event_t - parser_callback_t + parser_callback_t pointer - push_back - push_back - push_back + push_back + push_back + push_back rbegin rbegin reference rend rend reverse_iterator - size + size size_type string_t - swap + swap swap swap swap - type + type + value + value value_t value_type ~basic_json @@ -247,7 +250,8 @@ template<typename T , std::size_t n>
-

Returns a reference to the element at with specified key key.

+

Returns a const reference to the element at with specified key key. No bounds checking is performed.

+
Warning
If the element with key key does not exist, the behavior is undefined.
Note
This function is required for compatibility reasons with Clang.
Parameters
@@ -255,10 +259,10 @@ template<typename T , std::size_t n>
-
Returns
reference to the element at key key
+
Returns
const reference to the element at key key
Exceptions
- +
std::domain_errorif JSON is not an object or null
std::domain_errorif JSON is not an object
@@ -270,7 +274,7 @@ template<typename T , std::size_t n>
5 int main()
6 {
7  // create a JSON object
-
8  json object =
+
8  const json object =
9  {
10  {"one", 1}, {"two", 2}, {"three", 2.9}
11  };
@@ -278,10 +282,16 @@ template<typename T , std::size_t n>
13  // output element with key "two"
14  std::cout << object["two"] << '\n';
15 }
-
a class to store JSON values
Definition: json.hpp:182
-
namespace for Niels Lohmann
Definition: json.hpp:78
- Output (play with this example online):
2
-
The example code above can be translated with
g++ -std=c++11 -Isrc doc/examples/operatorarray__key_type_const.cpp -o operatorarray__key_type_const 
+
a class to store JSON values
Definition: json.hpp:187
+
namespace for Niels Lohmann
Definition: json.hpp:78
+ Output (play with this example online):
2
+
The example code above can be translated with
g++ -std=c++11 -Isrc doc/examples/operatorarray__key_type_const.cpp -o operatorarray__key_type_const 
+
See also
at(const typename object_t::key_type&) for access by reference with range checking
+
+value() for access by value with a default value
+
Since
version 1.0
+ +

Definition at line 2982 of file json.hpp.

@@ -291,9 +301,9 @@ template<typename T , std::size_t n> diff --git a/classnlohmann_1_1basic__json_a9f17a0690155e3a5603246ccec81499e.html b/classnlohmann_1_1basic__json_a9f17a0690155e3a5603246ccec81499e.html index 5b235512f..305572dd7 100644 --- a/classnlohmann_1_1basic__json_a9f17a0690155e3a5603246ccec81499e.html +++ b/classnlohmann_1_1basic__json_a9f17a0690155e3a5603246ccec81499e.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -296,7 +298,7 @@ true diff --git a/classnlohmann_1_1basic__json_aa0422e861b4cbd7cdcaad7a11a1304a9.html b/classnlohmann_1_1basic__json_aa0422e861b4cbd7cdcaad7a11a1304a9.html index 9d17894a3..cc55120e5 100644 --- a/classnlohmann_1_1basic__json_aa0422e861b4cbd7cdcaad7a11a1304a9.html +++ b/classnlohmann_1_1basic__json_aa0422e861b4cbd7cdcaad7a11a1304a9.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -321,13 +323,13 @@ template<template< typename U, typename V, typename...Args > class Obje
53  json j_filtered = json::parse(ss, cb);
54  std::cout << std::setw(4) << j_filtered << '\n';
55 }
-
basic_json<> json
default JSON class
Definition: json.hpp:7631
+
basic_json<> json
default JSON class
Definition: json.hpp:7712
a class to store JSON values
Definition: json.hpp:187
std::function< bool(int depth, parse_event_t event, basic_json &parsed)> parser_callback_t
per-element parser callback type
Definition: json.hpp:819
namespace for Niels Lohmann
Definition: json.hpp:78
-
void clear() noexcept
clears the contents
Definition: json.hpp:3866
+
void clear() noexcept
clears the contents
Definition: json.hpp:3947
the parser read a key of a value in an object
-
static basic_json parse(const string_t &s, parser_callback_t cb=nullptr)
deserialize from string
Definition: json.hpp:4778
+
static basic_json parse(const string_t &s, parser_callback_t cb=nullptr)
deserialize from string
Definition: json.hpp:4859
parse_event_t
JSON callback events.
Definition: json.hpp:754
Output (play with this example online):
{
     "Image": {
@@ -367,7 +369,7 @@ template<template< typename U, typename V, typename...Args > class Obje
 
See also
parse(const string_t&, parser_callback_t) for a version that reads from a string
Since
version 1.0
-

Definition at line 4815 of file json.hpp.

+

Definition at line 4896 of file json.hpp.

@@ -377,7 +379,7 @@ template<template< typename U, typename V, typename...Args > class Obje diff --git a/classnlohmann_1_1basic__json_aa1f3b3f1dca79392d6727b81f9668c6c.html b/classnlohmann_1_1basic__json_aa1f3b3f1dca79392d6727b81f9668c6c.html index 4febef272..4d1d00a0f 100644 --- a/classnlohmann_1_1basic__json_aa1f3b3f1dca79392d6727b81f9668c6c.html +++ b/classnlohmann_1_1basic__json_aa1f3b3f1dca79392d6727b81f9668c6c.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -287,7 +289,7 @@ template<template< typename U, typename V, typename...Args > class Obje
object (unordered set of name/value pairs)
namespace for Niels Lohmann
Definition: json.hpp:78
array (ordered collection of values)
-
reference back()
access the last element
Definition: json.hpp:3050
+
reference back()
access the last element
Definition: json.hpp:3131
Output (play with this example online):
true
 17
 23.42
@@ -297,7 +299,7 @@ template<template< typename U, typename V, typename...Args > class Obje
 
The example code above can be translated with
g++ -std=c++11 -Isrc doc/examples/back.cpp -o back 
Since
version 1.0
-

Definition at line 3050 of file json.hpp.

+

Definition at line 3131 of file json.hpp.

@@ -307,7 +309,7 @@ template<template< typename U, typename V, typename...Args > class Obje diff --git a/classnlohmann_1_1basic__json_aa5413178b8041f7ac685dec4b040dd2c.html b/classnlohmann_1_1basic__json_aa5413178b8041f7ac685dec4b040dd2c.html index 44e536c2f..62ebd7dc6 100644 --- a/classnlohmann_1_1basic__json_aa5413178b8041f7ac685dec4b040dd2c.html +++ b/classnlohmann_1_1basic__json_aa5413178b8041f7ac685dec4b040dd2c.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -276,14 +278,14 @@ Illustration from cppreference.com
17  std::cout << *it << '\n';
18 }
a class to store JSON values
Definition: json.hpp:187
-
const_iterator cend() const
returns a const iterator to one past the last element
Definition: json.hpp:3539
+
const_iterator cend() const
returns a const iterator to one past the last element
Definition: json.hpp:3620
namespace for Niels Lohmann
Definition: json.hpp:78
-
a const random access iterator for the basic_json class
Definition: json.hpp:5306
+
a const random access iterator for the basic_json class
Definition: json.hpp:5387
Output (play with this example online):
5
 
The example code above can be translated with
g++ -std=c++11 -Isrc doc/examples/cend.cpp -o cend 
Since
version 1.0
-

Definition at line 3515 of file json.hpp.

+

Definition at line 3596 of file json.hpp.

@@ -293,7 +295,7 @@ Illustration from cppreference.com diff --git a/classnlohmann_1_1basic__json_aa6a24b176f9599a21d662cc5f8e1ca76.html b/classnlohmann_1_1basic__json_aa6a24b176f9599a21d662cc5f8e1ca76.html index 6f38145e2..9a4530b0f 100644 --- a/classnlohmann_1_1basic__json_aa6a24b176f9599a21d662cc5f8e1ca76.html +++ b/classnlohmann_1_1basic__json_aa6a24b176f9599a21d662cc5f8e1ca76.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -264,7 +266,7 @@ template<template< typename U, typename V, typename...Args > class Obje diff --git a/classnlohmann_1_1basic__json_aa6c32f669a2e523666072003d0ea46f4.html b/classnlohmann_1_1basic__json_aa6c32f669a2e523666072003d0ea46f4.html index d019be66e..6b90fea95 100644 --- a/classnlohmann_1_1basic__json_aa6c32f669a2e523666072003d0ea46f4.html +++ b/classnlohmann_1_1basic__json_aa6c32f669a2e523666072003d0ea46f4.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -329,7 +331,7 @@ template<class CompatibleObjectType , typename std::enable_if< diff --git a/classnlohmann_1_1basic__json_aa71e977d31f470689883ac60d16ea4ac.html b/classnlohmann_1_1basic__json_aa71e977d31f470689883ac60d16ea4ac.html index 922c51b8f..71d9cd273 100644 --- a/classnlohmann_1_1basic__json_aa71e977d31f470689883ac60d16ea4ac.html +++ b/classnlohmann_1_1basic__json_aa71e977d31f470689883ac60d16ea4ac.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -281,15 +283,15 @@ template<template< typename U, typename V, typename...Args > class Obje
19 }
ArrayType< basic_json, AllocatorType< basic_json >> array_t
a type for an array
Definition: json.hpp:386
a class to store JSON values
Definition: json.hpp:187
-
ValueType value(const typename object_t::key_type &key, ValueType default_value) const
access specified object element with default value
Definition: json.hpp:2965
+
ValueType value(const typename object_t::key_type &key, ValueType default_value) const
access specified object element with default value
Definition: json.hpp:3046
namespace for Niels Lohmann
Definition: json.hpp:78
-
void swap(reference other) noexcept( std::is_nothrow_move_constructible< value_t >::value and std::is_nothrow_move_assignable< value_t >::value and std::is_nothrow_move_constructible< json_value >::value and std::is_nothrow_move_assignable< json_value >::value )
exchanges the values
Definition: json.hpp:4257
+
void swap(reference other) noexcept( std::is_nothrow_move_constructible< value_t >::value and std::is_nothrow_move_assignable< value_t >::value and std::is_nothrow_move_constructible< json_value >::value and std::is_nothrow_move_assignable< json_value >::value )
exchanges the values
Definition: json.hpp:4338
Output (play with this example online):
value = {"array":["Snap","Crackle","Pop"]}
 array = [1,2,3,4]
 
The example code above can be translated with
g++ -std=c++11 -Isrc doc/examples/swap__array_t.cpp -o swap__array_t 
Since
version 1.0
-

Definition at line 4287 of file json.hpp.

+

Definition at line 4368 of file json.hpp.

@@ -299,7 +301,7 @@ array = [1,2,3,4] diff --git a/classnlohmann_1_1basic__json_aabe4661644ea549089f0886c2551d2ac.html b/classnlohmann_1_1basic__json_aabe4661644ea549089f0886c2551d2ac.html index 7659e7693..da7068929 100644 --- a/classnlohmann_1_1basic__json_aabe4661644ea549089f0886c2551d2ac.html +++ b/classnlohmann_1_1basic__json_aabe4661644ea549089f0886c2551d2ac.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -279,7 +281,7 @@ template<template< typename U, typename V, typename...Args > class Obje diff --git a/classnlohmann_1_1basic__json_aac185a137428a7337aa620de07bfbbd7.html b/classnlohmann_1_1basic__json_aac185a137428a7337aa620de07bfbbd7.html index af705d653..23c077a0c 100644 --- a/classnlohmann_1_1basic__json_aac185a137428a7337aa620de07bfbbd7.html +++ b/classnlohmann_1_1basic__json_aac185a137428a7337aa620de07bfbbd7.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -262,7 +264,7 @@ template<template< typename U, typename V, typename...Args > class Obje
Since
version 1.0
-

Definition at line 4384 of file json.hpp.

+

Definition at line 4465 of file json.hpp.

@@ -272,7 +274,7 @@ template<template< typename U, typename V, typename...Args > class Obje diff --git a/classnlohmann_1_1basic__json_aacd442b66140c764c594ac8ad7dfd5b3.html b/classnlohmann_1_1basic__json_aacd442b66140c764c594ac8ad7dfd5b3.html index 214d28a74..86f104c92 100644 --- a/classnlohmann_1_1basic__json_aacd442b66140c764c594ac8ad7dfd5b3.html +++ b/classnlohmann_1_1basic__json_aacd442b66140c764c594ac8ad7dfd5b3.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -302,7 +304,7 @@ template<template< typename U, typename V, typename...Args > class Obje
The example code above can be translated with
g++ -std=c++11 -Isrc doc/examples/operator__less.cpp -o operator__less 
Since
version 1.0
-

Definition at line 4579 of file json.hpp.

+

Definition at line 4660 of file json.hpp.

@@ -312,7 +314,7 @@ template<template< typename U, typename V, typename...Args > class Obje diff --git a/classnlohmann_1_1basic__json_aacf6c869f6a9c66ac1bc99e93f310044.html b/classnlohmann_1_1basic__json_aacf6c869f6a9c66ac1bc99e93f310044.html index 7824b9857..58269cfad 100644 --- a/classnlohmann_1_1basic__json_aacf6c869f6a9c66ac1bc99e93f310044.html +++ b/classnlohmann_1_1basic__json_aacf6c869f6a9c66ac1bc99e93f310044.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -267,7 +269,7 @@ template<template< typename U, typename V, typename...Args > class Obje diff --git a/classnlohmann_1_1basic__json_aaf363408931d76472ded14017e59c9e8.html b/classnlohmann_1_1basic__json_aaf363408931d76472ded14017e59c9e8.html index 04f0f26ca..c435234bf 100644 --- a/classnlohmann_1_1basic__json_aaf363408931d76472ded14017e59c9e8.html +++ b/classnlohmann_1_1basic__json_aaf363408931d76472ded14017e59c9e8.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -314,7 +316,7 @@ template<template< typename U, typename V, typename...Args > class Obje
See also
parse(std::istream&, parser_callback_t) for a variant with a parser callback function to filter values while parsing
Since
version 1.0
-

Definition at line 4853 of file json.hpp.

+

Definition at line 4934 of file json.hpp.

@@ -324,7 +326,7 @@ template<template< typename U, typename V, typename...Args > class Obje diff --git a/classnlohmann_1_1basic__json_aafa839f2a74dc1b5060314b3423143b8.html b/classnlohmann_1_1basic__json_aafa839f2a74dc1b5060314b3423143b8.html index dd4817054..35c4547c6 100644 --- a/classnlohmann_1_1basic__json_aafa839f2a74dc1b5060314b3423143b8.html +++ b/classnlohmann_1_1basic__json_aafa839f2a74dc1b5060314b3423143b8.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -253,7 +255,7 @@ template<template< typename U, typename V, typename...Args > class Obje diff --git a/classnlohmann_1_1basic__json_ab14e3503305622fb5ab01a7f490916e8.html b/classnlohmann_1_1basic__json_ab14e3503305622fb5ab01a7f490916e8.html index fce58b60d..e4bb1ee36 100644 --- a/classnlohmann_1_1basic__json_ab14e3503305622fb5ab01a7f490916e8.html +++ b/classnlohmann_1_1basic__json_ab14e3503305622fb5ab01a7f490916e8.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -290,15 +292,15 @@ template<template< typename U, typename V, typename...Args > class Obje
15  std::cout << v << '\n';
16 }
a class to store JSON values
Definition: json.hpp:187
-
iterator end()
returns an iterator to one past the last element
Definition: json.hpp:3505
+
iterator end()
returns an iterator to one past the last element
Definition: json.hpp:3586
namespace for Niels Lohmann
Definition: json.hpp:78
-
iterator insert(const_iterator pos, const basic_json &val)
inserts element
Definition: json.hpp:4065
+
iterator insert(const_iterator pos, const basic_json &val)
inserts element
Definition: json.hpp:4146
Output (play with this example online):
7
 [1,2,3,4,7,8,9]
 
The example code above can be translated with
g++ -std=c++11 -Isrc doc/examples/insert__ilist.cpp -o insert__ilist 
Since
version 1.0
-

Definition at line 4220 of file json.hpp.

+

Definition at line 4301 of file json.hpp.

@@ -308,7 +310,7 @@ template<template< typename U, typename V, typename...Args > class Obje diff --git a/classnlohmann_1_1basic__json_ab2162bc76e10d8736cab9b2039956054.html b/classnlohmann_1_1basic__json_ab2162bc76e10d8736cab9b2039956054.html index 8a74fdd67..2feb086dc 100644 --- a/classnlohmann_1_1basic__json_ab2162bc76e10d8736cab9b2039956054.html +++ b/classnlohmann_1_1basic__json_ab2162bc76e10d8736cab9b2039956054.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -275,14 +277,14 @@ Illustration from cppreference.com
17  std::cout << *it << '\n';
18 }
a class to store JSON values
Definition: json.hpp:187
-
a mutable random access iterator for the basic_json class
Definition: json.hpp:5808
-
iterator end()
returns an iterator to one past the last element
Definition: json.hpp:3505
+
a mutable random access iterator for the basic_json class
Definition: json.hpp:5889
+
iterator end()
returns an iterator to one past the last element
Definition: json.hpp:3586
namespace for Niels Lohmann
Definition: json.hpp:78
Output (play with this example online):
5
 
The example code above can be translated with
g++ -std=c++11 -Isrc doc/examples/end.cpp -o end 
Since
version 1.0
-

Definition at line 3505 of file json.hpp.

+

Definition at line 3586 of file json.hpp.

@@ -292,7 +294,7 @@ Illustration from cppreference.com diff --git a/classnlohmann_1_1basic__json_ab74b2398f29acc6ffbf48f1b8974a848.html b/classnlohmann_1_1basic__json_ab74b2398f29acc6ffbf48f1b8974a848.html index 87450ac2c..3fad64fcb 100644 --- a/classnlohmann_1_1basic__json_ab74b2398f29acc6ffbf48f1b8974a848.html +++ b/classnlohmann_1_1basic__json_ab74b2398f29acc6ffbf48f1b8974a848.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -312,7 +314,7 @@ template<typename CompatibleNumberIntegerType , typename std::enable_if< diff --git a/classnlohmann_1_1basic__json_ab7d60fb6cb8e8f5740e588f9dc953819.html b/classnlohmann_1_1basic__json_ab7d60fb6cb8e8f5740e588f9dc953819.html index 701e22967..1afe44402 100644 --- a/classnlohmann_1_1basic__json_ab7d60fb6cb8e8f5740e588f9dc953819.html +++ b/classnlohmann_1_1basic__json_ab7d60fb6cb8e8f5740e588f9dc953819.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -351,7 +353,7 @@ template<class CompatibleArrayType , typename std::enable_if< diff --git a/classnlohmann_1_1basic__json_ab9a20bd1d391e9cb968db50c246f728d.html b/classnlohmann_1_1basic__json_ab9a20bd1d391e9cb968db50c246f728d.html index 34c187642..037f1df3e 100644 --- a/classnlohmann_1_1basic__json_ab9a20bd1d391e9cb968db50c246f728d.html +++ b/classnlohmann_1_1basic__json_ab9a20bd1d391e9cb968db50c246f728d.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -298,7 +300,7 @@ template<template< typename U, typename V, typename...Args > class Obje
27  std::cout << j_string.size() << '\n';
28 }
a class to store JSON values
Definition: json.hpp:187
-
size_type size() const noexcept
returns the number of elements
Definition: json.hpp:3749
+
size_type size() const noexcept
returns the number of elements
Definition: json.hpp:3830
object (unordered set of name/value pairs)
namespace for Niels Lohmann
Definition: json.hpp:78
array (ordered collection of values)
@@ -314,7 +316,7 @@ template<template< typename U, typename V, typename...Args > class Obje
The example code above can be translated with
g++ -std=c++11 -Isrc doc/examples/size.cpp -o size 
Since
version 1.0
-

Definition at line 3749 of file json.hpp.

+

Definition at line 3830 of file json.hpp.

@@ -324,7 +326,7 @@ template<template< typename U, typename V, typename...Args > class Obje diff --git a/classnlohmann_1_1basic__json_ab9da2afc6f77295f25252725fde142a6.html b/classnlohmann_1_1basic__json_ab9da2afc6f77295f25252725fde142a6.html index 1f7c522bf..1df7f18b8 100644 --- a/classnlohmann_1_1basic__json_ab9da2afc6f77295f25252725fde142a6.html +++ b/classnlohmann_1_1basic__json_ab9da2afc6f77295f25252725fde142a6.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -287,7 +289,7 @@ template<template< typename U, typename V, typename...Args > class Obje
object (unordered set of name/value pairs)
namespace for Niels Lohmann
Definition: json.hpp:78
array (ordered collection of values)
-
reference back()
access the last element
Definition: json.hpp:3050
+
reference back()
access the last element
Definition: json.hpp:3131
Output (play with this example online):
true
 17
 23.42
@@ -297,7 +299,7 @@ template<template< typename U, typename V, typename...Args > class Obje
 
The example code above can be translated with
g++ -std=c++11 -Isrc doc/examples/back.cpp -o back 
Since
version 1.0
-

Definition at line 3060 of file json.hpp.

+

Definition at line 3141 of file json.hpp.

@@ -307,7 +309,7 @@ template<template< typename U, typename V, typename...Args > class Obje diff --git a/classnlohmann_1_1basic__json_abe8f3224ca4041908ddb466cb9caecf1.html b/classnlohmann_1_1basic__json_abe8f3224ca4041908ddb466cb9caecf1.html index dfe51a65d..e5d12a1c0 100644 --- a/classnlohmann_1_1basic__json_abe8f3224ca4041908ddb466cb9caecf1.html +++ b/classnlohmann_1_1basic__json_abe8f3224ca4041908ddb466cb9caecf1.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -295,7 +297,7 @@ template<template< typename U, typename V, typename...Args > class Obje
24 }
a class to store JSON values
Definition: json.hpp:187
namespace for Niels Lohmann
Definition: json.hpp:78
-
size_type max_size() const noexcept
returns the maximum possible number of elements
Definition: json.hpp:3809
+
size_type max_size() const noexcept
returns the maximum possible number of elements
Definition: json.hpp:3890
Output (play with this example online):
0
 1
 1
@@ -306,7 +308,7 @@ template<template< typename U, typename V, typename...Args > class Obje
 
The example code above can be translated with
g++ -std=c++11 -Isrc doc/examples/max_size.cpp -o max_size 
Since
version 1.0
-

Definition at line 3809 of file json.hpp.

+

Definition at line 3890 of file json.hpp.

@@ -316,7 +318,7 @@ template<template< typename U, typename V, typename...Args > class Obje diff --git a/classnlohmann_1_1basic__json_ac160789f17d206a5404981ca0957e303.html b/classnlohmann_1_1basic__json_ac160789f17d206a5404981ca0957e303.html index f6dd4800c..7efa22d96 100644 --- a/classnlohmann_1_1basic__json_ac160789f17d206a5404981ca0957e303.html +++ b/classnlohmann_1_1basic__json_ac160789f17d206a5404981ca0957e303.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -289,7 +291,7 @@ template<template< typename U, typename V, typename...Args > class Obje diff --git a/classnlohmann_1_1basic__json_ac4011bd0781e51afe4994d2b09fd27e9.html b/classnlohmann_1_1basic__json_ac4011bd0781e51afe4994d2b09fd27e9.html index 2465f6daa..4a222726d 100644 --- a/classnlohmann_1_1basic__json_ac4011bd0781e51afe4994d2b09fd27e9.html +++ b/classnlohmann_1_1basic__json_ac4011bd0781e51afe4994d2b09fd27e9.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -245,7 +247,7 @@ template<template< typename U, typename V, typename...Args > class Obje diff --git a/classnlohmann_1_1basic__json_ac8163abe518595f19dbee68db1caaaf7.html b/classnlohmann_1_1basic__json_ac8163abe518595f19dbee68db1caaaf7.html index 66ab99020..8085f7579 100644 --- a/classnlohmann_1_1basic__json_ac8163abe518595f19dbee68db1caaaf7.html +++ b/classnlohmann_1_1basic__json_ac8163abe518595f19dbee68db1caaaf7.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -296,7 +298,7 @@ false diff --git a/classnlohmann_1_1basic__json_ac82abedf356d252e0589850c3d8b35ba.html b/classnlohmann_1_1basic__json_ac82abedf356d252e0589850c3d8b35ba.html index 5e0814ec6..5cdb54b9b 100644 --- a/classnlohmann_1_1basic__json_ac82abedf356d252e0589850c3d8b35ba.html +++ b/classnlohmann_1_1basic__json_ac82abedf356d252e0589850c3d8b35ba.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -271,7 +273,7 @@ template<template< typename U, typename V, typename...Args > class Obje diff --git a/classnlohmann_1_1basic__json_ac943391891fcde0a71a15ce990e0f7f4.html b/classnlohmann_1_1basic__json_ac943391891fcde0a71a15ce990e0f7f4.html index 77ef89e5c..4d1ab1cff 100644 --- a/classnlohmann_1_1basic__json_ac943391891fcde0a71a15ce990e0f7f4.html +++ b/classnlohmann_1_1basic__json_ac943391891fcde0a71a15ce990e0f7f4.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -298,7 +300,7 @@ true diff --git a/classnlohmann_1_1basic__json_acd08f9179c8c1e9f2cd7575a724ce27e.html b/classnlohmann_1_1basic__json_acd08f9179c8c1e9f2cd7575a724ce27e.html index 7398fc50b..df234b131 100644 --- a/classnlohmann_1_1basic__json_acd08f9179c8c1e9f2cd7575a724ce27e.html +++ b/classnlohmann_1_1basic__json_acd08f9179c8c1e9f2cd7575a724ce27e.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -297,7 +299,7 @@ template<typename T , typename std::enable_if< diff --git a/classnlohmann_1_1basic__json_acdf4445333649ec94198f09a62144884.html b/classnlohmann_1_1basic__json_acdf4445333649ec94198f09a62144884.html index 37521fd31..190598941 100644 --- a/classnlohmann_1_1basic__json_acdf4445333649ec94198f09a62144884.html +++ b/classnlohmann_1_1basic__json_acdf4445333649ec94198f09a62144884.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -272,14 +274,14 @@ Illustration from cppreference.com
14  std::cout << *it << '\n';
15 }
a class to store JSON values
Definition: json.hpp:187
-
a mutable random access iterator for the basic_json class
Definition: json.hpp:5808
-
iterator begin()
returns an iterator to the first element
Definition: json.hpp:3446
+
a mutable random access iterator for the basic_json class
Definition: json.hpp:5889
+
iterator begin()
returns an iterator to the first element
Definition: json.hpp:3527
namespace for Niels Lohmann
Definition: json.hpp:78
Output (play with this example online):
1
 
The example code above can be translated with
g++ -std=c++11 -Isrc doc/examples/begin.cpp -o begin 
Since
version 1.0
-

Definition at line 3446 of file json.hpp.

+

Definition at line 3527 of file json.hpp.

@@ -289,7 +291,7 @@ Illustration from cppreference.com diff --git a/classnlohmann_1_1basic__json_ace8338e57fdb11e1955c2a0c2d782069.html b/classnlohmann_1_1basic__json_ace8338e57fdb11e1955c2a0c2d782069.html index e7e9328eb..8e14d6651 100644 --- a/classnlohmann_1_1basic__json_ace8338e57fdb11e1955c2a0c2d782069.html +++ b/classnlohmann_1_1basic__json_ace8338e57fdb11e1955c2a0c2d782069.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -266,7 +268,7 @@ template<template< typename U, typename V, typename...Args > class Obje diff --git a/classnlohmann_1_1basic__json_ad1f617d29e8923dd40c89153f792b1bc.html b/classnlohmann_1_1basic__json_ad1f617d29e8923dd40c89153f792b1bc.html index 83635d45f..0208c0c50 100644 --- a/classnlohmann_1_1basic__json_ad1f617d29e8923dd40c89153f792b1bc.html +++ b/classnlohmann_1_1basic__json_ad1f617d29e8923dd40c89153f792b1bc.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -301,7 +303,7 @@ template<template< typename U, typename V, typename...Args > class Obje diff --git a/classnlohmann_1_1basic__json_ad2c4513cef5d8db760c4b2d871eea42c.html b/classnlohmann_1_1basic__json_ad2c4513cef5d8db760c4b2d871eea42c.html index 1513d8732..716687a58 100644 --- a/classnlohmann_1_1basic__json_ad2c4513cef5d8db760c4b2d871eea42c.html +++ b/classnlohmann_1_1basic__json_ad2c4513cef5d8db760c4b2d871eea42c.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -256,7 +258,7 @@ template<template< typename U, typename V, typename...Args > class Obje diff --git a/classnlohmann_1_1basic__json_ad497cbc4f80c8d79662ee6e19bf145dd.html b/classnlohmann_1_1basic__json_ad497cbc4f80c8d79662ee6e19bf145dd.html index 26cd931b6..e6886efa7 100644 --- a/classnlohmann_1_1basic__json_ad497cbc4f80c8d79662ee6e19bf145dd.html +++ b/classnlohmann_1_1basic__json_ad497cbc4f80c8d79662ee6e19bf145dd.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -320,11 +322,11 @@ template<class InteratorType , typename std::enable_if<
29  std::cout << j_string << '\n';
30 }
a class to store JSON values
Definition: json.hpp:187
-
iterator end()
returns an iterator to one past the last element
Definition: json.hpp:3505
-
iterator begin()
returns an iterator to the first element
Definition: json.hpp:3446
-
iterator find(typename object_t::key_type key)
find an element in a JSON object
Definition: json.hpp:3366
+
iterator end()
returns an iterator to one past the last element
Definition: json.hpp:3586
+
iterator begin()
returns an iterator to the first element
Definition: json.hpp:3527
+
iterator find(typename object_t::key_type key)
find an element in a JSON object
Definition: json.hpp:3447
namespace for Niels Lohmann
Definition: json.hpp:78
-
InteratorType erase(InteratorType pos)
remove element given an iterator
Definition: json.hpp:3115
+
InteratorType erase(InteratorType pos)
remove element given an iterator
Definition: json.hpp:3196
Output (play with this example online):
null
 null
 null
@@ -339,7 +341,7 @@ null
 erase(const size_type) – removes the element from an array at the given index
 
Since
version 1.0
-

Definition at line 3216 of file json.hpp.

+

Definition at line 3297 of file json.hpp.

@@ -349,7 +351,7 @@ null diff --git a/classnlohmann_1_1basic__json_ad6734c2b91b1b77aa2b43b65c3619c05.html b/classnlohmann_1_1basic__json_ad6734c2b91b1b77aa2b43b65c3619c05.html index 756c01a6d..ef60aebde 100644 --- a/classnlohmann_1_1basic__json_ad6734c2b91b1b77aa2b43b65c3619c05.html +++ b/classnlohmann_1_1basic__json_ad6734c2b91b1b77aa2b43b65c3619c05.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -306,7 +308,7 @@ null diff --git a/classnlohmann_1_1basic__json_ad8e0c5d04f016d1b3ac7369e5c73bedf.html b/classnlohmann_1_1basic__json_ad8e0c5d04f016d1b3ac7369e5c73bedf.html index a4d5517b0..746914607 100644 --- a/classnlohmann_1_1basic__json_ad8e0c5d04f016d1b3ac7369e5c73bedf.html +++ b/classnlohmann_1_1basic__json_ad8e0c5d04f016d1b3ac7369e5c73bedf.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -273,14 +275,14 @@ Illustration from cppreference.com
14  std::cout << *it << '\n';
15 }
a class to store JSON values
Definition: json.hpp:187
-
const_iterator cbegin() const
returns a const iterator to the first element
Definition: json.hpp:3480
+
const_iterator cbegin() const
returns a const iterator to the first element
Definition: json.hpp:3561
namespace for Niels Lohmann
Definition: json.hpp:78
-
a const random access iterator for the basic_json class
Definition: json.hpp:5306
+
a const random access iterator for the basic_json class
Definition: json.hpp:5387
Output (play with this example online):
1
 
The example code above can be translated with
g++ -std=c++11 -Isrc doc/examples/cbegin.cpp -o cbegin 
Since
version 1.0
-

Definition at line 3480 of file json.hpp.

+

Definition at line 3561 of file json.hpp.

@@ -290,7 +292,7 @@ Illustration from cppreference.com diff --git a/classnlohmann_1_1basic__json_ada8e01109a60088e4db2a670d4903b54.html b/classnlohmann_1_1basic__json_ada8e01109a60088e4db2a670d4903b54.html index cbffc4de5..c4c6c8369 100644 --- a/classnlohmann_1_1basic__json_ada8e01109a60088e4db2a670d4903b54.html +++ b/classnlohmann_1_1basic__json_ada8e01109a60088e4db2a670d4903b54.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -309,7 +311,7 @@ out of range diff --git a/classnlohmann_1_1basic__json_adbd4c16c9ac641b2a4736bc2c6787d83.html b/classnlohmann_1_1basic__json_adbd4c16c9ac641b2a4736bc2c6787d83.html index 4510a1a5f..9e9a8326e 100644 --- a/classnlohmann_1_1basic__json_adbd4c16c9ac641b2a4736bc2c6787d83.html +++ b/classnlohmann_1_1basic__json_adbd4c16c9ac641b2a4736bc2c6787d83.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -245,7 +247,7 @@ template<template< typename U, typename V, typename...Args > class Obje diff --git a/classnlohmann_1_1basic__json_ade7bd6e0fe221fec9d3fa9b430f5ce76.html b/classnlohmann_1_1basic__json_ade7bd6e0fe221fec9d3fa9b430f5ce76.html index 3577aa9de..3b94c68cd 100644 --- a/classnlohmann_1_1basic__json_ade7bd6e0fe221fec9d3fa9b430f5ce76.html +++ b/classnlohmann_1_1basic__json_ade7bd6e0fe221fec9d3fa9b430f5ce76.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -326,7 +328,7 @@ template<template< typename U, typename V, typename...Args > class Obje diff --git a/classnlohmann_1_1basic__json_adeaef2ab021997a11a826c378c2365e1.html b/classnlohmann_1_1basic__json_adeaef2ab021997a11a826c378c2365e1.html index 2d328a6a7..f8b7480e3 100644 --- a/classnlohmann_1_1basic__json_adeaef2ab021997a11a826c378c2365e1.html +++ b/classnlohmann_1_1basic__json_adeaef2ab021997a11a826c378c2365e1.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -285,7 +287,7 @@ false diff --git a/classnlohmann_1_1basic__json_adf5dea6fa9d7075ff89ca0796ab47a7e.html b/classnlohmann_1_1basic__json_adf5dea6fa9d7075ff89ca0796ab47a7e.html index d94f19492..42d8ca562 100644 --- a/classnlohmann_1_1basic__json_adf5dea6fa9d7075ff89ca0796ab47a7e.html +++ b/classnlohmann_1_1basic__json_adf5dea6fa9d7075ff89ca0796ab47a7e.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -292,7 +294,7 @@ template<template< typename U, typename V, typename...Args > class Obje diff --git a/classnlohmann_1_1basic__json_ae347859ec88176ef76a0cbe5b4514fcf.html b/classnlohmann_1_1basic__json_ae347859ec88176ef76a0cbe5b4514fcf.html index 7ed12bea3..4c0666d23 100644 --- a/classnlohmann_1_1basic__json_ae347859ec88176ef76a0cbe5b4514fcf.html +++ b/classnlohmann_1_1basic__json_ae347859ec88176ef76a0cbe5b4514fcf.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -296,7 +298,7 @@ template<template< typename U, typename V, typename...Args > class Obje null != nullptr false

The example code above can be translated with

g++ -std=c++11 -Isrc doc/examples/operator__notequal__nullptr_t.cpp -o operator__notequal__nullptr_t 
Since
version 1.0
-

Definition at line 4541 of file json.hpp.

+

Definition at line 4622 of file json.hpp.

@@ -306,7 +308,7 @@ null != nullptr false diff --git a/classnlohmann_1_1basic__json_ae50f22a1c646b8627e88f1313cceffd4.html b/classnlohmann_1_1basic__json_ae50f22a1c646b8627e88f1313cceffd4.html index fe5829506..fb7de861c 100644 --- a/classnlohmann_1_1basic__json_ae50f22a1c646b8627e88f1313cceffd4.html +++ b/classnlohmann_1_1basic__json_ae50f22a1c646b8627e88f1313cceffd4.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -278,7 +280,7 @@ template<typename PointerType , typename std::enable_if<
19  std::cout << std::boolalpha << (p5 == nullptr) << '\n';
20 }
a class to store JSON values
Definition: json.hpp:187
-
ValueType value(const typename object_t::key_type &key, ValueType default_value) const
access specified object element with default value
Definition: json.hpp:2965
+
ValueType value(const typename object_t::key_type &key, ValueType default_value) const
access specified object element with default value
Definition: json.hpp:3046
namespace for Niels Lohmann
Definition: json.hpp:78
ValueType get() const
get a value (explicit)
Definition: json.hpp:2440
NumberIntegerType number_integer_t
a type for a number (integer)
Definition: json.hpp:527
@@ -299,7 +301,7 @@ true diff --git a/classnlohmann_1_1basic__json_ae874cfc1746b560c53a03bcf5b7bbeed.html b/classnlohmann_1_1basic__json_ae874cfc1746b560c53a03bcf5b7bbeed.html index a6aeaeaf7..a9faae3d7 100644 --- a/classnlohmann_1_1basic__json_ae874cfc1746b560c53a03bcf5b7bbeed.html +++ b/classnlohmann_1_1basic__json_ae874cfc1746b560c53a03bcf5b7bbeed.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -296,7 +298,7 @@ false diff --git a/classnlohmann_1_1basic__json_ae928414b2805cf6ef56b4e4f8d235416.html b/classnlohmann_1_1basic__json_ae928414b2805cf6ef56b4e4f8d235416.html index 57ee4b280..a719670cc 100644 --- a/classnlohmann_1_1basic__json_ae928414b2805cf6ef56b4e4f8d235416.html +++ b/classnlohmann_1_1basic__json_ae928414b2805cf6ef56b4e4f8d235416.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -245,7 +247,7 @@ template<template< typename U, typename V, typename...Args > class Obje diff --git a/classnlohmann_1_1basic__json_ae960d2d6bc7b94fe39cc5e9f106edfa9.html b/classnlohmann_1_1basic__json_ae960d2d6bc7b94fe39cc5e9f106edfa9.html index 901b5aad3..95d2fc0fd 100644 --- a/classnlohmann_1_1basic__json_ae960d2d6bc7b94fe39cc5e9f106edfa9.html +++ b/classnlohmann_1_1basic__json_ae960d2d6bc7b94fe39cc5e9f106edfa9.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -290,7 +292,7 @@ template<template< typename U, typename V, typename...Args > class Obje diff --git a/classnlohmann_1_1basic__json_aea1c863b719b4ca5b77188c171bbfafe.html b/classnlohmann_1_1basic__json_aea1c863b719b4ca5b77188c171bbfafe.html index e86dcc22a..28910cf42 100644 --- a/classnlohmann_1_1basic__json_aea1c863b719b4ca5b77188c171bbfafe.html +++ b/classnlohmann_1_1basic__json_aea1c863b719b4ca5b77188c171bbfafe.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -275,7 +277,7 @@ template<template< typename U, typename V, typename...Args > class Obje diff --git a/classnlohmann_1_1basic__json_af073eec08d2e68924098aef09e9a10ba.html b/classnlohmann_1_1basic__json_af073eec08d2e68924098aef09e9a10ba.html index 76c9eee96..9bd576846 100644 --- a/classnlohmann_1_1basic__json_af073eec08d2e68924098aef09e9a10ba.html +++ b/classnlohmann_1_1basic__json_af073eec08d2e68924098aef09e9a10ba.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -273,13 +275,13 @@ template<template< typename U, typename V, typename...Args > class Obje
17 }
a class to store JSON values
Definition: json.hpp:187
namespace for Niels Lohmann
Definition: json.hpp:78
-
void swap(reference other) noexcept( std::is_nothrow_move_constructible< value_t >::value and std::is_nothrow_move_assignable< value_t >::value and std::is_nothrow_move_constructible< json_value >::value and std::is_nothrow_move_assignable< json_value >::value )
exchanges the values
Definition: json.hpp:4257
+
void swap(reference other) noexcept( std::is_nothrow_move_constructible< value_t >::value and std::is_nothrow_move_assignable< value_t >::value and std::is_nothrow_move_constructible< json_value >::value and std::is_nothrow_move_assignable< json_value >::value )
exchanges the values
Definition: json.hpp:4338
Output (play with this example online):
j1 = {"e":2.71828182845905,"pi":3.14159265358979}
 j2 = [1,2,3,4,5]
 
The example code above can be translated with
g++ -std=c++11 -Isrc doc/examples/swap__reference.cpp -o swap__reference 
Since
version 1.0
-

Definition at line 4257 of file json.hpp.

+

Definition at line 4338 of file json.hpp.

@@ -289,7 +291,7 @@ j2 = [1,2,3,4,5] diff --git a/classnlohmann_1_1basic__json_af0ebd1757acb971a6504b4acabf88584.html b/classnlohmann_1_1basic__json_af0ebd1757acb971a6504b4acabf88584.html index 7a458a1de..2dce148c8 100644 --- a/classnlohmann_1_1basic__json_af0ebd1757acb971a6504b4acabf88584.html +++ b/classnlohmann_1_1basic__json_af0ebd1757acb971a6504b4acabf88584.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -273,13 +275,13 @@ Illustration from cppreference.com
15 }
a class to store JSON values
Definition: json.hpp:187
namespace for Niels Lohmann
Definition: json.hpp:78
-
reverse_iterator rbegin()
returns an iterator to the reverse-beginning
Definition: json.hpp:3563
+
reverse_iterator rbegin()
returns an iterator to the reverse-beginning
Definition: json.hpp:3644
a template for a reverse iterator class
Definition: json.hpp:232
Output (play with this example online):
5
 
The example code above can be translated with
g++ -std=c++11 -Isrc doc/examples/rbegin.cpp -o rbegin 
Since
version 1.0
-

Definition at line 3563 of file json.hpp.

+

Definition at line 3644 of file json.hpp.

@@ -289,7 +291,7 @@ Illustration from cppreference.com diff --git a/classnlohmann_1_1basic__json_af127fb69c580c17821da5f5be57e3585.html b/classnlohmann_1_1basic__json_af127fb69c580c17821da5f5be57e3585.html index 173f01a61..ca8aab6a1 100644 --- a/classnlohmann_1_1basic__json_af127fb69c580c17821da5f5be57e3585.html +++ b/classnlohmann_1_1basic__json_af127fb69c580c17821da5f5be57e3585.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -291,7 +293,7 @@ template<template< typename U, typename V, typename...Args > class Obje diff --git a/classnlohmann_1_1basic__json_af1e3f9e079136abca2530c8191c56292.html b/classnlohmann_1_1basic__json_af1e3f9e079136abca2530c8191c56292.html index 7b99b99f6..b368b1fbe 100644 --- a/classnlohmann_1_1basic__json_af1e3f9e079136abca2530c8191c56292.html +++ b/classnlohmann_1_1basic__json_af1e3f9e079136abca2530c8191c56292.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -315,7 +317,7 @@ template<template< typename U, typename V, typename...Args > class Obje
18  std::cout << j_nested_object << '\n';
19  std::cout << j_nested_array << '\n';
20 }
-
basic_json<> json
default JSON class
Definition: json.hpp:7631
+
basic_json<> json
default JSON class
Definition: json.hpp:7712
a class to store JSON values
Definition: json.hpp:187
namespace for Niels Lohmann
Definition: json.hpp:78
Output (play with this example online):
{}
@@ -339,7 +341,7 @@ template<template< typename U, typename V, typename...Args > class Obje
 
 
 
diff --git a/classnlohmann_1_1basic__json_af2730bc8ffa6b28916875c13ee7b83f5.html b/classnlohmann_1_1basic__json_af2730bc8ffa6b28916875c13ee7b83f5.html
index 3967121e9..2387469d9 100644
--- a/classnlohmann_1_1basic__json_af2730bc8ffa6b28916875c13ee7b83f5.html
+++ b/classnlohmann_1_1basic__json_af2730bc8ffa6b28916875c13ee7b83f5.html
@@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
           operator[]
           operator[]
           operator[]
+          operator[]
           operator[]
+          operator[]
           parse
           parse
           parse
@@ -313,12 +315,12 @@ template<template< typename U, typename V, typename...Args > class Obje
 
45  json j_filtered = json::parse(text, cb);
46  std::cout << std::setw(4) << j_filtered << '\n';
47 }
-
basic_json<> json
default JSON class
Definition: json.hpp:7631
+
basic_json<> json
default JSON class
Definition: json.hpp:7712
a class to store JSON values
Definition: json.hpp:187
std::function< bool(int depth, parse_event_t event, basic_json &parsed)> parser_callback_t
per-element parser callback type
Definition: json.hpp:819
namespace for Niels Lohmann
Definition: json.hpp:78
the parser read a key of a value in an object
-
static basic_json parse(const string_t &s, parser_callback_t cb=nullptr)
deserialize from string
Definition: json.hpp:4778
+
static basic_json parse(const string_t &s, parser_callback_t cb=nullptr)
deserialize from string
Definition: json.hpp:4859
parse_event_t
JSON callback events.
Definition: json.hpp:754
Output (play with this example online):
{
     "Image": {
@@ -358,7 +360,7 @@ template<template< typename U, typename V, typename...Args > class Obje
 
See also
parse(std::istream&, parser_callback_t) for a version that reads from an input stream
Since
version 1.0
-

Definition at line 4778 of file json.hpp.

+

Definition at line 4859 of file json.hpp.

@@ -368,7 +370,7 @@ template<template< typename U, typename V, typename...Args > class Obje diff --git a/classnlohmann_1_1basic__json_af661bc209bf22097e2f76607a11b56bf.html b/classnlohmann_1_1basic__json_af661bc209bf22097e2f76607a11b56bf.html index 8caf8399a..b26429af3 100644 --- a/classnlohmann_1_1basic__json_af661bc209bf22097e2f76607a11b56bf.html +++ b/classnlohmann_1_1basic__json_af661bc209bf22097e2f76607a11b56bf.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -296,7 +298,7 @@ false diff --git a/classnlohmann_1_1basic__json_af6b6050ccd906dddf7c9f47fe3ad62a5.html b/classnlohmann_1_1basic__json_af6b6050ccd906dddf7c9f47fe3ad62a5.html index 6940ec3b1..7d5e42a24 100644 --- a/classnlohmann_1_1basic__json_af6b6050ccd906dddf7c9f47fe3ad62a5.html +++ b/classnlohmann_1_1basic__json_af6b6050ccd906dddf7c9f47fe3ad62a5.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -302,7 +304,7 @@ out of range diff --git a/classnlohmann_1_1basic__json_af709c079de0ac3507143ea2c60699bd0.html b/classnlohmann_1_1basic__json_af709c079de0ac3507143ea2c60699bd0.html index ff5aad451..efa7f6bd1 100644 --- a/classnlohmann_1_1basic__json_af709c079de0ac3507143ea2c60699bd0.html +++ b/classnlohmann_1_1basic__json_af709c079de0ac3507143ea2c60699bd0.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -337,7 +339,7 @@ array: [1,2,3,4,5] diff --git a/classnlohmann_1_1basic__json_af74581d177dafc38df5a126ccd358999.html b/classnlohmann_1_1basic__json_af74581d177dafc38df5a126ccd358999.html index ea4b3b683..1de4faba3 100644 --- a/classnlohmann_1_1basic__json_af74581d177dafc38df5a126ccd358999.html +++ b/classnlohmann_1_1basic__json_af74581d177dafc38df5a126ccd358999.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -329,7 +331,7 @@ template<template< typename U, typename V, typename...Args > class Obje diff --git a/classnlohmann_1_1basic__json_af7d0adc984d04fc70c3d29fcd63e096a.html b/classnlohmann_1_1basic__json_af7d0adc984d04fc70c3d29fcd63e096a.html index 561542e53..989c33989 100644 --- a/classnlohmann_1_1basic__json_af7d0adc984d04fc70c3d29fcd63e096a.html +++ b/classnlohmann_1_1basic__json_af7d0adc984d04fc70c3d29fcd63e096a.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -290,15 +292,15 @@ template<template< typename U, typename V, typename...Args > class Obje
15  std::cout << v << '\n';
16 }
a class to store JSON values
Definition: json.hpp:187
-
iterator begin()
returns an iterator to the first element
Definition: json.hpp:3446
+
iterator begin()
returns an iterator to the first element
Definition: json.hpp:3527
namespace for Niels Lohmann
Definition: json.hpp:78
-
iterator insert(const_iterator pos, const basic_json &val)
inserts element
Definition: json.hpp:4065
+
iterator insert(const_iterator pos, const basic_json &val)
inserts element
Definition: json.hpp:4146
Output (play with this example online):
10
 [1,2,10,3,4]
 
The example code above can be translated with
g++ -std=c++11 -Isrc doc/examples/insert.cpp -o insert 
Since
version 1.0
-

Definition at line 4065 of file json.hpp.

+

Definition at line 4146 of file json.hpp.

@@ -308,7 +310,7 @@ template<template< typename U, typename V, typename...Args > class Obje diff --git a/classnlohmann_1_1basic__json_afc4223b5ad03b1b76e925374a8fff98e.html b/classnlohmann_1_1basic__json_afc4223b5ad03b1b76e925374a8fff98e.html index e532c2367..9b09013d1 100644 --- a/classnlohmann_1_1basic__json_afc4223b5ad03b1b76e925374a8fff98e.html +++ b/classnlohmann_1_1basic__json_afc4223b5ad03b1b76e925374a8fff98e.html @@ -190,7 +190,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); operator[] operator[] operator[] + operator[] operator[] + operator[] parse parse parse @@ -301,7 +303,7 @@ template<template< typename U, typename V, typename...Args > class Obje diff --git a/dir_68267d1309a1af8e8297ef4c3efbcdba.html b/dir_68267d1309a1af8e8297ef4c3efbcdba.html index 7145effee..dc3f404e9 100644 --- a/dir_68267d1309a1af8e8297ef4c3efbcdba.html +++ b/dir_68267d1309a1af8e8297ef4c3efbcdba.html @@ -92,7 +92,7 @@ Files diff --git a/functions.html b/functions.html index a23a7ae2a..d7efb8374 100644 --- a/functions.html +++ b/functions.html @@ -134,7 +134,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/functions_b.html b/functions_b.html index c7cc32127..8783f4273 100644 --- a/functions_b.html +++ b/functions_b.html @@ -140,7 +140,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/functions_c.html b/functions_c.html index e27169e24..707b894cf 100644 --- a/functions_c.html +++ b/functions_c.html @@ -152,7 +152,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/functions_d.html b/functions_d.html index 93fbeac2a..fbd68d760 100644 --- a/functions_d.html +++ b/functions_d.html @@ -129,7 +129,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/functions_e.html b/functions_e.html index 5c0c39788..ac5af846b 100644 --- a/functions_e.html +++ b/functions_e.html @@ -132,7 +132,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/functions_enum.html b/functions_enum.html index cfb52f4e7..4721f5cfb 100644 --- a/functions_enum.html +++ b/functions_enum.html @@ -103,7 +103,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/functions_f.html b/functions_f.html index a6645e5e5..0fd6298ec 100644 --- a/functions_f.html +++ b/functions_f.html @@ -128,7 +128,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/functions_func.html b/functions_func.html index 51e10ff78..4644ce183 100644 --- a/functions_func.html +++ b/functions_func.html @@ -355,7 +355,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); : nlohmann::basic_json::const_iterator , nlohmann::basic_json::iterator , nlohmann::basic_json::json_reverse_iterator< Base > -, nlohmann::basic_json +, nlohmann::basic_json @@ -415,7 +415,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/functions_g.html b/functions_g.html index 9f6f2f202..2f99657d2 100644 --- a/functions_g.html +++ b/functions_g.html @@ -131,7 +131,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/functions_i.html b/functions_i.html index 97385c2e0..9e458028c 100644 --- a/functions_i.html +++ b/functions_i.html @@ -167,7 +167,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/functions_j.html b/functions_j.html index 422a428a7..f3c25fb45 100644 --- a/functions_j.html +++ b/functions_j.html @@ -125,7 +125,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/functions_k.html b/functions_k.html index ad472c77d..410f321b9 100644 --- a/functions_k.html +++ b/functions_k.html @@ -126,7 +126,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/functions_m.html b/functions_m.html index c244b3383..1ad57c403 100644 --- a/functions_m.html +++ b/functions_m.html @@ -125,7 +125,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/functions_n.html b/functions_n.html index bbd3fed3c..30ff66102 100644 --- a/functions_n.html +++ b/functions_n.html @@ -128,7 +128,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/functions_o.html b/functions_o.html index bd4178370..73e190fec 100644 --- a/functions_o.html +++ b/functions_o.html @@ -180,7 +180,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); , nlohmann::basic_json
  • operator<< -: nlohmann::basic_json +: nlohmann::basic_json
  • operator<=() : nlohmann::basic_json::const_iterator @@ -193,7 +193,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
  • operator==() : nlohmann::basic_json::const_iterator -, nlohmann::basic_json +, nlohmann::basic_json
  • operator>() : nlohmann::basic_json::const_iterator @@ -210,13 +210,13 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); : nlohmann::basic_json::const_iterator , nlohmann::basic_json::iterator , nlohmann::basic_json::json_reverse_iterator< Base > -, nlohmann::basic_json +, nlohmann::basic_json
  • diff --git a/functions_p.html b/functions_p.html index 21269644f..e221928a0 100644 --- a/functions_p.html +++ b/functions_p.html @@ -139,7 +139,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/functions_r.html b/functions_r.html index 3fe2b3a02..6e019fa60 100644 --- a/functions_r.html +++ b/functions_r.html @@ -137,7 +137,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/functions_rela.html b/functions_rela.html index 20e2314b3..2f25e0957 100644 --- a/functions_rela.html +++ b/functions_rela.html @@ -124,7 +124,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/functions_s.html b/functions_s.html index 17f6b801f..cfb28258f 100644 --- a/functions_s.html +++ b/functions_s.html @@ -134,7 +134,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/functions_t.html b/functions_t.html index 41574e07d..3438ce220 100644 --- a/functions_t.html +++ b/functions_t.html @@ -125,7 +125,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/functions_type.html b/functions_type.html index 8ab32f085..dd878ce93 100644 --- a/functions_type.html +++ b/functions_type.html @@ -162,7 +162,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/functions_v.html b/functions_v.html index 751b3a6fd..b9a0b803a 100644 --- a/functions_v.html +++ b/functions_v.html @@ -135,7 +135,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/functions_~.html b/functions_~.html index 5ecf70cf0..3bab9ad5b 100644 --- a/functions_~.html +++ b/functions_~.html @@ -125,7 +125,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/graph_legend.html b/graph_legend.html index 4d7ac0348..cca91d94c 100644 --- a/graph_legend.html +++ b/graph_legend.html @@ -142,7 +142,7 @@ A yellow dashed arrow denotes a relation between a template instance and the tem diff --git a/hierarchy.html b/hierarchy.html index f2d5b986a..dd57309ed 100644 --- a/hierarchy.html +++ b/hierarchy.html @@ -102,7 +102,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/index.html b/index.html index 7cdc81496..fe64aba01 100644 --- a/index.html +++ b/index.html @@ -92,7 +92,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/json_8hpp_source.html b/json_8hpp_source.html index c845461cf..4a20425f9 100644 --- a/json_8hpp_source.html +++ b/json_8hpp_source.html @@ -1212,3630 +1212,3659 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
    2862  }
    2863  }
    2864 
    -
    2893  template<typename T, std::size_t n>
    -
    2894  reference operator[](const T (&key)[n])
    -
    2895  {
    -
    2896  // implicitly convert null to object
    -
    2897  if (is_null())
    -
    2898  {
    -
    2899  m_type = value_t::object;
    -
    2900  m_value = value_t::object;
    +
    2891  const_reference operator[](const typename object_t::key_type& key) const
    +
    2892  {
    +
    2893  // [] only works for objects
    +
    2894  if (is_object())
    +
    2895  {
    +
    2896  return m_value.object->find(key)->second;
    +
    2897  }
    +
    2898  else
    +
    2899  {
    +
    2900  throw std::domain_error("cannot use operator[] with " + type_name());
    2901  }
    -
    2902 
    -
    2903  // at only works for objects
    -
    2904  if (is_object())
    -
    2905  {
    -
    2906  return m_value.object->operator[](key);
    -
    2907  }
    -
    2908  else
    -
    2909  {
    -
    2910  throw std::domain_error("cannot use operator[] with " + type_name());
    -
    2911  }
    -
    2912  }
    -
    2913 
    -
    2961  template <class ValueType, typename
    -
    2962  std::enable_if<
    -
    2963  std::is_convertible<basic_json_t, ValueType>::value
    -
    2964  , int>::type = 0>
    -
    2965  ValueType value(const typename object_t::key_type& key, ValueType default_value) const
    -
    2966  {
    -
    2967  // at only works for objects
    -
    2968  if (is_object())
    -
    2969  {
    -
    2970  // if key is found, return value and given default value otherwise
    -
    2971  const auto it = find(key);
    -
    2972  if (it != end())
    -
    2973  {
    -
    2974  return *it;
    -
    2975  }
    -
    2976  else
    -
    2977  {
    -
    2978  return default_value;
    -
    2979  }
    -
    2980  }
    -
    2981  else
    -
    2982  {
    -
    2983  throw std::domain_error("cannot use value() with " + type_name());
    -
    2984  }
    -
    2985  }
    -
    2986 
    -
    2991  string_t value(const typename object_t::key_type& key, const char* default_value) const
    -
    2992  {
    -
    2993  return value(key, string_t(default_value));
    -
    2994  }
    -
    2995 
    - -
    3017  {
    -
    3018  return *begin();
    -
    3019  }
    -
    3020 
    - -
    3025  {
    -
    3026  return *cbegin();
    -
    3027  }
    -
    3028 
    - -
    3051  {
    -
    3052  auto tmp = end();
    -
    3053  --tmp;
    -
    3054  return *tmp;
    -
    3055  }
    -
    3056 
    - -
    3061  {
    -
    3062  auto tmp = cend();
    -
    3063  --tmp;
    -
    3064  return *tmp;
    -
    3065  }
    -
    3066 
    -
    3109  template <class InteratorType, typename
    -
    3110  std::enable_if<
    -
    3111  std::is_same<InteratorType, typename basic_json_t::iterator>::value or
    -
    3112  std::is_same<InteratorType, typename basic_json_t::const_iterator>::value
    -
    3113  , int>::type
    -
    3114  = 0>
    -
    3115  InteratorType erase(InteratorType pos)
    -
    3116  {
    -
    3117  // make sure iterator fits the current value
    -
    3118  if (this != pos.m_object)
    -
    3119  {
    -
    3120  throw std::domain_error("iterator does not fit current value");
    -
    3121  }
    -
    3122 
    -
    3123  InteratorType result = end();
    -
    3124 
    -
    3125  switch (m_type)
    -
    3126  {
    -
    3127  case value_t::boolean:
    -
    3128  case value_t::number_float:
    - -
    3130  case value_t::string:
    -
    3131  {
    -
    3132  if (not pos.m_it.primitive_iterator.is_begin())
    -
    3133  {
    -
    3134  throw std::out_of_range("iterator out of range");
    -
    3135  }
    -
    3136 
    -
    3137  if (is_string())
    -
    3138  {
    -
    3139  delete m_value.string;
    -
    3140  m_value.string = nullptr;
    -
    3141  }
    -
    3142 
    -
    3143  m_type = value_t::null;
    -
    3144  break;
    -
    3145  }
    -
    3146 
    -
    3147  case value_t::object:
    -
    3148  {
    -
    3149  result.m_it.object_iterator = m_value.object->erase(pos.m_it.object_iterator);
    -
    3150  break;
    -
    3151  }
    -
    3152 
    -
    3153  case value_t::array:
    -
    3154  {
    -
    3155  result.m_it.array_iterator = m_value.array->erase(pos.m_it.array_iterator);
    -
    3156  break;
    -
    3157  }
    -
    3158 
    -
    3159  default:
    -
    3160  {
    -
    3161  throw std::domain_error("cannot use erase() with " + type_name());
    -
    3162  }
    -
    3163  }
    -
    3164 
    -
    3165  return result;
    -
    3166  }
    -
    3167 
    -
    3210  template <class InteratorType, typename
    -
    3211  std::enable_if<
    -
    3212  std::is_same<InteratorType, typename basic_json_t::iterator>::value or
    -
    3213  std::is_same<InteratorType, typename basic_json_t::const_iterator>::value
    -
    3214  , int>::type
    -
    3215  = 0>
    -
    3216  InteratorType erase(InteratorType first, InteratorType last)
    -
    3217  {
    -
    3218  // make sure iterator fits the current value
    -
    3219  if (this != first.m_object or this != last.m_object)
    -
    3220  {
    -
    3221  throw std::domain_error("iterators do not fit current value");
    -
    3222  }
    +
    2902  }
    +
    2903 
    +
    2932  template<typename T, std::size_t n>
    +
    2933  reference operator[](const T (&key)[n])
    +
    2934  {
    +
    2935  // implicitly convert null to object
    +
    2936  if (is_null())
    +
    2937  {
    +
    2938  m_type = value_t::object;
    +
    2939  m_value = value_t::object;
    +
    2940  }
    +
    2941 
    +
    2942  // at only works for objects
    +
    2943  if (is_object())
    +
    2944  {
    +
    2945  return m_value.object->operator[](key);
    +
    2946  }
    +
    2947  else
    +
    2948  {
    +
    2949  throw std::domain_error("cannot use operator[] with " + type_name());
    +
    2950  }
    +
    2951  }
    +
    2952 
    +
    2981  template<typename T, std::size_t n>
    +
    2982  const_reference operator[](const T (&key)[n]) const
    +
    2983  {
    +
    2984  // at only works for objects
    +
    2985  if (is_object())
    +
    2986  {
    +
    2987  return m_value.object->find(key)->second;
    +
    2988  }
    +
    2989  else
    +
    2990  {
    +
    2991  throw std::domain_error("cannot use operator[] with " + type_name());
    +
    2992  }
    +
    2993  }
    +
    2994 
    +
    3042  template <class ValueType, typename
    +
    3043  std::enable_if<
    +
    3044  std::is_convertible<basic_json_t, ValueType>::value
    +
    3045  , int>::type = 0>
    +
    3046  ValueType value(const typename object_t::key_type& key, ValueType default_value) const
    +
    3047  {
    +
    3048  // at only works for objects
    +
    3049  if (is_object())
    +
    3050  {
    +
    3051  // if key is found, return value and given default value otherwise
    +
    3052  const auto it = find(key);
    +
    3053  if (it != end())
    +
    3054  {
    +
    3055  return *it;
    +
    3056  }
    +
    3057  else
    +
    3058  {
    +
    3059  return default_value;
    +
    3060  }
    +
    3061  }
    +
    3062  else
    +
    3063  {
    +
    3064  throw std::domain_error("cannot use value() with " + type_name());
    +
    3065  }
    +
    3066  }
    +
    3067 
    +
    3072  string_t value(const typename object_t::key_type& key, const char* default_value) const
    +
    3073  {
    +
    3074  return value(key, string_t(default_value));
    +
    3075  }
    +
    3076 
    + +
    3098  {
    +
    3099  return *begin();
    +
    3100  }
    +
    3101 
    + +
    3106  {
    +
    3107  return *cbegin();
    +
    3108  }
    +
    3109 
    + +
    3132  {
    +
    3133  auto tmp = end();
    +
    3134  --tmp;
    +
    3135  return *tmp;
    +
    3136  }
    +
    3137 
    + +
    3142  {
    +
    3143  auto tmp = cend();
    +
    3144  --tmp;
    +
    3145  return *tmp;
    +
    3146  }
    +
    3147 
    +
    3190  template <class InteratorType, typename
    +
    3191  std::enable_if<
    +
    3192  std::is_same<InteratorType, typename basic_json_t::iterator>::value or
    +
    3193  std::is_same<InteratorType, typename basic_json_t::const_iterator>::value
    +
    3194  , int>::type
    +
    3195  = 0>
    +
    3196  InteratorType erase(InteratorType pos)
    +
    3197  {
    +
    3198  // make sure iterator fits the current value
    +
    3199  if (this != pos.m_object)
    +
    3200  {
    +
    3201  throw std::domain_error("iterator does not fit current value");
    +
    3202  }
    +
    3203 
    +
    3204  InteratorType result = end();
    +
    3205 
    +
    3206  switch (m_type)
    +
    3207  {
    +
    3208  case value_t::boolean:
    +
    3209  case value_t::number_float:
    + +
    3211  case value_t::string:
    +
    3212  {
    +
    3213  if (not pos.m_it.primitive_iterator.is_begin())
    +
    3214  {
    +
    3215  throw std::out_of_range("iterator out of range");
    +
    3216  }
    +
    3217 
    +
    3218  if (is_string())
    +
    3219  {
    +
    3220  delete m_value.string;
    +
    3221  m_value.string = nullptr;
    +
    3222  }
    3223 
    -
    3224  InteratorType result = end();
    -
    3225 
    -
    3226  switch (m_type)
    -
    3227  {
    -
    3228  case value_t::boolean:
    -
    3229  case value_t::number_float:
    - -
    3231  case value_t::string:
    -
    3232  {
    -
    3233  if (not first.m_it.primitive_iterator.is_begin() or not last.m_it.primitive_iterator.is_end())
    -
    3234  {
    -
    3235  throw std::out_of_range("iterators out of range");
    -
    3236  }
    -
    3237 
    -
    3238  if (is_string())
    -
    3239  {
    -
    3240  delete m_value.string;
    -
    3241  m_value.string = nullptr;
    -
    3242  }
    -
    3243 
    -
    3244  m_type = value_t::null;
    -
    3245  break;
    -
    3246  }
    -
    3247 
    -
    3248  case value_t::object:
    -
    3249  {
    -
    3250  result.m_it.object_iterator = m_value.object->erase(first.m_it.object_iterator,
    -
    3251  last.m_it.object_iterator);
    -
    3252  break;
    -
    3253  }
    -
    3254 
    -
    3255  case value_t::array:
    -
    3256  {
    -
    3257  result.m_it.array_iterator = m_value.array->erase(first.m_it.array_iterator,
    -
    3258  last.m_it.array_iterator);
    -
    3259  break;
    -
    3260  }
    -
    3261 
    -
    3262  default:
    -
    3263  {
    -
    3264  throw std::domain_error("cannot use erase with " + type_name());
    -
    3265  }
    -
    3266  }
    -
    3267 
    -
    3268  return result;
    -
    3269  }
    -
    3270 
    -
    3296  size_type erase(const typename object_t::key_type& key)
    -
    3297  {
    -
    3298  // this erase only works for objects
    -
    3299  if (is_object())
    -
    3300  {
    -
    3301  return m_value.object->erase(key);
    -
    3302  }
    -
    3303  else
    -
    3304  {
    -
    3305  throw std::domain_error("cannot use erase() with " + type_name());
    -
    3306  }
    -
    3307  }
    -
    3308 
    -
    3331  void erase(const size_type idx)
    -
    3332  {
    -
    3333  // this erase only works for arrays
    -
    3334  if (is_array())
    -
    3335  {
    -
    3336  if (idx >= size())
    +
    3224  m_type = value_t::null;
    +
    3225  break;
    +
    3226  }
    +
    3227 
    +
    3228  case value_t::object:
    +
    3229  {
    +
    3230  result.m_it.object_iterator = m_value.object->erase(pos.m_it.object_iterator);
    +
    3231  break;
    +
    3232  }
    +
    3233 
    +
    3234  case value_t::array:
    +
    3235  {
    +
    3236  result.m_it.array_iterator = m_value.array->erase(pos.m_it.array_iterator);
    +
    3237  break;
    +
    3238  }
    +
    3239 
    +
    3240  default:
    +
    3241  {
    +
    3242  throw std::domain_error("cannot use erase() with " + type_name());
    +
    3243  }
    +
    3244  }
    +
    3245 
    +
    3246  return result;
    +
    3247  }
    +
    3248 
    +
    3291  template <class InteratorType, typename
    +
    3292  std::enable_if<
    +
    3293  std::is_same<InteratorType, typename basic_json_t::iterator>::value or
    +
    3294  std::is_same<InteratorType, typename basic_json_t::const_iterator>::value
    +
    3295  , int>::type
    +
    3296  = 0>
    +
    3297  InteratorType erase(InteratorType first, InteratorType last)
    +
    3298  {
    +
    3299  // make sure iterator fits the current value
    +
    3300  if (this != first.m_object or this != last.m_object)
    +
    3301  {
    +
    3302  throw std::domain_error("iterators do not fit current value");
    +
    3303  }
    +
    3304 
    +
    3305  InteratorType result = end();
    +
    3306 
    +
    3307  switch (m_type)
    +
    3308  {
    +
    3309  case value_t::boolean:
    +
    3310  case value_t::number_float:
    + +
    3312  case value_t::string:
    +
    3313  {
    +
    3314  if (not first.m_it.primitive_iterator.is_begin() or not last.m_it.primitive_iterator.is_end())
    +
    3315  {
    +
    3316  throw std::out_of_range("iterators out of range");
    +
    3317  }
    +
    3318 
    +
    3319  if (is_string())
    +
    3320  {
    +
    3321  delete m_value.string;
    +
    3322  m_value.string = nullptr;
    +
    3323  }
    +
    3324 
    +
    3325  m_type = value_t::null;
    +
    3326  break;
    +
    3327  }
    +
    3328 
    +
    3329  case value_t::object:
    +
    3330  {
    +
    3331  result.m_it.object_iterator = m_value.object->erase(first.m_it.object_iterator,
    +
    3332  last.m_it.object_iterator);
    +
    3333  break;
    +
    3334  }
    +
    3335 
    +
    3336  case value_t::array:
    3337  {
    -
    3338  throw std::out_of_range("index out of range");
    -
    3339  }
    -
    3340 
    -
    3341  m_value.array->erase(m_value.array->begin() + static_cast<difference_type>(idx));
    -
    3342  }
    -
    3343  else
    -
    3344  {
    -
    3345  throw std::domain_error("cannot use erase() with " + type_name());
    -
    3346  }
    -
    3347  }
    +
    3338  result.m_it.array_iterator = m_value.array->erase(first.m_it.array_iterator,
    +
    3339  last.m_it.array_iterator);
    +
    3340  break;
    +
    3341  }
    +
    3342 
    +
    3343  default:
    +
    3344  {
    +
    3345  throw std::domain_error("cannot use erase with " + type_name());
    +
    3346  }
    +
    3347  }
    3348 
    -
    3366  iterator find(typename object_t::key_type key)
    -
    3367  {
    -
    3368  auto result = end();
    -
    3369 
    -
    3370  if (is_object())
    -
    3371  {
    -
    3372  result.m_it.object_iterator = m_value.object->find(key);
    -
    3373  }
    -
    3374 
    -
    3375  return result;
    -
    3376  }
    -
    3377 
    -
    3382  const_iterator find(typename object_t::key_type key) const
    -
    3383  {
    -
    3384  auto result = cend();
    -
    3385 
    -
    3386  if (is_object())
    -
    3387  {
    -
    3388  result.m_it.object_iterator = m_value.object->find(key);
    -
    3389  }
    -
    3390 
    -
    3391  return result;
    -
    3392  }
    -
    3393 
    -
    3412  size_type count(typename object_t::key_type key) const
    -
    3413  {
    -
    3414  // return 0 for all nonobject types
    -
    3415  return is_object() ? m_value.object->count(key) : 0;
    -
    3416  }
    -
    3417 
    -
    3419 
    -
    3420 
    -
    3422  // iterators //
    -
    3424 
    -
    3427 
    - -
    3447  {
    -
    3448  iterator result(this);
    -
    3449  result.set_begin();
    -
    3450  return result;
    -
    3451  }
    -
    3452 
    - -
    3457  {
    -
    3458  return cbegin();
    -
    3459  }
    -
    3460 
    - -
    3481  {
    -
    3482  const_iterator result(this);
    -
    3483  result.set_begin();
    -
    3484  return result;
    -
    3485  }
    -
    3486 
    - -
    3506  {
    -
    3507  iterator result(this);
    -
    3508  result.set_end();
    -
    3509  return result;
    -
    3510  }
    -
    3511 
    - -
    3516  {
    -
    3517  return cend();
    -
    3518  }
    -
    3519 
    - -
    3540  {
    -
    3541  const_iterator result(this);
    -
    3542  result.set_end();
    -
    3543  return result;
    -
    3544  }
    -
    3545 
    - -
    3564  {
    -
    3565  return reverse_iterator(end());
    +
    3349  return result;
    +
    3350  }
    +
    3351 
    +
    3377  size_type erase(const typename object_t::key_type& key)
    +
    3378  {
    +
    3379  // this erase only works for objects
    +
    3380  if (is_object())
    +
    3381  {
    +
    3382  return m_value.object->erase(key);
    +
    3383  }
    +
    3384  else
    +
    3385  {
    +
    3386  throw std::domain_error("cannot use erase() with " + type_name());
    +
    3387  }
    +
    3388  }
    +
    3389 
    +
    3412  void erase(const size_type idx)
    +
    3413  {
    +
    3414  // this erase only works for arrays
    +
    3415  if (is_array())
    +
    3416  {
    +
    3417  if (idx >= size())
    +
    3418  {
    +
    3419  throw std::out_of_range("index out of range");
    +
    3420  }
    +
    3421 
    +
    3422  m_value.array->erase(m_value.array->begin() + static_cast<difference_type>(idx));
    +
    3423  }
    +
    3424  else
    +
    3425  {
    +
    3426  throw std::domain_error("cannot use erase() with " + type_name());
    +
    3427  }
    +
    3428  }
    +
    3429 
    +
    3447  iterator find(typename object_t::key_type key)
    +
    3448  {
    +
    3449  auto result = end();
    +
    3450 
    +
    3451  if (is_object())
    +
    3452  {
    +
    3453  result.m_it.object_iterator = m_value.object->find(key);
    +
    3454  }
    +
    3455 
    +
    3456  return result;
    +
    3457  }
    +
    3458 
    +
    3463  const_iterator find(typename object_t::key_type key) const
    +
    3464  {
    +
    3465  auto result = cend();
    +
    3466 
    +
    3467  if (is_object())
    +
    3468  {
    +
    3469  result.m_it.object_iterator = m_value.object->find(key);
    +
    3470  }
    +
    3471 
    +
    3472  return result;
    +
    3473  }
    +
    3474 
    +
    3493  size_type count(typename object_t::key_type key) const
    +
    3494  {
    +
    3495  // return 0 for all nonobject types
    +
    3496  return is_object() ? m_value.object->count(key) : 0;
    +
    3497  }
    +
    3498 
    +
    3500 
    +
    3501 
    +
    3503  // iterators //
    +
    3505 
    +
    3508 
    + +
    3528  {
    +
    3529  iterator result(this);
    +
    3530  result.set_begin();
    +
    3531  return result;
    +
    3532  }
    +
    3533 
    + +
    3538  {
    +
    3539  return cbegin();
    +
    3540  }
    +
    3541 
    + +
    3562  {
    +
    3563  const_iterator result(this);
    +
    3564  result.set_begin();
    +
    3565  return result;
    3566  }
    3567 
    - -
    3572  {
    -
    3573  return crbegin();
    -
    3574  }
    -
    3575 
    - -
    3595  {
    -
    3596  return reverse_iterator(begin());
    -
    3597  }
    -
    3598 
    - -
    3603  {
    -
    3604  return crend();
    -
    3605  }
    -
    3606 
    - -
    3626  {
    -
    3627  return const_reverse_iterator(cend());
    -
    3628  }
    -
    3629 
    - -
    3649  {
    -
    3650  return const_reverse_iterator(cbegin());
    -
    3651  }
    -
    3652 
    -
    3654 
    -
    3655 
    -
    3657  // capacity //
    -
    3659 
    -
    3662 
    -
    3692  bool empty() const noexcept
    -
    3693  {
    -
    3694  switch (m_type)
    -
    3695  {
    -
    3696  case value_t::null:
    -
    3697  {
    -
    3698  // null values are empty
    -
    3699  return true;
    -
    3700  }
    -
    3701 
    -
    3702  case value_t::array:
    -
    3703  {
    -
    3704  return m_value.array->empty();
    -
    3705  }
    -
    3706 
    -
    3707  case value_t::object:
    -
    3708  {
    -
    3709  return m_value.object->empty();
    -
    3710  }
    -
    3711 
    -
    3712  default:
    -
    3713  {
    -
    3714  // all other types are nonempty
    -
    3715  return false;
    -
    3716  }
    -
    3717  }
    -
    3718  }
    -
    3719 
    -
    3749  size_type size() const noexcept
    -
    3750  {
    -
    3751  switch (m_type)
    -
    3752  {
    -
    3753  case value_t::null:
    -
    3754  {
    -
    3755  // null values are empty
    -
    3756  return 0;
    -
    3757  }
    -
    3758 
    -
    3759  case value_t::array:
    -
    3760  {
    -
    3761  return m_value.array->size();
    -
    3762  }
    -
    3763 
    -
    3764  case value_t::object:
    -
    3765  {
    -
    3766  return m_value.object->size();
    -
    3767  }
    -
    3768 
    -
    3769  default:
    -
    3770  {
    -
    3771  // all other types have size 1
    -
    3772  return 1;
    -
    3773  }
    -
    3774  }
    -
    3775  }
    -
    3776 
    -
    3809  size_type max_size() const noexcept
    -
    3810  {
    -
    3811  switch (m_type)
    -
    3812  {
    -
    3813  case value_t::array:
    -
    3814  {
    -
    3815  return m_value.array->max_size();
    -
    3816  }
    -
    3817 
    -
    3818  case value_t::object:
    -
    3819  {
    -
    3820  return m_value.object->max_size();
    -
    3821  }
    -
    3822 
    -
    3823  default:
    -
    3824  {
    -
    3825  // all other types have max_size() == size()
    -
    3826  return size();
    -
    3827  }
    -
    3828  }
    -
    3829  }
    -
    3830 
    -
    3832 
    -
    3833 
    -
    3835  // modifiers //
    -
    3837 
    -
    3840 
    -
    3866  void clear() noexcept
    -
    3867  {
    -
    3868  switch (m_type)
    -
    3869  {
    - -
    3871  {
    -
    3872  m_value.number_integer = 0;
    -
    3873  break;
    -
    3874  }
    -
    3875 
    -
    3876  case value_t::number_float:
    -
    3877  {
    -
    3878  m_value.number_float = 0.0;
    -
    3879  break;
    -
    3880  }
    -
    3881 
    -
    3882  case value_t::boolean:
    -
    3883  {
    -
    3884  m_value.boolean = false;
    -
    3885  break;
    -
    3886  }
    -
    3887 
    -
    3888  case value_t::string:
    -
    3889  {
    -
    3890  m_value.string->clear();
    -
    3891  break;
    -
    3892  }
    -
    3893 
    + +
    3587  {
    +
    3588  iterator result(this);
    +
    3589  result.set_end();
    +
    3590  return result;
    +
    3591  }
    +
    3592 
    + +
    3597  {
    +
    3598  return cend();
    +
    3599  }
    +
    3600 
    + +
    3621  {
    +
    3622  const_iterator result(this);
    +
    3623  result.set_end();
    +
    3624  return result;
    +
    3625  }
    +
    3626 
    + +
    3645  {
    +
    3646  return reverse_iterator(end());
    +
    3647  }
    +
    3648 
    + +
    3653  {
    +
    3654  return crbegin();
    +
    3655  }
    +
    3656 
    + +
    3676  {
    +
    3677  return reverse_iterator(begin());
    +
    3678  }
    +
    3679 
    + +
    3684  {
    +
    3685  return crend();
    +
    3686  }
    +
    3687 
    + +
    3707  {
    +
    3708  return const_reverse_iterator(cend());
    +
    3709  }
    +
    3710 
    + +
    3730  {
    +
    3731  return const_reverse_iterator(cbegin());
    +
    3732  }
    +
    3733 
    +
    3735 
    +
    3736 
    +
    3738  // capacity //
    +
    3740 
    +
    3743 
    +
    3773  bool empty() const noexcept
    +
    3774  {
    +
    3775  switch (m_type)
    +
    3776  {
    +
    3777  case value_t::null:
    +
    3778  {
    +
    3779  // null values are empty
    +
    3780  return true;
    +
    3781  }
    +
    3782 
    +
    3783  case value_t::array:
    +
    3784  {
    +
    3785  return m_value.array->empty();
    +
    3786  }
    +
    3787 
    +
    3788  case value_t::object:
    +
    3789  {
    +
    3790  return m_value.object->empty();
    +
    3791  }
    +
    3792 
    +
    3793  default:
    +
    3794  {
    +
    3795  // all other types are nonempty
    +
    3796  return false;
    +
    3797  }
    +
    3798  }
    +
    3799  }
    +
    3800 
    +
    3830  size_type size() const noexcept
    +
    3831  {
    +
    3832  switch (m_type)
    +
    3833  {
    +
    3834  case value_t::null:
    +
    3835  {
    +
    3836  // null values are empty
    +
    3837  return 0;
    +
    3838  }
    +
    3839 
    +
    3840  case value_t::array:
    +
    3841  {
    +
    3842  return m_value.array->size();
    +
    3843  }
    +
    3844 
    +
    3845  case value_t::object:
    +
    3846  {
    +
    3847  return m_value.object->size();
    +
    3848  }
    +
    3849 
    +
    3850  default:
    +
    3851  {
    +
    3852  // all other types have size 1
    +
    3853  return 1;
    +
    3854  }
    +
    3855  }
    +
    3856  }
    +
    3857 
    +
    3890  size_type max_size() const noexcept
    +
    3891  {
    +
    3892  switch (m_type)
    +
    3893  {
    3894  case value_t::array:
    3895  {
    -
    3896  m_value.array->clear();
    -
    3897  break;
    -
    3898  }
    -
    3899 
    -
    3900  case value_t::object:
    -
    3901  {
    -
    3902  m_value.object->clear();
    -
    3903  break;
    -
    3904  }
    -
    3905 
    -
    3906  default:
    -
    3907  {
    -
    3908  break;
    -
    3909  }
    -
    3910  }
    -
    3911  }
    -
    3912 
    -
    3932  void push_back(basic_json&& val)
    -
    3933  {
    -
    3934  // push_back only works for null objects or arrays
    -
    3935  if (not(is_null() or is_array()))
    -
    3936  {
    -
    3937  throw std::domain_error("cannot use push_back() with " + type_name());
    -
    3938  }
    -
    3939 
    -
    3940  // transform null object into an array
    -
    3941  if (is_null())
    -
    3942  {
    -
    3943  m_type = value_t::array;
    -
    3944  m_value = value_t::array;
    -
    3945  }
    -
    3946 
    -
    3947  // add element to array (move semantics)
    -
    3948  m_value.array->push_back(std::move(val));
    -
    3949  // invalidate object
    -
    3950  val.m_type = value_t::null;
    -
    3951  }
    -
    3952 
    -
    3957  reference operator+=(basic_json&& val)
    -
    3958  {
    -
    3959  push_back(std::move(val));
    -
    3960  return *this;
    -
    3961  }
    +
    3896  return m_value.array->max_size();
    +
    3897  }
    +
    3898 
    +
    3899  case value_t::object:
    +
    3900  {
    +
    3901  return m_value.object->max_size();
    +
    3902  }
    +
    3903 
    +
    3904  default:
    +
    3905  {
    +
    3906  // all other types have max_size() == size()
    +
    3907  return size();
    +
    3908  }
    +
    3909  }
    +
    3910  }
    +
    3911 
    +
    3913 
    +
    3914 
    +
    3916  // modifiers //
    +
    3918 
    +
    3921 
    +
    3947  void clear() noexcept
    +
    3948  {
    +
    3949  switch (m_type)
    +
    3950  {
    + +
    3952  {
    +
    3953  m_value.number_integer = 0;
    +
    3954  break;
    +
    3955  }
    +
    3956 
    +
    3957  case value_t::number_float:
    +
    3958  {
    +
    3959  m_value.number_float = 0.0;
    +
    3960  break;
    +
    3961  }
    3962 
    -
    3967  void push_back(const basic_json& val)
    -
    3968  {
    -
    3969  // push_back only works for null objects or arrays
    -
    3970  if (not(is_null() or is_array()))
    -
    3971  {
    -
    3972  throw std::domain_error("cannot use push_back() with " + type_name());
    -
    3973  }
    +
    3963  case value_t::boolean:
    +
    3964  {
    +
    3965  m_value.boolean = false;
    +
    3966  break;
    +
    3967  }
    +
    3968 
    +
    3969  case value_t::string:
    +
    3970  {
    +
    3971  m_value.string->clear();
    +
    3972  break;
    +
    3973  }
    3974 
    -
    3975  // transform null object into an array
    -
    3976  if (is_null())
    -
    3977  {
    -
    3978  m_type = value_t::array;
    -
    3979  m_value = value_t::array;
    -
    3980  }
    -
    3981 
    -
    3982  // add element to array
    -
    3983  m_value.array->push_back(val);
    -
    3984  }
    -
    3985 
    -
    3990  reference operator+=(const basic_json& val)
    -
    3991  {
    -
    3992  push_back(val);
    -
    3993  return *this;
    -
    3994  }
    -
    3995 
    -
    4016  void push_back(const typename object_t::value_type& val)
    -
    4017  {
    -
    4018  // push_back only works for null objects or objects
    -
    4019  if (not(is_null() or is_object()))
    -
    4020  {
    -
    4021  throw std::domain_error("cannot use push_back() with " + type_name());
    -
    4022  }
    -
    4023 
    -
    4024  // transform null object into an object
    -
    4025  if (is_null())
    -
    4026  {
    -
    4027  m_type = value_t::object;
    -
    4028  m_value = value_t::object;
    -
    4029  }
    -
    4030 
    -
    4031  // add element to array
    -
    4032  m_value.object->insert(val);
    -
    4033  }
    -
    4034 
    -
    4039  reference operator+=(const typename object_t::value_type& val)
    -
    4040  {
    -
    4041  push_back(val);
    -
    4042  return operator[](val.first);
    -
    4043  }
    -
    4044 
    -
    4065  iterator insert(const_iterator pos, const basic_json& val)
    -
    4066  {
    -
    4067  // insert only works for arrays
    -
    4068  if (is_array())
    -
    4069  {
    -
    4070  // check if iterator pos fits to this JSON value
    -
    4071  if (pos.m_object != this)
    -
    4072  {
    -
    4073  throw std::domain_error("iterator does not fit current value");
    -
    4074  }
    -
    4075 
    -
    4076  // insert to array and return iterator
    -
    4077  iterator result(this);
    -
    4078  result.m_it.array_iterator = m_value.array->insert(pos.m_it.array_iterator, val);
    -
    4079  return result;
    -
    4080  }
    -
    4081  else
    -
    4082  {
    -
    4083  throw std::domain_error("cannot use insert() with " + type_name());
    -
    4084  }
    -
    4085  }
    -
    4086 
    -
    4091  iterator insert(const_iterator pos, basic_json&& val)
    -
    4092  {
    -
    4093  return insert(pos, val);
    -
    4094  }
    -
    4095 
    -
    4118  iterator insert(const_iterator pos, size_type cnt, const basic_json& val)
    -
    4119  {
    -
    4120  // insert only works for arrays
    -
    4121  if (is_array())
    -
    4122  {
    -
    4123  // check if iterator pos fits to this JSON value
    -
    4124  if (pos.m_object != this)
    -
    4125  {
    -
    4126  throw std::domain_error("iterator does not fit current value");
    -
    4127  }
    -
    4128 
    -
    4129  // insert to array and return iterator
    -
    4130  iterator result(this);
    -
    4131  result.m_it.array_iterator = m_value.array->insert(pos.m_it.array_iterator, cnt, val);
    -
    4132  return result;
    -
    4133  }
    -
    4134  else
    -
    4135  {
    -
    4136  throw std::domain_error("cannot use insert() with " + type_name());
    -
    4137  }
    -
    4138  }
    -
    4139 
    - -
    4167  {
    -
    4168  // insert only works for arrays
    -
    4169  if (not is_array())
    -
    4170  {
    -
    4171  throw std::domain_error("cannot use insert() with " + type_name());
    -
    4172  }
    -
    4173 
    -
    4174  // check if iterator pos fits to this JSON value
    -
    4175  if (pos.m_object != this)
    -
    4176  {
    -
    4177  throw std::domain_error("iterator does not fit current value");
    -
    4178  }
    -
    4179 
    -
    4180  if (first.m_object != last.m_object)
    -
    4181  {
    -
    4182  throw std::domain_error("iterators do not fit");
    -
    4183  }
    -
    4184 
    -
    4185  if (first.m_object == this or last.m_object == this)
    -
    4186  {
    -
    4187  throw std::domain_error("passed iterators may not belong to container");
    -
    4188  }
    -
    4189 
    -
    4190  // insert to array and return iterator
    -
    4191  iterator result(this);
    -
    4192  result.m_it.array_iterator = m_value.array->insert(
    -
    4193  pos.m_it.array_iterator,
    -
    4194  first.m_it.array_iterator,
    -
    4195  last.m_it.array_iterator);
    -
    4196  return result;
    -
    4197  }
    -
    4198 
    -
    4220  iterator insert(const_iterator pos, std::initializer_list<basic_json> ilist)
    -
    4221  {
    -
    4222  // insert only works for arrays
    -
    4223  if (not is_array())
    -
    4224  {
    -
    4225  throw std::domain_error("cannot use insert() with " + type_name());
    -
    4226  }
    -
    4227 
    -
    4228  // check if iterator pos fits to this JSON value
    -
    4229  if (pos.m_object != this)
    -
    4230  {
    -
    4231  throw std::domain_error("iterator does not fit current value");
    -
    4232  }
    -
    4233 
    -
    4234  // insert to array and return iterator
    -
    4235  iterator result(this);
    -
    4236  result.m_it.array_iterator = m_value.array->insert(pos.m_it.array_iterator, ilist);
    -
    4237  return result;
    -
    4238  }
    -
    4239 
    -
    4257  void swap(reference other) noexcept (
    -
    4258  std::is_nothrow_move_constructible<value_t>::value and
    -
    4259  std::is_nothrow_move_assignable<value_t>::value and
    -
    4260  std::is_nothrow_move_constructible<json_value>::value and
    -
    4261  std::is_nothrow_move_assignable<json_value>::value
    -
    4262  )
    -
    4263  {
    -
    4264  std::swap(m_type, other.m_type);
    -
    4265  std::swap(m_value, other.m_value);
    -
    4266  }
    -
    4267 
    -
    4287  void swap(array_t& other)
    -
    4288  {
    -
    4289  // swap only works for arrays
    -
    4290  if (is_array())
    -
    4291  {
    -
    4292  std::swap(*(m_value.array), other);
    -
    4293  }
    -
    4294  else
    -
    4295  {
    -
    4296  throw std::domain_error("cannot use swap() with " + type_name());
    -
    4297  }
    -
    4298  }
    -
    4299 
    -
    4319  void swap(object_t& other)
    -
    4320  {
    -
    4321  // swap only works for objects
    -
    4322  if (is_object())
    -
    4323  {
    -
    4324  std::swap(*(m_value.object), other);
    -
    4325  }
    -
    4326  else
    -
    4327  {
    -
    4328  throw std::domain_error("cannot use swap() with " + type_name());
    -
    4329  }
    -
    4330  }
    -
    4331 
    -
    4351  void swap(string_t& other)
    -
    4352  {
    -
    4353  // swap only works for strings
    -
    4354  if (is_string())
    -
    4355  {
    -
    4356  std::swap(*(m_value.string), other);
    -
    4357  }
    -
    4358  else
    -
    4359  {
    -
    4360  throw std::domain_error("cannot use swap() with " + type_name());
    -
    4361  }
    -
    4362  }
    -
    4363 
    -
    4365 
    -
    4366 
    -
    4368  // lexicographical comparison operators //
    -
    4370 
    -
    4373 
    -
    4374  private:
    -
    4384  friend bool operator<(const value_t lhs, const value_t rhs)
    -
    4385  {
    -
    4386  static constexpr std::array<uint8_t, 7> order = {{
    -
    4387  0, // null
    -
    4388  3, // object
    -
    4389  4, // array
    -
    4390  5, // string
    -
    4391  1, // boolean
    -
    4392  2, // integer
    -
    4393  2 // float
    -
    4394  }
    -
    4395  };
    -
    4396 
    -
    4397  // discarded values are not comparable
    -
    4398  if (lhs == value_t::discarded or rhs == value_t::discarded)
    -
    4399  {
    -
    4400  return false;
    -
    4401  }
    -
    4402 
    -
    4403  return order[static_cast<std::size_t>(lhs)] < order[static_cast<std::size_t>(rhs)];
    -
    4404  }
    -
    4405 
    -
    4406  public:
    -
    4430  friend bool operator==(const_reference lhs, const_reference rhs) noexcept
    -
    4431  {
    -
    4432  const auto lhs_type = lhs.type();
    -
    4433  const auto rhs_type = rhs.type();
    -
    4434 
    -
    4435  if (lhs_type == rhs_type)
    +
    3975  case value_t::array:
    +
    3976  {
    +
    3977  m_value.array->clear();
    +
    3978  break;
    +
    3979  }
    +
    3980 
    +
    3981  case value_t::object:
    +
    3982  {
    +
    3983  m_value.object->clear();
    +
    3984  break;
    +
    3985  }
    +
    3986 
    +
    3987  default:
    +
    3988  {
    +
    3989  break;
    +
    3990  }
    +
    3991  }
    +
    3992  }
    +
    3993 
    +
    4013  void push_back(basic_json&& val)
    +
    4014  {
    +
    4015  // push_back only works for null objects or arrays
    +
    4016  if (not(is_null() or is_array()))
    +
    4017  {
    +
    4018  throw std::domain_error("cannot use push_back() with " + type_name());
    +
    4019  }
    +
    4020 
    +
    4021  // transform null object into an array
    +
    4022  if (is_null())
    +
    4023  {
    +
    4024  m_type = value_t::array;
    +
    4025  m_value = value_t::array;
    +
    4026  }
    +
    4027 
    +
    4028  // add element to array (move semantics)
    +
    4029  m_value.array->push_back(std::move(val));
    +
    4030  // invalidate object
    +
    4031  val.m_type = value_t::null;
    +
    4032  }
    +
    4033 
    +
    4038  reference operator+=(basic_json&& val)
    +
    4039  {
    +
    4040  push_back(std::move(val));
    +
    4041  return *this;
    +
    4042  }
    +
    4043 
    +
    4048  void push_back(const basic_json& val)
    +
    4049  {
    +
    4050  // push_back only works for null objects or arrays
    +
    4051  if (not(is_null() or is_array()))
    +
    4052  {
    +
    4053  throw std::domain_error("cannot use push_back() with " + type_name());
    +
    4054  }
    +
    4055 
    +
    4056  // transform null object into an array
    +
    4057  if (is_null())
    +
    4058  {
    +
    4059  m_type = value_t::array;
    +
    4060  m_value = value_t::array;
    +
    4061  }
    +
    4062 
    +
    4063  // add element to array
    +
    4064  m_value.array->push_back(val);
    +
    4065  }
    +
    4066 
    +
    4071  reference operator+=(const basic_json& val)
    +
    4072  {
    +
    4073  push_back(val);
    +
    4074  return *this;
    +
    4075  }
    +
    4076 
    +
    4097  void push_back(const typename object_t::value_type& val)
    +
    4098  {
    +
    4099  // push_back only works for null objects or objects
    +
    4100  if (not(is_null() or is_object()))
    +
    4101  {
    +
    4102  throw std::domain_error("cannot use push_back() with " + type_name());
    +
    4103  }
    +
    4104 
    +
    4105  // transform null object into an object
    +
    4106  if (is_null())
    +
    4107  {
    +
    4108  m_type = value_t::object;
    +
    4109  m_value = value_t::object;
    +
    4110  }
    +
    4111 
    +
    4112  // add element to array
    +
    4113  m_value.object->insert(val);
    +
    4114  }
    +
    4115 
    +
    4120  reference operator+=(const typename object_t::value_type& val)
    +
    4121  {
    +
    4122  push_back(val);
    +
    4123  return operator[](val.first);
    +
    4124  }
    +
    4125 
    +
    4146  iterator insert(const_iterator pos, const basic_json& val)
    +
    4147  {
    +
    4148  // insert only works for arrays
    +
    4149  if (is_array())
    +
    4150  {
    +
    4151  // check if iterator pos fits to this JSON value
    +
    4152  if (pos.m_object != this)
    +
    4153  {
    +
    4154  throw std::domain_error("iterator does not fit current value");
    +
    4155  }
    +
    4156 
    +
    4157  // insert to array and return iterator
    +
    4158  iterator result(this);
    +
    4159  result.m_it.array_iterator = m_value.array->insert(pos.m_it.array_iterator, val);
    +
    4160  return result;
    +
    4161  }
    +
    4162  else
    +
    4163  {
    +
    4164  throw std::domain_error("cannot use insert() with " + type_name());
    +
    4165  }
    +
    4166  }
    +
    4167 
    +
    4172  iterator insert(const_iterator pos, basic_json&& val)
    +
    4173  {
    +
    4174  return insert(pos, val);
    +
    4175  }
    +
    4176 
    +
    4199  iterator insert(const_iterator pos, size_type cnt, const basic_json& val)
    +
    4200  {
    +
    4201  // insert only works for arrays
    +
    4202  if (is_array())
    +
    4203  {
    +
    4204  // check if iterator pos fits to this JSON value
    +
    4205  if (pos.m_object != this)
    +
    4206  {
    +
    4207  throw std::domain_error("iterator does not fit current value");
    +
    4208  }
    +
    4209 
    +
    4210  // insert to array and return iterator
    +
    4211  iterator result(this);
    +
    4212  result.m_it.array_iterator = m_value.array->insert(pos.m_it.array_iterator, cnt, val);
    +
    4213  return result;
    +
    4214  }
    +
    4215  else
    +
    4216  {
    +
    4217  throw std::domain_error("cannot use insert() with " + type_name());
    +
    4218  }
    +
    4219  }
    +
    4220 
    + +
    4248  {
    +
    4249  // insert only works for arrays
    +
    4250  if (not is_array())
    +
    4251  {
    +
    4252  throw std::domain_error("cannot use insert() with " + type_name());
    +
    4253  }
    +
    4254 
    +
    4255  // check if iterator pos fits to this JSON value
    +
    4256  if (pos.m_object != this)
    +
    4257  {
    +
    4258  throw std::domain_error("iterator does not fit current value");
    +
    4259  }
    +
    4260 
    +
    4261  if (first.m_object != last.m_object)
    +
    4262  {
    +
    4263  throw std::domain_error("iterators do not fit");
    +
    4264  }
    +
    4265 
    +
    4266  if (first.m_object == this or last.m_object == this)
    +
    4267  {
    +
    4268  throw std::domain_error("passed iterators may not belong to container");
    +
    4269  }
    +
    4270 
    +
    4271  // insert to array and return iterator
    +
    4272  iterator result(this);
    +
    4273  result.m_it.array_iterator = m_value.array->insert(
    +
    4274  pos.m_it.array_iterator,
    +
    4275  first.m_it.array_iterator,
    +
    4276  last.m_it.array_iterator);
    +
    4277  return result;
    +
    4278  }
    +
    4279 
    +
    4301  iterator insert(const_iterator pos, std::initializer_list<basic_json> ilist)
    +
    4302  {
    +
    4303  // insert only works for arrays
    +
    4304  if (not is_array())
    +
    4305  {
    +
    4306  throw std::domain_error("cannot use insert() with " + type_name());
    +
    4307  }
    +
    4308 
    +
    4309  // check if iterator pos fits to this JSON value
    +
    4310  if (pos.m_object != this)
    +
    4311  {
    +
    4312  throw std::domain_error("iterator does not fit current value");
    +
    4313  }
    +
    4314 
    +
    4315  // insert to array and return iterator
    +
    4316  iterator result(this);
    +
    4317  result.m_it.array_iterator = m_value.array->insert(pos.m_it.array_iterator, ilist);
    +
    4318  return result;
    +
    4319  }
    +
    4320 
    +
    4338  void swap(reference other) noexcept (
    +
    4339  std::is_nothrow_move_constructible<value_t>::value and
    +
    4340  std::is_nothrow_move_assignable<value_t>::value and
    +
    4341  std::is_nothrow_move_constructible<json_value>::value and
    +
    4342  std::is_nothrow_move_assignable<json_value>::value
    +
    4343  )
    +
    4344  {
    +
    4345  std::swap(m_type, other.m_type);
    +
    4346  std::swap(m_value, other.m_value);
    +
    4347  }
    +
    4348 
    +
    4368  void swap(array_t& other)
    +
    4369  {
    +
    4370  // swap only works for arrays
    +
    4371  if (is_array())
    +
    4372  {
    +
    4373  std::swap(*(m_value.array), other);
    +
    4374  }
    +
    4375  else
    +
    4376  {
    +
    4377  throw std::domain_error("cannot use swap() with " + type_name());
    +
    4378  }
    +
    4379  }
    +
    4380 
    +
    4400  void swap(object_t& other)
    +
    4401  {
    +
    4402  // swap only works for objects
    +
    4403  if (is_object())
    +
    4404  {
    +
    4405  std::swap(*(m_value.object), other);
    +
    4406  }
    +
    4407  else
    +
    4408  {
    +
    4409  throw std::domain_error("cannot use swap() with " + type_name());
    +
    4410  }
    +
    4411  }
    +
    4412 
    +
    4432  void swap(string_t& other)
    +
    4433  {
    +
    4434  // swap only works for strings
    +
    4435  if (is_string())
    4436  {
    -
    4437  switch (lhs_type)
    -
    4438  {
    -
    4439  case value_t::array:
    -
    4440  return *lhs.m_value.array == *rhs.m_value.array;
    -
    4441  case value_t::object:
    -
    4442  return *lhs.m_value.object == *rhs.m_value.object;
    -
    4443  case value_t::null:
    -
    4444  return true;
    -
    4445  case value_t::string:
    -
    4446  return *lhs.m_value.string == *rhs.m_value.string;
    -
    4447  case value_t::boolean:
    -
    4448  return lhs.m_value.boolean == rhs.m_value.boolean;
    - -
    4450  return lhs.m_value.number_integer == rhs.m_value.number_integer;
    -
    4451  case value_t::number_float:
    -
    4452  return approx(lhs.m_value.number_float, rhs.m_value.number_float);
    -
    4453  default:
    -
    4454  return false;
    -
    4455  }
    -
    4456  }
    -
    4457  else if (lhs_type == value_t::number_integer and rhs_type == value_t::number_float)
    -
    4458  {
    -
    4459  return approx(static_cast<number_float_t>(lhs.m_value.number_integer),
    -
    4460  rhs.m_value.number_float);
    -
    4461  }
    -
    4462  else if (lhs_type == value_t::number_float and rhs_type == value_t::number_integer)
    -
    4463  {
    -
    4464  return approx(lhs.m_value.number_float,
    -
    4465  static_cast<number_float_t>(rhs.m_value.number_integer));
    -
    4466  }
    -
    4467  return false;
    -
    4468  }
    -
    4469 
    -
    4488  friend bool operator==(const_reference v, std::nullptr_t) noexcept
    -
    4489  {
    -
    4490  return v.is_null();
    -
    4491  }
    -
    4492 
    -
    4497  friend bool operator==(std::nullptr_t, const_reference v) noexcept
    -
    4498  {
    -
    4499  return v.is_null();
    -
    4500  }
    -
    4501 
    -
    4518  friend bool operator!=(const_reference lhs, const_reference rhs) noexcept
    -
    4519  {
    -
    4520  return not (lhs == rhs);
    -
    4521  }
    -
    4522 
    -
    4541  friend bool operator!=(const_reference v, std::nullptr_t) noexcept
    -
    4542  {
    -
    4543  return not v.is_null();
    -
    4544  }
    -
    4545 
    -
    4550  friend bool operator!=(std::nullptr_t, const_reference v) noexcept
    -
    4551  {
    -
    4552  return not v.is_null();
    -
    4553  }
    -
    4554 
    -
    4579  friend bool operator<(const_reference lhs, const_reference rhs) noexcept
    -
    4580  {
    -
    4581  const auto lhs_type = lhs.type();
    -
    4582  const auto rhs_type = rhs.type();
    -
    4583 
    -
    4584  if (lhs_type == rhs_type)
    -
    4585  {
    -
    4586  switch (lhs_type)
    -
    4587  {
    -
    4588  case value_t::array:
    -
    4589  return *lhs.m_value.array < *rhs.m_value.array;
    -
    4590  case value_t::object:
    -
    4591  return *lhs.m_value.object < *rhs.m_value.object;
    -
    4592  case value_t::null:
    -
    4593  return false;
    -
    4594  case value_t::string:
    -
    4595  return *lhs.m_value.string < *rhs.m_value.string;
    -
    4596  case value_t::boolean:
    -
    4597  return lhs.m_value.boolean < rhs.m_value.boolean;
    - -
    4599  return lhs.m_value.number_integer < rhs.m_value.number_integer;
    -
    4600  case value_t::number_float:
    -
    4601  return lhs.m_value.number_float < rhs.m_value.number_float;
    -
    4602  default:
    -
    4603  return false;
    -
    4604  }
    -
    4605  }
    -
    4606  else if (lhs_type == value_t::number_integer and rhs_type == value_t::number_float)
    -
    4607  {
    -
    4608  return static_cast<number_float_t>(lhs.m_value.number_integer) <
    -
    4609  rhs.m_value.number_float;
    -
    4610  }
    -
    4611  else if (lhs_type == value_t::number_float and rhs_type == value_t::number_integer)
    -
    4612  {
    -
    4613  return lhs.m_value.number_float <
    -
    4614  static_cast<number_float_t>(rhs.m_value.number_integer);
    -
    4615  }
    -
    4616 
    -
    4617  // We only reach this line if we cannot compare values. In that case,
    -
    4618  // we compare types. Note we have to call the operator explicitly,
    -
    4619  // because MSVC has problems otherwise.
    -
    4620  return operator<(lhs_type, rhs_type);
    -
    4621  }
    -
    4622 
    -
    4640  friend bool operator<=(const_reference lhs, const_reference rhs) noexcept
    -
    4641  {
    -
    4642  return not (rhs < lhs);
    -
    4643  }
    -
    4644 
    -
    4662  friend bool operator>(const_reference lhs, const_reference rhs) noexcept
    -
    4663  {
    -
    4664  return not (lhs <= rhs);
    -
    4665  }
    -
    4666 
    -
    4684  friend bool operator>=(const_reference lhs, const_reference rhs) noexcept
    -
    4685  {
    -
    4686  return not (lhs < rhs);
    -
    4687  }
    -
    4688 
    -
    4690 
    -
    4691 
    -
    4693  // serialization //
    -
    4695 
    -
    4698 
    -
    4721  friend std::ostream& operator<<(std::ostream& o, const basic_json& j)
    +
    4437  std::swap(*(m_value.string), other);
    +
    4438  }
    +
    4439  else
    +
    4440  {
    +
    4441  throw std::domain_error("cannot use swap() with " + type_name());
    +
    4442  }
    +
    4443  }
    +
    4444 
    +
    4446 
    +
    4447 
    +
    4449  // lexicographical comparison operators //
    +
    4451 
    +
    4454 
    +
    4455  private:
    +
    4465  friend bool operator<(const value_t lhs, const value_t rhs)
    +
    4466  {
    +
    4467  static constexpr std::array<uint8_t, 7> order = {{
    +
    4468  0, // null
    +
    4469  3, // object
    +
    4470  4, // array
    +
    4471  5, // string
    +
    4472  1, // boolean
    +
    4473  2, // integer
    +
    4474  2 // float
    +
    4475  }
    +
    4476  };
    +
    4477 
    +
    4478  // discarded values are not comparable
    +
    4479  if (lhs == value_t::discarded or rhs == value_t::discarded)
    +
    4480  {
    +
    4481  return false;
    +
    4482  }
    +
    4483 
    +
    4484  return order[static_cast<std::size_t>(lhs)] < order[static_cast<std::size_t>(rhs)];
    +
    4485  }
    +
    4486 
    +
    4487  public:
    +
    4511  friend bool operator==(const_reference lhs, const_reference rhs) noexcept
    +
    4512  {
    +
    4513  const auto lhs_type = lhs.type();
    +
    4514  const auto rhs_type = rhs.type();
    +
    4515 
    +
    4516  if (lhs_type == rhs_type)
    +
    4517  {
    +
    4518  switch (lhs_type)
    +
    4519  {
    +
    4520  case value_t::array:
    +
    4521  return *lhs.m_value.array == *rhs.m_value.array;
    +
    4522  case value_t::object:
    +
    4523  return *lhs.m_value.object == *rhs.m_value.object;
    +
    4524  case value_t::null:
    +
    4525  return true;
    +
    4526  case value_t::string:
    +
    4527  return *lhs.m_value.string == *rhs.m_value.string;
    +
    4528  case value_t::boolean:
    +
    4529  return lhs.m_value.boolean == rhs.m_value.boolean;
    + +
    4531  return lhs.m_value.number_integer == rhs.m_value.number_integer;
    +
    4532  case value_t::number_float:
    +
    4533  return approx(lhs.m_value.number_float, rhs.m_value.number_float);
    +
    4534  default:
    +
    4535  return false;
    +
    4536  }
    +
    4537  }
    +
    4538  else if (lhs_type == value_t::number_integer and rhs_type == value_t::number_float)
    +
    4539  {
    +
    4540  return approx(static_cast<number_float_t>(lhs.m_value.number_integer),
    +
    4541  rhs.m_value.number_float);
    +
    4542  }
    +
    4543  else if (lhs_type == value_t::number_float and rhs_type == value_t::number_integer)
    +
    4544  {
    +
    4545  return approx(lhs.m_value.number_float,
    +
    4546  static_cast<number_float_t>(rhs.m_value.number_integer));
    +
    4547  }
    +
    4548  return false;
    +
    4549  }
    +
    4550 
    +
    4569  friend bool operator==(const_reference v, std::nullptr_t) noexcept
    +
    4570  {
    +
    4571  return v.is_null();
    +
    4572  }
    +
    4573 
    +
    4578  friend bool operator==(std::nullptr_t, const_reference v) noexcept
    +
    4579  {
    +
    4580  return v.is_null();
    +
    4581  }
    +
    4582 
    +
    4599  friend bool operator!=(const_reference lhs, const_reference rhs) noexcept
    +
    4600  {
    +
    4601  return not (lhs == rhs);
    +
    4602  }
    +
    4603 
    +
    4622  friend bool operator!=(const_reference v, std::nullptr_t) noexcept
    +
    4623  {
    +
    4624  return not v.is_null();
    +
    4625  }
    +
    4626 
    +
    4631  friend bool operator!=(std::nullptr_t, const_reference v) noexcept
    +
    4632  {
    +
    4633  return not v.is_null();
    +
    4634  }
    +
    4635 
    +
    4660  friend bool operator<(const_reference lhs, const_reference rhs) noexcept
    +
    4661  {
    +
    4662  const auto lhs_type = lhs.type();
    +
    4663  const auto rhs_type = rhs.type();
    +
    4664 
    +
    4665  if (lhs_type == rhs_type)
    +
    4666  {
    +
    4667  switch (lhs_type)
    +
    4668  {
    +
    4669  case value_t::array:
    +
    4670  return *lhs.m_value.array < *rhs.m_value.array;
    +
    4671  case value_t::object:
    +
    4672  return *lhs.m_value.object < *rhs.m_value.object;
    +
    4673  case value_t::null:
    +
    4674  return false;
    +
    4675  case value_t::string:
    +
    4676  return *lhs.m_value.string < *rhs.m_value.string;
    +
    4677  case value_t::boolean:
    +
    4678  return lhs.m_value.boolean < rhs.m_value.boolean;
    + +
    4680  return lhs.m_value.number_integer < rhs.m_value.number_integer;
    +
    4681  case value_t::number_float:
    +
    4682  return lhs.m_value.number_float < rhs.m_value.number_float;
    +
    4683  default:
    +
    4684  return false;
    +
    4685  }
    +
    4686  }
    +
    4687  else if (lhs_type == value_t::number_integer and rhs_type == value_t::number_float)
    +
    4688  {
    +
    4689  return static_cast<number_float_t>(lhs.m_value.number_integer) <
    +
    4690  rhs.m_value.number_float;
    +
    4691  }
    +
    4692  else if (lhs_type == value_t::number_float and rhs_type == value_t::number_integer)
    +
    4693  {
    +
    4694  return lhs.m_value.number_float <
    +
    4695  static_cast<number_float_t>(rhs.m_value.number_integer);
    +
    4696  }
    +
    4697 
    +
    4698  // We only reach this line if we cannot compare values. In that case,
    +
    4699  // we compare types. Note we have to call the operator explicitly,
    +
    4700  // because MSVC has problems otherwise.
    +
    4701  return operator<(lhs_type, rhs_type);
    +
    4702  }
    +
    4703 
    +
    4721  friend bool operator<=(const_reference lhs, const_reference rhs) noexcept
    4722  {
    -
    4723  // read width member and use it as indentation parameter if nonzero
    -
    4724  const bool pretty_print = (o.width() > 0);
    -
    4725  const auto indentation = (pretty_print ? o.width() : 0);
    -
    4726 
    -
    4727  // reset width to 0 for subsequent calls to this stream
    -
    4728  o.width(0);
    -
    4729 
    -
    4730  // do the actual serialization
    -
    4731  j.dump(o, pretty_print, static_cast<unsigned int>(indentation));
    -
    4732  return o;
    -
    4733  }
    -
    4734 
    -
    4739  friend std::ostream& operator>>(const basic_json& j, std::ostream& o)
    -
    4740  {
    -
    4741  return o << j;
    -
    4742  }
    -
    4743 
    -
    4745 
    -
    4746 
    -
    4748  // deserialization //
    -
    4750 
    -
    4753 
    -
    4778  static basic_json parse(const string_t& s, parser_callback_t cb = nullptr)
    -
    4779  {
    -
    4780  return parser(s, cb).parse();
    -
    4781  }
    -
    4782 
    -
    4807  static basic_json parse(std::istream& i, parser_callback_t cb = nullptr)
    -
    4808  {
    -
    4809  return parser(i, cb).parse();
    -
    4810  }
    -
    4811 
    -
    4815  static basic_json parse(std::istream&& i, parser_callback_t cb = nullptr)
    -
    4816  {
    -
    4817  return parser(i, cb).parse();
    -
    4818  }
    -
    4819 
    -
    4843  friend std::istream& operator<<(basic_json& j, std::istream& i)
    -
    4844  {
    -
    4845  j = parser(i).parse();
    -
    4846  return i;
    -
    4847  }
    -
    4848 
    -
    4853  friend std::istream& operator>>(std::istream& i, basic_json& j)
    -
    4854  {
    -
    4855  j = parser(i).parse();
    -
    4856  return i;
    -
    4857  }
    -
    4858 
    -
    4860 
    -
    4861 
    -
    4862  private:
    -
    4864  // convenience functions //
    -
    4866 
    -
    4868  string_t type_name() const
    -
    4869  {
    -
    4870  switch (m_type)
    -
    4871  {
    -
    4872  case value_t::null:
    -
    4873  return "null";
    -
    4874  case value_t::object:
    -
    4875  return "object";
    -
    4876  case value_t::array:
    -
    4877  return "array";
    -
    4878  case value_t::string:
    -
    4879  return "string";
    -
    4880  case value_t::boolean:
    -
    4881  return "boolean";
    -
    4882  case value_t::discarded:
    -
    4883  return "discarded";
    -
    4884  default:
    -
    4885  return "number";
    -
    4886  }
    -
    4887  }
    -
    4888 
    -
    4897  static std::size_t extra_space(const string_t& s) noexcept
    -
    4898  {
    -
    4899  std::size_t result = 0;
    +
    4723  return not (rhs < lhs);
    +
    4724  }
    +
    4725 
    +
    4743  friend bool operator>(const_reference lhs, const_reference rhs) noexcept
    +
    4744  {
    +
    4745  return not (lhs <= rhs);
    +
    4746  }
    +
    4747 
    +
    4765  friend bool operator>=(const_reference lhs, const_reference rhs) noexcept
    +
    4766  {
    +
    4767  return not (lhs < rhs);
    +
    4768  }
    +
    4769 
    +
    4771 
    +
    4772 
    +
    4774  // serialization //
    +
    4776 
    +
    4779 
    +
    4802  friend std::ostream& operator<<(std::ostream& o, const basic_json& j)
    +
    4803  {
    +
    4804  // read width member and use it as indentation parameter if nonzero
    +
    4805  const bool pretty_print = (o.width() > 0);
    +
    4806  const auto indentation = (pretty_print ? o.width() : 0);
    +
    4807 
    +
    4808  // reset width to 0 for subsequent calls to this stream
    +
    4809  o.width(0);
    +
    4810 
    +
    4811  // do the actual serialization
    +
    4812  j.dump(o, pretty_print, static_cast<unsigned int>(indentation));
    +
    4813  return o;
    +
    4814  }
    +
    4815 
    +
    4820  friend std::ostream& operator>>(const basic_json& j, std::ostream& o)
    +
    4821  {
    +
    4822  return o << j;
    +
    4823  }
    +
    4824 
    +
    4826 
    +
    4827 
    +
    4829  // deserialization //
    +
    4831 
    +
    4834 
    +
    4859  static basic_json parse(const string_t& s, parser_callback_t cb = nullptr)
    +
    4860  {
    +
    4861  return parser(s, cb).parse();
    +
    4862  }
    +
    4863 
    +
    4888  static basic_json parse(std::istream& i, parser_callback_t cb = nullptr)
    +
    4889  {
    +
    4890  return parser(i, cb).parse();
    +
    4891  }
    +
    4892 
    +
    4896  static basic_json parse(std::istream&& i, parser_callback_t cb = nullptr)
    +
    4897  {
    +
    4898  return parser(i, cb).parse();
    +
    4899  }
    4900 
    -
    4901  for (const auto& c : s)
    -
    4902  {
    -
    4903  switch (c)
    -
    4904  {
    -
    4905  case '"':
    -
    4906  case '\\':
    -
    4907  case '\b':
    -
    4908  case '\f':
    -
    4909  case '\n':
    -
    4910  case '\r':
    -
    4911  case '\t':
    -
    4912  {
    -
    4913  // from c (1 byte) to \x (2 bytes)
    -
    4914  result += 1;
    -
    4915  break;
    -
    4916  }
    -
    4917 
    -
    4918  default:
    -
    4919  {
    -
    4920  if (c >= 0x00 and c <= 0x1f)
    -
    4921  {
    -
    4922  // from c (1 byte) to \uxxxx (6 bytes)
    -
    4923  result += 5;
    -
    4924  }
    -
    4925  break;
    -
    4926  }
    -
    4927  }
    -
    4928  }
    +
    4924  friend std::istream& operator<<(basic_json& j, std::istream& i)
    +
    4925  {
    +
    4926  j = parser(i).parse();
    +
    4927  return i;
    +
    4928  }
    4929 
    -
    4930  return result;
    -
    4931  }
    -
    4932 
    -
    4946  static string_t escape_string(const string_t& s) noexcept
    -
    4947  {
    -
    4948  const auto space = extra_space(s);
    -
    4949  if (space == 0)
    -
    4950  {
    -
    4951  return s;
    -
    4952  }
    -
    4953 
    -
    4954  // create a result string of necessary size
    -
    4955  string_t result(s.size() + space, '\\');
    -
    4956  std::size_t pos = 0;
    -
    4957 
    -
    4958  for (const auto& c : s)
    -
    4959  {
    -
    4960  switch (c)
    -
    4961  {
    -
    4962  // quotation mark (0x22)
    -
    4963  case '"':
    -
    4964  {
    -
    4965  result[pos + 1] = '"';
    -
    4966  pos += 2;
    -
    4967  break;
    -
    4968  }
    +
    4934  friend std::istream& operator>>(std::istream& i, basic_json& j)
    +
    4935  {
    +
    4936  j = parser(i).parse();
    +
    4937  return i;
    +
    4938  }
    +
    4939 
    +
    4941 
    +
    4942 
    +
    4943  private:
    +
    4945  // convenience functions //
    +
    4947 
    +
    4949  string_t type_name() const
    +
    4950  {
    +
    4951  switch (m_type)
    +
    4952  {
    +
    4953  case value_t::null:
    +
    4954  return "null";
    +
    4955  case value_t::object:
    +
    4956  return "object";
    +
    4957  case value_t::array:
    +
    4958  return "array";
    +
    4959  case value_t::string:
    +
    4960  return "string";
    +
    4961  case value_t::boolean:
    +
    4962  return "boolean";
    +
    4963  case value_t::discarded:
    +
    4964  return "discarded";
    +
    4965  default:
    +
    4966  return "number";
    +
    4967  }
    +
    4968  }
    4969 
    -
    4970  // reverse solidus (0x5c)
    -
    4971  case '\\':
    -
    4972  {
    -
    4973  // nothing to change
    -
    4974  pos += 2;
    -
    4975  break;
    -
    4976  }
    -
    4977 
    -
    4978  // backspace (0x08)
    -
    4979  case '\b':
    -
    4980  {
    -
    4981  result[pos + 1] = 'b';
    -
    4982  pos += 2;
    -
    4983  break;
    -
    4984  }
    -
    4985 
    -
    4986  // formfeed (0x0c)
    -
    4987  case '\f':
    -
    4988  {
    -
    4989  result[pos + 1] = 'f';
    -
    4990  pos += 2;
    -
    4991  break;
    -
    4992  }
    -
    4993 
    -
    4994  // newline (0x0a)
    -
    4995  case '\n':
    -
    4996  {
    -
    4997  result[pos + 1] = 'n';
    -
    4998  pos += 2;
    -
    4999  break;
    -
    5000  }
    -
    5001 
    -
    5002  // carriage return (0x0d)
    -
    5003  case '\r':
    -
    5004  {
    -
    5005  result[pos + 1] = 'r';
    -
    5006  pos += 2;
    -
    5007  break;
    -
    5008  }
    -
    5009 
    -
    5010  // horizontal tab (0x09)
    -
    5011  case '\t':
    -
    5012  {
    -
    5013  result[pos + 1] = 't';
    -
    5014  pos += 2;
    -
    5015  break;
    -
    5016  }
    -
    5017 
    -
    5018  default:
    -
    5019  {
    -
    5020  if (c >= 0x00 and c <= 0x1f)
    -
    5021  {
    -
    5022  // convert a number 0..15 to its hex representation (0..f)
    -
    5023  auto hexify = [](const char v) -> char
    -
    5024  {
    -
    5025  return (v < 10) ? ('0' + v) : ('a' + v - 10);
    -
    5026  };
    -
    5027 
    -
    5028  // print character c as \uxxxx
    -
    5029  for (const char m :
    -
    5030  { 'u', '0', '0', hexify(c >> 4), hexify(c & 0x0f)
    -
    5031  })
    -
    5032  {
    -
    5033  result[++pos] = m;
    -
    5034  }
    -
    5035 
    -
    5036  ++pos;
    -
    5037  }
    -
    5038  else
    -
    5039  {
    -
    5040  // all other characters are added as-is
    -
    5041  result[pos++] = c;
    -
    5042  }
    -
    5043  break;
    -
    5044  }
    -
    5045  }
    -
    5046  }
    -
    5047 
    -
    5048  return result;
    -
    5049  }
    +
    4978  static std::size_t extra_space(const string_t& s) noexcept
    +
    4979  {
    +
    4980  std::size_t result = 0;
    +
    4981 
    +
    4982  for (const auto& c : s)
    +
    4983  {
    +
    4984  switch (c)
    +
    4985  {
    +
    4986  case '"':
    +
    4987  case '\\':
    +
    4988  case '\b':
    +
    4989  case '\f':
    +
    4990  case '\n':
    +
    4991  case '\r':
    +
    4992  case '\t':
    +
    4993  {
    +
    4994  // from c (1 byte) to \x (2 bytes)
    +
    4995  result += 1;
    +
    4996  break;
    +
    4997  }
    +
    4998 
    +
    4999  default:
    +
    5000  {
    +
    5001  if (c >= 0x00 and c <= 0x1f)
    +
    5002  {
    +
    5003  // from c (1 byte) to \uxxxx (6 bytes)
    +
    5004  result += 5;
    +
    5005  }
    +
    5006  break;
    +
    5007  }
    +
    5008  }
    +
    5009  }
    +
    5010 
    +
    5011  return result;
    +
    5012  }
    +
    5013 
    +
    5027  static string_t escape_string(const string_t& s) noexcept
    +
    5028  {
    +
    5029  const auto space = extra_space(s);
    +
    5030  if (space == 0)
    +
    5031  {
    +
    5032  return s;
    +
    5033  }
    +
    5034 
    +
    5035  // create a result string of necessary size
    +
    5036  string_t result(s.size() + space, '\\');
    +
    5037  std::size_t pos = 0;
    +
    5038 
    +
    5039  for (const auto& c : s)
    +
    5040  {
    +
    5041  switch (c)
    +
    5042  {
    +
    5043  // quotation mark (0x22)
    +
    5044  case '"':
    +
    5045  {
    +
    5046  result[pos + 1] = '"';
    +
    5047  pos += 2;
    +
    5048  break;
    +
    5049  }
    5050 
    -
    5068  void dump(std::ostream& o,
    -
    5069  const bool pretty_print,
    -
    5070  const unsigned int indent_step,
    -
    5071  const unsigned int current_indent = 0) const
    -
    5072  {
    -
    5073  // variable to hold indentation for recursive calls
    -
    5074  unsigned int new_indent = current_indent;
    -
    5075 
    -
    5076  switch (m_type)
    -
    5077  {
    -
    5078  case value_t::object:
    -
    5079  {
    -
    5080  if (m_value.object->empty())
    -
    5081  {
    -
    5082  o << "{}";
    -
    5083  return;
    -
    5084  }
    -
    5085 
    -
    5086  o << "{";
    -
    5087 
    -
    5088  // increase indentation
    -
    5089  if (pretty_print)
    -
    5090  {
    -
    5091  new_indent += indent_step;
    -
    5092  o << "\n";
    -
    5093  }
    -
    5094 
    -
    5095  for (auto i = m_value.object->cbegin(); i != m_value.object->cend(); ++i)
    -
    5096  {
    -
    5097  if (i != m_value.object->cbegin())
    -
    5098  {
    -
    5099  o << (pretty_print ? ",\n" : ",");
    -
    5100  }
    -
    5101  o << string_t(new_indent, ' ') << "\""
    -
    5102  << escape_string(i->first) << "\":"
    -
    5103  << (pretty_print ? " " : "");
    -
    5104  i->second.dump(o, pretty_print, indent_step, new_indent);
    -
    5105  }
    -
    5106 
    -
    5107  // decrease indentation
    -
    5108  if (pretty_print)
    -
    5109  {
    -
    5110  new_indent -= indent_step;
    -
    5111  o << "\n";
    -
    5112  }
    -
    5113 
    -
    5114  o << string_t(new_indent, ' ') + "}";
    -
    5115  return;
    -
    5116  }
    -
    5117 
    -
    5118  case value_t::array:
    -
    5119  {
    -
    5120  if (m_value.array->empty())
    -
    5121  {
    -
    5122  o << "[]";
    -
    5123  return;
    -
    5124  }
    -
    5125 
    -
    5126  o << "[";
    -
    5127 
    -
    5128  // increase indentation
    -
    5129  if (pretty_print)
    -
    5130  {
    -
    5131  new_indent += indent_step;
    -
    5132  o << "\n";
    -
    5133  }
    -
    5134 
    -
    5135  for (auto i = m_value.array->cbegin(); i != m_value.array->cend(); ++i)
    -
    5136  {
    -
    5137  if (i != m_value.array->cbegin())
    -
    5138  {
    -
    5139  o << (pretty_print ? ",\n" : ",");
    -
    5140  }
    -
    5141  o << string_t(new_indent, ' ');
    -
    5142  i->dump(o, pretty_print, indent_step, new_indent);
    -
    5143  }
    -
    5144 
    -
    5145  // decrease indentation
    -
    5146  if (pretty_print)
    -
    5147  {
    -
    5148  new_indent -= indent_step;
    -
    5149  o << "\n";
    -
    5150  }
    -
    5151 
    -
    5152  o << string_t(new_indent, ' ') << "]";
    -
    5153  return;
    -
    5154  }
    -
    5155 
    -
    5156  case value_t::string:
    -
    5157  {
    -
    5158  o << string_t("\"") << escape_string(*m_value.string) << "\"";
    -
    5159  return;
    -
    5160  }
    -
    5161 
    -
    5162  case value_t::boolean:
    -
    5163  {
    -
    5164  o << (m_value.boolean ? "true" : "false");
    -
    5165  return;
    -
    5166  }
    -
    5167 
    - -
    5169  {
    -
    5170  o << m_value.number_integer;
    -
    5171  return;
    -
    5172  }
    -
    5173 
    -
    5174  case value_t::number_float:
    -
    5175  {
    -
    5176  // 15 digits of precision allows round-trip IEEE 754
    -
    5177  // string->double->string; to be safe, we read this value from
    -
    5178  // std::numeric_limits<number_float_t>::digits10
    -
    5179  o << std::setprecision(std::numeric_limits<number_float_t>::digits10) << m_value.number_float;
    -
    5180  return;
    -
    5181  }
    -
    5182 
    -
    5183  case value_t::discarded:
    -
    5184  {
    -
    5185  o << "<discarded>";
    -
    5186  return;
    -
    5187  }
    -
    5188 
    -
    5189  case value_t::null:
    -
    5190  {
    -
    5191  o << "null";
    -
    5192  return;
    -
    5193  }
    -
    5194  }
    -
    5195  }
    -
    5196 
    -
    5197  private:
    -
    5199  // member variables //
    -
    5201 
    -
    5203  value_t m_type = value_t::null;
    -
    5204 
    -
    5206  json_value m_value = {};
    -
    5207 
    +
    5051  // reverse solidus (0x5c)
    +
    5052  case '\\':
    +
    5053  {
    +
    5054  // nothing to change
    +
    5055  pos += 2;
    +
    5056  break;
    +
    5057  }
    +
    5058 
    +
    5059  // backspace (0x08)
    +
    5060  case '\b':
    +
    5061  {
    +
    5062  result[pos + 1] = 'b';
    +
    5063  pos += 2;
    +
    5064  break;
    +
    5065  }
    +
    5066 
    +
    5067  // formfeed (0x0c)
    +
    5068  case '\f':
    +
    5069  {
    +
    5070  result[pos + 1] = 'f';
    +
    5071  pos += 2;
    +
    5072  break;
    +
    5073  }
    +
    5074 
    +
    5075  // newline (0x0a)
    +
    5076  case '\n':
    +
    5077  {
    +
    5078  result[pos + 1] = 'n';
    +
    5079  pos += 2;
    +
    5080  break;
    +
    5081  }
    +
    5082 
    +
    5083  // carriage return (0x0d)
    +
    5084  case '\r':
    +
    5085  {
    +
    5086  result[pos + 1] = 'r';
    +
    5087  pos += 2;
    +
    5088  break;
    +
    5089  }
    +
    5090 
    +
    5091  // horizontal tab (0x09)
    +
    5092  case '\t':
    +
    5093  {
    +
    5094  result[pos + 1] = 't';
    +
    5095  pos += 2;
    +
    5096  break;
    +
    5097  }
    +
    5098 
    +
    5099  default:
    +
    5100  {
    +
    5101  if (c >= 0x00 and c <= 0x1f)
    +
    5102  {
    +
    5103  // convert a number 0..15 to its hex representation (0..f)
    +
    5104  auto hexify = [](const char v) -> char
    +
    5105  {
    +
    5106  return (v < 10) ? ('0' + v) : ('a' + v - 10);
    +
    5107  };
    +
    5108 
    +
    5109  // print character c as \uxxxx
    +
    5110  for (const char m :
    +
    5111  { 'u', '0', '0', hexify(c >> 4), hexify(c & 0x0f)
    +
    5112  })
    +
    5113  {
    +
    5114  result[++pos] = m;
    +
    5115  }
    +
    5116 
    +
    5117  ++pos;
    +
    5118  }
    +
    5119  else
    +
    5120  {
    +
    5121  // all other characters are added as-is
    +
    5122  result[pos++] = c;
    +
    5123  }
    +
    5124  break;
    +
    5125  }
    +
    5126  }
    +
    5127  }
    +
    5128 
    +
    5129  return result;
    +
    5130  }
    +
    5131 
    +
    5149  void dump(std::ostream& o,
    +
    5150  const bool pretty_print,
    +
    5151  const unsigned int indent_step,
    +
    5152  const unsigned int current_indent = 0) const
    +
    5153  {
    +
    5154  // variable to hold indentation for recursive calls
    +
    5155  unsigned int new_indent = current_indent;
    +
    5156 
    +
    5157  switch (m_type)
    +
    5158  {
    +
    5159  case value_t::object:
    +
    5160  {
    +
    5161  if (m_value.object->empty())
    +
    5162  {
    +
    5163  o << "{}";
    +
    5164  return;
    +
    5165  }
    +
    5166 
    +
    5167  o << "{";
    +
    5168 
    +
    5169  // increase indentation
    +
    5170  if (pretty_print)
    +
    5171  {
    +
    5172  new_indent += indent_step;
    +
    5173  o << "\n";
    +
    5174  }
    +
    5175 
    +
    5176  for (auto i = m_value.object->cbegin(); i != m_value.object->cend(); ++i)
    +
    5177  {
    +
    5178  if (i != m_value.object->cbegin())
    +
    5179  {
    +
    5180  o << (pretty_print ? ",\n" : ",");
    +
    5181  }
    +
    5182  o << string_t(new_indent, ' ') << "\""
    +
    5183  << escape_string(i->first) << "\":"
    +
    5184  << (pretty_print ? " " : "");
    +
    5185  i->second.dump(o, pretty_print, indent_step, new_indent);
    +
    5186  }
    +
    5187 
    +
    5188  // decrease indentation
    +
    5189  if (pretty_print)
    +
    5190  {
    +
    5191  new_indent -= indent_step;
    +
    5192  o << "\n";
    +
    5193  }
    +
    5194 
    +
    5195  o << string_t(new_indent, ' ') + "}";
    +
    5196  return;
    +
    5197  }
    +
    5198 
    +
    5199  case value_t::array:
    +
    5200  {
    +
    5201  if (m_value.array->empty())
    +
    5202  {
    +
    5203  o << "[]";
    +
    5204  return;
    +
    5205  }
    +
    5206 
    +
    5207  o << "[";
    5208 
    -
    5209  private:
    -
    5211  // iterators //
    -
    5213 
    -
    5223  class primitive_iterator_t
    -
    5224  {
    -
    5225  public:
    -
    5227  void set_begin()
    -
    5228  {
    -
    5229  m_it = begin_value;
    -
    5230  }
    -
    5231 
    -
    5233  void set_end()
    -
    5234  {
    -
    5235  m_it = end_value;
    -
    5236  }
    -
    5237 
    -
    5239  bool is_begin() const
    -
    5240  {
    -
    5241  return (m_it == begin_value);
    -
    5242  }
    -
    5243 
    -
    5245  bool is_end() const
    -
    5246  {
    -
    5247  return (m_it == end_value);
    -
    5248  }
    -
    5249 
    -
    5251  operator difference_type& ()
    -
    5252  {
    -
    5253  return m_it;
    -
    5254  }
    -
    5255 
    -
    5257  operator difference_type () const
    -
    5258  {
    -
    5259  return m_it;
    -
    5260  }
    -
    5261 
    -
    5262  private:
    -
    5263  static constexpr difference_type begin_value = 0;
    -
    5264  static constexpr difference_type end_value = begin_value + 1;
    -
    5265 
    -
    5267  difference_type m_it = std::numeric_limits<std::ptrdiff_t>::denorm_min();
    -
    5268  };
    +
    5209  // increase indentation
    +
    5210  if (pretty_print)
    +
    5211  {
    +
    5212  new_indent += indent_step;
    +
    5213  o << "\n";
    +
    5214  }
    +
    5215 
    +
    5216  for (auto i = m_value.array->cbegin(); i != m_value.array->cend(); ++i)
    +
    5217  {
    +
    5218  if (i != m_value.array->cbegin())
    +
    5219  {
    +
    5220  o << (pretty_print ? ",\n" : ",");
    +
    5221  }
    +
    5222  o << string_t(new_indent, ' ');
    +
    5223  i->dump(o, pretty_print, indent_step, new_indent);
    +
    5224  }
    +
    5225 
    +
    5226  // decrease indentation
    +
    5227  if (pretty_print)
    +
    5228  {
    +
    5229  new_indent -= indent_step;
    +
    5230  o << "\n";
    +
    5231  }
    +
    5232 
    +
    5233  o << string_t(new_indent, ' ') << "]";
    +
    5234  return;
    +
    5235  }
    +
    5236 
    +
    5237  case value_t::string:
    +
    5238  {
    +
    5239  o << string_t("\"") << escape_string(*m_value.string) << "\"";
    +
    5240  return;
    +
    5241  }
    +
    5242 
    +
    5243  case value_t::boolean:
    +
    5244  {
    +
    5245  o << (m_value.boolean ? "true" : "false");
    +
    5246  return;
    +
    5247  }
    +
    5248 
    + +
    5250  {
    +
    5251  o << m_value.number_integer;
    +
    5252  return;
    +
    5253  }
    +
    5254 
    +
    5255  case value_t::number_float:
    +
    5256  {
    +
    5257  // 15 digits of precision allows round-trip IEEE 754
    +
    5258  // string->double->string; to be safe, we read this value from
    +
    5259  // std::numeric_limits<number_float_t>::digits10
    +
    5260  o << std::setprecision(std::numeric_limits<number_float_t>::digits10) << m_value.number_float;
    +
    5261  return;
    +
    5262  }
    +
    5263 
    +
    5264  case value_t::discarded:
    +
    5265  {
    +
    5266  o << "<discarded>";
    +
    5267  return;
    +
    5268  }
    5269 
    -
    5277  struct internal_iterator
    -
    5278  {
    -
    5280  typename object_t::iterator object_iterator;
    -
    5282  typename array_t::iterator array_iterator;
    -
    5284  primitive_iterator_t primitive_iterator;
    +
    5270  case value_t::null:
    +
    5271  {
    +
    5272  o << "null";
    +
    5273  return;
    +
    5274  }
    +
    5275  }
    +
    5276  }
    +
    5277 
    +
    5278  private:
    +
    5280  // member variables //
    +
    5282 
    +
    5284  value_t m_type = value_t::null;
    5285 
    -
    5287  internal_iterator()
    -
    5288  : object_iterator(), array_iterator(), primitive_iterator()
    -
    5289  {}
    -
    5290  };
    -
    5291 
    -
    5292  public:
    -
    5306  class const_iterator : public std::iterator<std::random_access_iterator_tag, const basic_json>
    -
    5307  {
    -
    5309  friend class basic_json;
    -
    5310 
    -
    5311  public:
    - - - - -
    5321  using iterator_category = std::bidirectional_iterator_tag;
    -
    5322 
    -
    5324  const_iterator() = default;
    -
    5325 
    -
    5327  const_iterator(pointer object) : m_object(object)
    -
    5328  {
    -
    5329  switch (m_object->m_type)
    -
    5330  {
    - -
    5332  {
    -
    5333  m_it.object_iterator = typename object_t::iterator();
    -
    5334  break;
    -
    5335  }
    +
    5287  json_value m_value = {};
    +
    5288 
    +
    5289 
    +
    5290  private:
    +
    5292  // iterators //
    +
    5294 
    +
    5304  class primitive_iterator_t
    +
    5305  {
    +
    5306  public:
    +
    5308  void set_begin()
    +
    5309  {
    +
    5310  m_it = begin_value;
    +
    5311  }
    +
    5312 
    +
    5314  void set_end()
    +
    5315  {
    +
    5316  m_it = end_value;
    +
    5317  }
    +
    5318 
    +
    5320  bool is_begin() const
    +
    5321  {
    +
    5322  return (m_it == begin_value);
    +
    5323  }
    +
    5324 
    +
    5326  bool is_end() const
    +
    5327  {
    +
    5328  return (m_it == end_value);
    +
    5329  }
    +
    5330 
    +
    5332  operator difference_type& ()
    +
    5333  {
    +
    5334  return m_it;
    +
    5335  }
    5336 
    - -
    5338  {
    -
    5339  m_it.array_iterator = typename array_t::iterator();
    -
    5340  break;
    -
    5341  }
    +
    5338  operator difference_type () const
    +
    5339  {
    +
    5340  return m_it;
    +
    5341  }
    5342 
    -
    5343  default:
    -
    5344  {
    -
    5345  m_it.primitive_iterator = primitive_iterator_t();
    -
    5346  break;
    -
    5347  }
    -
    5348  }
    -
    5349  }
    +
    5343  private:
    +
    5344  static constexpr difference_type begin_value = 0;
    +
    5345  static constexpr difference_type end_value = begin_value + 1;
    +
    5346 
    +
    5348  difference_type m_it = std::numeric_limits<std::ptrdiff_t>::denorm_min();
    +
    5349  };
    5350 
    -
    5352  const_iterator(const iterator& other) : m_object(other.m_object)
    -
    5353  {
    -
    5354  switch (m_object->m_type)
    -
    5355  {
    - -
    5357  {
    -
    5358  m_it.object_iterator = other.m_it.object_iterator;
    -
    5359  break;
    -
    5360  }
    -
    5361 
    - -
    5363  {
    -
    5364  m_it.array_iterator = other.m_it.array_iterator;
    -
    5365  break;
    -
    5366  }
    -
    5367 
    -
    5368  default:
    -
    5369  {
    -
    5370  m_it.primitive_iterator = other.m_it.primitive_iterator;
    -
    5371  break;
    -
    5372  }
    -
    5373  }
    -
    5374  }
    -
    5375 
    -
    5377  const_iterator(const const_iterator& other) noexcept
    -
    5378  : m_object(other.m_object), m_it(other.m_it)
    -
    5379  {}
    -
    5380 
    - -
    5383  std::is_nothrow_move_constructible<pointer>::value and
    -
    5384  std::is_nothrow_move_assignable<pointer>::value and
    -
    5385  std::is_nothrow_move_constructible<internal_iterator>::value and
    -
    5386  std::is_nothrow_move_assignable<internal_iterator>::value
    -
    5387  )
    -
    5388  {
    -
    5389  std::swap(m_object, other.m_object);
    -
    5390  std::swap(m_it, other.m_it);
    -
    5391  return *this;
    -
    5392  }
    -
    5393 
    -
    5394  private:
    -
    5396  void set_begin()
    -
    5397  {
    -
    5398  switch (m_object->m_type)
    -
    5399  {
    - -
    5401  {
    -
    5402  m_it.object_iterator = m_object->m_value.object->begin();
    -
    5403  break;
    -
    5404  }
    -
    5405 
    - -
    5407  {
    -
    5408  m_it.array_iterator = m_object->m_value.array->begin();
    -
    5409  break;
    -
    5410  }
    -
    5411 
    - +
    5358  struct internal_iterator
    +
    5359  {
    +
    5361  typename object_t::iterator object_iterator;
    +
    5363  typename array_t::iterator array_iterator;
    +
    5365  primitive_iterator_t primitive_iterator;
    +
    5366 
    +
    5368  internal_iterator()
    +
    5369  : object_iterator(), array_iterator(), primitive_iterator()
    +
    5370  {}
    +
    5371  };
    +
    5372 
    +
    5373  public:
    +
    5387  class const_iterator : public std::iterator<std::random_access_iterator_tag, const basic_json>
    +
    5388  {
    +
    5390  friend class basic_json;
    +
    5391 
    +
    5392  public:
    + + + + +
    5402  using iterator_category = std::bidirectional_iterator_tag;
    +
    5403 
    +
    5405  const_iterator() = default;
    +
    5406 
    +
    5408  const_iterator(pointer object) : m_object(object)
    +
    5409  {
    +
    5410  switch (m_object->m_type)
    +
    5411  {
    +
    5413  {
    -
    5414  // set to end so begin()==end() is true: null is empty
    -
    5415  m_it.primitive_iterator.set_end();
    -
    5416  break;
    -
    5417  }
    -
    5418 
    -
    5419  default:
    -
    5420  {
    -
    5421  m_it.primitive_iterator.set_begin();
    -
    5422  break;
    -
    5423  }
    -
    5424  }
    -
    5425  }
    -
    5426 
    -
    5428  void set_end()
    -
    5429  {
    -
    5430  switch (m_object->m_type)
    -
    5431  {
    - -
    5433  {
    -
    5434  m_it.object_iterator = m_object->m_value.object->end();
    -
    5435  break;
    -
    5436  }
    -
    5437 
    - -
    5439  {
    -
    5440  m_it.array_iterator = m_object->m_value.array->end();
    -
    5441  break;
    -
    5442  }
    -
    5443 
    -
    5444  default:
    -
    5445  {
    -
    5446  m_it.primitive_iterator.set_end();
    -
    5447  break;
    -
    5448  }
    -
    5449  }
    -
    5450  }
    -
    5451 
    -
    5452  public:
    - -
    5455  {
    -
    5456  switch (m_object->m_type)
    -
    5457  {
    - -
    5459  {
    -
    5460  return m_it.object_iterator->second;
    -
    5461  }
    -
    5462 
    - -
    5464  {
    -
    5465  return *m_it.array_iterator;
    -
    5466  }
    -
    5467 
    - -
    5469  {
    -
    5470  throw std::out_of_range("cannot get value");
    -
    5471  }
    -
    5472 
    -
    5473  default:
    -
    5474  {
    -
    5475  if (m_it.primitive_iterator.is_begin())
    -
    5476  {
    -
    5477  return *m_object;
    -
    5478  }
    -
    5479  else
    -
    5480  {
    -
    5481  throw std::out_of_range("cannot get value");
    -
    5482  }
    -
    5483  }
    -
    5484  }
    -
    5485  }
    +
    5414  m_it.object_iterator = typename object_t::iterator();
    +
    5415  break;
    +
    5416  }
    +
    5417 
    + +
    5419  {
    +
    5420  m_it.array_iterator = typename array_t::iterator();
    +
    5421  break;
    +
    5422  }
    +
    5423 
    +
    5424  default:
    +
    5425  {
    +
    5426  m_it.primitive_iterator = primitive_iterator_t();
    +
    5427  break;
    +
    5428  }
    +
    5429  }
    +
    5430  }
    +
    5431 
    +
    5433  const_iterator(const iterator& other) : m_object(other.m_object)
    +
    5434  {
    +
    5435  switch (m_object->m_type)
    +
    5436  {
    + +
    5438  {
    +
    5439  m_it.object_iterator = other.m_it.object_iterator;
    +
    5440  break;
    +
    5441  }
    +
    5442 
    + +
    5444  {
    +
    5445  m_it.array_iterator = other.m_it.array_iterator;
    +
    5446  break;
    +
    5447  }
    +
    5448 
    +
    5449  default:
    +
    5450  {
    +
    5451  m_it.primitive_iterator = other.m_it.primitive_iterator;
    +
    5452  break;
    +
    5453  }
    +
    5454  }
    +
    5455  }
    +
    5456 
    +
    5458  const_iterator(const const_iterator& other) noexcept
    +
    5459  : m_object(other.m_object), m_it(other.m_it)
    +
    5460  {}
    +
    5461 
    + +
    5464  std::is_nothrow_move_constructible<pointer>::value and
    +
    5465  std::is_nothrow_move_assignable<pointer>::value and
    +
    5466  std::is_nothrow_move_constructible<internal_iterator>::value and
    +
    5467  std::is_nothrow_move_assignable<internal_iterator>::value
    +
    5468  )
    +
    5469  {
    +
    5470  std::swap(m_object, other.m_object);
    +
    5471  std::swap(m_it, other.m_it);
    +
    5472  return *this;
    +
    5473  }
    +
    5474 
    +
    5475  private:
    +
    5477  void set_begin()
    +
    5478  {
    +
    5479  switch (m_object->m_type)
    +
    5480  {
    + +
    5482  {
    +
    5483  m_it.object_iterator = m_object->m_value.object->begin();
    +
    5484  break;
    +
    5485  }
    5486 
    - -
    5489  {
    -
    5490  switch (m_object->m_type)
    -
    5491  {
    - -
    5493  {
    -
    5494  return &(m_it.object_iterator->second);
    -
    5495  }
    -
    5496 
    - -
    5498  {
    -
    5499  return &*m_it.array_iterator;
    -
    5500  }
    -
    5501 
    -
    5502  default:
    -
    5503  {
    -
    5504  if (m_it.primitive_iterator.is_begin())
    -
    5505  {
    -
    5506  return m_object;
    -
    5507  }
    -
    5508  else
    -
    5509  {
    -
    5510  throw std::out_of_range("cannot get value");
    -
    5511  }
    -
    5512  }
    -
    5513  }
    -
    5514  }
    -
    5515 
    - -
    5518  {
    -
    5519  auto result = *this;
    -
    5520  ++(*this);
    -
    5521  return result;
    -
    5522  }
    -
    5523 
    - -
    5526  {
    -
    5527  switch (m_object->m_type)
    -
    5528  {
    - -
    5530  {
    -
    5531  ++m_it.object_iterator;
    -
    5532  break;
    -
    5533  }
    -
    5534 
    - -
    5536  {
    -
    5537  ++m_it.array_iterator;
    -
    5538  break;
    -
    5539  }
    -
    5540 
    -
    5541  default:
    -
    5542  {
    -
    5543  ++m_it.primitive_iterator;
    -
    5544  break;
    -
    5545  }
    -
    5546  }
    -
    5547 
    -
    5548  return *this;
    -
    5549  }
    -
    5550 
    - -
    5553  {
    -
    5554  auto result = *this;
    -
    5555  --(*this);
    -
    5556  return result;
    -
    5557  }
    -
    5558 
    - -
    5561  {
    -
    5562  switch (m_object->m_type)
    -
    5563  {
    - -
    5565  {
    -
    5566  --m_it.object_iterator;
    -
    5567  break;
    -
    5568  }
    -
    5569 
    - -
    5571  {
    -
    5572  --m_it.array_iterator;
    -
    5573  break;
    -
    5574  }
    -
    5575 
    -
    5576  default:
    -
    5577  {
    -
    5578  --m_it.primitive_iterator;
    -
    5579  break;
    -
    5580  }
    -
    5581  }
    + +
    5488  {
    +
    5489  m_it.array_iterator = m_object->m_value.array->begin();
    +
    5490  break;
    +
    5491  }
    +
    5492 
    + +
    5494  {
    +
    5495  // set to end so begin()==end() is true: null is empty
    +
    5496  m_it.primitive_iterator.set_end();
    +
    5497  break;
    +
    5498  }
    +
    5499 
    +
    5500  default:
    +
    5501  {
    +
    5502  m_it.primitive_iterator.set_begin();
    +
    5503  break;
    +
    5504  }
    +
    5505  }
    +
    5506  }
    +
    5507 
    +
    5509  void set_end()
    +
    5510  {
    +
    5511  switch (m_object->m_type)
    +
    5512  {
    + +
    5514  {
    +
    5515  m_it.object_iterator = m_object->m_value.object->end();
    +
    5516  break;
    +
    5517  }
    +
    5518 
    + +
    5520  {
    +
    5521  m_it.array_iterator = m_object->m_value.array->end();
    +
    5522  break;
    +
    5523  }
    +
    5524 
    +
    5525  default:
    +
    5526  {
    +
    5527  m_it.primitive_iterator.set_end();
    +
    5528  break;
    +
    5529  }
    +
    5530  }
    +
    5531  }
    +
    5532 
    +
    5533  public:
    + +
    5536  {
    +
    5537  switch (m_object->m_type)
    +
    5538  {
    + +
    5540  {
    +
    5541  return m_it.object_iterator->second;
    +
    5542  }
    +
    5543 
    + +
    5545  {
    +
    5546  return *m_it.array_iterator;
    +
    5547  }
    +
    5548 
    + +
    5550  {
    +
    5551  throw std::out_of_range("cannot get value");
    +
    5552  }
    +
    5553 
    +
    5554  default:
    +
    5555  {
    +
    5556  if (m_it.primitive_iterator.is_begin())
    +
    5557  {
    +
    5558  return *m_object;
    +
    5559  }
    +
    5560  else
    +
    5561  {
    +
    5562  throw std::out_of_range("cannot get value");
    +
    5563  }
    +
    5564  }
    +
    5565  }
    +
    5566  }
    +
    5567 
    + +
    5570  {
    +
    5571  switch (m_object->m_type)
    +
    5572  {
    + +
    5574  {
    +
    5575  return &(m_it.object_iterator->second);
    +
    5576  }
    +
    5577 
    + +
    5579  {
    +
    5580  return &*m_it.array_iterator;
    +
    5581  }
    5582 
    -
    5583  return *this;
    -
    5584  }
    -
    5585 
    -
    5587  bool operator==(const const_iterator& other) const
    -
    5588  {
    -
    5589  // if objects are not the same, the comparison is undefined
    -
    5590  if (m_object != other.m_object)
    -
    5591  {
    -
    5592  throw std::domain_error("cannot compare iterators of different containers");
    -
    5593  }
    -
    5594 
    -
    5595  switch (m_object->m_type)
    -
    5596  {
    - -
    5598  {
    -
    5599  return (m_it.object_iterator == other.m_it.object_iterator);
    -
    5600  }
    -
    5601 
    - -
    5603  {
    -
    5604  return (m_it.array_iterator == other.m_it.array_iterator);
    -
    5605  }
    -
    5606 
    -
    5607  default:
    -
    5608  {
    -
    5609  return (m_it.primitive_iterator == other.m_it.primitive_iterator);
    -
    5610  }
    -
    5611  }
    -
    5612  }
    -
    5613 
    -
    5615  bool operator!=(const const_iterator& other) const
    -
    5616  {
    -
    5617  return not operator==(other);
    -
    5618  }
    -
    5619 
    -
    5621  bool operator<(const const_iterator& other) const
    -
    5622  {
    -
    5623  // if objects are not the same, the comparison is undefined
    -
    5624  if (m_object != other.m_object)
    -
    5625  {
    -
    5626  throw std::domain_error("cannot compare iterators of different containers");
    +
    5583  default:
    +
    5584  {
    +
    5585  if (m_it.primitive_iterator.is_begin())
    +
    5586  {
    +
    5587  return m_object;
    +
    5588  }
    +
    5589  else
    +
    5590  {
    +
    5591  throw std::out_of_range("cannot get value");
    +
    5592  }
    +
    5593  }
    +
    5594  }
    +
    5595  }
    +
    5596 
    + +
    5599  {
    +
    5600  auto result = *this;
    +
    5601  ++(*this);
    +
    5602  return result;
    +
    5603  }
    +
    5604 
    + +
    5607  {
    +
    5608  switch (m_object->m_type)
    +
    5609  {
    + +
    5611  {
    +
    5612  ++m_it.object_iterator;
    +
    5613  break;
    +
    5614  }
    +
    5615 
    + +
    5617  {
    +
    5618  ++m_it.array_iterator;
    +
    5619  break;
    +
    5620  }
    +
    5621 
    +
    5622  default:
    +
    5623  {
    +
    5624  ++m_it.primitive_iterator;
    +
    5625  break;
    +
    5626  }
    5627  }
    5628 
    -
    5629  switch (m_object->m_type)
    -
    5630  {
    - -
    5632  {
    -
    5633  throw std::domain_error("cannot use operator< for object iterators");
    -
    5634  }
    -
    5635 
    - -
    5637  {
    -
    5638  return (m_it.array_iterator < other.m_it.array_iterator);
    -
    5639  }
    -
    5640 
    -
    5641  default:
    -
    5642  {
    -
    5643  return (m_it.primitive_iterator < other.m_it.primitive_iterator);
    -
    5644  }
    -
    5645  }
    -
    5646  }
    -
    5647 
    -
    5649  bool operator<=(const const_iterator& other) const
    -
    5650  {
    -
    5651  return not other.operator < (*this);
    -
    5652  }
    -
    5653 
    -
    5655  bool operator>(const const_iterator& other) const
    -
    5656  {
    -
    5657  return not operator<=(other);
    -
    5658  }
    -
    5659 
    -
    5661  bool operator>=(const const_iterator& other) const
    -
    5662  {
    -
    5663  return not operator<(other);
    -
    5664  }
    -
    5665 
    - -
    5668  {
    -
    5669  switch (m_object->m_type)
    -
    5670  {
    - -
    5672  {
    -
    5673  throw std::domain_error("cannot use operator+= for object iterators");
    -
    5674  }
    +
    5629  return *this;
    +
    5630  }
    +
    5631 
    + +
    5634  {
    +
    5635  auto result = *this;
    +
    5636  --(*this);
    +
    5637  return result;
    +
    5638  }
    +
    5639 
    + +
    5642  {
    +
    5643  switch (m_object->m_type)
    +
    5644  {
    + +
    5646  {
    +
    5647  --m_it.object_iterator;
    +
    5648  break;
    +
    5649  }
    +
    5650 
    + +
    5652  {
    +
    5653  --m_it.array_iterator;
    +
    5654  break;
    +
    5655  }
    +
    5656 
    +
    5657  default:
    +
    5658  {
    +
    5659  --m_it.primitive_iterator;
    +
    5660  break;
    +
    5661  }
    +
    5662  }
    +
    5663 
    +
    5664  return *this;
    +
    5665  }
    +
    5666 
    +
    5668  bool operator==(const const_iterator& other) const
    +
    5669  {
    +
    5670  // if objects are not the same, the comparison is undefined
    +
    5671  if (m_object != other.m_object)
    +
    5672  {
    +
    5673  throw std::domain_error("cannot compare iterators of different containers");
    +
    5674  }
    5675 
    - -
    5677  {
    -
    5678  m_it.array_iterator += i;
    -
    5679  break;
    -
    5680  }
    -
    5681 
    -
    5682  default:
    -
    5683  {
    -
    5684  m_it.primitive_iterator += i;
    -
    5685  break;
    +
    5676  switch (m_object->m_type)
    +
    5677  {
    + +
    5679  {
    +
    5680  return (m_it.object_iterator == other.m_it.object_iterator);
    +
    5681  }
    +
    5682 
    + +
    5684  {
    +
    5685  return (m_it.array_iterator == other.m_it.array_iterator);
    5686  }
    -
    5687  }
    -
    5688 
    -
    5689  return *this;
    -
    5690  }
    -
    5691 
    - -
    5694  {
    -
    5695  return operator+=(-i);
    -
    5696  }
    -
    5697 
    - -
    5700  {
    -
    5701  auto result = *this;
    -
    5702  result += i;
    -
    5703  return result;
    -
    5704  }
    -
    5705 
    - -
    5708  {
    -
    5709  auto result = *this;
    -
    5710  result -= i;
    -
    5711  return result;
    -
    5712  }
    -
    5713 
    - -
    5716  {
    -
    5717  switch (m_object->m_type)
    -
    5718  {
    - -
    5720  {
    -
    5721  throw std::domain_error("cannot use operator- for object iterators");
    -
    5722  }
    -
    5723 
    - -
    5725  {
    -
    5726  return m_it.array_iterator - other.m_it.array_iterator;
    -
    5727  }
    +
    5687 
    +
    5688  default:
    +
    5689  {
    +
    5690  return (m_it.primitive_iterator == other.m_it.primitive_iterator);
    +
    5691  }
    +
    5692  }
    +
    5693  }
    +
    5694 
    +
    5696  bool operator!=(const const_iterator& other) const
    +
    5697  {
    +
    5698  return not operator==(other);
    +
    5699  }
    +
    5700 
    +
    5702  bool operator<(const const_iterator& other) const
    +
    5703  {
    +
    5704  // if objects are not the same, the comparison is undefined
    +
    5705  if (m_object != other.m_object)
    +
    5706  {
    +
    5707  throw std::domain_error("cannot compare iterators of different containers");
    +
    5708  }
    +
    5709 
    +
    5710  switch (m_object->m_type)
    +
    5711  {
    + +
    5713  {
    +
    5714  throw std::domain_error("cannot use operator< for object iterators");
    +
    5715  }
    +
    5716 
    + +
    5718  {
    +
    5719  return (m_it.array_iterator < other.m_it.array_iterator);
    +
    5720  }
    +
    5721 
    +
    5722  default:
    +
    5723  {
    +
    5724  return (m_it.primitive_iterator < other.m_it.primitive_iterator);
    +
    5725  }
    +
    5726  }
    +
    5727  }
    5728 
    -
    5729  default:
    -
    5730  {
    -
    5731  return m_it.primitive_iterator - other.m_it.primitive_iterator;
    -
    5732  }
    -
    5733  }
    -
    5734  }
    -
    5735 
    - -
    5738  {
    -
    5739  switch (m_object->m_type)
    -
    5740  {
    - -
    5742  {
    -
    5743  throw std::domain_error("cannot use operator[] for object iterators");
    -
    5744  }
    -
    5745 
    - -
    5747  {
    -
    5748  return *(m_it.array_iterator + n);
    -
    5749  }
    -
    5750 
    - -
    5752  {
    -
    5753  throw std::out_of_range("cannot get value");
    -
    5754  }
    -
    5755 
    -
    5756  default:
    -
    5757  {
    -
    5758  if (m_it.primitive_iterator == -n)
    -
    5759  {
    -
    5760  return *m_object;
    -
    5761  }
    -
    5762  else
    -
    5763  {
    -
    5764  throw std::out_of_range("cannot get value");
    -
    5765  }
    -
    5766  }
    -
    5767  }
    -
    5768  }
    +
    5730  bool operator<=(const const_iterator& other) const
    +
    5731  {
    +
    5732  return not other.operator < (*this);
    +
    5733  }
    +
    5734 
    +
    5736  bool operator>(const const_iterator& other) const
    +
    5737  {
    +
    5738  return not operator<=(other);
    +
    5739  }
    +
    5740 
    +
    5742  bool operator>=(const const_iterator& other) const
    +
    5743  {
    +
    5744  return not operator<(other);
    +
    5745  }
    +
    5746 
    + +
    5749  {
    +
    5750  switch (m_object->m_type)
    +
    5751  {
    + +
    5753  {
    +
    5754  throw std::domain_error("cannot use operator+= for object iterators");
    +
    5755  }
    +
    5756 
    + +
    5758  {
    +
    5759  m_it.array_iterator += i;
    +
    5760  break;
    +
    5761  }
    +
    5762 
    +
    5763  default:
    +
    5764  {
    +
    5765  m_it.primitive_iterator += i;
    +
    5766  break;
    +
    5767  }
    +
    5768  }
    5769 
    -
    5771  typename object_t::key_type key() const
    -
    5772  {
    -
    5773  if (m_object->is_object())
    -
    5774  {
    -
    5775  return m_it.object_iterator->first;
    -
    5776  }
    -
    5777  else
    -
    5778  {
    -
    5779  throw std::domain_error("cannot use key() for non-object iterators");
    -
    5780  }
    -
    5781  }
    -
    5782 
    - -
    5785  {
    -
    5786  return operator*();
    -
    5787  }
    -
    5788 
    -
    5789  private:
    -
    5791  pointer m_object = nullptr;
    -
    5793  internal_iterator m_it = internal_iterator();
    -
    5794  };
    -
    5795 
    -
    5808  class iterator : public const_iterator
    -
    5809  {
    -
    5810  public:
    - -
    5812  using pointer = typename basic_json::pointer;
    - -
    5814 
    -
    5816  iterator() = default;
    -
    5817 
    -
    5819  iterator(pointer object) noexcept : base_iterator(object)
    -
    5820  {}
    -
    5821 
    -
    5823  iterator(const iterator& other) noexcept
    -
    5824  : base_iterator(other)
    -
    5825  {}
    +
    5770  return *this;
    +
    5771  }
    +
    5772 
    + +
    5775  {
    +
    5776  return operator+=(-i);
    +
    5777  }
    +
    5778 
    + +
    5781  {
    +
    5782  auto result = *this;
    +
    5783  result += i;
    +
    5784  return result;
    +
    5785  }
    +
    5786 
    + +
    5789  {
    +
    5790  auto result = *this;
    +
    5791  result -= i;
    +
    5792  return result;
    +
    5793  }
    +
    5794 
    + +
    5797  {
    +
    5798  switch (m_object->m_type)
    +
    5799  {
    + +
    5801  {
    +
    5802  throw std::domain_error("cannot use operator- for object iterators");
    +
    5803  }
    +
    5804 
    + +
    5806  {
    +
    5807  return m_it.array_iterator - other.m_it.array_iterator;
    +
    5808  }
    +
    5809 
    +
    5810  default:
    +
    5811  {
    +
    5812  return m_it.primitive_iterator - other.m_it.primitive_iterator;
    +
    5813  }
    +
    5814  }
    +
    5815  }
    +
    5816 
    + +
    5819  {
    +
    5820  switch (m_object->m_type)
    +
    5821  {
    + +
    5823  {
    +
    5824  throw std::domain_error("cannot use operator[] for object iterators");
    +
    5825  }
    5826 
    -
    5828  iterator& operator=(iterator other) noexcept(
    -
    5829  std::is_nothrow_move_constructible<pointer>::value and
    -
    5830  std::is_nothrow_move_assignable<pointer>::value and
    -
    5831  std::is_nothrow_move_constructible<internal_iterator>::value and
    -
    5832  std::is_nothrow_move_assignable<internal_iterator>::value
    -
    5833  )
    -
    5834  {
    -
    5835  base_iterator::operator=(other);
    -
    5836  return *this;
    -
    5837  }
    -
    5838 
    - -
    5841  {
    -
    5842  return const_cast<reference>(base_iterator::operator*());
    -
    5843  }
    -
    5844 
    - -
    5847  {
    -
    5848  return const_cast<pointer>(base_iterator::operator->());
    + +
    5828  {
    +
    5829  return *(m_it.array_iterator + n);
    +
    5830  }
    +
    5831 
    + +
    5833  {
    +
    5834  throw std::out_of_range("cannot get value");
    +
    5835  }
    +
    5836 
    +
    5837  default:
    +
    5838  {
    +
    5839  if (m_it.primitive_iterator == -n)
    +
    5840  {
    +
    5841  return *m_object;
    +
    5842  }
    +
    5843  else
    +
    5844  {
    +
    5845  throw std::out_of_range("cannot get value");
    +
    5846  }
    +
    5847  }
    +
    5848  }
    5849  }
    5850 
    - -
    5853  {
    -
    5854  iterator result = *this;
    - -
    5856  return result;
    -
    5857  }
    -
    5858 
    - -
    5861  {
    - -
    5863  return *this;
    -
    5864  }
    -
    5865 
    - -
    5868  {
    -
    5869  iterator result = *this;
    - -
    5871  return result;
    -
    5872  }
    -
    5873 
    - -
    5876  {
    - -
    5878  return *this;
    -
    5879  }
    -
    5880 
    - -
    5883  {
    - -
    5885  return *this;
    -
    5886  }
    -
    5887 
    - -
    5890  {
    - -
    5892  return *this;
    -
    5893  }
    -
    5894 
    - -
    5897  {
    -
    5898  auto result = *this;
    -
    5899  result += i;
    -
    5900  return result;
    -
    5901  }
    +
    5852  typename object_t::key_type key() const
    +
    5853  {
    +
    5854  if (m_object->is_object())
    +
    5855  {
    +
    5856  return m_it.object_iterator->first;
    +
    5857  }
    +
    5858  else
    +
    5859  {
    +
    5860  throw std::domain_error("cannot use key() for non-object iterators");
    +
    5861  }
    +
    5862  }
    +
    5863 
    + +
    5866  {
    +
    5867  return operator*();
    +
    5868  }
    +
    5869 
    +
    5870  private:
    +
    5872  pointer m_object = nullptr;
    +
    5874  internal_iterator m_it = internal_iterator();
    +
    5875  };
    +
    5876 
    +
    5889  class iterator : public const_iterator
    +
    5890  {
    +
    5891  public:
    + +
    5893  using pointer = typename basic_json::pointer;
    + +
    5895 
    +
    5897  iterator() = default;
    +
    5898 
    +
    5900  iterator(pointer object) noexcept : base_iterator(object)
    +
    5901  {}
    5902 
    - -
    5905  {
    -
    5906  auto result = *this;
    -
    5907  result -= i;
    -
    5908  return result;
    -
    5909  }
    -
    5910 
    -
    5911  difference_type operator-(const iterator& other) const
    -
    5912  {
    -
    5913  return base_iterator::operator-(other);
    -
    5914  }
    -
    5915 
    - -
    5918  {
    -
    5919  return const_cast<reference>(base_iterator::operator[](n));
    -
    5920  }
    -
    5921 
    - -
    5924  {
    -
    5925  return const_cast<reference>(base_iterator::value());
    -
    5926  }
    -
    5927  };
    -
    5928 
    -
    5946  template<typename Base>
    -
    5947  class json_reverse_iterator : public std::reverse_iterator<Base>
    -
    5948  {
    -
    5949  public:
    -
    5951  using base_iterator = std::reverse_iterator<Base>;
    -
    5953  using reference = typename Base::reference;
    +
    5904  iterator(const iterator& other) noexcept
    +
    5905  : base_iterator(other)
    +
    5906  {}
    +
    5907 
    +
    5909  iterator& operator=(iterator other) noexcept(
    +
    5910  std::is_nothrow_move_constructible<pointer>::value and
    +
    5911  std::is_nothrow_move_assignable<pointer>::value and
    +
    5912  std::is_nothrow_move_constructible<internal_iterator>::value and
    +
    5913  std::is_nothrow_move_assignable<internal_iterator>::value
    +
    5914  )
    +
    5915  {
    +
    5916  base_iterator::operator=(other);
    +
    5917  return *this;
    +
    5918  }
    +
    5919 
    + +
    5922  {
    +
    5923  return const_cast<reference>(base_iterator::operator*());
    +
    5924  }
    +
    5925 
    + +
    5928  {
    +
    5929  return const_cast<pointer>(base_iterator::operator->());
    +
    5930  }
    +
    5931 
    + +
    5934  {
    +
    5935  iterator result = *this;
    + +
    5937  return result;
    +
    5938  }
    +
    5939 
    + +
    5942  {
    + +
    5944  return *this;
    +
    5945  }
    +
    5946 
    + +
    5949  {
    +
    5950  iterator result = *this;
    + +
    5952  return result;
    +
    5953  }
    5954 
    -
    5956  json_reverse_iterator(const typename base_iterator::iterator_type& it)
    -
    5957  : base_iterator(it) {}
    -
    5958 
    - + +
    5957  {
    + +
    5959  return *this;
    +
    5960  }
    5961 
    - +
    5964  {
    -
    5965  return base_iterator::operator++(1);
    -
    5966  }
    -
    5967 
    - -
    5970  {
    -
    5971  base_iterator::operator++();
    -
    5972  return *this;
    -
    5973  }
    -
    5974 
    - -
    5977  {
    -
    5978  return base_iterator::operator--(1);
    -
    5979  }
    -
    5980 
    - -
    5983  {
    -
    5984  base_iterator::operator--();
    -
    5985  return *this;
    -
    5986  }
    -
    5987 
    - -
    5990  {
    -
    5991  base_iterator::operator+=(i);
    -
    5992  return *this;
    -
    5993  }
    -
    5994 
    - -
    5997  {
    -
    5998  auto result = *this;
    -
    5999  result += i;
    -
    6000  return result;
    + +
    5966  return *this;
    +
    5967  }
    +
    5968 
    + +
    5971  {
    + +
    5973  return *this;
    +
    5974  }
    +
    5975 
    + +
    5978  {
    +
    5979  auto result = *this;
    +
    5980  result += i;
    +
    5981  return result;
    +
    5982  }
    +
    5983 
    + +
    5986  {
    +
    5987  auto result = *this;
    +
    5988  result -= i;
    +
    5989  return result;
    +
    5990  }
    +
    5991 
    +
    5992  difference_type operator-(const iterator& other) const
    +
    5993  {
    +
    5994  return base_iterator::operator-(other);
    +
    5995  }
    +
    5996 
    + +
    5999  {
    +
    6000  return const_cast<reference>(base_iterator::operator[](n));
    6001  }
    6002 
    - +
    6005  {
    -
    6006  auto result = *this;
    -
    6007  result -= i;
    -
    6008  return result;
    -
    6009  }
    -
    6010 
    - -
    6013  {
    -
    6014  return this->base() - other.base();
    -
    6015  }
    -
    6016 
    - -
    6019  {
    -
    6020  return *(this->operator+(n));
    -
    6021  }
    -
    6022 
    -
    6024  typename object_t::key_type key() const
    -
    6025  {
    -
    6026  auto it = --this->base();
    -
    6027  return it.key();
    -
    6028  }
    -
    6029 
    - -
    6032  {
    -
    6033  auto it = --this->base();
    -
    6034  return it.operator * ();
    -
    6035  }
    -
    6036  };
    -
    6037 
    - -
    6046  {
    -
    6047  private:
    -
    6049  basic_json& container;
    -
    6051  using json_iterator = decltype(std::begin(container));
    -
    6052 
    -
    6054  class iterator_wrapper_internal
    -
    6055  {
    -
    6056  private:
    -
    6058  json_iterator anchor;
    -
    6060  size_t array_index = 0;
    +
    6006  return const_cast<reference>(base_iterator::value());
    +
    6007  }
    +
    6008  };
    +
    6009 
    +
    6027  template<typename Base>
    +
    6028  class json_reverse_iterator : public std::reverse_iterator<Base>
    +
    6029  {
    +
    6030  public:
    +
    6032  using base_iterator = std::reverse_iterator<Base>;
    +
    6034  using reference = typename Base::reference;
    +
    6035 
    +
    6037  json_reverse_iterator(const typename base_iterator::iterator_type& it)
    +
    6038  : base_iterator(it) {}
    +
    6039 
    + +
    6042 
    + +
    6045  {
    +
    6046  return base_iterator::operator++(1);
    +
    6047  }
    +
    6048 
    + +
    6051  {
    +
    6052  base_iterator::operator++();
    +
    6053  return *this;
    +
    6054  }
    +
    6055 
    + +
    6058  {
    +
    6059  return base_iterator::operator--(1);
    +
    6060  }
    6061 
    -
    6062  public:
    -
    6064  iterator_wrapper_internal(json_iterator i) : anchor(i)
    -
    6065  {}
    -
    6066 
    -
    6068  iterator_wrapper_internal& operator*()
    -
    6069  {
    -
    6070  return *this;
    -
    6071  }
    -
    6072 
    -
    6074  iterator_wrapper_internal& operator++()
    -
    6075  {
    -
    6076  ++anchor;
    -
    6077  ++array_index;
    -
    6078 
    -
    6079  return *this;
    -
    6080  }
    -
    6081 
    -
    6083  bool operator!= (const iterator_wrapper_internal& o)
    -
    6084  {
    -
    6085  return anchor != o.anchor;
    -
    6086  }
    -
    6087 
    -
    6089  typename basic_json::string_t key() const
    -
    6090  {
    -
    6091  switch (anchor.m_object->type())
    -
    6092  {
    -
    6093  // use integer array index as key
    -
    6094  case value_t::array:
    -
    6095  {
    -
    6096  return std::to_string(array_index);
    -
    6097  }
    -
    6098 
    -
    6099  // use key from the object
    -
    6100  case value_t::object:
    -
    6101  {
    -
    6102  return anchor.key();
    -
    6103  }
    -
    6104 
    -
    6105  // use an empty key for all primitive types
    -
    6106  default:
    -
    6107  {
    -
    6108  return "";
    -
    6109  }
    -
    6110  }
    -
    6111  }
    -
    6112 
    -
    6114  typename json_iterator::reference value() const
    -
    6115  {
    -
    6116  return anchor.value();
    -
    6117  }
    -
    6118  };
    -
    6119 
    -
    6120  public:
    -
    6122  iterator_wrapper(basic_json& cont)
    -
    6123  : container(cont)
    -
    6124  {}
    -
    6125 
    -
    6127  iterator_wrapper_internal begin()
    -
    6128  {
    -
    6129  return iterator_wrapper_internal(container.begin());
    -
    6130  }
    -
    6131 
    -
    6133  iterator_wrapper_internal end()
    -
    6134  {
    -
    6135  return iterator_wrapper_internal(container.end());
    -
    6136  }
    -
    6137  };
    -
    6138 
    -
    6139  private:
    -
    6141  // lexer and parser //
    -
    6143 
    -
    6151  class lexer
    -
    6152  {
    -
    6153  public:
    -
    6155  enum class token_type
    -
    6156  {
    -
    6157  uninitialized,
    -
    6158  literal_true,
    -
    6159  literal_false,
    -
    6160  literal_null,
    -
    6161  value_string,
    -
    6162  value_number,
    -
    6163  begin_array,
    -
    6164  begin_object,
    -
    6165  end_array,
    -
    6166  end_object,
    -
    6167  name_separator,
    -
    6168  value_separator,
    -
    6169  parse_error,
    -
    6170  end_of_input
    -
    6171  };
    -
    6172 
    -
    6174  using lexer_char_t = unsigned char;
    -
    6175 
    -
    6177  explicit lexer(const string_t& s) noexcept
    -
    6178  : m_stream(nullptr), m_buffer(s)
    -
    6179  {
    -
    6180  m_content = reinterpret_cast<const lexer_char_t*>(s.c_str());
    -
    6181  m_start = m_cursor = m_content;
    -
    6182  m_limit = m_content + s.size();
    -
    6183  }
    -
    6184  explicit lexer(std::istream* s) noexcept
    -
    6185  : m_stream(s), m_buffer()
    -
    6186  {
    -
    6187  getline(*m_stream, m_buffer);
    -
    6188  m_content = reinterpret_cast<const lexer_char_t*>(m_buffer.c_str());
    -
    6189  m_start = m_cursor = m_content;
    -
    6190  m_limit = m_content + m_buffer.size();
    -
    6191  }
    -
    6192 
    -
    6194  lexer() = default;
    -
    6195 
    -
    6196  // switch of unwanted functions
    -
    6197  lexer(const lexer&) = delete;
    -
    6198  lexer operator=(const lexer&) = delete;
    -
    6199 
    -
    6211  static string_t to_unicode(const std::size_t codepoint1,
    -
    6212  const std::size_t codepoint2 = 0)
    -
    6213  {
    -
    6214  string_t result;
    -
    6215 
    -
    6216  // calculate the codepoint from the given code points
    -
    6217  std::size_t codepoint = codepoint1;
    -
    6218 
    -
    6219  // check if codepoint1 is a high surrogate
    -
    6220  if (codepoint1 >= 0xD800 and codepoint1 <= 0xDBFF)
    -
    6221  {
    -
    6222  // check if codepoint2 is a low surrogate
    -
    6223  if (codepoint2 >= 0xDC00 and codepoint2 <= 0xDFFF)
    -
    6224  {
    -
    6225  codepoint =
    -
    6226  // high surrogate occupies the most significant 22 bits
    -
    6227  (codepoint1 << 10)
    -
    6228  // low surrogate occupies the least significant 15 bits
    -
    6229  + codepoint2
    -
    6230  // there is still the 0xD800, 0xDC00 and 0x10000 noise
    -
    6231  // in the result so we have to substract with:
    -
    6232  // (0xD800 << 10) + DC00 - 0x10000 = 0x35FDC00
    -
    6233  - 0x35FDC00;
    -
    6234  }
    -
    6235  else
    -
    6236  {
    -
    6237  throw std::invalid_argument("missing or wrong low surrogate");
    -
    6238  }
    -
    6239  }
    -
    6240 
    -
    6241  if (codepoint < 0x80)
    -
    6242  {
    -
    6243  // 1-byte characters: 0xxxxxxx (ASCII)
    -
    6244  result.append(1, static_cast<typename string_t::value_type>(codepoint));
    -
    6245  }
    -
    6246  else if (codepoint <= 0x7ff)
    -
    6247  {
    -
    6248  // 2-byte characters: 110xxxxx 10xxxxxx
    -
    6249  result.append(1, static_cast<typename string_t::value_type>(0xC0 | ((codepoint >> 6) & 0x1F)));
    -
    6250  result.append(1, static_cast<typename string_t::value_type>(0x80 | (codepoint & 0x3F)));
    -
    6251  }
    -
    6252  else if (codepoint <= 0xffff)
    -
    6253  {
    -
    6254  // 3-byte characters: 1110xxxx 10xxxxxx 10xxxxxx
    -
    6255  result.append(1, static_cast<typename string_t::value_type>(0xE0 | ((codepoint >> 12) & 0x0F)));
    -
    6256  result.append(1, static_cast<typename string_t::value_type>(0x80 | ((codepoint >> 6) & 0x3F)));
    -
    6257  result.append(1, static_cast<typename string_t::value_type>(0x80 | (codepoint & 0x3F)));
    -
    6258  }
    -
    6259  else if (codepoint <= 0x10ffff)
    -
    6260  {
    -
    6261  // 4-byte characters: 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx
    -
    6262  result.append(1, static_cast<typename string_t::value_type>(0xF0 | ((codepoint >> 18) & 0x07)));
    -
    6263  result.append(1, static_cast<typename string_t::value_type>(0x80 | ((codepoint >> 12) & 0x3F)));
    -
    6264  result.append(1, static_cast<typename string_t::value_type>(0x80 | ((codepoint >> 6) & 0x3F)));
    -
    6265  result.append(1, static_cast<typename string_t::value_type>(0x80 | (codepoint & 0x3F)));
    -
    6266  }
    -
    6267  else
    -
    6268  {
    -
    6269  throw std::out_of_range("code points above 0x10FFFF are invalid");
    -
    6270  }
    -
    6271 
    -
    6272  return result;
    -
    6273  }
    -
    6274 
    -
    6276  static std::string token_type_name(token_type t)
    -
    6277  {
    -
    6278  switch (t)
    -
    6279  {
    -
    6280  case token_type::uninitialized:
    -
    6281  return "<uninitialized>";
    -
    6282  case token_type::literal_true:
    -
    6283  return "true literal";
    -
    6284  case token_type::literal_false:
    -
    6285  return "false literal";
    -
    6286  case token_type::literal_null:
    -
    6287  return "null literal";
    -
    6288  case token_type::value_string:
    -
    6289  return "string literal";
    -
    6290  case token_type::value_number:
    -
    6291  return "number literal";
    -
    6292  case token_type::begin_array:
    -
    6293  return "[";
    -
    6294  case token_type::begin_object:
    -
    6295  return "{";
    -
    6296  case token_type::end_array:
    -
    6297  return "]";
    -
    6298  case token_type::end_object:
    -
    6299  return "}";
    -
    6300  case token_type::name_separator:
    -
    6301  return ":";
    -
    6302  case token_type::value_separator:
    -
    6303  return ",";
    -
    6304  case token_type::parse_error:
    -
    6305  return "<parse error>";
    -
    6306  case token_type::end_of_input:
    -
    6307  return "<end of input>";
    -
    6308  default:
    -
    6309  {
    -
    6310  // catch non-enum values
    -
    6311  return "unknown token"; // LCOV_EXCL_LINE
    -
    6312  }
    -
    6313  }
    -
    6314  }
    -
    6315 
    -
    6326  token_type scan() noexcept
    -
    6327  {
    -
    6328  // pointer for backtracking information
    -
    6329  m_marker = nullptr;
    -
    6330 
    -
    6331  // remember the begin of the token
    -
    6332  m_start = m_cursor;
    -
    6333 
    -
    6334 
    -
    6335  {
    -
    6336  lexer_char_t yych;
    -
    6337  unsigned int yyaccept = 0;
    -
    6338  static const unsigned char yybm[] =
    -
    6339  {
    -
    6340  0, 0, 0, 0, 0, 0, 0, 0,
    -
    6341  0, 32, 32, 0, 0, 32, 0, 0,
    -
    6342  64, 64, 64, 64, 64, 64, 64, 64,
    -
    6343  64, 64, 64, 64, 64, 64, 64, 64,
    -
    6344  96, 64, 0, 64, 64, 64, 64, 64,
    -
    6345  64, 64, 64, 64, 64, 64, 64, 64,
    -
    6346  192, 192, 192, 192, 192, 192, 192, 192,
    -
    6347  192, 192, 64, 64, 64, 64, 64, 64,
    -
    6348  64, 64, 64, 64, 64, 64, 64, 64,
    -
    6349  64, 64, 64, 64, 64, 64, 64, 64,
    -
    6350  64, 64, 64, 64, 64, 64, 64, 64,
    -
    6351  64, 64, 64, 64, 0, 64, 64, 64,
    -
    6352  64, 64, 64, 64, 64, 64, 64, 64,
    -
    6353  64, 64, 64, 64, 64, 64, 64, 64,
    -
    6354  64, 64, 64, 64, 64, 64, 64, 64,
    -
    6355  64, 64, 64, 64, 64, 64, 64, 64,
    -
    6356  64, 64, 64, 64, 64, 64, 64, 64,
    -
    6357  64, 64, 64, 64, 64, 64, 64, 64,
    -
    6358  64, 64, 64, 64, 64, 64, 64, 64,
    -
    6359  64, 64, 64, 64, 64, 64, 64, 64,
    -
    6360  64, 64, 64, 64, 64, 64, 64, 64,
    -
    6361  64, 64, 64, 64, 64, 64, 64, 64,
    -
    6362  64, 64, 64, 64, 64, 64, 64, 64,
    -
    6363  64, 64, 64, 64, 64, 64, 64, 64,
    -
    6364  64, 64, 64, 64, 64, 64, 64, 64,
    -
    6365  64, 64, 64, 64, 64, 64, 64, 64,
    -
    6366  64, 64, 64, 64, 64, 64, 64, 64,
    -
    6367  64, 64, 64, 64, 64, 64, 64, 64,
    -
    6368  64, 64, 64, 64, 64, 64, 64, 64,
    -
    6369  64, 64, 64, 64, 64, 64, 64, 64,
    -
    6370  64, 64, 64, 64, 64, 64, 64, 64,
    -
    6371  64, 64, 64, 64, 64, 64, 64, 64,
    -
    6372  };
    -
    6373  if ((m_limit - m_cursor) < 5)
    -
    6374  {
    -
    6375  yyfill(); // LCOV_EXCL_LINE;
    -
    6376  }
    -
    6377  yych = *m_cursor;
    -
    6378  if (yych <= ':')
    -
    6379  {
    -
    6380  if (yych <= ' ')
    -
    6381  {
    -
    6382  if (yych <= '\n')
    -
    6383  {
    -
    6384  if (yych <= 0x00)
    -
    6385  {
    -
    6386  goto basic_json_parser_28;
    -
    6387  }
    -
    6388  if (yych <= 0x08)
    -
    6389  {
    -
    6390  goto basic_json_parser_30;
    -
    6391  }
    -
    6392  if (yych >= '\n')
    -
    6393  {
    -
    6394  goto basic_json_parser_4;
    -
    6395  }
    -
    6396  }
    -
    6397  else
    -
    6398  {
    -
    6399  if (yych == '\r')
    -
    6400  {
    -
    6401  goto basic_json_parser_2;
    -
    6402  }
    -
    6403  if (yych <= 0x1F)
    -
    6404  {
    -
    6405  goto basic_json_parser_30;
    -
    6406  }
    -
    6407  }
    -
    6408  }
    -
    6409  else
    -
    6410  {
    -
    6411  if (yych <= ',')
    -
    6412  {
    -
    6413  if (yych == '"')
    -
    6414  {
    -
    6415  goto basic_json_parser_27;
    -
    6416  }
    -
    6417  if (yych <= '+')
    -
    6418  {
    -
    6419  goto basic_json_parser_30;
    -
    6420  }
    -
    6421  goto basic_json_parser_16;
    -
    6422  }
    -
    6423  else
    -
    6424  {
    -
    6425  if (yych <= '/')
    -
    6426  {
    -
    6427  if (yych <= '-')
    -
    6428  {
    -
    6429  goto basic_json_parser_23;
    -
    6430  }
    -
    6431  goto basic_json_parser_30;
    -
    6432  }
    -
    6433  else
    -
    6434  {
    -
    6435  if (yych <= '0')
    -
    6436  {
    -
    6437  goto basic_json_parser_24;
    -
    6438  }
    -
    6439  if (yych <= '9')
    -
    6440  {
    -
    6441  goto basic_json_parser_26;
    -
    6442  }
    -
    6443  goto basic_json_parser_18;
    -
    6444  }
    -
    6445  }
    -
    6446  }
    -
    6447  }
    -
    6448  else
    -
    6449  {
    -
    6450  if (yych <= 'n')
    -
    6451  {
    -
    6452  if (yych <= ']')
    -
    6453  {
    -
    6454  if (yych == '[')
    -
    6455  {
    -
    6456  goto basic_json_parser_8;
    -
    6457  }
    -
    6458  if (yych <= '\\')
    -
    6459  {
    -
    6460  goto basic_json_parser_30;
    -
    6461  }
    -
    6462  goto basic_json_parser_10;
    -
    6463  }
    -
    6464  else
    -
    6465  {
    -
    6466  if (yych == 'f')
    -
    6467  {
    -
    6468  goto basic_json_parser_22;
    -
    6469  }
    -
    6470  if (yych <= 'm')
    -
    6471  {
    -
    6472  goto basic_json_parser_30;
    -
    6473  }
    -
    6474  goto basic_json_parser_20;
    -
    6475  }
    -
    6476  }
    -
    6477  else
    -
    6478  {
    -
    6479  if (yych <= '{')
    -
    6480  {
    -
    6481  if (yych == 't')
    -
    6482  {
    -
    6483  goto basic_json_parser_21;
    -
    6484  }
    -
    6485  if (yych <= 'z')
    -
    6486  {
    -
    6487  goto basic_json_parser_30;
    -
    6488  }
    -
    6489  goto basic_json_parser_12;
    -
    6490  }
    -
    6491  else
    -
    6492  {
    -
    6493  if (yych <= '}')
    -
    6494  {
    -
    6495  if (yych <= '|')
    -
    6496  {
    -
    6497  goto basic_json_parser_30;
    -
    6498  }
    -
    6499  goto basic_json_parser_14;
    -
    6500  }
    -
    6501  else
    -
    6502  {
    -
    6503  if (yych == 0xEF)
    -
    6504  {
    -
    6505  goto basic_json_parser_6;
    -
    6506  }
    -
    6507  goto basic_json_parser_30;
    -
    6508  }
    -
    6509  }
    -
    6510  }
    -
    6511  }
    -
    6512 basic_json_parser_2:
    -
    6513  ++m_cursor;
    -
    6514  yych = *m_cursor;
    -
    6515  goto basic_json_parser_5;
    -
    6516 basic_json_parser_3:
    -
    6517  {
    -
    6518  return scan();
    -
    6519  }
    -
    6520 basic_json_parser_4:
    -
    6521  ++m_cursor;
    -
    6522  if (m_limit <= m_cursor)
    -
    6523  {
    -
    6524  yyfill(); // LCOV_EXCL_LINE;
    -
    6525  }
    -
    6526  yych = *m_cursor;
    -
    6527 basic_json_parser_5:
    -
    6528  if (yybm[0 + yych] & 32)
    -
    6529  {
    -
    6530  goto basic_json_parser_4;
    -
    6531  }
    -
    6532  goto basic_json_parser_3;
    -
    6533 basic_json_parser_6:
    -
    6534  yyaccept = 0;
    -
    6535  yych = *(m_marker = ++m_cursor);
    -
    6536  if (yych == 0xBB)
    -
    6537  {
    -
    6538  goto basic_json_parser_64;
    -
    6539  }
    -
    6540 basic_json_parser_7:
    -
    6541  {
    -
    6542  return token_type::parse_error;
    -
    6543  }
    -
    6544 basic_json_parser_8:
    -
    6545  ++m_cursor;
    -
    6546  {
    -
    6547  return token_type::begin_array;
    -
    6548  }
    -
    6549 basic_json_parser_10:
    -
    6550  ++m_cursor;
    -
    6551  {
    -
    6552  return token_type::end_array;
    -
    6553  }
    -
    6554 basic_json_parser_12:
    -
    6555  ++m_cursor;
    -
    6556  {
    -
    6557  return token_type::begin_object;
    -
    6558  }
    -
    6559 basic_json_parser_14:
    -
    6560  ++m_cursor;
    -
    6561  {
    -
    6562  return token_type::end_object;
    -
    6563  }
    -
    6564 basic_json_parser_16:
    -
    6565  ++m_cursor;
    -
    6566  {
    -
    6567  return token_type::value_separator;
    -
    6568  }
    -
    6569 basic_json_parser_18:
    -
    6570  ++m_cursor;
    -
    6571  {
    -
    6572  return token_type::name_separator;
    -
    6573  }
    -
    6574 basic_json_parser_20:
    -
    6575  yyaccept = 0;
    -
    6576  yych = *(m_marker = ++m_cursor);
    -
    6577  if (yych == 'u')
    -
    6578  {
    -
    6579  goto basic_json_parser_60;
    -
    6580  }
    -
    6581  goto basic_json_parser_7;
    -
    6582 basic_json_parser_21:
    -
    6583  yyaccept = 0;
    -
    6584  yych = *(m_marker = ++m_cursor);
    -
    6585  if (yych == 'r')
    -
    6586  {
    -
    6587  goto basic_json_parser_56;
    -
    6588  }
    -
    6589  goto basic_json_parser_7;
    -
    6590 basic_json_parser_22:
    -
    6591  yyaccept = 0;
    -
    6592  yych = *(m_marker = ++m_cursor);
    -
    6593  if (yych == 'a')
    -
    6594  {
    -
    6595  goto basic_json_parser_51;
    -
    6596  }
    -
    6597  goto basic_json_parser_7;
    -
    6598 basic_json_parser_23:
    -
    6599  yych = *++m_cursor;
    -
    6600  if (yych <= '/')
    -
    6601  {
    -
    6602  goto basic_json_parser_7;
    -
    6603  }
    -
    6604  if (yych <= '0')
    -
    6605  {
    -
    6606  goto basic_json_parser_50;
    -
    6607  }
    -
    6608  if (yych <= '9')
    -
    6609  {
    -
    6610  goto basic_json_parser_41;
    -
    6611  }
    -
    6612  goto basic_json_parser_7;
    -
    6613 basic_json_parser_24:
    -
    6614  yyaccept = 1;
    -
    6615  yych = *(m_marker = ++m_cursor);
    -
    6616  if (yych <= 'D')
    -
    6617  {
    -
    6618  if (yych == '.')
    -
    6619  {
    -
    6620  goto basic_json_parser_43;
    -
    6621  }
    -
    6622  }
    -
    6623  else
    -
    6624  {
    -
    6625  if (yych <= 'E')
    -
    6626  {
    -
    6627  goto basic_json_parser_44;
    -
    6628  }
    -
    6629  if (yych == 'e')
    -
    6630  {
    -
    6631  goto basic_json_parser_44;
    -
    6632  }
    -
    6633  }
    -
    6634 basic_json_parser_25:
    -
    6635  {
    -
    6636  return token_type::value_number;
    -
    6637  }
    -
    6638 basic_json_parser_26:
    -
    6639  yyaccept = 1;
    -
    6640  yych = *(m_marker = ++m_cursor);
    -
    6641  goto basic_json_parser_42;
    -
    6642 basic_json_parser_27:
    -
    6643  yyaccept = 0;
    -
    6644  yych = *(m_marker = ++m_cursor);
    -
    6645  if (yych <= 0x0F)
    -
    6646  {
    -
    6647  goto basic_json_parser_7;
    -
    6648  }
    -
    6649  goto basic_json_parser_32;
    -
    6650 basic_json_parser_28:
    + +
    6064  {
    +
    6065  base_iterator::operator--();
    +
    6066  return *this;
    +
    6067  }
    +
    6068 
    + +
    6071  {
    +
    6072  base_iterator::operator+=(i);
    +
    6073  return *this;
    +
    6074  }
    +
    6075 
    + +
    6078  {
    +
    6079  auto result = *this;
    +
    6080  result += i;
    +
    6081  return result;
    +
    6082  }
    +
    6083 
    + +
    6086  {
    +
    6087  auto result = *this;
    +
    6088  result -= i;
    +
    6089  return result;
    +
    6090  }
    +
    6091 
    + +
    6094  {
    +
    6095  return this->base() - other.base();
    +
    6096  }
    +
    6097 
    + +
    6100  {
    +
    6101  return *(this->operator+(n));
    +
    6102  }
    +
    6103 
    +
    6105  typename object_t::key_type key() const
    +
    6106  {
    +
    6107  auto it = --this->base();
    +
    6108  return it.key();
    +
    6109  }
    +
    6110 
    + +
    6113  {
    +
    6114  auto it = --this->base();
    +
    6115  return it.operator * ();
    +
    6116  }
    +
    6117  };
    +
    6118 
    + +
    6127  {
    +
    6128  private:
    +
    6130  basic_json& container;
    +
    6132  using json_iterator = decltype(std::begin(container));
    +
    6133 
    +
    6135  class iterator_wrapper_internal
    +
    6136  {
    +
    6137  private:
    +
    6139  json_iterator anchor;
    +
    6141  size_t array_index = 0;
    +
    6142 
    +
    6143  public:
    +
    6145  iterator_wrapper_internal(json_iterator i) : anchor(i)
    +
    6146  {}
    +
    6147 
    +
    6149  iterator_wrapper_internal& operator*()
    +
    6150  {
    +
    6151  return *this;
    +
    6152  }
    +
    6153 
    +
    6155  iterator_wrapper_internal& operator++()
    +
    6156  {
    +
    6157  ++anchor;
    +
    6158  ++array_index;
    +
    6159 
    +
    6160  return *this;
    +
    6161  }
    +
    6162 
    +
    6164  bool operator!= (const iterator_wrapper_internal& o)
    +
    6165  {
    +
    6166  return anchor != o.anchor;
    +
    6167  }
    +
    6168 
    +
    6170  typename basic_json::string_t key() const
    +
    6171  {
    +
    6172  switch (anchor.m_object->type())
    +
    6173  {
    +
    6174  // use integer array index as key
    +
    6175  case value_t::array:
    +
    6176  {
    +
    6177  return std::to_string(array_index);
    +
    6178  }
    +
    6179 
    +
    6180  // use key from the object
    +
    6181  case value_t::object:
    +
    6182  {
    +
    6183  return anchor.key();
    +
    6184  }
    +
    6185 
    +
    6186  // use an empty key for all primitive types
    +
    6187  default:
    +
    6188  {
    +
    6189  return "";
    +
    6190  }
    +
    6191  }
    +
    6192  }
    +
    6193 
    +
    6195  typename json_iterator::reference value() const
    +
    6196  {
    +
    6197  return anchor.value();
    +
    6198  }
    +
    6199  };
    +
    6200 
    +
    6201  public:
    +
    6203  iterator_wrapper(basic_json& cont)
    +
    6204  : container(cont)
    +
    6205  {}
    +
    6206 
    +
    6208  iterator_wrapper_internal begin()
    +
    6209  {
    +
    6210  return iterator_wrapper_internal(container.begin());
    +
    6211  }
    +
    6212 
    +
    6214  iterator_wrapper_internal end()
    +
    6215  {
    +
    6216  return iterator_wrapper_internal(container.end());
    +
    6217  }
    +
    6218  };
    +
    6219 
    +
    6220  private:
    +
    6222  // lexer and parser //
    +
    6224 
    +
    6232  class lexer
    +
    6233  {
    +
    6234  public:
    +
    6236  enum class token_type
    +
    6237  {
    +
    6238  uninitialized,
    +
    6239  literal_true,
    +
    6240  literal_false,
    +
    6241  literal_null,
    +
    6242  value_string,
    +
    6243  value_number,
    +
    6244  begin_array,
    +
    6245  begin_object,
    +
    6246  end_array,
    +
    6247  end_object,
    +
    6248  name_separator,
    +
    6249  value_separator,
    +
    6250  parse_error,
    +
    6251  end_of_input
    +
    6252  };
    +
    6253 
    +
    6255  using lexer_char_t = unsigned char;
    +
    6256 
    +
    6258  explicit lexer(const string_t& s) noexcept
    +
    6259  : m_stream(nullptr), m_buffer(s)
    +
    6260  {
    +
    6261  m_content = reinterpret_cast<const lexer_char_t*>(s.c_str());
    +
    6262  m_start = m_cursor = m_content;
    +
    6263  m_limit = m_content + s.size();
    +
    6264  }
    +
    6265  explicit lexer(std::istream* s) noexcept
    +
    6266  : m_stream(s), m_buffer()
    +
    6267  {
    +
    6268  getline(*m_stream, m_buffer);
    +
    6269  m_content = reinterpret_cast<const lexer_char_t*>(m_buffer.c_str());
    +
    6270  m_start = m_cursor = m_content;
    +
    6271  m_limit = m_content + m_buffer.size();
    +
    6272  }
    +
    6273 
    +
    6275  lexer() = default;
    +
    6276 
    +
    6277  // switch of unwanted functions
    +
    6278  lexer(const lexer&) = delete;
    +
    6279  lexer operator=(const lexer&) = delete;
    +
    6280 
    +
    6292  static string_t to_unicode(const std::size_t codepoint1,
    +
    6293  const std::size_t codepoint2 = 0)
    +
    6294  {
    +
    6295  string_t result;
    +
    6296 
    +
    6297  // calculate the codepoint from the given code points
    +
    6298  std::size_t codepoint = codepoint1;
    +
    6299 
    +
    6300  // check if codepoint1 is a high surrogate
    +
    6301  if (codepoint1 >= 0xD800 and codepoint1 <= 0xDBFF)
    +
    6302  {
    +
    6303  // check if codepoint2 is a low surrogate
    +
    6304  if (codepoint2 >= 0xDC00 and codepoint2 <= 0xDFFF)
    +
    6305  {
    +
    6306  codepoint =
    +
    6307  // high surrogate occupies the most significant 22 bits
    +
    6308  (codepoint1 << 10)
    +
    6309  // low surrogate occupies the least significant 15 bits
    +
    6310  + codepoint2
    +
    6311  // there is still the 0xD800, 0xDC00 and 0x10000 noise
    +
    6312  // in the result so we have to substract with:
    +
    6313  // (0xD800 << 10) + DC00 - 0x10000 = 0x35FDC00
    +
    6314  - 0x35FDC00;
    +
    6315  }
    +
    6316  else
    +
    6317  {
    +
    6318  throw std::invalid_argument("missing or wrong low surrogate");
    +
    6319  }
    +
    6320  }
    +
    6321 
    +
    6322  if (codepoint < 0x80)
    +
    6323  {
    +
    6324  // 1-byte characters: 0xxxxxxx (ASCII)
    +
    6325  result.append(1, static_cast<typename string_t::value_type>(codepoint));
    +
    6326  }
    +
    6327  else if (codepoint <= 0x7ff)
    +
    6328  {
    +
    6329  // 2-byte characters: 110xxxxx 10xxxxxx
    +
    6330  result.append(1, static_cast<typename string_t::value_type>(0xC0 | ((codepoint >> 6) & 0x1F)));
    +
    6331  result.append(1, static_cast<typename string_t::value_type>(0x80 | (codepoint & 0x3F)));
    +
    6332  }
    +
    6333  else if (codepoint <= 0xffff)
    +
    6334  {
    +
    6335  // 3-byte characters: 1110xxxx 10xxxxxx 10xxxxxx
    +
    6336  result.append(1, static_cast<typename string_t::value_type>(0xE0 | ((codepoint >> 12) & 0x0F)));
    +
    6337  result.append(1, static_cast<typename string_t::value_type>(0x80 | ((codepoint >> 6) & 0x3F)));
    +
    6338  result.append(1, static_cast<typename string_t::value_type>(0x80 | (codepoint & 0x3F)));
    +
    6339  }
    +
    6340  else if (codepoint <= 0x10ffff)
    +
    6341  {
    +
    6342  // 4-byte characters: 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx
    +
    6343  result.append(1, static_cast<typename string_t::value_type>(0xF0 | ((codepoint >> 18) & 0x07)));
    +
    6344  result.append(1, static_cast<typename string_t::value_type>(0x80 | ((codepoint >> 12) & 0x3F)));
    +
    6345  result.append(1, static_cast<typename string_t::value_type>(0x80 | ((codepoint >> 6) & 0x3F)));
    +
    6346  result.append(1, static_cast<typename string_t::value_type>(0x80 | (codepoint & 0x3F)));
    +
    6347  }
    +
    6348  else
    +
    6349  {
    +
    6350  throw std::out_of_range("code points above 0x10FFFF are invalid");
    +
    6351  }
    +
    6352 
    +
    6353  return result;
    +
    6354  }
    +
    6355 
    +
    6357  static std::string token_type_name(token_type t)
    +
    6358  {
    +
    6359  switch (t)
    +
    6360  {
    +
    6361  case token_type::uninitialized:
    +
    6362  return "<uninitialized>";
    +
    6363  case token_type::literal_true:
    +
    6364  return "true literal";
    +
    6365  case token_type::literal_false:
    +
    6366  return "false literal";
    +
    6367  case token_type::literal_null:
    +
    6368  return "null literal";
    +
    6369  case token_type::value_string:
    +
    6370  return "string literal";
    +
    6371  case token_type::value_number:
    +
    6372  return "number literal";
    +
    6373  case token_type::begin_array:
    +
    6374  return "[";
    +
    6375  case token_type::begin_object:
    +
    6376  return "{";
    +
    6377  case token_type::end_array:
    +
    6378  return "]";
    +
    6379  case token_type::end_object:
    +
    6380  return "}";
    +
    6381  case token_type::name_separator:
    +
    6382  return ":";
    +
    6383  case token_type::value_separator:
    +
    6384  return ",";
    +
    6385  case token_type::parse_error:
    +
    6386  return "<parse error>";
    +
    6387  case token_type::end_of_input:
    +
    6388  return "<end of input>";
    +
    6389  default:
    +
    6390  {
    +
    6391  // catch non-enum values
    +
    6392  return "unknown token"; // LCOV_EXCL_LINE
    +
    6393  }
    +
    6394  }
    +
    6395  }
    +
    6396 
    +
    6407  token_type scan() noexcept
    +
    6408  {
    +
    6409  // pointer for backtracking information
    +
    6410  m_marker = nullptr;
    +
    6411 
    +
    6412  // remember the begin of the token
    +
    6413  m_start = m_cursor;
    +
    6414 
    +
    6415 
    +
    6416  {
    +
    6417  lexer_char_t yych;
    +
    6418  unsigned int yyaccept = 0;
    +
    6419  static const unsigned char yybm[] =
    +
    6420  {
    +
    6421  0, 0, 0, 0, 0, 0, 0, 0,
    +
    6422  0, 32, 32, 0, 0, 32, 0, 0,
    +
    6423  64, 64, 64, 64, 64, 64, 64, 64,
    +
    6424  64, 64, 64, 64, 64, 64, 64, 64,
    +
    6425  96, 64, 0, 64, 64, 64, 64, 64,
    +
    6426  64, 64, 64, 64, 64, 64, 64, 64,
    +
    6427  192, 192, 192, 192, 192, 192, 192, 192,
    +
    6428  192, 192, 64, 64, 64, 64, 64, 64,
    +
    6429  64, 64, 64, 64, 64, 64, 64, 64,
    +
    6430  64, 64, 64, 64, 64, 64, 64, 64,
    +
    6431  64, 64, 64, 64, 64, 64, 64, 64,
    +
    6432  64, 64, 64, 64, 0, 64, 64, 64,
    +
    6433  64, 64, 64, 64, 64, 64, 64, 64,
    +
    6434  64, 64, 64, 64, 64, 64, 64, 64,
    +
    6435  64, 64, 64, 64, 64, 64, 64, 64,
    +
    6436  64, 64, 64, 64, 64, 64, 64, 64,
    +
    6437  64, 64, 64, 64, 64, 64, 64, 64,
    +
    6438  64, 64, 64, 64, 64, 64, 64, 64,
    +
    6439  64, 64, 64, 64, 64, 64, 64, 64,
    +
    6440  64, 64, 64, 64, 64, 64, 64, 64,
    +
    6441  64, 64, 64, 64, 64, 64, 64, 64,
    +
    6442  64, 64, 64, 64, 64, 64, 64, 64,
    +
    6443  64, 64, 64, 64, 64, 64, 64, 64,
    +
    6444  64, 64, 64, 64, 64, 64, 64, 64,
    +
    6445  64, 64, 64, 64, 64, 64, 64, 64,
    +
    6446  64, 64, 64, 64, 64, 64, 64, 64,
    +
    6447  64, 64, 64, 64, 64, 64, 64, 64,
    +
    6448  64, 64, 64, 64, 64, 64, 64, 64,
    +
    6449  64, 64, 64, 64, 64, 64, 64, 64,
    +
    6450  64, 64, 64, 64, 64, 64, 64, 64,
    +
    6451  64, 64, 64, 64, 64, 64, 64, 64,
    +
    6452  64, 64, 64, 64, 64, 64, 64, 64,
    +
    6453  };
    +
    6454  if ((m_limit - m_cursor) < 5)
    +
    6455  {
    +
    6456  yyfill(); // LCOV_EXCL_LINE;
    +
    6457  }
    +
    6458  yych = *m_cursor;
    +
    6459  if (yych <= ':')
    +
    6460  {
    +
    6461  if (yych <= ' ')
    +
    6462  {
    +
    6463  if (yych <= '\n')
    +
    6464  {
    +
    6465  if (yych <= 0x00)
    +
    6466  {
    +
    6467  goto basic_json_parser_28;
    +
    6468  }
    +
    6469  if (yych <= 0x08)
    +
    6470  {
    +
    6471  goto basic_json_parser_30;
    +
    6472  }
    +
    6473  if (yych >= '\n')
    +
    6474  {
    +
    6475  goto basic_json_parser_4;
    +
    6476  }
    +
    6477  }
    +
    6478  else
    +
    6479  {
    +
    6480  if (yych == '\r')
    +
    6481  {
    +
    6482  goto basic_json_parser_2;
    +
    6483  }
    +
    6484  if (yych <= 0x1F)
    +
    6485  {
    +
    6486  goto basic_json_parser_30;
    +
    6487  }
    +
    6488  }
    +
    6489  }
    +
    6490  else
    +
    6491  {
    +
    6492  if (yych <= ',')
    +
    6493  {
    +
    6494  if (yych == '"')
    +
    6495  {
    +
    6496  goto basic_json_parser_27;
    +
    6497  }
    +
    6498  if (yych <= '+')
    +
    6499  {
    +
    6500  goto basic_json_parser_30;
    +
    6501  }
    +
    6502  goto basic_json_parser_16;
    +
    6503  }
    +
    6504  else
    +
    6505  {
    +
    6506  if (yych <= '/')
    +
    6507  {
    +
    6508  if (yych <= '-')
    +
    6509  {
    +
    6510  goto basic_json_parser_23;
    +
    6511  }
    +
    6512  goto basic_json_parser_30;
    +
    6513  }
    +
    6514  else
    +
    6515  {
    +
    6516  if (yych <= '0')
    +
    6517  {
    +
    6518  goto basic_json_parser_24;
    +
    6519  }
    +
    6520  if (yych <= '9')
    +
    6521  {
    +
    6522  goto basic_json_parser_26;
    +
    6523  }
    +
    6524  goto basic_json_parser_18;
    +
    6525  }
    +
    6526  }
    +
    6527  }
    +
    6528  }
    +
    6529  else
    +
    6530  {
    +
    6531  if (yych <= 'n')
    +
    6532  {
    +
    6533  if (yych <= ']')
    +
    6534  {
    +
    6535  if (yych == '[')
    +
    6536  {
    +
    6537  goto basic_json_parser_8;
    +
    6538  }
    +
    6539  if (yych <= '\\')
    +
    6540  {
    +
    6541  goto basic_json_parser_30;
    +
    6542  }
    +
    6543  goto basic_json_parser_10;
    +
    6544  }
    +
    6545  else
    +
    6546  {
    +
    6547  if (yych == 'f')
    +
    6548  {
    +
    6549  goto basic_json_parser_22;
    +
    6550  }
    +
    6551  if (yych <= 'm')
    +
    6552  {
    +
    6553  goto basic_json_parser_30;
    +
    6554  }
    +
    6555  goto basic_json_parser_20;
    +
    6556  }
    +
    6557  }
    +
    6558  else
    +
    6559  {
    +
    6560  if (yych <= '{')
    +
    6561  {
    +
    6562  if (yych == 't')
    +
    6563  {
    +
    6564  goto basic_json_parser_21;
    +
    6565  }
    +
    6566  if (yych <= 'z')
    +
    6567  {
    +
    6568  goto basic_json_parser_30;
    +
    6569  }
    +
    6570  goto basic_json_parser_12;
    +
    6571  }
    +
    6572  else
    +
    6573  {
    +
    6574  if (yych <= '}')
    +
    6575  {
    +
    6576  if (yych <= '|')
    +
    6577  {
    +
    6578  goto basic_json_parser_30;
    +
    6579  }
    +
    6580  goto basic_json_parser_14;
    +
    6581  }
    +
    6582  else
    +
    6583  {
    +
    6584  if (yych == 0xEF)
    +
    6585  {
    +
    6586  goto basic_json_parser_6;
    +
    6587  }
    +
    6588  goto basic_json_parser_30;
    +
    6589  }
    +
    6590  }
    +
    6591  }
    +
    6592  }
    +
    6593 basic_json_parser_2:
    +
    6594  ++m_cursor;
    +
    6595  yych = *m_cursor;
    +
    6596  goto basic_json_parser_5;
    +
    6597 basic_json_parser_3:
    +
    6598  {
    +
    6599  return scan();
    +
    6600  }
    +
    6601 basic_json_parser_4:
    +
    6602  ++m_cursor;
    +
    6603  if (m_limit <= m_cursor)
    +
    6604  {
    +
    6605  yyfill(); // LCOV_EXCL_LINE;
    +
    6606  }
    +
    6607  yych = *m_cursor;
    +
    6608 basic_json_parser_5:
    +
    6609  if (yybm[0 + yych] & 32)
    +
    6610  {
    +
    6611  goto basic_json_parser_4;
    +
    6612  }
    +
    6613  goto basic_json_parser_3;
    +
    6614 basic_json_parser_6:
    +
    6615  yyaccept = 0;
    +
    6616  yych = *(m_marker = ++m_cursor);
    +
    6617  if (yych == 0xBB)
    +
    6618  {
    +
    6619  goto basic_json_parser_64;
    +
    6620  }
    +
    6621 basic_json_parser_7:
    +
    6622  {
    +
    6623  return token_type::parse_error;
    +
    6624  }
    +
    6625 basic_json_parser_8:
    +
    6626  ++m_cursor;
    +
    6627  {
    +
    6628  return token_type::begin_array;
    +
    6629  }
    +
    6630 basic_json_parser_10:
    +
    6631  ++m_cursor;
    +
    6632  {
    +
    6633  return token_type::end_array;
    +
    6634  }
    +
    6635 basic_json_parser_12:
    +
    6636  ++m_cursor;
    +
    6637  {
    +
    6638  return token_type::begin_object;
    +
    6639  }
    +
    6640 basic_json_parser_14:
    +
    6641  ++m_cursor;
    +
    6642  {
    +
    6643  return token_type::end_object;
    +
    6644  }
    +
    6645 basic_json_parser_16:
    +
    6646  ++m_cursor;
    +
    6647  {
    +
    6648  return token_type::value_separator;
    +
    6649  }
    +
    6650 basic_json_parser_18:
    6651  ++m_cursor;
    6652  {
    -
    6653  return token_type::end_of_input;
    +
    6653  return token_type::name_separator;
    6654  }
    -
    6655 basic_json_parser_30:
    -
    6656  yych = *++m_cursor;
    -
    6657  goto basic_json_parser_7;
    -
    6658 basic_json_parser_31:
    -
    6659  ++m_cursor;
    -
    6660  if (m_limit <= m_cursor)
    -
    6661  {
    -
    6662  yyfill(); // LCOV_EXCL_LINE;
    -
    6663  }
    -
    6664  yych = *m_cursor;
    -
    6665 basic_json_parser_32:
    -
    6666  if (yybm[0 + yych] & 64)
    +
    6655 basic_json_parser_20:
    +
    6656  yyaccept = 0;
    +
    6657  yych = *(m_marker = ++m_cursor);
    +
    6658  if (yych == 'u')
    +
    6659  {
    +
    6660  goto basic_json_parser_60;
    +
    6661  }
    +
    6662  goto basic_json_parser_7;
    +
    6663 basic_json_parser_21:
    +
    6664  yyaccept = 0;
    +
    6665  yych = *(m_marker = ++m_cursor);
    +
    6666  if (yych == 'r')
    6667  {
    -
    6668  goto basic_json_parser_31;
    +
    6668  goto basic_json_parser_56;
    6669  }
    -
    6670  if (yych <= 0x0F)
    -
    6671  {
    -
    6672  goto basic_json_parser_33;
    -
    6673  }
    -
    6674  if (yych <= '"')
    +
    6670  goto basic_json_parser_7;
    +
    6671 basic_json_parser_22:
    +
    6672  yyaccept = 0;
    +
    6673  yych = *(m_marker = ++m_cursor);
    +
    6674  if (yych == 'a')
    6675  {
    -
    6676  goto basic_json_parser_35;
    +
    6676  goto basic_json_parser_51;
    6677  }
    -
    6678  goto basic_json_parser_34;
    -
    6679 basic_json_parser_33:
    -
    6680  m_cursor = m_marker;
    -
    6681  if (yyaccept == 0)
    +
    6678  goto basic_json_parser_7;
    +
    6679 basic_json_parser_23:
    +
    6680  yych = *++m_cursor;
    +
    6681  if (yych <= '/')
    6682  {
    6683  goto basic_json_parser_7;
    6684  }
    -
    6685  else
    +
    6685  if (yych <= '0')
    6686  {
    -
    6687  goto basic_json_parser_25;
    +
    6687  goto basic_json_parser_50;
    6688  }
    -
    6689 basic_json_parser_34:
    -
    6690  ++m_cursor;
    -
    6691  if (m_limit <= m_cursor)
    -
    6692  {
    -
    6693  yyfill(); // LCOV_EXCL_LINE;
    -
    6694  }
    -
    6695  yych = *m_cursor;
    -
    6696  if (yych <= 'e')
    -
    6697  {
    -
    6698  if (yych <= '/')
    -
    6699  {
    -
    6700  if (yych == '"')
    -
    6701  {
    -
    6702  goto basic_json_parser_31;
    -
    6703  }
    -
    6704  if (yych <= '.')
    -
    6705  {
    -
    6706  goto basic_json_parser_33;
    -
    6707  }
    -
    6708  goto basic_json_parser_31;
    +
    6689  if (yych <= '9')
    +
    6690  {
    +
    6691  goto basic_json_parser_41;
    +
    6692  }
    +
    6693  goto basic_json_parser_7;
    +
    6694 basic_json_parser_24:
    +
    6695  yyaccept = 1;
    +
    6696  yych = *(m_marker = ++m_cursor);
    +
    6697  if (yych <= 'D')
    +
    6698  {
    +
    6699  if (yych == '.')
    +
    6700  {
    +
    6701  goto basic_json_parser_43;
    +
    6702  }
    +
    6703  }
    +
    6704  else
    +
    6705  {
    +
    6706  if (yych <= 'E')
    +
    6707  {
    +
    6708  goto basic_json_parser_44;
    6709  }
    -
    6710  else
    +
    6710  if (yych == 'e')
    6711  {
    -
    6712  if (yych <= '\\')
    -
    6713  {
    -
    6714  if (yych <= '[')
    -
    6715  {
    -
    6716  goto basic_json_parser_33;
    -
    6717  }
    -
    6718  goto basic_json_parser_31;
    -
    6719  }
    -
    6720  else
    -
    6721  {
    -
    6722  if (yych == 'b')
    -
    6723  {
    -
    6724  goto basic_json_parser_31;
    -
    6725  }
    -
    6726  goto basic_json_parser_33;
    -
    6727  }
    -
    6728  }
    +
    6712  goto basic_json_parser_44;
    +
    6713  }
    +
    6714  }
    +
    6715 basic_json_parser_25:
    +
    6716  {
    +
    6717  return token_type::value_number;
    +
    6718  }
    +
    6719 basic_json_parser_26:
    +
    6720  yyaccept = 1;
    +
    6721  yych = *(m_marker = ++m_cursor);
    +
    6722  goto basic_json_parser_42;
    +
    6723 basic_json_parser_27:
    +
    6724  yyaccept = 0;
    +
    6725  yych = *(m_marker = ++m_cursor);
    +
    6726  if (yych <= 0x0F)
    +
    6727  {
    +
    6728  goto basic_json_parser_7;
    6729  }
    -
    6730  else
    -
    6731  {
    -
    6732  if (yych <= 'q')
    -
    6733  {
    -
    6734  if (yych <= 'f')
    -
    6735  {
    -
    6736  goto basic_json_parser_31;
    -
    6737  }
    -
    6738  if (yych == 'n')
    -
    6739  {
    -
    6740  goto basic_json_parser_31;
    -
    6741  }
    -
    6742  goto basic_json_parser_33;
    -
    6743  }
    -
    6744  else
    -
    6745  {
    -
    6746  if (yych <= 's')
    -
    6747  {
    -
    6748  if (yych <= 'r')
    -
    6749  {
    -
    6750  goto basic_json_parser_31;
    -
    6751  }
    -
    6752  goto basic_json_parser_33;
    -
    6753  }
    -
    6754  else
    -
    6755  {
    -
    6756  if (yych <= 't')
    -
    6757  {
    -
    6758  goto basic_json_parser_31;
    -
    6759  }
    -
    6760  if (yych <= 'u')
    -
    6761  {
    -
    6762  goto basic_json_parser_37;
    -
    6763  }
    -
    6764  goto basic_json_parser_33;
    -
    6765  }
    -
    6766  }
    -
    6767  }
    -
    6768 basic_json_parser_35:
    -
    6769  ++m_cursor;
    -
    6770  {
    -
    6771  return token_type::value_string;
    -
    6772  }
    -
    6773 basic_json_parser_37:
    -
    6774  ++m_cursor;
    -
    6775  if (m_limit <= m_cursor)
    -
    6776  {
    -
    6777  yyfill(); // LCOV_EXCL_LINE;
    -
    6778  }
    -
    6779  yych = *m_cursor;
    -
    6780  if (yych <= '@')
    -
    6781  {
    -
    6782  if (yych <= '/')
    -
    6783  {
    -
    6784  goto basic_json_parser_33;
    -
    6785  }
    -
    6786  if (yych >= ':')
    -
    6787  {
    -
    6788  goto basic_json_parser_33;
    -
    6789  }
    -
    6790  }
    -
    6791  else
    -
    6792  {
    -
    6793  if (yych <= 'F')
    -
    6794  {
    -
    6795  goto basic_json_parser_38;
    -
    6796  }
    -
    6797  if (yych <= '`')
    -
    6798  {
    -
    6799  goto basic_json_parser_33;
    -
    6800  }
    -
    6801  if (yych >= 'g')
    -
    6802  {
    -
    6803  goto basic_json_parser_33;
    -
    6804  }
    -
    6805  }
    -
    6806 basic_json_parser_38:
    -
    6807  ++m_cursor;
    -
    6808  if (m_limit <= m_cursor)
    -
    6809  {
    -
    6810  yyfill(); // LCOV_EXCL_LINE;
    -
    6811  }
    -
    6812  yych = *m_cursor;
    -
    6813  if (yych <= '@')
    -
    6814  {
    -
    6815  if (yych <= '/')
    -
    6816  {
    -
    6817  goto basic_json_parser_33;
    -
    6818  }
    -
    6819  if (yych >= ':')
    -
    6820  {
    -
    6821  goto basic_json_parser_33;
    -
    6822  }
    -
    6823  }
    -
    6824  else
    -
    6825  {
    -
    6826  if (yych <= 'F')
    -
    6827  {
    -
    6828  goto basic_json_parser_39;
    -
    6829  }
    -
    6830  if (yych <= '`')
    -
    6831  {
    -
    6832  goto basic_json_parser_33;
    -
    6833  }
    -
    6834  if (yych >= 'g')
    -
    6835  {
    -
    6836  goto basic_json_parser_33;
    -
    6837  }
    -
    6838  }
    -
    6839 basic_json_parser_39:
    -
    6840  ++m_cursor;
    -
    6841  if (m_limit <= m_cursor)
    -
    6842  {
    -
    6843  yyfill(); // LCOV_EXCL_LINE;
    -
    6844  }
    -
    6845  yych = *m_cursor;
    -
    6846  if (yych <= '@')
    -
    6847  {
    -
    6848  if (yych <= '/')
    -
    6849  {
    -
    6850  goto basic_json_parser_33;
    -
    6851  }
    -
    6852  if (yych >= ':')
    -
    6853  {
    -
    6854  goto basic_json_parser_33;
    -
    6855  }
    -
    6856  }
    -
    6857  else
    -
    6858  {
    -
    6859  if (yych <= 'F')
    -
    6860  {
    -
    6861  goto basic_json_parser_40;
    -
    6862  }
    -
    6863  if (yych <= '`')
    +
    6730  goto basic_json_parser_32;
    +
    6731 basic_json_parser_28:
    +
    6732  ++m_cursor;
    +
    6733  {
    +
    6734  return token_type::end_of_input;
    +
    6735  }
    +
    6736 basic_json_parser_30:
    +
    6737  yych = *++m_cursor;
    +
    6738  goto basic_json_parser_7;
    +
    6739 basic_json_parser_31:
    +
    6740  ++m_cursor;
    +
    6741  if (m_limit <= m_cursor)
    +
    6742  {
    +
    6743  yyfill(); // LCOV_EXCL_LINE;
    +
    6744  }
    +
    6745  yych = *m_cursor;
    +
    6746 basic_json_parser_32:
    +
    6747  if (yybm[0 + yych] & 64)
    +
    6748  {
    +
    6749  goto basic_json_parser_31;
    +
    6750  }
    +
    6751  if (yych <= 0x0F)
    +
    6752  {
    +
    6753  goto basic_json_parser_33;
    +
    6754  }
    +
    6755  if (yych <= '"')
    +
    6756  {
    +
    6757  goto basic_json_parser_35;
    +
    6758  }
    +
    6759  goto basic_json_parser_34;
    +
    6760 basic_json_parser_33:
    +
    6761  m_cursor = m_marker;
    +
    6762  if (yyaccept == 0)
    +
    6763  {
    +
    6764  goto basic_json_parser_7;
    +
    6765  }
    +
    6766  else
    +
    6767  {
    +
    6768  goto basic_json_parser_25;
    +
    6769  }
    +
    6770 basic_json_parser_34:
    +
    6771  ++m_cursor;
    +
    6772  if (m_limit <= m_cursor)
    +
    6773  {
    +
    6774  yyfill(); // LCOV_EXCL_LINE;
    +
    6775  }
    +
    6776  yych = *m_cursor;
    +
    6777  if (yych <= 'e')
    +
    6778  {
    +
    6779  if (yych <= '/')
    +
    6780  {
    +
    6781  if (yych == '"')
    +
    6782  {
    +
    6783  goto basic_json_parser_31;
    +
    6784  }
    +
    6785  if (yych <= '.')
    +
    6786  {
    +
    6787  goto basic_json_parser_33;
    +
    6788  }
    +
    6789  goto basic_json_parser_31;
    +
    6790  }
    +
    6791  else
    +
    6792  {
    +
    6793  if (yych <= '\\')
    +
    6794  {
    +
    6795  if (yych <= '[')
    +
    6796  {
    +
    6797  goto basic_json_parser_33;
    +
    6798  }
    +
    6799  goto basic_json_parser_31;
    +
    6800  }
    +
    6801  else
    +
    6802  {
    +
    6803  if (yych == 'b')
    +
    6804  {
    +
    6805  goto basic_json_parser_31;
    +
    6806  }
    +
    6807  goto basic_json_parser_33;
    +
    6808  }
    +
    6809  }
    +
    6810  }
    +
    6811  else
    +
    6812  {
    +
    6813  if (yych <= 'q')
    +
    6814  {
    +
    6815  if (yych <= 'f')
    +
    6816  {
    +
    6817  goto basic_json_parser_31;
    +
    6818  }
    +
    6819  if (yych == 'n')
    +
    6820  {
    +
    6821  goto basic_json_parser_31;
    +
    6822  }
    +
    6823  goto basic_json_parser_33;
    +
    6824  }
    +
    6825  else
    +
    6826  {
    +
    6827  if (yych <= 's')
    +
    6828  {
    +
    6829  if (yych <= 'r')
    +
    6830  {
    +
    6831  goto basic_json_parser_31;
    +
    6832  }
    +
    6833  goto basic_json_parser_33;
    +
    6834  }
    +
    6835  else
    +
    6836  {
    +
    6837  if (yych <= 't')
    +
    6838  {
    +
    6839  goto basic_json_parser_31;
    +
    6840  }
    +
    6841  if (yych <= 'u')
    +
    6842  {
    +
    6843  goto basic_json_parser_37;
    +
    6844  }
    +
    6845  goto basic_json_parser_33;
    +
    6846  }
    +
    6847  }
    +
    6848  }
    +
    6849 basic_json_parser_35:
    +
    6850  ++m_cursor;
    +
    6851  {
    +
    6852  return token_type::value_string;
    +
    6853  }
    +
    6854 basic_json_parser_37:
    +
    6855  ++m_cursor;
    +
    6856  if (m_limit <= m_cursor)
    +
    6857  {
    +
    6858  yyfill(); // LCOV_EXCL_LINE;
    +
    6859  }
    +
    6860  yych = *m_cursor;
    +
    6861  if (yych <= '@')
    +
    6862  {
    +
    6863  if (yych <= '/')
    6864  {
    6865  goto basic_json_parser_33;
    6866  }
    -
    6867  if (yych >= 'g')
    +
    6867  if (yych >= ':')
    6868  {
    6869  goto basic_json_parser_33;
    6870  }
    6871  }
    -
    6872 basic_json_parser_40:
    -
    6873  ++m_cursor;
    -
    6874  if (m_limit <= m_cursor)
    -
    6875  {
    -
    6876  yyfill(); // LCOV_EXCL_LINE;
    -
    6877  }
    -
    6878  yych = *m_cursor;
    -
    6879  if (yych <= '@')
    -
    6880  {
    -
    6881  if (yych <= '/')
    -
    6882  {
    -
    6883  goto basic_json_parser_33;
    -
    6884  }
    -
    6885  if (yych <= '9')
    -
    6886  {
    -
    6887  goto basic_json_parser_31;
    -
    6888  }
    -
    6889  goto basic_json_parser_33;
    -
    6890  }
    -
    6891  else
    -
    6892  {
    -
    6893  if (yych <= 'F')
    -
    6894  {
    -
    6895  goto basic_json_parser_31;
    -
    6896  }
    -
    6897  if (yych <= '`')
    -
    6898  {
    -
    6899  goto basic_json_parser_33;
    -
    6900  }
    -
    6901  if (yych <= 'f')
    -
    6902  {
    -
    6903  goto basic_json_parser_31;
    -
    6904  }
    -
    6905  goto basic_json_parser_33;
    -
    6906  }
    -
    6907 basic_json_parser_41:
    -
    6908  yyaccept = 1;
    -
    6909  m_marker = ++m_cursor;
    -
    6910  if ((m_limit - m_cursor) < 3)
    -
    6911  {
    -
    6912  yyfill(); // LCOV_EXCL_LINE;
    -
    6913  }
    -
    6914  yych = *m_cursor;
    -
    6915 basic_json_parser_42:
    -
    6916  if (yybm[0 + yych] & 128)
    -
    6917  {
    -
    6918  goto basic_json_parser_41;
    +
    6872  else
    +
    6873  {
    +
    6874  if (yych <= 'F')
    +
    6875  {
    +
    6876  goto basic_json_parser_38;
    +
    6877  }
    +
    6878  if (yych <= '`')
    +
    6879  {
    +
    6880  goto basic_json_parser_33;
    +
    6881  }
    +
    6882  if (yych >= 'g')
    +
    6883  {
    +
    6884  goto basic_json_parser_33;
    +
    6885  }
    +
    6886  }
    +
    6887 basic_json_parser_38:
    +
    6888  ++m_cursor;
    +
    6889  if (m_limit <= m_cursor)
    +
    6890  {
    +
    6891  yyfill(); // LCOV_EXCL_LINE;
    +
    6892  }
    +
    6893  yych = *m_cursor;
    +
    6894  if (yych <= '@')
    +
    6895  {
    +
    6896  if (yych <= '/')
    +
    6897  {
    +
    6898  goto basic_json_parser_33;
    +
    6899  }
    +
    6900  if (yych >= ':')
    +
    6901  {
    +
    6902  goto basic_json_parser_33;
    +
    6903  }
    +
    6904  }
    +
    6905  else
    +
    6906  {
    +
    6907  if (yych <= 'F')
    +
    6908  {
    +
    6909  goto basic_json_parser_39;
    +
    6910  }
    +
    6911  if (yych <= '`')
    +
    6912  {
    +
    6913  goto basic_json_parser_33;
    +
    6914  }
    +
    6915  if (yych >= 'g')
    +
    6916  {
    +
    6917  goto basic_json_parser_33;
    +
    6918  }
    6919  }
    -
    6920  if (yych <= 'D')
    -
    6921  {
    -
    6922  if (yych != '.')
    -
    6923  {
    -
    6924  goto basic_json_parser_25;
    -
    6925  }
    -
    6926  }
    -
    6927  else
    +
    6920 basic_json_parser_39:
    +
    6921  ++m_cursor;
    +
    6922  if (m_limit <= m_cursor)
    +
    6923  {
    +
    6924  yyfill(); // LCOV_EXCL_LINE;
    +
    6925  }
    +
    6926  yych = *m_cursor;
    +
    6927  if (yych <= '@')
    6928  {
    -
    6929  if (yych <= 'E')
    +
    6929  if (yych <= '/')
    6930  {
    -
    6931  goto basic_json_parser_44;
    +
    6931  goto basic_json_parser_33;
    6932  }
    -
    6933  if (yych == 'e')
    +
    6933  if (yych >= ':')
    6934  {
    -
    6935  goto basic_json_parser_44;
    +
    6935  goto basic_json_parser_33;
    6936  }
    -
    6937  goto basic_json_parser_25;
    -
    6938  }
    -
    6939 basic_json_parser_43:
    -
    6940  yych = *++m_cursor;
    -
    6941  if (yych <= '/')
    -
    6942  {
    -
    6943  goto basic_json_parser_33;
    -
    6944  }
    -
    6945  if (yych <= '9')
    -
    6946  {
    -
    6947  goto basic_json_parser_48;
    -
    6948  }
    -
    6949  goto basic_json_parser_33;
    -
    6950 basic_json_parser_44:
    -
    6951  yych = *++m_cursor;
    -
    6952  if (yych <= ',')
    -
    6953  {
    -
    6954  if (yych != '+')
    -
    6955  {
    -
    6956  goto basic_json_parser_33;
    -
    6957  }
    +
    6937  }
    +
    6938  else
    +
    6939  {
    +
    6940  if (yych <= 'F')
    +
    6941  {
    +
    6942  goto basic_json_parser_40;
    +
    6943  }
    +
    6944  if (yych <= '`')
    +
    6945  {
    +
    6946  goto basic_json_parser_33;
    +
    6947  }
    +
    6948  if (yych >= 'g')
    +
    6949  {
    +
    6950  goto basic_json_parser_33;
    +
    6951  }
    +
    6952  }
    +
    6953 basic_json_parser_40:
    +
    6954  ++m_cursor;
    +
    6955  if (m_limit <= m_cursor)
    +
    6956  {
    +
    6957  yyfill(); // LCOV_EXCL_LINE;
    6958  }
    -
    6959  else
    -
    6960  {
    -
    6961  if (yych <= '-')
    -
    6962  {
    -
    6963  goto basic_json_parser_45;
    -
    6964  }
    -
    6965  if (yych <= '/')
    -
    6966  {
    -
    6967  goto basic_json_parser_33;
    -
    6968  }
    -
    6969  if (yych <= '9')
    -
    6970  {
    -
    6971  goto basic_json_parser_46;
    -
    6972  }
    -
    6973  goto basic_json_parser_33;
    -
    6974  }
    -
    6975 basic_json_parser_45:
    -
    6976  yych = *++m_cursor;
    -
    6977  if (yych <= '/')
    -
    6978  {
    -
    6979  goto basic_json_parser_33;
    -
    6980  }
    -
    6981  if (yych >= ':')
    -
    6982  {
    -
    6983  goto basic_json_parser_33;
    -
    6984  }
    -
    6985 basic_json_parser_46:
    -
    6986  ++m_cursor;
    -
    6987  if (m_limit <= m_cursor)
    -
    6988  {
    -
    6989  yyfill(); // LCOV_EXCL_LINE;
    -
    6990  }
    -
    6991  yych = *m_cursor;
    -
    6992  if (yych <= '/')
    -
    6993  {
    -
    6994  goto basic_json_parser_25;
    -
    6995  }
    -
    6996  if (yych <= '9')
    -
    6997  {
    -
    6998  goto basic_json_parser_46;
    -
    6999  }
    -
    7000  goto basic_json_parser_25;
    -
    7001 basic_json_parser_48:
    -
    7002  yyaccept = 1;
    -
    7003  m_marker = ++m_cursor;
    -
    7004  if ((m_limit - m_cursor) < 3)
    -
    7005  {
    -
    7006  yyfill(); // LCOV_EXCL_LINE;
    +
    6959  yych = *m_cursor;
    +
    6960  if (yych <= '@')
    +
    6961  {
    +
    6962  if (yych <= '/')
    +
    6963  {
    +
    6964  goto basic_json_parser_33;
    +
    6965  }
    +
    6966  if (yych <= '9')
    +
    6967  {
    +
    6968  goto basic_json_parser_31;
    +
    6969  }
    +
    6970  goto basic_json_parser_33;
    +
    6971  }
    +
    6972  else
    +
    6973  {
    +
    6974  if (yych <= 'F')
    +
    6975  {
    +
    6976  goto basic_json_parser_31;
    +
    6977  }
    +
    6978  if (yych <= '`')
    +
    6979  {
    +
    6980  goto basic_json_parser_33;
    +
    6981  }
    +
    6982  if (yych <= 'f')
    +
    6983  {
    +
    6984  goto basic_json_parser_31;
    +
    6985  }
    +
    6986  goto basic_json_parser_33;
    +
    6987  }
    +
    6988 basic_json_parser_41:
    +
    6989  yyaccept = 1;
    +
    6990  m_marker = ++m_cursor;
    +
    6991  if ((m_limit - m_cursor) < 3)
    +
    6992  {
    +
    6993  yyfill(); // LCOV_EXCL_LINE;
    +
    6994  }
    +
    6995  yych = *m_cursor;
    +
    6996 basic_json_parser_42:
    +
    6997  if (yybm[0 + yych] & 128)
    +
    6998  {
    +
    6999  goto basic_json_parser_41;
    +
    7000  }
    +
    7001  if (yych <= 'D')
    +
    7002  {
    +
    7003  if (yych != '.')
    +
    7004  {
    +
    7005  goto basic_json_parser_25;
    +
    7006  }
    7007  }
    -
    7008  yych = *m_cursor;
    -
    7009  if (yych <= 'D')
    -
    7010  {
    -
    7011  if (yych <= '/')
    -
    7012  {
    -
    7013  goto basic_json_parser_25;
    -
    7014  }
    -
    7015  if (yych <= '9')
    -
    7016  {
    -
    7017  goto basic_json_parser_48;
    -
    7018  }
    -
    7019  goto basic_json_parser_25;
    -
    7020  }
    -
    7021  else
    -
    7022  {
    -
    7023  if (yych <= 'E')
    -
    7024  {
    -
    7025  goto basic_json_parser_44;
    -
    7026  }
    -
    7027  if (yych == 'e')
    -
    7028  {
    -
    7029  goto basic_json_parser_44;
    -
    7030  }
    -
    7031  goto basic_json_parser_25;
    -
    7032  }
    -
    7033 basic_json_parser_50:
    -
    7034  yyaccept = 1;
    -
    7035  yych = *(m_marker = ++m_cursor);
    -
    7036  if (yych <= 'D')
    -
    7037  {
    -
    7038  if (yych == '.')
    -
    7039  {
    -
    7040  goto basic_json_parser_43;
    -
    7041  }
    -
    7042  goto basic_json_parser_25;
    -
    7043  }
    -
    7044  else
    -
    7045  {
    -
    7046  if (yych <= 'E')
    +
    7008  else
    +
    7009  {
    +
    7010  if (yych <= 'E')
    +
    7011  {
    +
    7012  goto basic_json_parser_44;
    +
    7013  }
    +
    7014  if (yych == 'e')
    +
    7015  {
    +
    7016  goto basic_json_parser_44;
    +
    7017  }
    +
    7018  goto basic_json_parser_25;
    +
    7019  }
    +
    7020 basic_json_parser_43:
    +
    7021  yych = *++m_cursor;
    +
    7022  if (yych <= '/')
    +
    7023  {
    +
    7024  goto basic_json_parser_33;
    +
    7025  }
    +
    7026  if (yych <= '9')
    +
    7027  {
    +
    7028  goto basic_json_parser_48;
    +
    7029  }
    +
    7030  goto basic_json_parser_33;
    +
    7031 basic_json_parser_44:
    +
    7032  yych = *++m_cursor;
    +
    7033  if (yych <= ',')
    +
    7034  {
    +
    7035  if (yych != '+')
    +
    7036  {
    +
    7037  goto basic_json_parser_33;
    +
    7038  }
    +
    7039  }
    +
    7040  else
    +
    7041  {
    +
    7042  if (yych <= '-')
    +
    7043  {
    +
    7044  goto basic_json_parser_45;
    +
    7045  }
    +
    7046  if (yych <= '/')
    7047  {
    -
    7048  goto basic_json_parser_44;
    +
    7048  goto basic_json_parser_33;
    7049  }
    -
    7050  if (yych == 'e')
    +
    7050  if (yych <= '9')
    7051  {
    -
    7052  goto basic_json_parser_44;
    +
    7052  goto basic_json_parser_46;
    7053  }
    -
    7054  goto basic_json_parser_25;
    +
    7054  goto basic_json_parser_33;
    7055  }
    -
    7056 basic_json_parser_51:
    +
    7056 basic_json_parser_45:
    7057  yych = *++m_cursor;
    -
    7058  if (yych != 'l')
    +
    7058  if (yych <= '/')
    7059  {
    7060  goto basic_json_parser_33;
    7061  }
    -
    7062  yych = *++m_cursor;
    -
    7063  if (yych != 's')
    -
    7064  {
    -
    7065  goto basic_json_parser_33;
    -
    7066  }
    -
    7067  yych = *++m_cursor;
    -
    7068  if (yych != 'e')
    +
    7062  if (yych >= ':')
    +
    7063  {
    +
    7064  goto basic_json_parser_33;
    +
    7065  }
    +
    7066 basic_json_parser_46:
    +
    7067  ++m_cursor;
    +
    7068  if (m_limit <= m_cursor)
    7069  {
    -
    7070  goto basic_json_parser_33;
    +
    7070  yyfill(); // LCOV_EXCL_LINE;
    7071  }
    -
    7072  ++m_cursor;
    -
    7073  {
    -
    7074  return token_type::literal_false;
    -
    7075  }
    -
    7076 basic_json_parser_56:
    -
    7077  yych = *++m_cursor;
    -
    7078  if (yych != 'u')
    -
    7079  {
    -
    7080  goto basic_json_parser_33;
    -
    7081  }
    -
    7082  yych = *++m_cursor;
    -
    7083  if (yych != 'e')
    -
    7084  {
    -
    7085  goto basic_json_parser_33;
    -
    7086  }
    -
    7087  ++m_cursor;
    -
    7088  {
    -
    7089  return token_type::literal_true;
    -
    7090  }
    -
    7091 basic_json_parser_60:
    -
    7092  yych = *++m_cursor;
    -
    7093  if (yych != 'l')
    -
    7094  {
    -
    7095  goto basic_json_parser_33;
    -
    7096  }
    -
    7097  yych = *++m_cursor;
    -
    7098  if (yych != 'l')
    -
    7099  {
    -
    7100  goto basic_json_parser_33;
    +
    7072  yych = *m_cursor;
    +
    7073  if (yych <= '/')
    +
    7074  {
    +
    7075  goto basic_json_parser_25;
    +
    7076  }
    +
    7077  if (yych <= '9')
    +
    7078  {
    +
    7079  goto basic_json_parser_46;
    +
    7080  }
    +
    7081  goto basic_json_parser_25;
    +
    7082 basic_json_parser_48:
    +
    7083  yyaccept = 1;
    +
    7084  m_marker = ++m_cursor;
    +
    7085  if ((m_limit - m_cursor) < 3)
    +
    7086  {
    +
    7087  yyfill(); // LCOV_EXCL_LINE;
    +
    7088  }
    +
    7089  yych = *m_cursor;
    +
    7090  if (yych <= 'D')
    +
    7091  {
    +
    7092  if (yych <= '/')
    +
    7093  {
    +
    7094  goto basic_json_parser_25;
    +
    7095  }
    +
    7096  if (yych <= '9')
    +
    7097  {
    +
    7098  goto basic_json_parser_48;
    +
    7099  }
    +
    7100  goto basic_json_parser_25;
    7101  }
    -
    7102  ++m_cursor;
    +
    7102  else
    7103  {
    -
    7104  return token_type::literal_null;
    -
    7105  }
    -
    7106 basic_json_parser_64:
    -
    7107  yych = *++m_cursor;
    -
    7108  if (yych != 0xBF)
    -
    7109  {
    -
    7110  goto basic_json_parser_33;
    -
    7111  }
    -
    7112  ++m_cursor;
    -
    7113  {
    -
    7114  return scan();
    -
    7115  }
    -
    7116  }
    -
    7117 
    -
    7118 
    -
    7119  }
    -
    7120 
    -
    7122  void yyfill() noexcept
    -
    7123  {
    -
    7124  if (not m_stream or not * m_stream)
    -
    7125  {
    -
    7126  return;
    -
    7127  }
    -
    7128 
    -
    7129  const ssize_t offset_start = m_start - m_content;
    -
    7130  const ssize_t offset_marker = m_marker - m_start;
    -
    7131  const ssize_t offset_cursor = m_cursor - m_start;
    -
    7132 
    -
    7133  m_buffer.erase(0, static_cast<size_t>(offset_start));
    -
    7134  std::string line;
    -
    7135  std::getline(*m_stream, line);
    -
    7136  m_buffer += "\n" + line; // add line with newline symbol
    -
    7137 
    -
    7138  m_content = reinterpret_cast<const lexer_char_t*>(m_buffer.c_str());
    -
    7139  m_start = m_content;
    -
    7140  m_marker = m_start + offset_marker;
    -
    7141  m_cursor = m_start + offset_cursor;
    -
    7142  m_limit = m_start + m_buffer.size() - 1;
    -
    7143  }
    -
    7144 
    -
    7146  string_t get_token() const noexcept
    -
    7147  {
    -
    7148  return string_t(reinterpret_cast<typename string_t::const_pointer>(m_start),
    -
    7149  static_cast<size_t>(m_cursor - m_start));
    -
    7150  }
    -
    7151 
    -
    7173  string_t get_string() const
    -
    7174  {
    -
    7175  string_t result;
    -
    7176  result.reserve(static_cast<size_t>(m_cursor - m_start - 2));
    -
    7177 
    -
    7178  // iterate the result between the quotes
    -
    7179  for (const lexer_char_t* i = m_start + 1; i < m_cursor - 1; ++i)
    -
    7180  {
    -
    7181  // process escaped characters
    -
    7182  if (*i == '\\')
    -
    7183  {
    -
    7184  // read next character
    -
    7185  ++i;
    -
    7186 
    -
    7187  switch (*i)
    -
    7188  {
    -
    7189  // the default escapes
    -
    7190  case 't':
    -
    7191  {
    -
    7192  result += "\t";
    -
    7193  break;
    -
    7194  }
    -
    7195  case 'b':
    -
    7196  {
    -
    7197  result += "\b";
    -
    7198  break;
    -
    7199  }
    -
    7200  case 'f':
    -
    7201  {
    -
    7202  result += "\f";
    -
    7203  break;
    -
    7204  }
    -
    7205  case 'n':
    -
    7206  {
    -
    7207  result += "\n";
    -
    7208  break;
    -
    7209  }
    -
    7210  case 'r':
    -
    7211  {
    -
    7212  result += "\r";
    -
    7213  break;
    -
    7214  }
    -
    7215  case '\\':
    -
    7216  {
    -
    7217  result += "\\";
    -
    7218  break;
    -
    7219  }
    -
    7220  case '/':
    -
    7221  {
    -
    7222  result += "/";
    -
    7223  break;
    -
    7224  }
    -
    7225  case '"':
    -
    7226  {
    -
    7227  result += "\"";
    -
    7228  break;
    -
    7229  }
    -
    7230 
    -
    7231  // unicode
    -
    7232  case 'u':
    -
    7233  {
    -
    7234  // get code xxxx from uxxxx
    -
    7235  auto codepoint = std::strtoul(std::string(reinterpret_cast<typename string_t::const_pointer>(i + 1),
    -
    7236  4).c_str(), nullptr, 16);
    -
    7237 
    -
    7238  // check if codepoint is a high surrogate
    -
    7239  if (codepoint >= 0xD800 and codepoint <= 0xDBFF)
    -
    7240  {
    -
    7241  // make sure there is a subsequent unicode
    -
    7242  if ((i + 6 >= m_limit) or * (i + 5) != '\\' or * (i + 6) != 'u')
    -
    7243  {
    -
    7244  throw std::invalid_argument("missing low surrogate");
    -
    7245  }
    -
    7246 
    -
    7247  // get code yyyy from uxxxx\uyyyy
    -
    7248  auto codepoint2 = std::strtoul(std::string(reinterpret_cast<typename string_t::const_pointer>
    -
    7249  (i + 7), 4).c_str(), nullptr, 16);
    -
    7250  result += to_unicode(codepoint, codepoint2);
    -
    7251  // skip the next 10 characters (xxxx\uyyyy)
    -
    7252  i += 10;
    -
    7253  }
    -
    7254  else
    -
    7255  {
    -
    7256  // add unicode character(s)
    -
    7257  result += to_unicode(codepoint);
    -
    7258  // skip the next four characters (xxxx)
    -
    7259  i += 4;
    -
    7260  }
    -
    7261  break;
    -
    7262  }
    -
    7263  }
    -
    7264  }
    -
    7265  else
    -
    7266  {
    -
    7267  // all other characters are just copied to the end of the
    -
    7268  // string
    -
    7269  result.append(1, static_cast<typename string_t::value_type>(*i));
    -
    7270  }
    -
    7271  }
    -
    7272 
    -
    7273  return result;
    -
    7274  }
    -
    7275 
    -
    7293  long double get_number() const
    -
    7294  {
    -
    7295  // conversion
    -
    7296  typename string_t::value_type* endptr;
    -
    7297  const auto float_val = std::strtold(reinterpret_cast<typename string_t::const_pointer>(m_start),
    -
    7298  &endptr);
    -
    7299 
    -
    7300  // return float_val if the whole number was translated and NAN
    -
    7301  // otherwise
    -
    7302  return (reinterpret_cast<lexer_char_t*>(endptr) == m_cursor) ? float_val : NAN;
    -
    7303  }
    -
    7304 
    -
    7305  private:
    -
    7307  std::istream* m_stream;
    -
    7309  string_t m_buffer;
    -
    7311  const lexer_char_t* m_content = nullptr;
    -
    7313  const lexer_char_t* m_start = nullptr;
    -
    7315  const lexer_char_t* m_marker = nullptr;
    -
    7317  const lexer_char_t* m_cursor = nullptr;
    -
    7319  const lexer_char_t* m_limit = nullptr;
    -
    7320  };
    -
    7321 
    -
    7327  class parser
    -
    7328  {
    -
    7329  public:
    -
    7331  parser(const string_t& s, parser_callback_t cb = nullptr)
    -
    7332  : callback(cb), m_lexer(s)
    -
    7333  {
    -
    7334  // read first token
    -
    7335  get_token();
    -
    7336  }
    -
    7337 
    -
    7339  parser(std::istream& _is, parser_callback_t cb = nullptr)
    -
    7340  : callback(cb), m_lexer(&_is)
    -
    7341  {
    -
    7342  // read first token
    -
    7343  get_token();
    -
    7344  }
    -
    7345 
    -
    7347  basic_json parse()
    -
    7348  {
    -
    7349  basic_json result = parse_internal(true);
    -
    7350 
    -
    7351  expect(lexer::token_type::end_of_input);
    -
    7352 
    -
    7353  // return parser result and replace it with null in case the
    -
    7354  // top-level value was discarded by the callback function
    -
    7355  return result.is_discarded() ? basic_json() : result;
    -
    7356  }
    -
    7357 
    -
    7358  private:
    -
    7360  basic_json parse_internal(bool keep)
    -
    7361  {
    -
    7362  auto result = basic_json(value_t::discarded);
    -
    7363 
    -
    7364  switch (last_token)
    -
    7365  {
    -
    7366  case lexer::token_type::begin_object:
    -
    7367  {
    -
    7368  if (keep and (not callback or (keep = callback(depth++, parse_event_t::object_start, result))))
    -
    7369  {
    -
    7370  // explicitly set result to object to cope with {}
    -
    7371  result.m_type = value_t::object;
    -
    7372  result.m_value = json_value(value_t::object);
    -
    7373  }
    -
    7374 
    -
    7375  // read next token
    -
    7376  get_token();
    -
    7377 
    -
    7378  // closing } -> we are done
    -
    7379  if (last_token == lexer::token_type::end_object)
    -
    7380  {
    -
    7381  get_token();
    -
    7382  if (keep and callback and not callback(--depth, parse_event_t::object_end, result))
    -
    7383  {
    -
    7384  result = basic_json(value_t::discarded);
    -
    7385  }
    -
    7386  return result;
    -
    7387  }
    -
    7388 
    -
    7389  // no comma is expected here
    -
    7390  unexpect(lexer::token_type::value_separator);
    -
    7391 
    -
    7392  // otherwise: parse key-value pairs
    -
    7393  do
    -
    7394  {
    -
    7395  // ugly, but could be fixed with loop reorganization
    -
    7396  if (last_token == lexer::token_type::value_separator)
    -
    7397  {
    -
    7398  get_token();
    -
    7399  }
    -
    7400 
    -
    7401  // store key
    -
    7402  expect(lexer::token_type::value_string);
    -
    7403  const auto key = m_lexer.get_string();
    -
    7404 
    -
    7405  bool keep_tag = false;
    -
    7406  if (keep)
    -
    7407  {
    -
    7408  if (callback)
    -
    7409  {
    -
    7410  basic_json k(key);
    -
    7411  keep_tag = callback(depth, parse_event_t::key, k);
    -
    7412  }
    -
    7413  else
    -
    7414  {
    -
    7415  keep_tag = true;
    -
    7416  }
    -
    7417  }
    +
    7104  if (yych <= 'E')
    +
    7105  {
    +
    7106  goto basic_json_parser_44;
    +
    7107  }
    +
    7108  if (yych == 'e')
    +
    7109  {
    +
    7110  goto basic_json_parser_44;
    +
    7111  }
    +
    7112  goto basic_json_parser_25;
    +
    7113  }
    +
    7114 basic_json_parser_50:
    +
    7115  yyaccept = 1;
    +
    7116  yych = *(m_marker = ++m_cursor);
    +
    7117  if (yych <= 'D')
    +
    7118  {
    +
    7119  if (yych == '.')
    +
    7120  {
    +
    7121  goto basic_json_parser_43;
    +
    7122  }
    +
    7123  goto basic_json_parser_25;
    +
    7124  }
    +
    7125  else
    +
    7126  {
    +
    7127  if (yych <= 'E')
    +
    7128  {
    +
    7129  goto basic_json_parser_44;
    +
    7130  }
    +
    7131  if (yych == 'e')
    +
    7132  {
    +
    7133  goto basic_json_parser_44;
    +
    7134  }
    +
    7135  goto basic_json_parser_25;
    +
    7136  }
    +
    7137 basic_json_parser_51:
    +
    7138  yych = *++m_cursor;
    +
    7139  if (yych != 'l')
    +
    7140  {
    +
    7141  goto basic_json_parser_33;
    +
    7142  }
    +
    7143  yych = *++m_cursor;
    +
    7144  if (yych != 's')
    +
    7145  {
    +
    7146  goto basic_json_parser_33;
    +
    7147  }
    +
    7148  yych = *++m_cursor;
    +
    7149  if (yych != 'e')
    +
    7150  {
    +
    7151  goto basic_json_parser_33;
    +
    7152  }
    +
    7153  ++m_cursor;
    +
    7154  {
    +
    7155  return token_type::literal_false;
    +
    7156  }
    +
    7157 basic_json_parser_56:
    +
    7158  yych = *++m_cursor;
    +
    7159  if (yych != 'u')
    +
    7160  {
    +
    7161  goto basic_json_parser_33;
    +
    7162  }
    +
    7163  yych = *++m_cursor;
    +
    7164  if (yych != 'e')
    +
    7165  {
    +
    7166  goto basic_json_parser_33;
    +
    7167  }
    +
    7168  ++m_cursor;
    +
    7169  {
    +
    7170  return token_type::literal_true;
    +
    7171  }
    +
    7172 basic_json_parser_60:
    +
    7173  yych = *++m_cursor;
    +
    7174  if (yych != 'l')
    +
    7175  {
    +
    7176  goto basic_json_parser_33;
    +
    7177  }
    +
    7178  yych = *++m_cursor;
    +
    7179  if (yych != 'l')
    +
    7180  {
    +
    7181  goto basic_json_parser_33;
    +
    7182  }
    +
    7183  ++m_cursor;
    +
    7184  {
    +
    7185  return token_type::literal_null;
    +
    7186  }
    +
    7187 basic_json_parser_64:
    +
    7188  yych = *++m_cursor;
    +
    7189  if (yych != 0xBF)
    +
    7190  {
    +
    7191  goto basic_json_parser_33;
    +
    7192  }
    +
    7193  ++m_cursor;
    +
    7194  {
    +
    7195  return scan();
    +
    7196  }
    +
    7197  }
    +
    7198 
    +
    7199 
    +
    7200  }
    +
    7201 
    +
    7203  void yyfill() noexcept
    +
    7204  {
    +
    7205  if (not m_stream or not * m_stream)
    +
    7206  {
    +
    7207  return;
    +
    7208  }
    +
    7209 
    +
    7210  const ssize_t offset_start = m_start - m_content;
    +
    7211  const ssize_t offset_marker = m_marker - m_start;
    +
    7212  const ssize_t offset_cursor = m_cursor - m_start;
    +
    7213 
    +
    7214  m_buffer.erase(0, static_cast<size_t>(offset_start));
    +
    7215  std::string line;
    +
    7216  std::getline(*m_stream, line);
    +
    7217  m_buffer += "\n" + line; // add line with newline symbol
    +
    7218 
    +
    7219  m_content = reinterpret_cast<const lexer_char_t*>(m_buffer.c_str());
    +
    7220  m_start = m_content;
    +
    7221  m_marker = m_start + offset_marker;
    +
    7222  m_cursor = m_start + offset_cursor;
    +
    7223  m_limit = m_start + m_buffer.size() - 1;
    +
    7224  }
    +
    7225 
    +
    7227  string_t get_token() const noexcept
    +
    7228  {
    +
    7229  return string_t(reinterpret_cast<typename string_t::const_pointer>(m_start),
    +
    7230  static_cast<size_t>(m_cursor - m_start));
    +
    7231  }
    +
    7232 
    +
    7254  string_t get_string() const
    +
    7255  {
    +
    7256  string_t result;
    +
    7257  result.reserve(static_cast<size_t>(m_cursor - m_start - 2));
    +
    7258 
    +
    7259  // iterate the result between the quotes
    +
    7260  for (const lexer_char_t* i = m_start + 1; i < m_cursor - 1; ++i)
    +
    7261  {
    +
    7262  // process escaped characters
    +
    7263  if (*i == '\\')
    +
    7264  {
    +
    7265  // read next character
    +
    7266  ++i;
    +
    7267 
    +
    7268  switch (*i)
    +
    7269  {
    +
    7270  // the default escapes
    +
    7271  case 't':
    +
    7272  {
    +
    7273  result += "\t";
    +
    7274  break;
    +
    7275  }
    +
    7276  case 'b':
    +
    7277  {
    +
    7278  result += "\b";
    +
    7279  break;
    +
    7280  }
    +
    7281  case 'f':
    +
    7282  {
    +
    7283  result += "\f";
    +
    7284  break;
    +
    7285  }
    +
    7286  case 'n':
    +
    7287  {
    +
    7288  result += "\n";
    +
    7289  break;
    +
    7290  }
    +
    7291  case 'r':
    +
    7292  {
    +
    7293  result += "\r";
    +
    7294  break;
    +
    7295  }
    +
    7296  case '\\':
    +
    7297  {
    +
    7298  result += "\\";
    +
    7299  break;
    +
    7300  }
    +
    7301  case '/':
    +
    7302  {
    +
    7303  result += "/";
    +
    7304  break;
    +
    7305  }
    +
    7306  case '"':
    +
    7307  {
    +
    7308  result += "\"";
    +
    7309  break;
    +
    7310  }
    +
    7311 
    +
    7312  // unicode
    +
    7313  case 'u':
    +
    7314  {
    +
    7315  // get code xxxx from uxxxx
    +
    7316  auto codepoint = std::strtoul(std::string(reinterpret_cast<typename string_t::const_pointer>(i + 1),
    +
    7317  4).c_str(), nullptr, 16);
    +
    7318 
    +
    7319  // check if codepoint is a high surrogate
    +
    7320  if (codepoint >= 0xD800 and codepoint <= 0xDBFF)
    +
    7321  {
    +
    7322  // make sure there is a subsequent unicode
    +
    7323  if ((i + 6 >= m_limit) or * (i + 5) != '\\' or * (i + 6) != 'u')
    +
    7324  {
    +
    7325  throw std::invalid_argument("missing low surrogate");
    +
    7326  }
    +
    7327 
    +
    7328  // get code yyyy from uxxxx\uyyyy
    +
    7329  auto codepoint2 = std::strtoul(std::string(reinterpret_cast<typename string_t::const_pointer>
    +
    7330  (i + 7), 4).c_str(), nullptr, 16);
    +
    7331  result += to_unicode(codepoint, codepoint2);
    +
    7332  // skip the next 10 characters (xxxx\uyyyy)
    +
    7333  i += 10;
    +
    7334  }
    +
    7335  else
    +
    7336  {
    +
    7337  // add unicode character(s)
    +
    7338  result += to_unicode(codepoint);
    +
    7339  // skip the next four characters (xxxx)
    +
    7340  i += 4;
    +
    7341  }
    +
    7342  break;
    +
    7343  }
    +
    7344  }
    +
    7345  }
    +
    7346  else
    +
    7347  {
    +
    7348  // all other characters are just copied to the end of the
    +
    7349  // string
    +
    7350  result.append(1, static_cast<typename string_t::value_type>(*i));
    +
    7351  }
    +
    7352  }
    +
    7353 
    +
    7354  return result;
    +
    7355  }
    +
    7356 
    +
    7374  long double get_number() const
    +
    7375  {
    +
    7376  // conversion
    +
    7377  typename string_t::value_type* endptr;
    +
    7378  const auto float_val = std::strtold(reinterpret_cast<typename string_t::const_pointer>(m_start),
    +
    7379  &endptr);
    +
    7380 
    +
    7381  // return float_val if the whole number was translated and NAN
    +
    7382  // otherwise
    +
    7383  return (reinterpret_cast<lexer_char_t*>(endptr) == m_cursor) ? float_val : NAN;
    +
    7384  }
    +
    7385 
    +
    7386  private:
    +
    7388  std::istream* m_stream;
    +
    7390  string_t m_buffer;
    +
    7392  const lexer_char_t* m_content = nullptr;
    +
    7394  const lexer_char_t* m_start = nullptr;
    +
    7396  const lexer_char_t* m_marker = nullptr;
    +
    7398  const lexer_char_t* m_cursor = nullptr;
    +
    7400  const lexer_char_t* m_limit = nullptr;
    +
    7401  };
    +
    7402 
    +
    7408  class parser
    +
    7409  {
    +
    7410  public:
    +
    7412  parser(const string_t& s, parser_callback_t cb = nullptr)
    +
    7413  : callback(cb), m_lexer(s)
    +
    7414  {
    +
    7415  // read first token
    +
    7416  get_token();
    +
    7417  }
    7418 
    -
    7419  // parse separator (:)
    -
    7420  get_token();
    -
    7421  expect(lexer::token_type::name_separator);
    -
    7422 
    -
    7423  // parse and add value
    -
    7424  get_token();
    -
    7425  auto value = parse_internal(keep);
    -
    7426  if (keep and keep_tag and not value.is_discarded())
    -
    7427  {
    -
    7428  result[key] = std::move(value);
    -
    7429  }
    -
    7430  }
    -
    7431  while (last_token == lexer::token_type::value_separator);
    -
    7432 
    -
    7433  // closing }
    -
    7434  expect(lexer::token_type::end_object);
    -
    7435  get_token();
    -
    7436  if (keep and callback and not callback(--depth, parse_event_t::object_end, result))
    -
    7437  {
    -
    7438  result = basic_json(value_t::discarded);
    -
    7439  }
    -
    7440 
    -
    7441  return result;
    -
    7442  }
    -
    7443 
    -
    7444  case lexer::token_type::begin_array:
    -
    7445  {
    -
    7446  if (keep and (not callback or (keep = callback(depth++, parse_event_t::array_start, result))))
    -
    7447  {
    -
    7448  // explicitly set result to object to cope with []
    -
    7449  result.m_type = value_t::array;
    -
    7450  result.m_value = json_value(value_t::array);
    -
    7451  }
    -
    7452 
    -
    7453  // read next token
    -
    7454  get_token();
    +
    7420  parser(std::istream& _is, parser_callback_t cb = nullptr)
    +
    7421  : callback(cb), m_lexer(&_is)
    +
    7422  {
    +
    7423  // read first token
    +
    7424  get_token();
    +
    7425  }
    +
    7426 
    +
    7428  basic_json parse()
    +
    7429  {
    +
    7430  basic_json result = parse_internal(true);
    +
    7431 
    +
    7432  expect(lexer::token_type::end_of_input);
    +
    7433 
    +
    7434  // return parser result and replace it with null in case the
    +
    7435  // top-level value was discarded by the callback function
    +
    7436  return result.is_discarded() ? basic_json() : result;
    +
    7437  }
    +
    7438 
    +
    7439  private:
    +
    7441  basic_json parse_internal(bool keep)
    +
    7442  {
    +
    7443  auto result = basic_json(value_t::discarded);
    +
    7444 
    +
    7445  switch (last_token)
    +
    7446  {
    +
    7447  case lexer::token_type::begin_object:
    +
    7448  {
    +
    7449  if (keep and (not callback or (keep = callback(depth++, parse_event_t::object_start, result))))
    +
    7450  {
    +
    7451  // explicitly set result to object to cope with {}
    +
    7452  result.m_type = value_t::object;
    +
    7453  result.m_value = json_value(value_t::object);
    +
    7454  }
    7455 
    -
    7456  // closing ] -> we are done
    -
    7457  if (last_token == lexer::token_type::end_array)
    -
    7458  {
    -
    7459  get_token();
    -
    7460  if (callback and not callback(--depth, parse_event_t::array_end, result))
    -
    7461  {
    -
    7462  result = basic_json(value_t::discarded);
    -
    7463  }
    -
    7464  return result;
    -
    7465  }
    -
    7466 
    -
    7467  // no comma is expected here
    -
    7468  unexpect(lexer::token_type::value_separator);
    +
    7456  // read next token
    +
    7457  get_token();
    +
    7458 
    +
    7459  // closing } -> we are done
    +
    7460  if (last_token == lexer::token_type::end_object)
    +
    7461  {
    +
    7462  get_token();
    +
    7463  if (keep and callback and not callback(--depth, parse_event_t::object_end, result))
    +
    7464  {
    +
    7465  result = basic_json(value_t::discarded);
    +
    7466  }
    +
    7467  return result;
    +
    7468  }
    7469 
    -
    7470  // otherwise: parse values
    -
    7471  do
    -
    7472  {
    -
    7473  // ugly, but could be fixed with loop reorganization
    -
    7474  if (last_token == lexer::token_type::value_separator)
    -
    7475  {
    -
    7476  get_token();
    -
    7477  }
    -
    7478 
    -
    7479  // parse value
    -
    7480  auto value = parse_internal(keep);
    -
    7481  if (keep and not value.is_discarded())
    -
    7482  {
    -
    7483  result.push_back(std::move(value));
    -
    7484  }
    -
    7485  }
    -
    7486  while (last_token == lexer::token_type::value_separator);
    -
    7487 
    -
    7488  // closing ]
    -
    7489  expect(lexer::token_type::end_array);
    -
    7490  get_token();
    -
    7491  if (keep and callback and not callback(--depth, parse_event_t::array_end, result))
    -
    7492  {
    -
    7493  result = basic_json(value_t::discarded);
    -
    7494  }
    -
    7495 
    -
    7496  return result;
    -
    7497  }
    -
    7498 
    -
    7499  case lexer::token_type::literal_null:
    -
    7500  {
    -
    7501  get_token();
    -
    7502  result.m_type = value_t::null;
    -
    7503  break;
    -
    7504  }
    -
    7505 
    -
    7506  case lexer::token_type::value_string:
    -
    7507  {
    -
    7508  const auto s = m_lexer.get_string();
    -
    7509  get_token();
    -
    7510  result = basic_json(s);
    -
    7511  break;
    -
    7512  }
    +
    7470  // no comma is expected here
    +
    7471  unexpect(lexer::token_type::value_separator);
    +
    7472 
    +
    7473  // otherwise: parse key-value pairs
    +
    7474  do
    +
    7475  {
    +
    7476  // ugly, but could be fixed with loop reorganization
    +
    7477  if (last_token == lexer::token_type::value_separator)
    +
    7478  {
    +
    7479  get_token();
    +
    7480  }
    +
    7481 
    +
    7482  // store key
    +
    7483  expect(lexer::token_type::value_string);
    +
    7484  const auto key = m_lexer.get_string();
    +
    7485 
    +
    7486  bool keep_tag = false;
    +
    7487  if (keep)
    +
    7488  {
    +
    7489  if (callback)
    +
    7490  {
    +
    7491  basic_json k(key);
    +
    7492  keep_tag = callback(depth, parse_event_t::key, k);
    +
    7493  }
    +
    7494  else
    +
    7495  {
    +
    7496  keep_tag = true;
    +
    7497  }
    +
    7498  }
    +
    7499 
    +
    7500  // parse separator (:)
    +
    7501  get_token();
    +
    7502  expect(lexer::token_type::name_separator);
    +
    7503 
    +
    7504  // parse and add value
    +
    7505  get_token();
    +
    7506  auto value = parse_internal(keep);
    +
    7507  if (keep and keep_tag and not value.is_discarded())
    +
    7508  {
    +
    7509  result[key] = std::move(value);
    +
    7510  }
    +
    7511  }
    +
    7512  while (last_token == lexer::token_type::value_separator);
    7513 
    -
    7514  case lexer::token_type::literal_true:
    -
    7515  {
    +
    7514  // closing }
    +
    7515  expect(lexer::token_type::end_object);
    7516  get_token();
    -
    7517  result.m_type = value_t::boolean;
    -
    7518  result.m_value = true;
    -
    7519  break;
    -
    7520  }
    +
    7517  if (keep and callback and not callback(--depth, parse_event_t::object_end, result))
    +
    7518  {
    +
    7519  result = basic_json(value_t::discarded);
    +
    7520  }
    7521 
    -
    7522  case lexer::token_type::literal_false:
    -
    7523  {
    -
    7524  get_token();
    -
    7525  result.m_type = value_t::boolean;
    -
    7526  result.m_value = false;
    -
    7527  break;
    -
    7528  }
    -
    7529 
    -
    7530  case lexer::token_type::value_number:
    -
    7531  {
    -
    7532  auto float_val = m_lexer.get_number();
    +
    7522  return result;
    +
    7523  }
    +
    7524 
    +
    7525  case lexer::token_type::begin_array:
    +
    7526  {
    +
    7527  if (keep and (not callback or (keep = callback(depth++, parse_event_t::array_start, result))))
    +
    7528  {
    +
    7529  // explicitly set result to object to cope with []
    +
    7530  result.m_type = value_t::array;
    +
    7531  result.m_value = json_value(value_t::array);
    +
    7532  }
    7533 
    -
    7534  // NAN is returned if token could not be translated
    -
    7535  // completely
    -
    7536  if (std::isnan(float_val))
    -
    7537  {
    -
    7538  throw std::invalid_argument(std::string("parse error - ") +
    -
    7539  m_lexer.get_token() + " is not a number");
    -
    7540  }
    -
    7541 
    -
    7542  get_token();
    -
    7543 
    -
    7544  // check if conversion loses precision
    -
    7545  const auto int_val = static_cast<number_integer_t>(float_val);
    -
    7546  if (approx(float_val, static_cast<long double>(int_val)))
    -
    7547  {
    -
    7548  // we would not lose precision -> return int
    -
    7549  result.m_type = value_t::number_integer;
    -
    7550  result.m_value = int_val;
    -
    7551  }
    -
    7552  else
    +
    7534  // read next token
    +
    7535  get_token();
    +
    7536 
    +
    7537  // closing ] -> we are done
    +
    7538  if (last_token == lexer::token_type::end_array)
    +
    7539  {
    +
    7540  get_token();
    +
    7541  if (callback and not callback(--depth, parse_event_t::array_end, result))
    +
    7542  {
    +
    7543  result = basic_json(value_t::discarded);
    +
    7544  }
    +
    7545  return result;
    +
    7546  }
    +
    7547 
    +
    7548  // no comma is expected here
    +
    7549  unexpect(lexer::token_type::value_separator);
    +
    7550 
    +
    7551  // otherwise: parse values
    +
    7552  do
    7553  {
    -
    7554  // we would lose precision -> return float
    -
    7555  result.m_type = value_t::number_float;
    -
    7556  result.m_value = static_cast<number_float_t>(float_val);
    -
    7557  }
    -
    7558  break;
    -
    7559  }
    -
    7560 
    -
    7561  default:
    -
    7562  {
    -
    7563  // the last token was unexpected
    -
    7564  unexpect(last_token);
    -
    7565  }
    -
    7566  }
    -
    7567 
    -
    7568  if (keep and callback and not callback(depth, parse_event_t::value, result))
    -
    7569  {
    -
    7570  result = basic_json(value_t::discarded);
    -
    7571  }
    -
    7572  return result;
    -
    7573  }
    -
    7574 
    -
    7576  typename lexer::token_type get_token()
    -
    7577  {
    -
    7578  last_token = m_lexer.scan();
    -
    7579  return last_token;
    -
    7580  }
    -
    7581 
    -
    7582  void expect(typename lexer::token_type t) const
    -
    7583  {
    -
    7584  if (t != last_token)
    -
    7585  {
    -
    7586  std::string error_msg = "parse error - unexpected \'";
    -
    7587  error_msg += m_lexer.get_token();
    -
    7588  error_msg += "\' (" + lexer::token_type_name(last_token);
    -
    7589  error_msg += "); expected " + lexer::token_type_name(t);
    -
    7590  throw std::invalid_argument(error_msg);
    -
    7591  }
    -
    7592  }
    -
    7593 
    -
    7594  void unexpect(typename lexer::token_type t) const
    -
    7595  {
    -
    7596  if (t == last_token)
    -
    7597  {
    -
    7598  std::string error_msg = "parse error - unexpected \'";
    -
    7599  error_msg += m_lexer.get_token();
    -
    7600  error_msg += "\' (";
    -
    7601  error_msg += lexer::token_type_name(last_token) + ")";
    -
    7602  throw std::invalid_argument(error_msg);
    -
    7603  }
    -
    7604  }
    -
    7605 
    -
    7606  private:
    -
    7608  int depth = 0;
    -
    7610  parser_callback_t callback;
    -
    7612  typename lexer::token_type last_token = lexer::token_type::uninitialized;
    -
    7614  lexer m_lexer;
    -
    7615  };
    -
    7616 };
    -
    7617 
    -
    7618 
    -
    7620 // presets //
    -
    7622 
    - -
    7632 }
    -
    7633 
    -
    7634 
    -
    7636 // nonmember functions //
    -
    7638 
    -
    7639 // specialization of std::swap, and std::hash
    -
    7640 namespace std
    -
    7641 {
    -
    7647 template <>
    -
    7648 inline void swap(nlohmann::json& j1,
    -
    7649  nlohmann::json& j2) noexcept(
    -
    7650  is_nothrow_move_constructible<nlohmann::json>::value and
    -
    7651  is_nothrow_move_assignable<nlohmann::json>::value
    -
    7652  )
    -
    7653 {
    -
    7654  j1.swap(j2);
    -
    7655 }
    -
    7656 
    -
    7658 template <>
    -
    7659 struct hash<nlohmann::json>
    -
    7660 {
    -
    7666  std::size_t operator()(const nlohmann::json& j) const
    -
    7667  {
    -
    7668  // a naive hashing via the string representation
    -
    7669  const auto& h = hash<nlohmann::json::string_t>();
    -
    7670  return h(j.dump());
    -
    7671  }
    -
    7672 };
    -
    7673 }
    +
    7554  // ugly, but could be fixed with loop reorganization
    +
    7555  if (last_token == lexer::token_type::value_separator)
    +
    7556  {
    +
    7557  get_token();
    +
    7558  }
    +
    7559 
    +
    7560  // parse value
    +
    7561  auto value = parse_internal(keep);
    +
    7562  if (keep and not value.is_discarded())
    +
    7563  {
    +
    7564  result.push_back(std::move(value));
    +
    7565  }
    +
    7566  }
    +
    7567  while (last_token == lexer::token_type::value_separator);
    +
    7568 
    +
    7569  // closing ]
    +
    7570  expect(lexer::token_type::end_array);
    +
    7571  get_token();
    +
    7572  if (keep and callback and not callback(--depth, parse_event_t::array_end, result))
    +
    7573  {
    +
    7574  result = basic_json(value_t::discarded);
    +
    7575  }
    +
    7576 
    +
    7577  return result;
    +
    7578  }
    +
    7579 
    +
    7580  case lexer::token_type::literal_null:
    +
    7581  {
    +
    7582  get_token();
    +
    7583  result.m_type = value_t::null;
    +
    7584  break;
    +
    7585  }
    +
    7586 
    +
    7587  case lexer::token_type::value_string:
    +
    7588  {
    +
    7589  const auto s = m_lexer.get_string();
    +
    7590  get_token();
    +
    7591  result = basic_json(s);
    +
    7592  break;
    +
    7593  }
    +
    7594 
    +
    7595  case lexer::token_type::literal_true:
    +
    7596  {
    +
    7597  get_token();
    +
    7598  result.m_type = value_t::boolean;
    +
    7599  result.m_value = true;
    +
    7600  break;
    +
    7601  }
    +
    7602 
    +
    7603  case lexer::token_type::literal_false:
    +
    7604  {
    +
    7605  get_token();
    +
    7606  result.m_type = value_t::boolean;
    +
    7607  result.m_value = false;
    +
    7608  break;
    +
    7609  }
    +
    7610 
    +
    7611  case lexer::token_type::value_number:
    +
    7612  {
    +
    7613  auto float_val = m_lexer.get_number();
    +
    7614 
    +
    7615  // NAN is returned if token could not be translated
    +
    7616  // completely
    +
    7617  if (std::isnan(float_val))
    +
    7618  {
    +
    7619  throw std::invalid_argument(std::string("parse error - ") +
    +
    7620  m_lexer.get_token() + " is not a number");
    +
    7621  }
    +
    7622 
    +
    7623  get_token();
    +
    7624 
    +
    7625  // check if conversion loses precision
    +
    7626  const auto int_val = static_cast<number_integer_t>(float_val);
    +
    7627  if (approx(float_val, static_cast<long double>(int_val)))
    +
    7628  {
    +
    7629  // we would not lose precision -> return int
    +
    7630  result.m_type = value_t::number_integer;
    +
    7631  result.m_value = int_val;
    +
    7632  }
    +
    7633  else
    +
    7634  {
    +
    7635  // we would lose precision -> return float
    +
    7636  result.m_type = value_t::number_float;
    +
    7637  result.m_value = static_cast<number_float_t>(float_val);
    +
    7638  }
    +
    7639  break;
    +
    7640  }
    +
    7641 
    +
    7642  default:
    +
    7643  {
    +
    7644  // the last token was unexpected
    +
    7645  unexpect(last_token);
    +
    7646  }
    +
    7647  }
    +
    7648 
    +
    7649  if (keep and callback and not callback(depth, parse_event_t::value, result))
    +
    7650  {
    +
    7651  result = basic_json(value_t::discarded);
    +
    7652  }
    +
    7653  return result;
    +
    7654  }
    +
    7655 
    +
    7657  typename lexer::token_type get_token()
    +
    7658  {
    +
    7659  last_token = m_lexer.scan();
    +
    7660  return last_token;
    +
    7661  }
    +
    7662 
    +
    7663  void expect(typename lexer::token_type t) const
    +
    7664  {
    +
    7665  if (t != last_token)
    +
    7666  {
    +
    7667  std::string error_msg = "parse error - unexpected \'";
    +
    7668  error_msg += m_lexer.get_token();
    +
    7669  error_msg += "\' (" + lexer::token_type_name(last_token);
    +
    7670  error_msg += "); expected " + lexer::token_type_name(t);
    +
    7671  throw std::invalid_argument(error_msg);
    +
    7672  }
    +
    7673  }
    7674 
    -
    7687 inline nlohmann::json operator "" _json(const char* s, std::size_t)
    -
    7688 {
    -
    7689  return nlohmann::json::parse(reinterpret_cast<nlohmann::json::string_t::value_type*>
    -
    7690  (const_cast<char*>(s)));
    -
    7691 }
    -
    7692 
    -
    7693 #endif
    +
    7675  void unexpect(typename lexer::token_type t) const
    +
    7676  {
    +
    7677  if (t == last_token)
    +
    7678  {
    +
    7679  std::string error_msg = "parse error - unexpected \'";
    +
    7680  error_msg += m_lexer.get_token();
    +
    7681  error_msg += "\' (";
    +
    7682  error_msg += lexer::token_type_name(last_token) + ")";
    +
    7683  throw std::invalid_argument(error_msg);
    +
    7684  }
    +
    7685  }
    +
    7686 
    +
    7687  private:
    +
    7689  int depth = 0;
    +
    7691  parser_callback_t callback;
    +
    7693  typename lexer::token_type last_token = lexer::token_type::uninitialized;
    +
    7695  lexer m_lexer;
    +
    7696  };
    +
    7697 };
    +
    7698 
    +
    7699 
    +
    7701 // presets //
    +
    7703 
    + +
    7713 }
    +
    7714 
    +
    7715 
    +
    7717 // nonmember functions //
    +
    7719 
    +
    7720 // specialization of std::swap, and std::hash
    +
    7721 namespace std
    +
    7722 {
    +
    7728 template <>
    +
    7729 inline void swap(nlohmann::json& j1,
    +
    7730  nlohmann::json& j2) noexcept(
    +
    7731  is_nothrow_move_constructible<nlohmann::json>::value and
    +
    7732  is_nothrow_move_assignable<nlohmann::json>::value
    +
    7733  )
    +
    7734 {
    +
    7735  j1.swap(j2);
    +
    7736 }
    +
    7737 
    +
    7739 template <>
    +
    7740 struct hash<nlohmann::json>
    +
    7741 {
    +
    7747  std::size_t operator()(const nlohmann::json& j) const
    +
    7748  {
    +
    7749  // a naive hashing via the string representation
    +
    7750  const auto& h = hash<nlohmann::json::string_t>();
    +
    7751  return h(j.dump());
    +
    7752  }
    +
    7753 };
    +
    7754 }
    +
    7755 
    +
    7768 inline nlohmann::json operator "" _json(const char* s, std::size_t)
    +
    7769 {
    +
    7770  return nlohmann::json::parse(reinterpret_cast<nlohmann::json::string_t::value_type*>
    +
    7771  (const_cast<char*>(s)));
    +
    7772 }
    +
    7773 
    +
    7774 #endif
    json_reverse_iterator< typename basic_json::iterator > reverse_iterator
    a reverse iterator for a basic_json container
    Definition: json.hpp:239
    -
    iterator_wrapper(basic_json &cont)
    construct iterator wrapper from a container
    Definition: json.hpp:6122
    -
    bool operator!=(const const_iterator &other) const
    comparison: not equal
    Definition: json.hpp:5615
    -
    iterator insert(const_iterator pos, basic_json &&val)
    inserts element
    Definition: json.hpp:4091
    -
    iterator operator++(int)
    post-increment (it++)
    Definition: json.hpp:5852
    -
    friend bool operator<=(const_reference lhs, const_reference rhs) noexcept
    comparison: less than or equal
    Definition: json.hpp:4640
    +
    iterator_wrapper(basic_json &cont)
    construct iterator wrapper from a container
    Definition: json.hpp:6203
    +
    bool operator!=(const const_iterator &other) const
    comparison: not equal
    Definition: json.hpp:5696
    +
    iterator insert(const_iterator pos, basic_json &&val)
    inserts element
    Definition: json.hpp:4172
    +
    iterator operator++(int)
    post-increment (it++)
    Definition: json.hpp:5933
    +
    friend bool operator<=(const_reference lhs, const_reference rhs) noexcept
    comparison: less than or equal
    Definition: json.hpp:4721
    typename std::allocator_traits< allocator_type >::pointer pointer
    the type of an element pointer
    Definition: json.hpp:227
    -
    json_reverse_iterator operator-(difference_type i) const
    subtract from iterator
    Definition: json.hpp:6004
    +
    json_reverse_iterator operator-(difference_type i) const
    subtract from iterator
    Definition: json.hpp:6085
    static basic_json object(std::initializer_list< basic_json > init=std::initializer_list< basic_json >())
    explicitly create an object from an initializer list
    Definition: json.hpp:1506
    const_reference operator[](size_type idx) const
    access specified array element
    Definition: json.hpp:2806
    -
    reference operator[](const T(&key)[n])
    access specified object element
    Definition: json.hpp:2894
    -
    typename basic_json::const_pointer pointer
    defines a pointer to the type iterated over (value_type)
    Definition: json.hpp:5317
    -
    const_iterator & operator--()
    pre-decrement (–it)
    Definition: json.hpp:5560
    -
    friend std::istream & operator>>(std::istream &i, basic_json &j)
    deserialize from stream
    Definition: json.hpp:4853
    -
    const_iterator & operator=(const_iterator other) noexcept( std::is_nothrow_move_constructible< pointer >::value and std::is_nothrow_move_assignable< pointer >::value and std::is_nothrow_move_constructible< internal_iterator >::value and std::is_nothrow_move_assignable< internal_iterator >::value )
    copy assignment
    Definition: json.hpp:5382
    -
    typename basic_json::value_type value_type
    the type of the values when the iterator is dereferenced
    Definition: json.hpp:5313
    +
    reference operator[](const T(&key)[n])
    access specified object element
    Definition: json.hpp:2933
    +
    typename basic_json::const_pointer pointer
    defines a pointer to the type iterated over (value_type)
    Definition: json.hpp:5398
    +
    const_iterator & operator--()
    pre-decrement (–it)
    Definition: json.hpp:5641
    +
    friend std::istream & operator>>(std::istream &i, basic_json &j)
    deserialize from stream
    Definition: json.hpp:4934
    +
    const_iterator & operator=(const_iterator other) noexcept( std::is_nothrow_move_constructible< pointer >::value and std::is_nothrow_move_assignable< pointer >::value and std::is_nothrow_move_constructible< internal_iterator >::value and std::is_nothrow_move_assignable< internal_iterator >::value )
    copy assignment
    Definition: json.hpp:5463
    +
    typename basic_json::value_type value_type
    the type of the values when the iterator is dereferenced
    Definition: json.hpp:5394
    reference & operator=(basic_json other) noexcept( std::is_nothrow_move_constructible< value_t >::value and std::is_nothrow_move_assignable< value_t >::value and std::is_nothrow_move_constructible< json_value >::value and std::is_nothrow_move_assignable< json_value >::value )
    copy assignment
    Definition: json.hpp:1768
    -
    iterator insert(const_iterator pos, const_iterator first, const_iterator last)
    inserts elements
    Definition: json.hpp:4166
    -
    iterator insert(const_iterator pos, size_type cnt, const basic_json &val)
    inserts elements
    Definition: json.hpp:4118
    -
    json_reverse_iterator operator--(int)
    post-decrement (it–)
    Definition: json.hpp:5976
    +
    iterator insert(const_iterator pos, const_iterator first, const_iterator last)
    inserts elements
    Definition: json.hpp:4247
    +
    iterator insert(const_iterator pos, size_type cnt, const basic_json &val)
    inserts elements
    Definition: json.hpp:4199
    +
    json_reverse_iterator operator--(int)
    post-decrement (it–)
    Definition: json.hpp:6057
    StringType string_t
    a type for a string
    Definition: json.hpp:433
    -
    void push_back(const typename object_t::value_type &val)
    add an object to an object
    Definition: json.hpp:4016
    +
    void push_back(const typename object_t::value_type &val)
    add an object to an object
    Definition: json.hpp:4097
    basic_json(boolean_t val)
    create a boolean (explicit)
    Definition: json.hpp:1131
    static basic_json array(std::initializer_list< basic_json > init=std::initializer_list< basic_json >())
    explicitly create an array from an initializer list
    Definition: json.hpp:1466
    -
    iterator & operator++()
    pre-increment (++it)
    Definition: json.hpp:5860
    -
    friend bool operator!=(const_reference lhs, const_reference rhs) noexcept
    comparison: not equal
    Definition: json.hpp:4518
    +
    iterator & operator++()
    pre-increment (++it)
    Definition: json.hpp:5941
    +
    friend bool operator!=(const_reference lhs, const_reference rhs) noexcept
    comparison: not equal
    Definition: json.hpp:4599
    ArrayType< basic_json, AllocatorType< basic_json >> array_t
    a type for an array
    Definition: json.hpp:386
    -
    const_iterator & operator++()
    pre-increment (++it)
    Definition: json.hpp:5525
    -
    difference_type operator-(const json_reverse_iterator &other) const
    return difference
    Definition: json.hpp:6012
    -
    basic_json<> json
    default JSON class
    Definition: json.hpp:7631
    -
    reference front()
    access the first element
    Definition: json.hpp:3016
    +
    const_iterator & operator++()
    pre-increment (++it)
    Definition: json.hpp:5606
    +
    difference_type operator-(const json_reverse_iterator &other) const
    return difference
    Definition: json.hpp:6093
    +
    basic_json<> json
    default JSON class
    Definition: json.hpp:7712
    +
    reference front()
    access the first element
    Definition: json.hpp:3097
    bool is_array() const noexcept
    return whether value is an array
    Definition: json.hpp:2081
    -
    const_iterator find(typename object_t::key_type key) const
    find an element in a JSON object
    Definition: json.hpp:3382
    -
    std::reverse_iterator< Base > base_iterator
    shortcut to the reverse iterator adaptor
    Definition: json.hpp:5951
    -
    json_reverse_iterator(const typename base_iterator::iterator_type &it)
    create reverse iterator from iterator
    Definition: json.hpp:5956
    +
    const_iterator find(typename object_t::key_type key) const
    find an element in a JSON object
    Definition: json.hpp:3463
    +
    std::reverse_iterator< Base > base_iterator
    shortcut to the reverse iterator adaptor
    Definition: json.hpp:6032
    +
    json_reverse_iterator(const typename base_iterator::iterator_type &it)
    create reverse iterator from iterator
    Definition: json.hpp:6037
    a class to store JSON values
    Definition: json.hpp:187
    -
    json_reverse_iterator & operator--()
    pre-decrement (–it)
    Definition: json.hpp:5982
    +
    json_reverse_iterator & operator--()
    pre-decrement (–it)
    Definition: json.hpp:6063
    basic_json(const object_t &val)
    create an object (explicit)
    Definition: json.hpp:933
    -
    friend bool operator==(std::nullptr_t, const_reference v) noexcept
    comparison: equal
    Definition: json.hpp:4497
    -
    void push_back(basic_json &&val)
    add an object to an array
    Definition: json.hpp:3932
    -
    const_iterator cbegin() const
    returns a const iterator to the first element
    Definition: json.hpp:3480
    +
    friend bool operator==(std::nullptr_t, const_reference v) noexcept
    comparison: equal
    Definition: json.hpp:4578
    +
    void push_back(basic_json &&val)
    add an object to an array
    Definition: json.hpp:4013
    +
    const_iterator cbegin() const
    returns a const iterator to the first element
    Definition: json.hpp:3561
    bool is_string() const noexcept
    return whether value is a string
    Definition: json.hpp:2100
    -
    iterator & operator+=(difference_type i)
    add to iterator
    Definition: json.hpp:5882
    +
    iterator & operator+=(difference_type i)
    add to iterator
    Definition: json.hpp:5963
    const PointerType get_ptr() const noexcept
    get a pointer value (implicit)
    Definition: json.hpp:2539
    basic_json(const CompatibleStringType &val)
    create a string (implicit)
    Definition: json.hpp:1113
    the parser read ] and finished processing a JSON array
    -
    const_iterator base_iterator
    Definition: json.hpp:5811
    -
    reference operator+=(basic_json &&val)
    add an object to an array
    Definition: json.hpp:3957
    +
    const_iterator base_iterator
    Definition: json.hpp:5892
    +
    reference operator+=(basic_json &&val)
    add an object to an array
    Definition: json.hpp:4038
    basic_json(size_type cnt, const basic_json &val)
    construct an array with count copies of given value
    Definition: json.hpp:1530
    -
    a mutable random access iterator for the basic_json class
    Definition: json.hpp:5808
    -
    iterator & operator-=(difference_type i)
    subtract from iterator
    Definition: json.hpp:5889
    -
    static basic_json parse(std::istream &&i, parser_callback_t cb=nullptr)
    deserialize from stream
    Definition: json.hpp:4815
    +
    a mutable random access iterator for the basic_json class
    Definition: json.hpp:5889
    +
    iterator & operator-=(difference_type i)
    subtract from iterator
    Definition: json.hpp:5970
    +
    static basic_json parse(std::istream &&i, parser_callback_t cb=nullptr)
    deserialize from stream
    Definition: json.hpp:4896
    reference operator[](const typename object_t::key_type &key)
    access specified object element
    Definition: json.hpp:2845
    STL namespace.
    -
    difference_type operator-(const iterator &other) const
    Definition: json.hpp:5911
    -
    reference value() const
    return the value of an iterator
    Definition: json.hpp:5784
    -
    const_iterator end() const
    returns a const iterator to one past the last element
    Definition: json.hpp:3515
    -
    const_iterator(const const_iterator &other) noexcept
    copy constructor
    Definition: json.hpp:5377
    +
    difference_type operator-(const iterator &other) const
    Definition: json.hpp:5992
    +
    reference value() const
    return the value of an iterator
    Definition: json.hpp:5865
    +
    const_iterator end() const
    returns a const iterator to one past the last element
    Definition: json.hpp:3596
    +
    const_iterator(const const_iterator &other) noexcept
    copy constructor
    Definition: json.hpp:5458
    reference at(const typename object_t::key_type &key)
    access specified object element with bounds checking
    Definition: json.hpp:2688
    -
    object_t::key_type key() const
    return the key of an object iterator
    Definition: json.hpp:5771
    -
    iterator end()
    returns an iterator to one past the last element
    Definition: json.hpp:3505
    +
    object_t::key_type key() const
    return the key of an object iterator
    Definition: json.hpp:5852
    +
    iterator end()
    returns an iterator to one past the last element
    Definition: json.hpp:3586
    ObjectType< StringType, basic_json, std::less< StringType >, AllocatorType< std::pair< const StringType, basic_json >>> object_t
    a type for an object
    Definition: json.hpp:340
    -
    reference operator*()
    return a reference to the value pointed to by the iterator
    Definition: json.hpp:5840
    -
    reverse_iterator rend()
    returns an iterator to the reverse-end
    Definition: json.hpp:3594
    +
    reference operator*()
    return a reference to the value pointed to by the iterator
    Definition: json.hpp:5921
    +
    reverse_iterator rend()
    returns an iterator to the reverse-end
    Definition: json.hpp:3675
    bool is_object() const noexcept
    return whether value is an object
    Definition: json.hpp:2062
    -
    const_iterator operator-(difference_type i)
    subtract from iterator
    Definition: json.hpp:5707
    +
    const_iterator operator-(difference_type i)
    subtract from iterator
    Definition: json.hpp:5788
    bool is_discarded() const noexcept
    return whether value is discarded
    Definition: json.hpp:2124
    basic_json(const CompatibleArrayType &val)
    create an array (implicit)
    Definition: json.hpp:1029
    -
    typename basic_json::const_reference reference
    defines a reference to the type iterated over (value_type)
    Definition: json.hpp:5319
    -
    const_reverse_iterator rend() const
    returns a const reverse iterator to one before the first
    Definition: json.hpp:3602
    -
    size_type erase(const typename object_t::key_type &key)
    remove element from a JSON object given a key
    Definition: json.hpp:3296
    +
    typename basic_json::const_reference reference
    defines a reference to the type iterated over (value_type)
    Definition: json.hpp:5400
    +
    const_reverse_iterator rend() const
    returns a const reverse iterator to one before the first
    Definition: json.hpp:3683
    +
    size_type erase(const typename object_t::key_type &key)
    remove element from a JSON object given a key
    Definition: json.hpp:3377
    bool is_boolean() const noexcept
    return whether value is a boolean
    Definition: json.hpp:1973
    -
    iterator begin()
    returns an iterator to the first element
    Definition: json.hpp:3446
    +
    iterator begin()
    returns an iterator to the first element
    Definition: json.hpp:3527
    const_reference at(const typename object_t::key_type &key) const
    access specified object element with bounds checking
    Definition: json.hpp:2726
    -
    reference operator+=(const basic_json &val)
    add an object to an array
    Definition: json.hpp:3990
    +
    reference operator+=(const basic_json &val)
    add an object to an array
    Definition: json.hpp:4071
    AllocatorType< basic_json > allocator_type
    the allocator type
    Definition: json.hpp:224
    basic_json(const number_float_t val)
    create a floating-point number (explicit)
    Definition: json.hpp:1258
    bool is_number_integer() const noexcept
    return whether value is an integer number
    Definition: json.hpp:2020
    -
    iterator operator+(difference_type i)
    add to iterator
    Definition: json.hpp:5896
    +
    iterator operator+(difference_type i)
    add to iterator
    Definition: json.hpp:5977
    std::function< bool(int depth, parse_event_t event, basic_json &parsed)> parser_callback_t
    per-element parser callback type
    Definition: json.hpp:819
    basic_json(const typename string_t::value_type *val)
    create a string (explicit)
    Definition: json.hpp:1082
    const_iterator()=default
    default constructor
    the parser read [ and started to process a JSON array
    -
    iterator find(typename object_t::key_type key)
    find an element in a JSON object
    Definition: json.hpp:3366
    +
    iterator find(typename object_t::key_type key)
    find an element in a JSON object
    Definition: json.hpp:3447
    basic_json(const value_t value_type)
    create an empty value with a given type
    Definition: json.hpp:866
    -
    friend bool operator>=(const_reference lhs, const_reference rhs) noexcept
    comparison: greater than or equal
    Definition: json.hpp:4684
    -
    iterator & operator--()
    pre-decrement (–it)
    Definition: json.hpp:5875
    -
    friend bool operator<(const_reference lhs, const_reference rhs) noexcept
    comparison: less than
    Definition: json.hpp:4579
    -
    pointer operator->() const
    dereference the iterator
    Definition: json.hpp:5488
    +
    friend bool operator>=(const_reference lhs, const_reference rhs) noexcept
    comparison: greater than or equal
    Definition: json.hpp:4765
    +
    iterator & operator--()
    pre-decrement (–it)
    Definition: json.hpp:5956
    +
    friend bool operator<(const_reference lhs, const_reference rhs) noexcept
    comparison: less than
    Definition: json.hpp:4660
    +
    pointer operator->() const
    dereference the iterator
    Definition: json.hpp:5569
    discarded by the the parser callback function
    -
    const_iterator cend() const
    returns a const iterator to one past the last element
    Definition: json.hpp:3539
    -
    typename Base::reference reference
    the reference type for the pointed-to element
    Definition: json.hpp:5953
    -
    size_type size() const noexcept
    returns the number of elements
    Definition: json.hpp:3749
    +
    const_reference operator[](const typename object_t::key_type &key) const
    read-only access specified object element
    Definition: json.hpp:2891
    +
    const_iterator cend() const
    returns a const iterator to one past the last element
    Definition: json.hpp:3620
    +
    typename Base::reference reference
    the reference type for the pointed-to element
    Definition: json.hpp:6034
    +
    size_type size() const noexcept
    returns the number of elements
    Definition: json.hpp:3830
    static allocator_type get_allocator()
    returns the allocator associated with the container
    Definition: json.hpp:249
    object (unordered set of name/value pairs)
    reference at(size_type idx)
    access specified array element with bounds checking
    Definition: json.hpp:2616
    the parser read } and finished processing a JSON object
    iterator()=default
    default constructor
    -
    json_reverse_iterator(const base_iterator &it)
    create reverse iterator from base class
    Definition: json.hpp:5960
    -
    iterator_wrapper_internal end()
    return iterator end (needed for range-based for)
    Definition: json.hpp:6133
    +
    json_reverse_iterator(const base_iterator &it)
    create reverse iterator from base class
    Definition: json.hpp:6041
    +
    iterator_wrapper_internal end()
    return iterator end (needed for range-based for)
    Definition: json.hpp:6214
    value_t type() const noexcept
    return the type of the JSON value (explicit)
    Definition: json.hpp:1894
    -
    friend std::ostream & operator>>(const basic_json &j, std::ostream &o)
    serialize to stream
    Definition: json.hpp:4739
    -
    ValueType value(const typename object_t::key_type &key, ValueType default_value) const
    access specified object element with default value
    Definition: json.hpp:2965
    -
    object_t::key_type key() const
    return the key of an object iterator
    Definition: json.hpp:6024
    +
    friend std::ostream & operator>>(const basic_json &j, std::ostream &o)
    serialize to stream
    Definition: json.hpp:4820
    +
    ValueType value(const typename object_t::key_type &key, ValueType default_value) const
    access specified object element with default value
    Definition: json.hpp:3046
    +
    object_t::key_type key() const
    return the key of an object iterator
    Definition: json.hpp:6105
    bool is_structured() const noexcept
    return whether type is structured
    Definition: json.hpp:1935
    namespace for Niels Lohmann
    Definition: json.hpp:78
    -
    typename basic_json::difference_type difference_type
    a type to represent differences between iterators
    Definition: json.hpp:5315
    -
    void swap(array_t &other)
    exchanges the values
    Definition: json.hpp:4287
    -
    reverse_iterator rbegin()
    returns an iterator to the reverse-beginning
    Definition: json.hpp:3563
    -
    reference operator+=(const typename object_t::value_type &val)
    add an object to an object
    Definition: json.hpp:4039
    +
    typename basic_json::difference_type difference_type
    a type to represent differences between iterators
    Definition: json.hpp:5396
    +
    void swap(array_t &other)
    exchanges the values
    Definition: json.hpp:4368
    +
    reverse_iterator rbegin()
    returns an iterator to the reverse-beginning
    Definition: json.hpp:3644
    +
    reference operator+=(const typename object_t::value_type &val)
    add an object to an object
    Definition: json.hpp:4120
    -
    iterator_wrapper_internal begin()
    return iterator begin (needed for range-based for)
    Definition: json.hpp:6127
    -
    reference operator[](difference_type n) const
    access to successor
    Definition: json.hpp:5917
    +
    iterator_wrapper_internal begin()
    return iterator begin (needed for range-based for)
    Definition: json.hpp:6208
    +
    reference operator[](difference_type n) const
    access to successor
    Definition: json.hpp:5998
    std::size_t size_type
    a type to represent container sizes
    Definition: json.hpp:221
    -
    const_reverse_iterator rbegin() const
    returns a const reverse iterator to the last element
    Definition: json.hpp:3571
    +
    const_reverse_iterator rbegin() const
    returns a const reverse iterator to the last element
    Definition: json.hpp:3652
    ~basic_json()
    destructor
    Definition: json.hpp:1794
    basic_json(const basic_json &other)
    copy constructor
    Definition: json.hpp:1672
    -
    const_iterator operator+(difference_type i)
    add to iterator
    Definition: json.hpp:5699
    +
    const_iterator operator+(difference_type i)
    add to iterator
    Definition: json.hpp:5780
    value_t
    the JSON type enumeration
    Definition: json.hpp:611
    const value_type & const_reference
    the type of an element const reference
    Definition: json.hpp:215
    basic_json(const CompatibleNumberIntegerType val) noexcept
    create an integer number (implicit)
    Definition: json.hpp:1229
    bool is_null() const noexcept
    return whether value is null
    Definition: json.hpp:1954
    -
    void swap(string_t &other)
    exchanges the values
    Definition: json.hpp:4351
    -
    reference value() const
    return the value of an iterator
    Definition: json.hpp:5923
    -
    const_iterator operator--(int)
    post-decrement (it–)
    Definition: json.hpp:5552
    -
    void erase(const size_type idx)
    remove element from a JSON array given an index
    Definition: json.hpp:3331
    -
    void clear() noexcept
    clears the contents
    Definition: json.hpp:3866
    -
    pointer operator->()
    dereference the iterator
    Definition: json.hpp:5846
    +
    void swap(string_t &other)
    exchanges the values
    Definition: json.hpp:4432
    +
    reference value() const
    return the value of an iterator
    Definition: json.hpp:6004
    +
    const_iterator operator--(int)
    post-decrement (it–)
    Definition: json.hpp:5633
    +
    void erase(const size_type idx)
    remove element from a JSON array given an index
    Definition: json.hpp:3412
    +
    void clear() noexcept
    clears the contents
    Definition: json.hpp:3947
    +
    pointer operator->()
    dereference the iterator
    Definition: json.hpp:5927
    basic_json value_type
    the type of elements in a basic_json container
    Definition: json.hpp:209
    array (ordered collection of values)
    -
    const_reference front() const
    access the first element
    Definition: json.hpp:3024
    -
    bool operator>=(const const_iterator &other) const
    comparison: greater than or equal
    Definition: json.hpp:5661
    -
    iterator insert(const_iterator pos, std::initializer_list< basic_json > ilist)
    inserts elements
    Definition: json.hpp:4220
    +
    const_reference front() const
    access the first element
    Definition: json.hpp:3105
    +
    bool operator>=(const const_iterator &other) const
    comparison: greater than or equal
    Definition: json.hpp:5742
    +
    iterator insert(const_iterator pos, std::initializer_list< basic_json > ilist)
    inserts elements
    Definition: json.hpp:4301
    std::ptrdiff_t difference_type
    a type to represent differences between iterators
    Definition: json.hpp:218
    -
    const_iterator & operator+=(difference_type i)
    add to iterator
    Definition: json.hpp:5667
    +
    const_iterator & operator+=(difference_type i)
    add to iterator
    Definition: json.hpp:5748
    basic_json(std::initializer_list< basic_json > init, bool type_deduction=true, value_t manual_type=value_t::array)
    create a container (array or object) from an initializer list
    Definition: json.hpp:1376
    -
    difference_type operator-(const const_iterator &other) const
    return difference
    Definition: json.hpp:5715
    -
    friend bool operator==(const_reference lhs, const_reference rhs) noexcept
    comparison: equal
    Definition: json.hpp:4430
    +
    difference_type operator-(const const_iterator &other) const
    return difference
    Definition: json.hpp:5796
    +
    friend bool operator==(const_reference lhs, const_reference rhs) noexcept
    comparison: equal
    Definition: json.hpp:4511
    bool is_number() const noexcept
    return whether value is a number
    Definition: json.hpp:1997
    BooleanType boolean_t
    a type for a boolean
    Definition: json.hpp:459
    -
    const_reverse_iterator crend() const
    returns a const reverse iterator to one before the first
    Definition: json.hpp:3648
    +
    const_reverse_iterator crend() const
    returns a const reverse iterator to one before the first
    Definition: json.hpp:3729
    basic_json() noexcept=default
    create a null object (implicitly)
    the parser read a key of a value in an object
    -
    bool empty() const noexcept
    checks whether the container is empty
    Definition: json.hpp:3692
    -
    string_t value(const typename object_t::key_type &key, const char *default_value) const
    overload for a default value of type const char*
    Definition: json.hpp:2991
    -
    void swap(reference other) noexcept( std::is_nothrow_move_constructible< value_t >::value and std::is_nothrow_move_assignable< value_t >::value and std::is_nothrow_move_constructible< json_value >::value and std::is_nothrow_move_assignable< json_value >::value )
    exchanges the values
    Definition: json.hpp:4257
    +
    bool empty() const noexcept
    checks whether the container is empty
    Definition: json.hpp:3773
    +
    string_t value(const typename object_t::key_type &key, const char *default_value) const
    overload for a default value of type const char*
    Definition: json.hpp:3072
    +
    void swap(reference other) noexcept( std::is_nothrow_move_constructible< value_t >::value and std::is_nothrow_move_assignable< value_t >::value and std::is_nothrow_move_constructible< json_value >::value and std::is_nothrow_move_assignable< json_value >::value )
    exchanges the values
    Definition: json.hpp:4338
    json_reverse_iterator< typename basic_json::const_iterator > const_reverse_iterator
    a const reverse iterator for a basic_json container
    Definition: json.hpp:241
    -
    const_reverse_iterator crbegin() const
    returns a const reverse iterator to the last element
    Definition: json.hpp:3625
    -
    reference value() const
    return the value of an iterator
    Definition: json.hpp:6031
    +
    const_reverse_iterator crbegin() const
    returns a const reverse iterator to the last element
    Definition: json.hpp:3706
    +
    reference value() const
    return the value of an iterator
    Definition: json.hpp:6112
    -
    const_iterator(pointer object)
    constructor for a given JSON instance
    Definition: json.hpp:5327
    -
    friend bool operator<(const value_t lhs, const value_t rhs)
    comparison operator for JSON types
    Definition: json.hpp:4384
    -
    iterator(pointer object) noexcept
    constructor for a given JSON instance
    Definition: json.hpp:5819
    -
    bool operator<(const const_iterator &other) const
    comparison: smaller
    Definition: json.hpp:5621
    +
    const_iterator(pointer object)
    constructor for a given JSON instance
    Definition: json.hpp:5408
    +
    friend bool operator<(const value_t lhs, const value_t rhs)
    comparison operator for JSON types
    Definition: json.hpp:4465
    +
    iterator(pointer object) noexcept
    constructor for a given JSON instance
    Definition: json.hpp:5900
    +
    bool operator<(const const_iterator &other) const
    comparison: smaller
    Definition: json.hpp:5702
    string_t dump(const int indent=-1) const
    serialization
    Definition: json.hpp:1863
    -
    friend bool operator!=(const_reference v, std::nullptr_t) noexcept
    comparison: not equal
    Definition: json.hpp:4541
    -
    const_iterator & operator-=(difference_type i)
    subtract from iterator
    Definition: json.hpp:5693
    +
    friend bool operator!=(const_reference v, std::nullptr_t) noexcept
    comparison: not equal
    Definition: json.hpp:4622
    +
    const_iterator & operator-=(difference_type i)
    subtract from iterator
    Definition: json.hpp:5774
    basic_json(const int val)
    create an integer number from an enum type (explicit)
    Definition: json.hpp:1194
    basic_json(const array_t &val)
    create an array (explicit)
    Definition: json.hpp:992
    number value (floating-point)
    -
    static basic_json parse(const string_t &s, parser_callback_t cb=nullptr)
    deserialize from string
    Definition: json.hpp:4778
    -
    InteratorType erase(InteratorType first, InteratorType last)
    remove elements given an iterator range
    Definition: json.hpp:3216
    -
    json_reverse_iterator operator++(int)
    post-increment (it++)
    Definition: json.hpp:5963
    +
    static basic_json parse(const string_t &s, parser_callback_t cb=nullptr)
    deserialize from string
    Definition: json.hpp:4859
    +
    InteratorType erase(InteratorType first, InteratorType last)
    remove elements given an iterator range
    Definition: json.hpp:3297
    +
    json_reverse_iterator operator++(int)
    post-increment (it++)
    Definition: json.hpp:6044
    PointerType get_ptr() noexcept
    get a pointer value (implicit)
    Definition: json.hpp:2524
    -
    const_iterator(const iterator &other)
    copy constructor given a nonconst iterator
    Definition: json.hpp:5352
    -
    friend bool operator!=(std::nullptr_t, const_reference v) noexcept
    comparison: not equal
    Definition: json.hpp:4550
    -
    InteratorType erase(InteratorType pos)
    remove element given an iterator
    Definition: json.hpp:3115
    -
    bool operator<=(const const_iterator &other) const
    comparison: less than or equal
    Definition: json.hpp:5649
    +
    const_iterator(const iterator &other)
    copy constructor given a nonconst iterator
    Definition: json.hpp:5433
    +
    friend bool operator!=(std::nullptr_t, const_reference v) noexcept
    comparison: not equal
    Definition: json.hpp:4631
    +
    InteratorType erase(InteratorType pos)
    remove element given an iterator
    Definition: json.hpp:3196
    +
    bool operator<=(const const_iterator &other) const
    comparison: less than or equal
    Definition: json.hpp:5730
    basic_json(const CompatibleNumberFloatType val) noexcept
    create an floating-point number (implicit)
    Definition: json.hpp:1304
    -
    reference back()
    access the last element
    Definition: json.hpp:3050
    +
    reference back()
    access the last element
    Definition: json.hpp:3131
    bool is_number_float() const noexcept
    return whether value is a floating-point number
    Definition: json.hpp:2043
    the parser read { and started to process a JSON object
    -
    const_iterator operator++(int)
    post-increment (it++)
    Definition: json.hpp:5517
    +
    const_iterator operator++(int)
    post-increment (it++)
    Definition: json.hpp:5598
    typename std::allocator_traits< allocator_type >::const_pointer const_pointer
    the type of an element const pointer
    Definition: json.hpp:229
    basic_json(const string_t &val)
    create a string (explicit)
    Definition: json.hpp:1058
    -
    iterator(const iterator &other) noexcept
    copy constructor
    Definition: json.hpp:5823
    -
    const_reference back() const
    access the last element
    Definition: json.hpp:3060
    +
    iterator(const iterator &other) noexcept
    copy constructor
    Definition: json.hpp:5904
    +
    const_reference back() const
    access the last element
    Definition: json.hpp:3141
    basic_json(InputIT first, InputIT last)
    construct a JSON container given an iterator range
    Definition: json.hpp:1574
    -
    static basic_json parse(std::istream &i, parser_callback_t cb=nullptr)
    deserialize from stream
    Definition: json.hpp:4807
    -
    size_type count(typename object_t::key_type key) const
    returns the number of occurrences of a key in a JSON object
    Definition: json.hpp:3412
    -
    size_type max_size() const noexcept
    returns the maximum possible number of elements
    Definition: json.hpp:3809
    -
    void push_back(const basic_json &val)
    add an object to an array
    Definition: json.hpp:3967
    -
    bool operator==(const const_iterator &other) const
    comparison: equal
    Definition: json.hpp:5587
    -
    json_reverse_iterator & operator++()
    pre-increment (++it)
    Definition: json.hpp:5969
    -
    bool operator>(const const_iterator &other) const
    comparison: greater than
    Definition: json.hpp:5655
    -
    friend bool operator>(const_reference lhs, const_reference rhs) noexcept
    comparison: greater than
    Definition: json.hpp:4662
    +
    static basic_json parse(std::istream &i, parser_callback_t cb=nullptr)
    deserialize from stream
    Definition: json.hpp:4888
    +
    size_type count(typename object_t::key_type key) const
    returns the number of occurrences of a key in a JSON object
    Definition: json.hpp:3493
    +
    size_type max_size() const noexcept
    returns the maximum possible number of elements
    Definition: json.hpp:3890
    +
    void push_back(const basic_json &val)
    add an object to an array
    Definition: json.hpp:4048
    +
    bool operator==(const const_iterator &other) const
    comparison: equal
    Definition: json.hpp:5668
    +
    json_reverse_iterator & operator++()
    pre-increment (++it)
    Definition: json.hpp:6050
    +
    bool operator>(const const_iterator &other) const
    comparison: greater than
    Definition: json.hpp:5736
    +
    friend bool operator>(const_reference lhs, const_reference rhs) noexcept
    comparison: greater than
    Definition: json.hpp:4743
    basic_json(basic_json &&other) noexcept
    move constructor
    Definition: json.hpp:1738
    -
    const_iterator begin() const
    returns a const iterator to the first element
    Definition: json.hpp:3456
    +
    const_reference operator[](const T(&key)[n]) const
    read-only access specified object element
    Definition: json.hpp:2982
    +
    const_iterator begin() const
    returns a const iterator to the first element
    Definition: json.hpp:3537
    const_reference at(size_type idx) const
    access specified array element with bounds checking
    Definition: json.hpp:2650
    -
    json_reverse_iterator & operator+=(difference_type i)
    add to iterator
    Definition: json.hpp:5989
    -
    a const random access iterator for the basic_json class
    Definition: json.hpp:5306
    +
    json_reverse_iterator & operator+=(difference_type i)
    add to iterator
    Definition: json.hpp:6070
    +
    a const random access iterator for the basic_json class
    Definition: json.hpp:5387
    a template for a reverse iterator class
    Definition: json.hpp:232
    -
    void swap(object_t &other)
    exchanges the values
    Definition: json.hpp:4319
    -
    std::bidirectional_iterator_tag iterator_category
    the category of the iterator
    Definition: json.hpp:5321
    +
    void swap(object_t &other)
    exchanges the values
    Definition: json.hpp:4400
    +
    std::bidirectional_iterator_tag iterator_category
    the category of the iterator
    Definition: json.hpp:5402
    bool is_primitive() const noexcept
    return whether type is primitive
    Definition: json.hpp:1915
    -
    iterator insert(const_iterator pos, const basic_json &val)
    inserts element
    Definition: json.hpp:4065
    -
    friend bool operator==(const_reference v, std::nullptr_t) noexcept
    comparison: equal
    Definition: json.hpp:4488
    +
    iterator insert(const_iterator pos, const basic_json &val)
    inserts element
    Definition: json.hpp:4146
    +
    friend bool operator==(const_reference v, std::nullptr_t) noexcept
    comparison: equal
    Definition: json.hpp:4569
    -
    reference operator[](difference_type n) const
    access to successor
    Definition: json.hpp:6018
    +
    reference operator[](difference_type n) const
    access to successor
    Definition: json.hpp:6099
    NumberIntegerType number_integer_t
    a type for a number (integer)
    Definition: json.hpp:527
    -
    reference operator[](difference_type n) const
    access to successor
    Definition: json.hpp:5737
    -
    reference operator*() const
    return a reference to the value pointed to by the iterator
    Definition: json.hpp:5454
    +
    reference operator[](difference_type n) const
    access to successor
    Definition: json.hpp:5818
    +
    reference operator*() const
    return a reference to the value pointed to by the iterator
    Definition: json.hpp:5535
    value_type & reference
    the type of an element reference
    Definition: json.hpp:212
    -
    friend std::istream & operator<<(basic_json &j, std::istream &i)
    deserialize from stream
    Definition: json.hpp:4843
    +
    friend std::istream & operator<<(basic_json &j, std::istream &i)
    deserialize from stream
    Definition: json.hpp:4924
    the parser finished reading a JSON value
    NumberFloatType number_float_t
    a type for a number (floating-point)
    Definition: json.hpp:592
    -
    std::size_t operator()(const nlohmann::json &j) const
    return a hash value for a JSON object
    Definition: json.hpp:7666
    -
    friend std::ostream & operator<<(std::ostream &o, const basic_json &j)
    serialize to stream
    Definition: json.hpp:4721
    -
    iterator & operator=(iterator other) noexcept( std::is_nothrow_move_constructible< pointer >::value and std::is_nothrow_move_assignable< pointer >::value and std::is_nothrow_move_constructible< internal_iterator >::value and std::is_nothrow_move_assignable< internal_iterator >::value )
    copy assignment
    Definition: json.hpp:5828
    +
    std::size_t operator()(const nlohmann::json &j) const
    return a hash value for a JSON object
    Definition: json.hpp:7747
    +
    friend std::ostream & operator<<(std::ostream &o, const basic_json &j)
    serialize to stream
    Definition: json.hpp:4802
    +
    iterator & operator=(iterator other) noexcept( std::is_nothrow_move_constructible< pointer >::value and std::is_nothrow_move_assignable< pointer >::value and std::is_nothrow_move_constructible< internal_iterator >::value and std::is_nothrow_move_assignable< internal_iterator >::value )
    copy assignment
    Definition: json.hpp:5909
    basic_json(const CompatibleObjectType &val)
    create an object (implicit)
    Definition: json.hpp:965
    reference operator[](size_type idx)
    access specified array element
    Definition: json.hpp:2763
    -
    iterator operator--(int)
    post-decrement (it–)
    Definition: json.hpp:5867
    -
    json_reverse_iterator operator+(difference_type i) const
    add to iterator
    Definition: json.hpp:5996
    +
    iterator operator--(int)
    post-decrement (it–)
    Definition: json.hpp:5948
    +
    json_reverse_iterator operator+(difference_type i) const
    add to iterator
    Definition: json.hpp:6077
    parse_event_t
    JSON callback events.
    Definition: json.hpp:754
    -
    iterator operator-(difference_type i)
    subtract from iterator
    Definition: json.hpp:5904
    -
    wrapper to access iterator member functions in range-based for
    Definition: json.hpp:6045
    +
    iterator operator-(difference_type i)
    subtract from iterator
    Definition: json.hpp:5985
    +
    wrapper to access iterator member functions in range-based for
    Definition: json.hpp:6126
    diff --git a/namespacemembers.html b/namespacemembers.html index 4e8653d34..a48d378d3 100644 --- a/namespacemembers.html +++ b/namespacemembers.html @@ -94,7 +94,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/namespacemembers_type.html b/namespacemembers_type.html index c492e9768..47f928371 100644 --- a/namespacemembers_type.html +++ b/namespacemembers_type.html @@ -94,7 +94,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/namespacenlohmann.html b/namespacenlohmann.html index 6c95436a3..ed4c30795 100644 --- a/namespacenlohmann.html +++ b/namespacenlohmann.html @@ -116,7 +116,7 @@ Typedefs diff --git a/namespacenlohmann_1_1anonymous__namespace_02json_8hpp_03.html b/namespacenlohmann_1_1anonymous__namespace_02json_8hpp_03.html index 61ea27c78..8263db394 100644 --- a/namespacenlohmann_1_1anonymous__namespace_02json_8hpp_03.html +++ b/namespacenlohmann_1_1anonymous__namespace_02json_8hpp_03.html @@ -105,7 +105,7 @@ Classes diff --git a/namespacenlohmann_a2bfd99e845a2e5cd90aeaf1b1431f474.html b/namespacenlohmann_a2bfd99e845a2e5cd90aeaf1b1431f474.html index cdf33a4c2..ea49e6c4d 100644 --- a/namespacenlohmann_a2bfd99e845a2e5cd90aeaf1b1431f474.html +++ b/namespacenlohmann_a2bfd99e845a2e5cd90aeaf1b1431f474.html @@ -101,7 +101,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');

    This type is the default specialization of the basic_json class which uses the standard template types.

    Since
    version 1.0
    -

    Definition at line 7631 of file json.hpp.

    +

    Definition at line 7712 of file json.hpp.

    @@ -111,7 +111,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/search/all_d.js b/search/all_d.js index fd8dfdd84..efac5216b 100644 --- a/search/all_d.js +++ b/search/all_d.js @@ -24,5 +24,5 @@ var searchData= ['operator_3e',['operator>',['../classnlohmann_1_1basic__json_a87db51b6b936fb2ea293cdbc8702dcb8.html#a87db51b6b936fb2ea293cdbc8702dcb8',1,'nlohmann::basic_json::operator>()'],['../classnlohmann_1_1basic__json_1_1const__iterator_a17e5f5d3598e6901f3c1c1f7dc60589f.html#a17e5f5d3598e6901f3c1c1f7dc60589f',1,'nlohmann::basic_json::const_iterator::operator>()']]], ['operator_3e_3d',['operator>=',['../classnlohmann_1_1basic__json_a74a943800c7f103d0990d7eef82c6453.html#a74a943800c7f103d0990d7eef82c6453',1,'nlohmann::basic_json::operator>=()'],['../classnlohmann_1_1basic__json_1_1const__iterator_a6b3e43d2f45fa611825dbdf4e88fffe2.html#a6b3e43d2f45fa611825dbdf4e88fffe2',1,'nlohmann::basic_json::const_iterator::operator>=()']]], ['operator_3e_3e',['operator>>',['../classnlohmann_1_1basic__json_a34d6a60dd99e9f33b8273a1c8db5669b.html#a34d6a60dd99e9f33b8273a1c8db5669b',1,'nlohmann::basic_json::operator>>()'],['../classnlohmann_1_1basic__json_aaf363408931d76472ded14017e59c9e8.html#aaf363408931d76472ded14017e59c9e8',1,'nlohmann::basic_json::operator>>()']]], - ['operator_5b_5d',['operator[]',['../classnlohmann_1_1basic__json_a57703688bee6b9736ab3a430d8d246f2.html#a57703688bee6b9736ab3a430d8d246f2',1,'nlohmann::basic_json::operator[](size_type idx)'],['../classnlohmann_1_1basic__json_ae960d2d6bc7b94fe39cc5e9f106edfa9.html#ae960d2d6bc7b94fe39cc5e9f106edfa9',1,'nlohmann::basic_json::operator[](size_type idx) const '],['../classnlohmann_1_1basic__json_af74581d177dafc38df5a126ccd358999.html#af74581d177dafc38df5a126ccd358999',1,'nlohmann::basic_json::operator[](const typename object_t::key_type &key)'],['../classnlohmann_1_1basic__json_a266c4dd24d11a86e4831523af5d9df4d.html#a266c4dd24d11a86e4831523af5d9df4d',1,'nlohmann::basic_json::operator[](const T(&key)[n])'],['../classnlohmann_1_1basic__json_1_1const__iterator_a1cba94e5a67ee52bc66b898a4e08359d.html#a1cba94e5a67ee52bc66b898a4e08359d',1,'nlohmann::basic_json::const_iterator::operator[]()'],['../classnlohmann_1_1basic__json_1_1iterator_a0eb7ac9b746fb6f931ae728f70f92a8e.html#a0eb7ac9b746fb6f931ae728f70f92a8e',1,'nlohmann::basic_json::iterator::operator[]()'],['../classnlohmann_1_1basic__json_1_1json__reverse__iterator_ae988bd36b7d098b1157871f83b2d6265.html#ae988bd36b7d098b1157871f83b2d6265',1,'nlohmann::basic_json::json_reverse_iterator::operator[]()']]] + ['operator_5b_5d',['operator[]',['../classnlohmann_1_1basic__json_a57703688bee6b9736ab3a430d8d246f2.html#a57703688bee6b9736ab3a430d8d246f2',1,'nlohmann::basic_json::operator[](size_type idx)'],['../classnlohmann_1_1basic__json_ae960d2d6bc7b94fe39cc5e9f106edfa9.html#ae960d2d6bc7b94fe39cc5e9f106edfa9',1,'nlohmann::basic_json::operator[](size_type idx) const '],['../classnlohmann_1_1basic__json_af74581d177dafc38df5a126ccd358999.html#af74581d177dafc38df5a126ccd358999',1,'nlohmann::basic_json::operator[](const typename object_t::key_type &key)'],['../classnlohmann_1_1basic__json_a8e34088252a3ee6b2377f3a1f26dd1ba.html#a8e34088252a3ee6b2377f3a1f26dd1ba',1,'nlohmann::basic_json::operator[](const typename object_t::key_type &key) const '],['../classnlohmann_1_1basic__json_a266c4dd24d11a86e4831523af5d9df4d.html#a266c4dd24d11a86e4831523af5d9df4d',1,'nlohmann::basic_json::operator[](const T(&key)[n])'],['../classnlohmann_1_1basic__json_a9daafb4c15ed5a008cb825bbd8c29d87.html#a9daafb4c15ed5a008cb825bbd8c29d87',1,'nlohmann::basic_json::operator[](const T(&key)[n]) const '],['../classnlohmann_1_1basic__json_1_1const__iterator_a1cba94e5a67ee52bc66b898a4e08359d.html#a1cba94e5a67ee52bc66b898a4e08359d',1,'nlohmann::basic_json::const_iterator::operator[]()'],['../classnlohmann_1_1basic__json_1_1iterator_a0eb7ac9b746fb6f931ae728f70f92a8e.html#a0eb7ac9b746fb6f931ae728f70f92a8e',1,'nlohmann::basic_json::iterator::operator[]()'],['../classnlohmann_1_1basic__json_1_1json__reverse__iterator_ae988bd36b7d098b1157871f83b2d6265.html#ae988bd36b7d098b1157871f83b2d6265',1,'nlohmann::basic_json::json_reverse_iterator::operator[]()']]] ]; diff --git a/search/functions_b.js b/search/functions_b.js index 4fd2882b3..b1ac189e0 100644 --- a/search/functions_b.js +++ b/search/functions_b.js @@ -19,5 +19,5 @@ var searchData= ['operator_3d_3d',['operator==',['../classnlohmann_1_1basic__json_1_1const__iterator_a36086a699b95e06976c11367b7d6ba53.html#a36086a699b95e06976c11367b7d6ba53',1,'nlohmann::basic_json::const_iterator']]], ['operator_3e',['operator>',['../classnlohmann_1_1basic__json_1_1const__iterator_a17e5f5d3598e6901f3c1c1f7dc60589f.html#a17e5f5d3598e6901f3c1c1f7dc60589f',1,'nlohmann::basic_json::const_iterator']]], ['operator_3e_3d',['operator>=',['../classnlohmann_1_1basic__json_1_1const__iterator_a6b3e43d2f45fa611825dbdf4e88fffe2.html#a6b3e43d2f45fa611825dbdf4e88fffe2',1,'nlohmann::basic_json::const_iterator']]], - ['operator_5b_5d',['operator[]',['../classnlohmann_1_1basic__json_a57703688bee6b9736ab3a430d8d246f2.html#a57703688bee6b9736ab3a430d8d246f2',1,'nlohmann::basic_json::operator[](size_type idx)'],['../classnlohmann_1_1basic__json_ae960d2d6bc7b94fe39cc5e9f106edfa9.html#ae960d2d6bc7b94fe39cc5e9f106edfa9',1,'nlohmann::basic_json::operator[](size_type idx) const '],['../classnlohmann_1_1basic__json_af74581d177dafc38df5a126ccd358999.html#af74581d177dafc38df5a126ccd358999',1,'nlohmann::basic_json::operator[](const typename object_t::key_type &key)'],['../classnlohmann_1_1basic__json_a266c4dd24d11a86e4831523af5d9df4d.html#a266c4dd24d11a86e4831523af5d9df4d',1,'nlohmann::basic_json::operator[](const T(&key)[n])'],['../classnlohmann_1_1basic__json_1_1const__iterator_a1cba94e5a67ee52bc66b898a4e08359d.html#a1cba94e5a67ee52bc66b898a4e08359d',1,'nlohmann::basic_json::const_iterator::operator[]()'],['../classnlohmann_1_1basic__json_1_1iterator_a0eb7ac9b746fb6f931ae728f70f92a8e.html#a0eb7ac9b746fb6f931ae728f70f92a8e',1,'nlohmann::basic_json::iterator::operator[]()'],['../classnlohmann_1_1basic__json_1_1json__reverse__iterator_ae988bd36b7d098b1157871f83b2d6265.html#ae988bd36b7d098b1157871f83b2d6265',1,'nlohmann::basic_json::json_reverse_iterator::operator[]()']]] + ['operator_5b_5d',['operator[]',['../classnlohmann_1_1basic__json_a57703688bee6b9736ab3a430d8d246f2.html#a57703688bee6b9736ab3a430d8d246f2',1,'nlohmann::basic_json::operator[](size_type idx)'],['../classnlohmann_1_1basic__json_ae960d2d6bc7b94fe39cc5e9f106edfa9.html#ae960d2d6bc7b94fe39cc5e9f106edfa9',1,'nlohmann::basic_json::operator[](size_type idx) const '],['../classnlohmann_1_1basic__json_af74581d177dafc38df5a126ccd358999.html#af74581d177dafc38df5a126ccd358999',1,'nlohmann::basic_json::operator[](const typename object_t::key_type &key)'],['../classnlohmann_1_1basic__json_a8e34088252a3ee6b2377f3a1f26dd1ba.html#a8e34088252a3ee6b2377f3a1f26dd1ba',1,'nlohmann::basic_json::operator[](const typename object_t::key_type &key) const '],['../classnlohmann_1_1basic__json_a266c4dd24d11a86e4831523af5d9df4d.html#a266c4dd24d11a86e4831523af5d9df4d',1,'nlohmann::basic_json::operator[](const T(&key)[n])'],['../classnlohmann_1_1basic__json_a9daafb4c15ed5a008cb825bbd8c29d87.html#a9daafb4c15ed5a008cb825bbd8c29d87',1,'nlohmann::basic_json::operator[](const T(&key)[n]) const '],['../classnlohmann_1_1basic__json_1_1const__iterator_a1cba94e5a67ee52bc66b898a4e08359d.html#a1cba94e5a67ee52bc66b898a4e08359d',1,'nlohmann::basic_json::const_iterator::operator[]()'],['../classnlohmann_1_1basic__json_1_1iterator_a0eb7ac9b746fb6f931ae728f70f92a8e.html#a0eb7ac9b746fb6f931ae728f70f92a8e',1,'nlohmann::basic_json::iterator::operator[]()'],['../classnlohmann_1_1basic__json_1_1json__reverse__iterator_ae988bd36b7d098b1157871f83b2d6265.html#ae988bd36b7d098b1157871f83b2d6265',1,'nlohmann::basic_json::json_reverse_iterator::operator[]()']]] ]; diff --git a/structstd_1_1hash_3_01nlohmann_1_1json_01_4-members.html b/structstd_1_1hash_3_01nlohmann_1_1json_01_4-members.html index 9f116f5c9..565c6e649 100644 --- a/structstd_1_1hash_3_01nlohmann_1_1json_01_4-members.html +++ b/structstd_1_1hash_3_01nlohmann_1_1json_01_4-members.html @@ -98,7 +98,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/structstd_1_1hash_3_01nlohmann_1_1json_01_4.html b/structstd_1_1hash_3_01nlohmann_1_1json_01_4.html index 92222d1f5..f7244b47d 100644 --- a/structstd_1_1hash_3_01nlohmann_1_1json_01_4.html +++ b/structstd_1_1hash_3_01nlohmann_1_1json_01_4.html @@ -111,11 +111,11 @@ Public Member Functions struct std::hash< nlohmann::json > -

    Definition at line 7659 of file json.hpp.

    +

    Definition at line 7740 of file json.hpp.

    diff --git a/structstd_1_1hash_3_01nlohmann_1_1json_01_4_afd03f6ad53db22868ca4163a8200b2f9.html b/structstd_1_1hash_3_01nlohmann_1_1json_01_4_afd03f6ad53db22868ca4163a8200b2f9.html index 0247010db..5103bb987 100644 --- a/structstd_1_1hash_3_01nlohmann_1_1json_01_4_afd03f6ad53db22868ca4163a8200b2f9.html +++ b/structstd_1_1hash_3_01nlohmann_1_1json_01_4_afd03f6ad53db22868ca4163a8200b2f9.html @@ -112,7 +112,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
    Since
    version 1.0
    -

    Definition at line 7666 of file json.hpp.

    +

    Definition at line 7747 of file json.hpp.

    @@ -122,7 +122,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');