From 2c677528e62ad4ee562dd6b05c0e332657d5425c Mon Sep 17 00:00:00 2001 From: Niels Date: Tue, 22 Dec 2015 13:29:42 +0100 Subject: [PATCH] Update --- annotated.html | 2 +- classes.html | 2 +- classnlohmann_1_1basic__json-members.html | 2 +- classnlohmann_1_1basic__json.html | 2 +- ...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 | 6 +- ...son_a0703ae5cbd2daac5e6c0ae01d3a1b114.html | 6 +- ...son_a07c9c38a1f01675759e05d5d34627343.html | 8 +- ...son_a088460b5d95f384a4f2ec9e52f4f66ba.html | 2 +- ...son_a0afa4512f03406db0d0432657e9c7361.html | 2 +- ...son_a114095c452ca2f4ba976548df3da68be.html | 2 +- ...son_a11c3dd843c21c58daa651e84046a82af.html | 2 +- ...son_a122640e7e2db1814fc7bbb3c122ec76e.html | 4 +- ...son_a13e5642dbfa1602c937d295a085413cc.html | 2 +- ...son_a1683189bd539313b5559f07961166c8b.html | 2 +- ...son_a16a275d0201e9aedc87c933c764b8869.html | 10 +- ...son_a1dc0c521042807e216d11110d2f002ff.html | 2 +- ...son_a231b02148577b69a154b2ce2c87a5522.html | 2 +- ...son_a234f03dce002783748ca401a42bc6472.html | 4 +- ...son_a266c4dd24d11a86e4831523af5d9df4d.html | 4 +- ...son_a26b7e4876af25eae5800ce43f93aaef2.html | 6 +- ...son_a2adfc8d24bea3908398cbf325b5dc1d7.html | 6 +- ...son_a2f07bcf7e75c34396476dd1790f26ce8.html | 6 +- ...son_a3173944e7b1809a333def4078a0b92a3.html | 6 +- ...son_a3287df6546c905fb0a5786deb4b1cf32.html | 6 +- ...son_a33f1632cfdbf460b4913f4e8a43dd9e4.html | 2 +- ...son_a34d6a60dd99e9f33b8273a1c8db5669b.html | 4 +- ...son_a3d4e4bab95b24ccab42ed37e0ede2d98.html | 2 +- ...son_a42f9133f978dde4cce5851b2c2434a0c.html | 2 +- ...son_a4361aa791f3980abb239e4155a3450cb.html | 8 +- ...son_a457fec897d7b6283c60ca236ebb1f5e8.html | 2 +- ...son_a48c8d153bc2fd1af655063a4b984feac.html | 2 +- ...son_a4943b7f16ddc4e0df33c0cae7ef14471.html | 6 +- ...son_a4ad3f27ecece8f644e8dca69a97eb67f.html | 6 +- ...son_a4bf695ddf4a00ea8feea2c725ec847f1.html | 6 +- ...son_a4d688b5ff534d3ab4e284b3191061529.html | 6 +- ...son_a5114ed5eb394a2805da0bd1acba95ae2.html | 6 +- ...son_a53a2abfdd4f72c7df5aba1155bf03e48.html | 2 +- ...son_a57703688bee6b9736ab3a430d8d246f2.html | 4 +- ...son_a57a96ab3ff1ce7b48a754129fb12c982.html | 6 +- ...son_a5a2d4dbcdbc8ea065b87daf52cd786b9.html | 2 +- ...son_a5c8bb5200f5eac10d31e26be46e5b1ac.html | 4 +- ...son_a5d428360d75a52f6af74751d1cc912c6.html | 2 +- ...son_a5e34c5435e557d0bf666bd7311211405.html | 4 +- ...son_a5f0aad50ed7e8aec3128fe018c18b3fe.html | 2 +- ...son_a5fd8b54389698edf0c08e2dd001f610b.html | 2 +- ...son_a60ca396028b8d9714c6e10efbf475af6.html | 4 +- ...son_a63691315292df8e1522b00d37ebb1ffc.html | 2 +- ...son_a652414dd930cb3af3b6f454cc535a23e.html | 18 +- ...son_a656939a3dc9a6047e4afacd9e11b83a6.html | 4 +- ...son_a66f936cfbd252f85bd3dc2598e37a64b.html | 6 +- ...son_a6944904b3b59769b1cf62ac2532cbe33.html | 2 +- ...son_a696ced74d8edc0b63a000a72907ab109.html | 2 +- ...son_a6a7f45095675ac6fd1d018a0e41874be.html | 8 +- ...son_a6b7428e8c1169497f47b81667001cbfb.html | 8 +- ...son_a6bbd3e72a870f1ba81ff6886b063b0fe.html | 2 +- ...son_a6dff6a02a2be250b8f8dc2f47be65544.html | 6 +- ...son_a6e2e21da48f5d9471716cd868a068327.html | 4 +- ...son_a71eba33d906745e66f340952b79fbce3.html | 2 +- ...son_a72442ccbb378b4464a24a2da1e784041.html | 6 +- ...son_a72ba20783ecb3eec98bd6a3b870d565c.html | 8 +- ...son_a74472977b798c7b7989e6e7cb960ecff.html | 2 +- ...son_a74a943800c7f103d0990d7eef82c6453.html | 4 +- ...son_a74ccfa471a0c061876b247f820f3c741.html | 10 +- ...son_a75a1754e0d39f33095d3102a8bdb9881.html | 10 +- ...son_a76cfc5062bf6223396ab82c753cd4634.html | 4 +- ...son_a7c08f966200af98db0313a3b517ce0a9.html | 6 +- ...son_a7c19a5c3be6cc755377ee41eade78baf.html | 8 +- ...son_a7d0db3b728d820d4984df78d97d2b104.html | 2 +- ...son_a7d1b990f2c12fecb57db1504fdadd0bb.html | 6 +- ...son_a7dab69b10b98e7bc694339720e37fb2b.html | 8 +- ...son_a7f97a91ad8f1d5cf0b9213bd24f247c4.html | 4 +- ...son_a80ceaa3bdd346292273b309e08525c1c.html | 2 +- ...son_a83cbbfbf5d3ecbad6de8ece0be6b36c4.html | 6 +- ...son_a87db51b6b936fb2ea293cdbc8702dcb8.html | 4 +- ...son_a8b526709d395142b68d21abfbfff17c3.html | 6 +- ...son_a8c40cd9ead4de7c82f28268bdf0ec98a.html | 6 +- ...son_a8e34088252a3ee6b2377f3a1f26dd1ba.html | 4 +- ...son_a8fa74698f4061e18ec664009f3af1ddf.html | 10 +- ...son_a930e14150ffa067bcf56d35cb00271e1.html | 2 +- ...son_a960962c683909619d1d2fbbe856c022e.html | 6 +- ...son_a9730b9f7bc2150e641fe20198d4477c7.html | 4 +- ...son_a98e05a2c9b8f74bd60442772cddeee52.html | 4 +- ...son_a9993148cb0473365e52998c7315f9ada.html | 2 +- ...son_a9a73d1b71c9e913aa2888d8b40c72ee9.html | 4 +- ...son_a9c26c5d0f4a519c7236149b9aeb3ef9e.html | 2 +- ...son_a9daafb4c15ed5a008cb825bbd8c29d87.html | 4 +- ...son_a9f17a0690155e3a5603246ccec81499e.html | 2 +- ...son_aa0422e861b4cbd7cdcaad7a11a1304a9.html | 10 +- ...son_aa1f3b3f1dca79392d6727b81f9668c6c.html | 6 +- ...son_aa5413178b8041f7ac685dec4b040dd2c.html | 8 +- ...son_aa6a24b176f9599a21d662cc5f8e1ca76.html | 2 +- ...son_aa6c32f669a2e523666072003d0ea46f4.html | 2 +- ...son_aa71e977d31f470689883ac60d16ea4ac.html | 8 +- ...son_aabe4661644ea549089f0886c2551d2ac.html | 2 +- ...son_aac185a137428a7337aa620de07bfbbd7.html | 4 +- ...son_aacd442b66140c764c594ac8ad7dfd5b3.html | 4 +- ...son_aacf6c869f6a9c66ac1bc99e93f310044.html | 2 +- ...son_aaf363408931d76472ded14017e59c9e8.html | 4 +- ...son_aafa839f2a74dc1b5060314b3423143b8.html | 2 +- ...son_ab14e3503305622fb5ab01a7f490916e8.html | 8 +- ...son_ab2162bc76e10d8736cab9b2039956054.html | 8 +- ...son_ab74b2398f29acc6ffbf48f1b8974a848.html | 2 +- ...son_ab7d60fb6cb8e8f5740e588f9dc953819.html | 2 +- ...son_ab9a20bd1d391e9cb968db50c246f728d.html | 6 +- ...son_ab9da2afc6f77295f25252725fde142a6.html | 6 +- ...son_abe8f3224ca4041908ddb466cb9caecf1.html | 6 +- ...son_ac160789f17d206a5404981ca0957e303.html | 2 +- ...son_ac4011bd0781e51afe4994d2b09fd27e9.html | 2 +- ...son_ac8163abe518595f19dbee68db1caaaf7.html | 2 +- ...son_ac82abedf356d252e0589850c3d8b35ba.html | 2 +- ...son_ac943391891fcde0a71a15ce990e0f7f4.html | 2 +- ...son_acd08f9179c8c1e9f2cd7575a724ce27e.html | 2 +- ...son_acdf4445333649ec94198f09a62144884.html | 8 +- ...son_ace8338e57fdb11e1955c2a0c2d782069.html | 2 +- ...son_ad1f617d29e8923dd40c89153f792b1bc.html | 2 +- ...son_ad2c4513cef5d8db760c4b2d871eea42c.html | 2 +- ...son_ad497cbc4f80c8d79662ee6e19bf145dd.html | 12 +- ...son_ad6734c2b91b1b77aa2b43b65c3619c05.html | 2 +- ...son_ad8e0c5d04f016d1b3ac7369e5c73bedf.html | 8 +- ...son_ada8e01109a60088e4db2a670d4903b54.html | 18 +- ...son_adbd4c16c9ac641b2a4736bc2c6787d83.html | 2 +- ...son_ade7bd6e0fe221fec9d3fa9b430f5ce76.html | 2 +- ...son_adeaef2ab021997a11a826c378c2365e1.html | 2 +- ...son_adf5dea6fa9d7075ff89ca0796ab47a7e.html | 2 +- ...son_ae347859ec88176ef76a0cbe5b4514fcf.html | 4 +- ...son_ae50f22a1c646b8627e88f1313cceffd4.html | 4 +- ...son_ae874cfc1746b560c53a03bcf5b7bbeed.html | 2 +- ...son_ae928414b2805cf6ef56b4e4f8d235416.html | 2 +- ...son_ae960d2d6bc7b94fe39cc5e9f106edfa9.html | 6 +- ...son_aea1c863b719b4ca5b77188c171bbfafe.html | 2 +- ...son_af073eec08d2e68924098aef09e9a10ba.html | 6 +- ...son_af0ebd1757acb971a6504b4acabf88584.html | 6 +- ...son_af127fb69c580c17821da5f5be57e3585.html | 2 +- ...son_af1e3f9e079136abca2530c8191c56292.html | 4 +- ...son_af2730bc8ffa6b28916875c13ee7b83f5.html | 8 +- ...son_af661bc209bf22097e2f76607a11b56bf.html | 2 +- ...son_af6b6050ccd906dddf7c9f47fe3ad62a5.html | 10 +- ...son_af709c079de0ac3507143ea2c60699bd0.html | 2 +- ...son_af74581d177dafc38df5a126ccd358999.html | 4 +- ...son_af7d0adc984d04fc70c3d29fcd63e096a.html | 8 +- ...son_afc4223b5ad03b1b76e925374a8fff98e.html | 2 +- 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 | 2 +- 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 | 2 +- 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 | 7204 +++++++++-------- namespacemembers.html | 2 +- namespacemembers_type.html | 2 +- namespacenlohmann.html | 2 +- ..._1anonymous__namespace_02json_8hpp_03.html | 2 +- ...ann_a2bfd99e845a2e5cd90aeaf1b1431f474.html | 4 +- ...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 +- 254 files changed, 4118 insertions(+), 4086 deletions(-) diff --git a/annotated.html b/annotated.html index 105a66dfd..8d5900d4e 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 15e18c2a7..cc8b620d9 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 bb7ccd98f..a8f34f76c 100644 --- a/classnlohmann_1_1basic__json-members.html +++ b/classnlohmann_1_1basic__json-members.html @@ -234,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 200bd5936..4eba957b3 100644 --- a/classnlohmann_1_1basic__json.html +++ b/classnlohmann_1_1basic__json.html @@ -659,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 f26f62e0e..fcc3a74d0 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 a7104c538..a286943a9 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 5387 of file json.hpp.

+

Definition at line 5423 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 fe8fb6434..e49d3bdb7 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 5633 of file json.hpp.

+

Definition at line 5669 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 06ab82cb8..035cb0c0f 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 5736 of file json.hpp.

+

Definition at line 5772 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 09f8686de..f0a32b5dd 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 5818 of file json.hpp.

+

Definition at line 5854 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 dccb0284d..1f5d740d5 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 5463 of file json.hpp.

+

Definition at line 5499 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 0b0c30533..935287ab0 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 5569 of file json.hpp.

+

Definition at line 5605 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 a76dd768c..bbef212e9 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 5668 of file json.hpp.

+

Definition at line 5704 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 e8618707e..95532c3ca 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 5535 of file json.hpp.

+

Definition at line 5571 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 0c2b07d00..ba49c27bc 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 5398 of file json.hpp.

+

Definition at line 5434 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 791929975..1f1b9c6b7 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 5433 of file json.hpp.

+

Definition at line 5469 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 445e0cb2e..37b83c1cf 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 5788 of file json.hpp.

+

Definition at line 5824 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 ea2a62968..20700f845 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 5394 of file json.hpp.

+

Definition at line 5430 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 a808395b5..2a4ad7e07 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 5742 of file json.hpp.

+

Definition at line 5778 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 4ca030160..102ff45a2 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 5408 of file json.hpp.

+

Definition at line 5444 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 85ede5e5a..18a7c53ca 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 b6a52745c..e2f1b245b 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 5852 of file json.hpp.

+

Definition at line 5888 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 2436d767a..8b812b85b 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 5748 of file json.hpp.

+

Definition at line 5784 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 d8fb18aaa..45f64eaaa 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 5865 of file json.hpp.

+

Definition at line 5901 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 0f8320aeb..21984d91f 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 5696 of file json.hpp.

+

Definition at line 5732 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 6110a8248..d381e9580 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 5641 of file json.hpp.

+

Definition at line 5677 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 212257170..dbc36a2cd 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 5606 of file json.hpp.

+

Definition at line 5642 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 311069cc7..16c3e1535 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 5396 of file json.hpp.

+

Definition at line 5432 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 66ed2d101..d8b1a6d5b 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 5780 of file json.hpp.

+

Definition at line 5816 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 6e82d50e0..1c520a036 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 5702 of file json.hpp.

+

Definition at line 5738 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 bc6f1e488..25458629a 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 5390 of file json.hpp.

+

Definition at line 5426 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 9547f7cc7..1d9253151 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 5400 of file json.hpp.

+

Definition at line 5436 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 f95f57915..51644891e 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 5796 of file json.hpp.

+

Definition at line 5832 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 9f6a9d2d0..d6922689c 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 5598 of file json.hpp.

+

Definition at line 5634 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 79f68dbb1..1faf9554e 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 5402 of file json.hpp.

+

Definition at line 5438 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 7299be978..e0a8f6a64 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 5730 of file json.hpp.

+

Definition at line 5766 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 31be78492..746a80eea 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 5774 of file json.hpp.

+

Definition at line 5810 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 2f1b79701..13fdec981 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 5458 of file json.hpp.

+

Definition at line 5494 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 bc95c6377..c72b54fcc 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 8b59817fd..1a50e02e1 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 5889 of file json.hpp.

+

Definition at line 5925 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 33ad97614..4830f5712 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 c38ea9568..5aeb5c8f5 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 6126 of file json.hpp.

+

Definition at line 6162 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 dfcf0ffd3..7906e24d6 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 6203 of file json.hpp.

+

Definition at line 6239 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 2adba8312..15de64f43 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 6208 of file json.hpp.

+

Definition at line 6244 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 02296a1bd..10d76267a 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 6214 of file json.hpp.

+

Definition at line 6250 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 436d20c92..e5ac4e36d 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 5941 of file json.hpp.

+

Definition at line 5977 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 20dc028c3..f6d08d58d 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 5970 of file json.hpp.

+

Definition at line 6006 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 cdec5ae4f..311a47ff9 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 5985 of file json.hpp.

+

Definition at line 6021 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 21c2b9456..6c09791d4 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 5998 of file json.hpp.

+

Definition at line 6034 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 e059c9340..705c3628d 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 5927 of file json.hpp.

+

Definition at line 5963 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 7dbfbb596..1ac62bcae 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 5956 of file json.hpp.

+

Definition at line 5992 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 298175b0b..0f8ebf407 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 5992 of file json.hpp.

+

Definition at line 6028 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 e0a49f76d..c6bf3a972 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 5921 of file json.hpp.

+

Definition at line 5957 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 7f7b64075..1c9ff83d9 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 5948 of file json.hpp.

+

Definition at line 5984 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 fc7098840..2521791d2 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 11872af9a..96df95f2c 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 5909 of file json.hpp.

+

Definition at line 5945 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 170b3ce2a..7c0c12195 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 5963 of file json.hpp.

+

Definition at line 5999 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 b237a9df3..b3c25f3d3 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 5904 of file json.hpp.

+

Definition at line 5940 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 cbf4ed87a..38fe87d74 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 5933 of file json.hpp.

+

Definition at line 5969 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 cc597645e..b4d1af251 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 5894 of file json.hpp.

+

Definition at line 5930 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 fffbecedc..bc1d01a35 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 5900 of file json.hpp.

+

Definition at line 5936 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 7c16f5ff5..3eac72db1 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 5977 of file json.hpp.

+

Definition at line 6013 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 aa89ecb53..5a7967c70 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 5892 of file json.hpp.

+

Definition at line 5928 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 0c9524eb0..8d30bd57f 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 6004 of file json.hpp.

+

Definition at line 6040 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 bf9ae6df1..2df118233 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 5893 of file json.hpp.

+

Definition at line 5929 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 0c56be781..76273f177 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 031f8310a..5c8ef96e2 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 46c6dbe96..0e0f3113a 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 6085 of file json.hpp.

+

Definition at line 6121 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 13cb3111f..042022699 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 6037 of file json.hpp.

+

Definition at line 6073 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 61efb1e7c..465492bb2 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 6050 of file json.hpp.

+

Definition at line 6086 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 3bfb5274f..c20ef3d53 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 6077 of file json.hpp.

+

Definition at line 6113 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 b1f3b7abe..e91cba23f 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 6070 of file json.hpp.

+

Definition at line 6106 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 6045797f3..d8ea6a04c 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 6034 of file json.hpp.

+

Definition at line 6070 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 1a34fcb6f..5f74b293e 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 6112 of file json.hpp.

+

Definition at line 6148 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 db4fbb56a..783e3817e 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 6057 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_a70086e392779ecbbc9e6845b2be126a0.html b/classnlohmann_1_1basic__json_1_1json__reverse__iterator_a70086e392779ecbbc9e6845b2be126a0.html index bafabe78a..5f891e503 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 6041 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_aa82b48aee07baee284f8340b37ec6864.html b/classnlohmann_1_1basic__json_1_1json__reverse__iterator_aa82b48aee07baee284f8340b37ec6864.html index f3ef741a7..56433571d 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 6044 of file json.hpp.

+

Definition at line 6080 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 b4ad8e06e..c97171a21 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 6032 of file json.hpp.

+

Definition at line 6068 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 78e20d55b..037b4d487 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 6093 of file json.hpp.

+

Definition at line 6129 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 d9ab8e99a..a741103d6 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 6063 of file json.hpp.

+

Definition at line 6099 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 2e88918f7..6fa2ad61c 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 6099 of file json.hpp.

+

Definition at line 6135 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 520079684..489327d6e 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 6105 of file json.hpp.

+

Definition at line 6141 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 cde2ca098..ddea6671b 100644 --- a/classnlohmann_1_1basic__json_a01a2643289b69cd71d9b3f3fc209b748.html +++ b/classnlohmann_1_1basic__json_a01a2643289b69cd71d9b3f3fc209b748.html @@ -277,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:3493
+
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:3529
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 3493 of file json.hpp.

+

Definition at line 3529 of file json.hpp.

@@ -293,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 85cff4472..b1b38058c 100644 --- a/classnlohmann_1_1basic__json_a0703ae5cbd2daac5e6c0ae01d3a1b114.html +++ b/classnlohmann_1_1basic__json_a0703ae5cbd2daac5e6c0ae01d3a1b114.html @@ -287,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:4013
+
void push_back(basic_json &&val)
add an object to an array
Definition: json.hpp:4049
namespace for Niels Lohmann
Definition: json.hpp:78
Output (play with this example online):
{"one":1,"two":2}
 null
@@ -296,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 4120 of file json.hpp.

+

Definition at line 4156 of file json.hpp.

@@ -306,7 +306,7 @@ null diff --git a/classnlohmann_1_1basic__json_a07c9c38a1f01675759e05d5d34627343.html b/classnlohmann_1_1basic__json_a07c9c38a1f01675759e05d5d34627343.html index 24d5f694c..43586f38f 100644 --- a/classnlohmann_1_1basic__json_a07c9c38a1f01675759e05d5d34627343.html +++ b/classnlohmann_1_1basic__json_a07c9c38a1f01675759e05d5d34627343.html @@ -292,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:3527
+
iterator begin()
returns an iterator to the first element
Definition: json.hpp:3563
namespace for Niels Lohmann
Definition: json.hpp:78
-
iterator insert(const_iterator pos, const basic_json &val)
inserts element
Definition: json.hpp:4146
+
iterator insert(const_iterator pos, const basic_json &val)
inserts element
Definition: json.hpp:4182
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 4172 of file json.hpp.

+

Definition at line 4208 of file json.hpp.

@@ -310,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 e67771f28..1b330fe7f 100644 --- a/classnlohmann_1_1basic__json_a088460b5d95f384a4f2ec9e52f4f66ba.html +++ b/classnlohmann_1_1basic__json_a088460b5d95f384a4f2ec9e52f4f66ba.html @@ -298,7 +298,7 @@ true diff --git a/classnlohmann_1_1basic__json_a0afa4512f03406db0d0432657e9c7361.html b/classnlohmann_1_1basic__json_a0afa4512f03406db0d0432657e9c7361.html index ef899b1dd..ebfe987a8 100644 --- a/classnlohmann_1_1basic__json_a0afa4512f03406db0d0432657e9c7361.html +++ b/classnlohmann_1_1basic__json_a0afa4512f03406db0d0432657e9c7361.html @@ -344,7 +344,7 @@ false diff --git a/classnlohmann_1_1basic__json_a114095c452ca2f4ba976548df3da68be.html b/classnlohmann_1_1basic__json_a114095c452ca2f4ba976548df3da68be.html index f905953b3..32a253808 100644 --- a/classnlohmann_1_1basic__json_a114095c452ca2f4ba976548df3da68be.html +++ b/classnlohmann_1_1basic__json_a114095c452ca2f4ba976548df3da68be.html @@ -298,7 +298,7 @@ false diff --git a/classnlohmann_1_1basic__json_a11c3dd843c21c58daa651e84046a82af.html b/classnlohmann_1_1basic__json_a11c3dd843c21c58daa651e84046a82af.html index 2967be70e..979102ce8 100644 --- a/classnlohmann_1_1basic__json_a11c3dd843c21c58daa651e84046a82af.html +++ b/classnlohmann_1_1basic__json_a11c3dd843c21c58daa651e84046a82af.html @@ -298,7 +298,7 @@ false diff --git a/classnlohmann_1_1basic__json_a122640e7e2db1814fc7bbb3c122ec76e.html b/classnlohmann_1_1basic__json_a122640e7e2db1814fc7bbb3c122ec76e.html index 76feb4915..523602e08 100644 --- a/classnlohmann_1_1basic__json_a122640e7e2db1814fc7bbb3c122ec76e.html +++ b/classnlohmann_1_1basic__json_a122640e7e2db1814fc7bbb3c122ec76e.html @@ -304,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 4511 of file json.hpp.

+

Definition at line 4547 of file json.hpp.

@@ -314,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 5e10df11f..bdd028214 100644 --- a/classnlohmann_1_1basic__json_a13e5642dbfa1602c937d295a085413cc.html +++ b/classnlohmann_1_1basic__json_a13e5642dbfa1602c937d295a085413cc.html @@ -247,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 1cfba327f..1406592f6 100644 --- a/classnlohmann_1_1basic__json_a1683189bd539313b5559f07961166c8b.html +++ b/classnlohmann_1_1basic__json_a1683189bd539313b5559f07961166c8b.html @@ -247,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 b0f102dae..bc5bbe11c 100644 --- a/classnlohmann_1_1basic__json_a16a275d0201e9aedc87c933c764b8869.html +++ b/classnlohmann_1_1basic__json_a16a275d0201e9aedc87c933c764b8869.html @@ -258,8 +258,8 @@ template<template< typename U, typename V, typename...Args > class Obje
Returns
const reference to the element at key key
Exceptions
- - + +
std::domain_errorif JSON is not an object
std::out_of_rangeif the key key is is not stored in the object; that is, find(key) == end()
std::domain_errorif the JSON value is not an object; example: "cannot use at() with boolean"
std::out_of_rangeif the key key is is not stored in the object; that is, find(key) == end(); example: "key "the fast" not found"
@@ -292,7 +292,7 @@ template<template< typename U, typename V, typename...Args > class Obje
26  }
27 }
a class to store JSON values
Definition: json.hpp:187
-
reference at(size_type idx)
access specified array element with bounds checking
Definition: json.hpp:2616
+
reference at(size_type idx)
access specified array element with bounds checking
Definition: json.hpp:2617
namespace for Niels Lohmann
Definition: json.hpp:78
Output (play with this example online):
"il brutto"
 out of range
@@ -302,7 +302,7 @@ out of range
 value() for access by value with a default value
 
Since
version 1.0
-

Definition at line 2726 of file json.hpp.

+

Definition at line 2754 of file json.hpp.

@@ -312,7 +312,7 @@ out of range diff --git a/classnlohmann_1_1basic__json_a1dc0c521042807e216d11110d2f002ff.html b/classnlohmann_1_1basic__json_a1dc0c521042807e216d11110d2f002ff.html index 7f9de7965..01332a064 100644 --- a/classnlohmann_1_1basic__json_a1dc0c521042807e216d11110d2f002ff.html +++ b/classnlohmann_1_1basic__json_a1dc0c521042807e216d11110d2f002ff.html @@ -304,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 6c348621b..5034ceb8a 100644 --- a/classnlohmann_1_1basic__json_a231b02148577b69a154b2ce2c87a5522.html +++ b/classnlohmann_1_1basic__json_a231b02148577b69a154b2ce2c87a5522.html @@ -283,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 29bee8bf8..26e50cac1 100644 --- a/classnlohmann_1_1basic__json_a234f03dce002783748ca401a42bc6472.html +++ b/classnlohmann_1_1basic__json_a234f03dce002783748ca401a42bc6472.html @@ -280,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:3046
+
ValueType value(const typename object_t::key_type &key, ValueType default_value) const
access specified object element with default value
Definition: json.hpp:3082
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
@@ -300,7 +300,7 @@ true diff --git a/classnlohmann_1_1basic__json_a266c4dd24d11a86e4831523af5d9df4d.html b/classnlohmann_1_1basic__json_a266c4dd24d11a86e4831523af5d9df4d.html index 21eb8b518..3c7c39b63 100644 --- a/classnlohmann_1_1basic__json_a266c4dd24d11a86e4831523af5d9df4d.html +++ b/classnlohmann_1_1basic__json_a266c4dd24d11a86e4831523af5d9df4d.html @@ -325,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 2933 of file json.hpp.

+

Definition at line 2969 of file json.hpp.

@@ -335,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 db9c5eaa1..8a6a39f5c 100644 --- a/classnlohmann_1_1basic__json_a26b7e4876af25eae5800ce43f93aaef2.html +++ b/classnlohmann_1_1basic__json_a26b7e4876af25eae5800ce43f93aaef2.html @@ -320,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:3046
+
ValueType value(const typename object_t::key_type &key, ValueType default_value) const
access specified object element with default value
Definition: json.hpp:3082
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 
@@ -329,7 +329,7 @@ Unlike operator[](const typename object_t::key_type&) for unchecked access by reference
Since
version 1.0
-

Definition at line 3046 of file json.hpp.

+

Definition at line 3082 of file json.hpp.

@@ -339,7 +339,7 @@ Unlike diff --git a/classnlohmann_1_1basic__json_a2adfc8d24bea3908398cbf325b5dc1d7.html b/classnlohmann_1_1basic__json_a2adfc8d24bea3908398cbf325b5dc1d7.html index 9eaee5276..365df143e 100644 --- a/classnlohmann_1_1basic__json_a2adfc8d24bea3908398cbf325b5dc1d7.html +++ b/classnlohmann_1_1basic__json_a2adfc8d24bea3908398cbf325b5dc1d7.html @@ -275,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:3706
+
const_reverse_iterator crbegin() const
returns a const reverse iterator to the last element
Definition: json.hpp:3742
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 3652 of file json.hpp.

+

Definition at line 3688 of file json.hpp.

@@ -291,7 +291,7 @@ Illustration from cppreference.com diff --git a/classnlohmann_1_1basic__json_a2f07bcf7e75c34396476dd1790f26ce8.html b/classnlohmann_1_1basic__json_a2f07bcf7e75c34396476dd1790f26ce8.html index 423342b30..ca2a7b7b5 100644 --- a/classnlohmann_1_1basic__json_a2f07bcf7e75c34396476dd1790f26ce8.html +++ b/classnlohmann_1_1basic__json_a2f07bcf7e75c34396476dd1790f26ce8.html @@ -287,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:4013
+
void push_back(basic_json &&val)
add an object to an array
Definition: json.hpp:4049
namespace for Niels Lohmann
Definition: json.hpp:78
Output (play with this example online):
{"one":1,"two":2}
 null
@@ -296,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 4097 of file json.hpp.

+

Definition at line 4133 of file json.hpp.

@@ -306,7 +306,7 @@ null diff --git a/classnlohmann_1_1basic__json_a3173944e7b1809a333def4078a0b92a3.html b/classnlohmann_1_1basic__json_a3173944e7b1809a333def4078a0b92a3.html index da820c0e6..8843a3ff2 100644 --- a/classnlohmann_1_1basic__json_a3173944e7b1809a333def4078a0b92a3.html +++ b/classnlohmann_1_1basic__json_a3173944e7b1809a333def4078a0b92a3.html @@ -287,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:4013
+
void push_back(basic_json &&val)
add an object to an array
Definition: json.hpp:4049
namespace for Niels Lohmann
Definition: json.hpp:78
Output (play with this example online):
[1,2,3,4,5]
 null
@@ -296,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 4038 of file json.hpp.

+

Definition at line 4074 of file json.hpp.

@@ -306,7 +306,7 @@ null diff --git a/classnlohmann_1_1basic__json_a3287df6546c905fb0a5786deb4b1cf32.html b/classnlohmann_1_1basic__json_a3287df6546c905fb0a5786deb4b1cf32.html index 97141f9b5..aa9ee10f5 100644 --- a/classnlohmann_1_1basic__json_a3287df6546c905fb0a5786deb4b1cf32.html +++ b/classnlohmann_1_1basic__json_a3287df6546c905fb0a5786deb4b1cf32.html @@ -304,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:3773
+
bool empty() const noexcept
checks whether the container is empty
Definition: json.hpp:3809
Output (play with this example online):
true
 false
 false
@@ -317,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 3773 of file json.hpp.

+

Definition at line 3809 of file json.hpp.

@@ -327,7 +327,7 @@ false diff --git a/classnlohmann_1_1basic__json_a33f1632cfdbf460b4913f4e8a43dd9e4.html b/classnlohmann_1_1basic__json_a33f1632cfdbf460b4913f4e8a43dd9e4.html index 271da71a0..5ef900efc 100644 --- a/classnlohmann_1_1basic__json_a33f1632cfdbf460b4913f4e8a43dd9e4.html +++ b/classnlohmann_1_1basic__json_a33f1632cfdbf460b4913f4e8a43dd9e4.html @@ -290,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 25d1c84b5..c901ad419 100644 --- a/classnlohmann_1_1basic__json_a34d6a60dd99e9f33b8273a1c8db5669b.html +++ b/classnlohmann_1_1basic__json_a34d6a60dd99e9f33b8273a1c8db5669b.html @@ -308,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 4820 of file json.hpp.

+

Definition at line 4856 of file json.hpp.

@@ -318,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 45e4f699d..870dff9a2 100644 --- a/classnlohmann_1_1basic__json_a3d4e4bab95b24ccab42ed37e0ede2d98.html +++ b/classnlohmann_1_1basic__json_a3d4e4bab95b24ccab42ed37e0ede2d98.html @@ -295,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 7afa1151f..a33bd1352 100644 --- a/classnlohmann_1_1basic__json_a42f9133f978dde4cce5851b2c2434a0c.html +++ b/classnlohmann_1_1basic__json_a42f9133f978dde4cce5851b2c2434a0c.html @@ -305,7 +305,7 @@ true diff --git a/classnlohmann_1_1basic__json_a4361aa791f3980abb239e4155a3450cb.html b/classnlohmann_1_1basic__json_a4361aa791f3980abb239e4155a3450cb.html index 7a5988738..e6440b6e9 100644 --- a/classnlohmann_1_1basic__json_a4361aa791f3980abb239e4155a3450cb.html +++ b/classnlohmann_1_1basic__json_a4361aa791f3980abb239e4155a3450cb.html @@ -275,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:3561
+
const_iterator cbegin() const
returns a const iterator to the first element
Definition: json.hpp:3597
namespace for Niels Lohmann
Definition: json.hpp:78
-
a const random access iterator for the basic_json class
Definition: json.hpp:5387
+
a const random access iterator for the basic_json class
Definition: json.hpp:5423
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 3537 of file json.hpp.

+

Definition at line 3573 of file json.hpp.

@@ -292,7 +292,7 @@ Illustration from cppreference.com diff --git a/classnlohmann_1_1basic__json_a457fec897d7b6283c60ca236ebb1f5e8.html b/classnlohmann_1_1basic__json_a457fec897d7b6283c60ca236ebb1f5e8.html index aa7e18280..108b7528c 100644 --- a/classnlohmann_1_1basic__json_a457fec897d7b6283c60ca236ebb1f5e8.html +++ b/classnlohmann_1_1basic__json_a457fec897d7b6283c60ca236ebb1f5e8.html @@ -295,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 4a13d4114..5f1ea7579 100644 --- a/classnlohmann_1_1basic__json_a48c8d153bc2fd1af655063a4b984feac.html +++ b/classnlohmann_1_1basic__json_a48c8d153bc2fd1af655063a4b984feac.html @@ -297,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 69cb493c2..ecdcc1838 100644 --- a/classnlohmann_1_1basic__json_a4943b7f16ddc4e0df33c0cae7ef14471.html +++ b/classnlohmann_1_1basic__json_a4943b7f16ddc4e0df33c0cae7ef14471.html @@ -278,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:3729
+
const_reverse_iterator crend() const
returns a const reverse iterator to one before the first
Definition: json.hpp:3765
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 3729 of file json.hpp.

+

Definition at line 3765 of file json.hpp.

@@ -294,7 +294,7 @@ Illustration from cppreference.com diff --git a/classnlohmann_1_1basic__json_a4ad3f27ecece8f644e8dca69a97eb67f.html b/classnlohmann_1_1basic__json_a4ad3f27ecece8f644e8dca69a97eb67f.html index a6eb115ed..2dca5d251 100644 --- a/classnlohmann_1_1basic__json_a4ad3f27ecece8f644e8dca69a97eb67f.html +++ b/classnlohmann_1_1basic__json_a4ad3f27ecece8f644e8dca69a97eb67f.html @@ -278,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:3729
+
const_reverse_iterator crend() const
returns a const reverse iterator to one before the first
Definition: json.hpp:3765
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 3683 of file json.hpp.

+

Definition at line 3719 of file json.hpp.

@@ -294,7 +294,7 @@ Illustration from cppreference.com diff --git a/classnlohmann_1_1basic__json_a4bf695ddf4a00ea8feea2c725ec847f1.html b/classnlohmann_1_1basic__json_a4bf695ddf4a00ea8feea2c725ec847f1.html index 37dbe3a43..9c367a9a8 100644 --- a/classnlohmann_1_1basic__json_a4bf695ddf4a00ea8feea2c725ec847f1.html +++ b/classnlohmann_1_1basic__json_a4bf695ddf4a00ea8feea2c725ec847f1.html @@ -284,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:4338
+
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:4374
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 4400 of file json.hpp.

+

Definition at line 4436 of file json.hpp.

@@ -300,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 476355dd1..1261bca72 100644 --- a/classnlohmann_1_1basic__json_a4d688b5ff534d3ab4e284b3191061529.html +++ b/classnlohmann_1_1basic__json_a4d688b5ff534d3ab4e284b3191061529.html @@ -275,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:3706
+
const_reverse_iterator crbegin() const
returns a const reverse iterator to the last element
Definition: json.hpp:3742
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 3706 of file json.hpp.

+

Definition at line 3742 of file json.hpp.

@@ -291,7 +291,7 @@ Illustration from cppreference.com diff --git a/classnlohmann_1_1basic__json_a5114ed5eb394a2805da0bd1acba95ae2.html b/classnlohmann_1_1basic__json_a5114ed5eb394a2805da0bd1acba95ae2.html index 44de443e4..7ed33a57e 100644 --- a/classnlohmann_1_1basic__json_a5114ed5eb394a2805da0bd1acba95ae2.html +++ b/classnlohmann_1_1basic__json_a5114ed5eb394a2805da0bd1acba95ae2.html @@ -287,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:4013
+
void push_back(basic_json &&val)
add an object to an array
Definition: json.hpp:4049
namespace for Niels Lohmann
Definition: json.hpp:78
Output (play with this example online):
[1,2,3,4,5]
 null
@@ -296,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 4048 of file json.hpp.

+

Definition at line 4084 of file json.hpp.

@@ -306,7 +306,7 @@ null diff --git a/classnlohmann_1_1basic__json_a53a2abfdd4f72c7df5aba1155bf03e48.html b/classnlohmann_1_1basic__json_a53a2abfdd4f72c7df5aba1155bf03e48.html index e9ad2e062..3d4e6b319 100644 --- a/classnlohmann_1_1basic__json_a53a2abfdd4f72c7df5aba1155bf03e48.html +++ b/classnlohmann_1_1basic__json_a53a2abfdd4f72c7df5aba1155bf03e48.html @@ -299,7 +299,7 @@ false diff --git a/classnlohmann_1_1basic__json_a57703688bee6b9736ab3a430d8d246f2.html b/classnlohmann_1_1basic__json_a57703688bee6b9736ab3a430d8d246f2.html index 66129cb4e..68b1a14ca 100644 --- a/classnlohmann_1_1basic__json_a57703688bee6b9736ab3a430d8d246f2.html +++ b/classnlohmann_1_1basic__json_a57703688bee6b9736ab3a430d8d246f2.html @@ -296,7 +296,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/operatorarray__size_type.cpp -o operatorarray__size_type 
Since
version 1.0
-

Definition at line 2763 of file json.hpp.

+

Definition at line 2799 of file json.hpp.

@@ -306,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 bc6f8670c..79fc6d87c 100644 --- a/classnlohmann_1_1basic__json_a57a96ab3ff1ce7b48a754129fb12c982.html +++ b/classnlohmann_1_1basic__json_a57a96ab3ff1ce7b48a754129fb12c982.html @@ -284,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:4338
+
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:4374
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 4432 of file json.hpp.

+

Definition at line 4468 of file json.hpp.

@@ -300,7 +300,7 @@ string = the bad diff --git a/classnlohmann_1_1basic__json_a5a2d4dbcdbc8ea065b87daf52cd786b9.html b/classnlohmann_1_1basic__json_a5a2d4dbcdbc8ea065b87daf52cd786b9.html index b559f7654..a10a84063 100644 --- a/classnlohmann_1_1basic__json_a5a2d4dbcdbc8ea065b87daf52cd786b9.html +++ b/classnlohmann_1_1basic__json_a5a2d4dbcdbc8ea065b87daf52cd786b9.html @@ -281,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 8aa588310..17e784fa1 100644 --- a/classnlohmann_1_1basic__json_a5c8bb5200f5eac10d31e26be46e5b1ac.html +++ b/classnlohmann_1_1basic__json_a5c8bb5200f5eac10d31e26be46e5b1ac.html @@ -300,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 4721 of file json.hpp.

+

Definition at line 4757 of file json.hpp.

@@ -310,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 ca4a7c3ee..11ee5ee12 100644 --- a/classnlohmann_1_1basic__json_a5d428360d75a52f6af74751d1cc912c6.html +++ b/classnlohmann_1_1basic__json_a5d428360d75a52f6af74751d1cc912c6.html @@ -314,7 +314,7 @@ true diff --git a/classnlohmann_1_1basic__json_a5e34c5435e557d0bf666bd7311211405.html b/classnlohmann_1_1basic__json_a5e34c5435e557d0bf666bd7311211405.html index c29feb39f..0eab0f774 100644 --- a/classnlohmann_1_1basic__json_a5e34c5435e557d0bf666bd7311211405.html +++ b/classnlohmann_1_1basic__json_a5e34c5435e557d0bf666bd7311211405.html @@ -308,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 4802 of file json.hpp.

+

Definition at line 4838 of file json.hpp.

@@ -318,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 ef5caec99..f82229192 100644 --- a/classnlohmann_1_1basic__json_a5f0aad50ed7e8aec3128fe018c18b3fe.html +++ b/classnlohmann_1_1basic__json_a5f0aad50ed7e8aec3128fe018c18b3fe.html @@ -343,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 849f425a8..efcf85c7a 100644 --- a/classnlohmann_1_1basic__json_a5fd8b54389698edf0c08e2dd001f610b.html +++ b/classnlohmann_1_1basic__json_a5fd8b54389698edf0c08e2dd001f610b.html @@ -247,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 a15815331..85be039ba 100644 --- a/classnlohmann_1_1basic__json_a60ca396028b8d9714c6e10efbf475af6.html +++ b/classnlohmann_1_1basic__json_a60ca396028b8d9714c6e10efbf475af6.html @@ -316,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 4924 of file json.hpp.

+

Definition at line 4960 of file json.hpp.

@@ -326,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 fa2faa759..870e4b45c 100644 --- a/classnlohmann_1_1basic__json_a63691315292df8e1522b00d37ebb1ffc.html +++ b/classnlohmann_1_1basic__json_a63691315292df8e1522b00d37ebb1ffc.html @@ -284,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 402bc178e..21f2d8a79 100644 --- a/classnlohmann_1_1basic__json_a652414dd930cb3af3b6f454cc535a23e.html +++ b/classnlohmann_1_1basic__json_a652414dd930cb3af3b6f454cc535a23e.html @@ -258,8 +258,8 @@ template<template< typename U, typename V, typename...Args > class Obje
Returns
reference to the element at key key
Exceptions
- - + +
std::domain_errorif JSON is not an object
std::out_of_rangeif the key key is is not stored in the object; that is, find(key) == end()
std::domain_errorif the JSON value is not an object; example: "cannot use at() with boolean"
std::out_of_rangeif the key key is is not stored in the object; that is, find(key) == end(); example: "key "the fast" not found"
@@ -292,24 +292,24 @@ template<template< typename U, typename V, typename...Args > class Obje
26  {
27  object.at("the fast") = "il rapido";
28  }
-
29  catch (std::out_of_range)
+
29  catch (std::out_of_range& e)
30  {
-
31  std::cout << "out of range" << '\n';
+
31  std::cout << "out of range: " << e.what() << '\n';
32  }
33 }
a class to store JSON values
Definition: json.hpp:187
-
reference at(size_type idx)
access specified array element with bounds checking
Definition: json.hpp:2616
+
reference at(size_type idx)
access specified array element with bounds checking
Definition: json.hpp:2617
namespace for Niels Lohmann
Definition: json.hpp:78
- Output (play with this example online):
"il brutto"
+ Output (play with this example online): 
"il brutto"
 {"the bad":"il cattivo","the good":"il buono","the ugly":"il brutto"}
-out of range
+out of range: key 'the fast' not found
 
The example code above can be translated with
g++ -std=c++11 -Isrc doc/examples/at__object_t_key_type.cpp -o at__object_t_key_type 
See also
operator[](const typename object_t::key_type&) for unchecked access by reference
value() for access by value with a default value
Since
version 1.0
-

Definition at line 2688 of file json.hpp.

+

Definition at line 2707 of file json.hpp.

@@ -319,7 +319,7 @@ out of range diff --git a/classnlohmann_1_1basic__json_a656939a3dc9a6047e4afacd9e11b83a6.html b/classnlohmann_1_1basic__json_a656939a3dc9a6047e4afacd9e11b83a6.html index f7d2bc496..a238a44a1 100644 --- a/classnlohmann_1_1basic__json_a656939a3dc9a6047e4afacd9e11b83a6.html +++ b/classnlohmann_1_1basic__json_a656939a3dc9a6047e4afacd9e11b83a6.html @@ -280,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:3046
+
ValueType value(const typename object_t::key_type &key, ValueType default_value) const
access specified object element with default value
Definition: json.hpp:3082
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
@@ -300,7 +300,7 @@ true diff --git a/classnlohmann_1_1basic__json_a66f936cfbd252f85bd3dc2598e37a64b.html b/classnlohmann_1_1basic__json_a66f936cfbd252f85bd3dc2598e37a64b.html index 48cd6acc9..918becf73 100644 --- a/classnlohmann_1_1basic__json_a66f936cfbd252f85bd3dc2598e37a64b.html +++ b/classnlohmann_1_1basic__json_a66f936cfbd252f85bd3dc2598e37a64b.html @@ -287,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:4013
+
void push_back(basic_json &&val)
add an object to an array
Definition: json.hpp:4049
namespace for Niels Lohmann
Definition: json.hpp:78
Output (play with this example online):
[1,2,3,4,5]
 null
@@ -296,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 4013 of file json.hpp.

+

Definition at line 4049 of file json.hpp.

@@ -306,7 +306,7 @@ null diff --git a/classnlohmann_1_1basic__json_a6944904b3b59769b1cf62ac2532cbe33.html b/classnlohmann_1_1basic__json_a6944904b3b59769b1cf62ac2532cbe33.html index 3225d7a1d..2421bbd6e 100644 --- a/classnlohmann_1_1basic__json_a6944904b3b59769b1cf62ac2532cbe33.html +++ b/classnlohmann_1_1basic__json_a6944904b3b59769b1cf62ac2532cbe33.html @@ -273,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 79fcc85de..841752986 100644 --- a/classnlohmann_1_1basic__json_a696ced74d8edc0b63a000a72907ab109.html +++ b/classnlohmann_1_1basic__json_a696ced74d8edc0b63a000a72907ab109.html @@ -301,7 +301,7 @@ false diff --git a/classnlohmann_1_1basic__json_a6a7f45095675ac6fd1d018a0e41874be.html b/classnlohmann_1_1basic__json_a6a7f45095675ac6fd1d018a0e41874be.html index 7fdaf4f54..8a317ea41 100644 --- a/classnlohmann_1_1basic__json_a6a7f45095675ac6fd1d018a0e41874be.html +++ b/classnlohmann_1_1basic__json_a6a7f45095675ac6fd1d018a0e41874be.html @@ -310,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: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
+
iterator end()
returns an iterator to one past the last element
Definition: json.hpp:3622
+
iterator begin()
returns an iterator to the first element
Definition: json.hpp:3563
+
iterator find(typename object_t::key_type key)
find an element in a JSON object
Definition: json.hpp:3483
namespace for Niels Lohmann
Definition: json.hpp:78
Output (play with this example online):
["bravo","charly"]
 42
@@ -330,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 cd18d2a75..960f65d30 100644
--- a/classnlohmann_1_1basic__json_a6b7428e8c1169497f47b81667001cbfb.html
+++ b/classnlohmann_1_1basic__json_a6b7428e8c1169497f47b81667001cbfb.html
@@ -299,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:3527
+
iterator begin()
returns an iterator to the first element
Definition: json.hpp:3563
namespace for Niels Lohmann
Definition: json.hpp:78
-
iterator insert(const_iterator pos, const basic_json &val)
inserts element
Definition: json.hpp:4146
+
iterator insert(const_iterator pos, const basic_json &val)
inserts element
Definition: json.hpp:4182
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 4199 of file json.hpp.

+

Definition at line 4235 of file json.hpp.

@@ -317,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 166f4cd66..319155216 100644 --- a/classnlohmann_1_1basic__json_a6bbd3e72a870f1ba81ff6886b063b0fe.html +++ b/classnlohmann_1_1basic__json_a6bbd3e72a870f1ba81ff6886b063b0fe.html @@ -247,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 449524b8d..0df410380 100644 --- a/classnlohmann_1_1basic__json_a6dff6a02a2be250b8f8dc2f47be65544.html +++ b/classnlohmann_1_1basic__json_a6dff6a02a2be250b8f8dc2f47be65544.html @@ -280,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:3196
+
InteratorType erase(InteratorType pos)
remove element given an iterator
Definition: json.hpp:3232
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
@@ -290,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 3412 of file json.hpp.

+

Definition at line 3448 of file json.hpp.

@@ -300,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 f982f5ecd..6036e9810 100644 --- a/classnlohmann_1_1basic__json_a6e2e21da48f5d9471716cd868a068327.html +++ b/classnlohmann_1_1basic__json_a6e2e21da48f5d9471716cd868a068327.html @@ -300,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 4599 of file json.hpp.

+

Definition at line 4635 of file json.hpp.

@@ -310,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 ed5c5c1b8..8f1ad0dc7 100644 --- a/classnlohmann_1_1basic__json_a71eba33d906745e66f340952b79fbce3.html +++ b/classnlohmann_1_1basic__json_a71eba33d906745e66f340952b79fbce3.html @@ -247,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 526ba5b6a..f2c994f95 100644 --- a/classnlohmann_1_1basic__json_a72442ccbb378b4464a24a2da1e784041.html +++ b/classnlohmann_1_1basic__json_a72442ccbb378b4464a24a2da1e784041.html @@ -318,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:3046
+
ValueType value(const typename object_t::key_type &key, ValueType default_value) const
access specified object element with default value
Definition: json.hpp:3082
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 +327,7 @@ Unlike operator[](const typename object_t::key_type&) for unchecked access by reference
Since
version 1.0
-

Definition at line 3072 of file json.hpp.

+

Definition at line 3108 of file json.hpp.

@@ -337,7 +337,7 @@ Unlike diff --git a/classnlohmann_1_1basic__json_a72ba20783ecb3eec98bd6a3b870d565c.html b/classnlohmann_1_1basic__json_a72ba20783ecb3eec98bd6a3b870d565c.html index c456eb3aa..ca7300b67 100644 --- a/classnlohmann_1_1basic__json_a72ba20783ecb3eec98bd6a3b870d565c.html +++ b/classnlohmann_1_1basic__json_a72ba20783ecb3eec98bd6a3b870d565c.html @@ -278,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:3620
+
const_iterator cend() const
returns a const iterator to one past the last element
Definition: json.hpp:3656
namespace for Niels Lohmann
Definition: json.hpp:78
-
a const random access iterator for the basic_json class
Definition: json.hpp:5387
+
a const random access iterator for the basic_json class
Definition: json.hpp:5423
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 3620 of file json.hpp.

+

Definition at line 3656 of file json.hpp.

@@ -295,7 +295,7 @@ Illustration from cppreference.com diff --git a/classnlohmann_1_1basic__json_a74472977b798c7b7989e6e7cb960ecff.html b/classnlohmann_1_1basic__json_a74472977b798c7b7989e6e7cb960ecff.html index 16e96051e..3b80d0427 100644 --- a/classnlohmann_1_1basic__json_a74472977b798c7b7989e6e7cb960ecff.html +++ b/classnlohmann_1_1basic__json_a74472977b798c7b7989e6e7cb960ecff.html @@ -301,7 +301,7 @@ null diff --git a/classnlohmann_1_1basic__json_a74a943800c7f103d0990d7eef82c6453.html b/classnlohmann_1_1basic__json_a74a943800c7f103d0990d7eef82c6453.html index e8456a2fe..0111ef96b 100644 --- a/classnlohmann_1_1basic__json_a74a943800c7f103d0990d7eef82c6453.html +++ b/classnlohmann_1_1basic__json_a74a943800c7f103d0990d7eef82c6453.html @@ -300,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 4765 of file json.hpp.

+

Definition at line 4801 of file json.hpp.

@@ -310,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 fcd766cea..b8c7bb7bb 100644 --- a/classnlohmann_1_1basic__json_a74ccfa471a0c061876b247f820f3c741.html +++ b/classnlohmann_1_1basic__json_a74ccfa471a0c061876b247f820f3c741.html @@ -323,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:7712
+
basic_json<> json
default JSON class
Definition: json.hpp:7748
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:3947
+
void clear() noexcept
clears the contents
Definition: json.hpp:3983
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:4859
+
static basic_json parse(const string_t &s, parser_callback_t cb=nullptr)
deserialize from string
Definition: json.hpp:4895
parse_event_t
JSON callback events.
Definition: json.hpp:754
Output (play with this example online):
{
     "Image": {
@@ -369,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 4888 of file json.hpp.

+

Definition at line 4924 of file json.hpp.

@@ -379,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 b7e725b5c..276590018 100644 --- a/classnlohmann_1_1basic__json_a75a1754e0d39f33095d3102a8bdb9881.html +++ b/classnlohmann_1_1basic__json_a75a1754e0d39f33095d3102a8bdb9881.html @@ -311,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:3527
-
iterator find(typename object_t::key_type key)
find an element in a JSON object
Definition: json.hpp:3447
+
iterator begin()
returns an iterator to the first element
Definition: json.hpp:3563
+
iterator find(typename object_t::key_type key)
find an element in a JSON object
Definition: json.hpp:3483
namespace for Niels Lohmann
Definition: json.hpp:78
-
InteratorType erase(InteratorType pos)
remove element given an iterator
Definition: json.hpp:3196
+
InteratorType erase(InteratorType pos)
remove element given an iterator
Definition: json.hpp:3232
Output (play with this example online):
null
 null
 null
@@ -329,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 3196 of file json.hpp.

+

Definition at line 3232 of file json.hpp.

@@ -339,7 +339,7 @@ null diff --git a/classnlohmann_1_1basic__json_a76cfc5062bf6223396ab82c753cd4634.html b/classnlohmann_1_1basic__json_a76cfc5062bf6223396ab82c753cd4634.html index 4fdea0da1..8ab4a978e 100644 --- a/classnlohmann_1_1basic__json_a76cfc5062bf6223396ab82c753cd4634.html +++ b/classnlohmann_1_1basic__json_a76cfc5062bf6223396ab82c753cd4634.html @@ -280,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:3046
+
ValueType value(const typename object_t::key_type &key, ValueType default_value) const
access specified object element with default value
Definition: json.hpp:3082
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
@@ -301,7 +301,7 @@ true diff --git a/classnlohmann_1_1basic__json_a7c08f966200af98db0313a3b517ce0a9.html b/classnlohmann_1_1basic__json_a7c08f966200af98db0313a3b517ce0a9.html index 8fa1864fe..6c9fc2f65 100644 --- a/classnlohmann_1_1basic__json_a7c08f966200af98db0313a3b517ce0a9.html +++ b/classnlohmann_1_1basic__json_a7c08f966200af98db0313a3b517ce0a9.html @@ -277,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:3675
+
reverse_iterator rend()
returns an iterator to the reverse-end
Definition: json.hpp:3711
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 3675 of file json.hpp.

+

Definition at line 3711 of file json.hpp.

@@ -294,7 +294,7 @@ Illustration from cppreference.com diff --git a/classnlohmann_1_1basic__json_a7c19a5c3be6cc755377ee41eade78baf.html b/classnlohmann_1_1basic__json_a7c19a5c3be6cc755377ee41eade78baf.html index 28a228eb0..8b221de24 100644 --- a/classnlohmann_1_1basic__json_a7c19a5c3be6cc755377ee41eade78baf.html +++ b/classnlohmann_1_1basic__json_a7c19a5c3be6cc755377ee41eade78baf.html @@ -277,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:3586
-
iterator find(typename object_t::key_type key)
find an element in a JSON object
Definition: json.hpp:3447
+
iterator end()
returns an iterator to one past the last element
Definition: json.hpp:3622
+
iterator find(typename object_t::key_type key)
find an element in a JSON object
Definition: json.hpp:3483
namespace for Niels Lohmann
Definition: json.hpp:78
Output (play with this example online):
"two" was found: true
 value at key "two": 2
@@ -286,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 3463 of file json.hpp.

+

Definition at line 3499 of file json.hpp.

@@ -296,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 1f2f2dadf..39f6ec86c 100644 --- a/classnlohmann_1_1basic__json_a7d0db3b728d820d4984df78d97d2b104.html +++ b/classnlohmann_1_1basic__json_a7d0db3b728d820d4984df78d97d2b104.html @@ -247,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 03dc3017a..7c419e8da 100644 --- a/classnlohmann_1_1basic__json_a7d1b990f2c12fecb57db1504fdadd0bb.html +++ b/classnlohmann_1_1basic__json_a7d1b990f2c12fecb57db1504fdadd0bb.html @@ -282,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:3196
+
InteratorType erase(InteratorType pos)
remove element given an iterator
Definition: json.hpp:3232
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 
@@ -293,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 3377 of file json.hpp.

+

Definition at line 3413 of file json.hpp.

@@ -303,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 7f9607f14..d48a96e67 100644 --- a/classnlohmann_1_1basic__json_a7dab69b10b98e7bc694339720e37fb2b.html +++ b/classnlohmann_1_1basic__json_a7dab69b10b98e7bc694339720e37fb2b.html @@ -277,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:3586
-
iterator find(typename object_t::key_type key)
find an element in a JSON object
Definition: json.hpp:3447
+
iterator end()
returns an iterator to one past the last element
Definition: json.hpp:3622
+
iterator find(typename object_t::key_type key)
find an element in a JSON object
Definition: json.hpp:3483
namespace for Niels Lohmann
Definition: json.hpp:78
Output (play with this example online):
"two" was found: true
 value at key "two": 2
@@ -286,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 3447 of file json.hpp.

+

Definition at line 3483 of file json.hpp.

@@ -296,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 5598789b7..a2bcba72f 100644 --- a/classnlohmann_1_1basic__json_a7f97a91ad8f1d5cf0b9213bd24f247c4.html +++ b/classnlohmann_1_1basic__json_a7f97a91ad8f1d5cf0b9213bd24f247c4.html @@ -298,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 4631 of file json.hpp.

+

Definition at line 4667 of file json.hpp.

@@ -308,7 +308,7 @@ null != nullptr false diff --git a/classnlohmann_1_1basic__json_a80ceaa3bdd346292273b309e08525c1c.html b/classnlohmann_1_1basic__json_a80ceaa3bdd346292273b309e08525c1c.html index de344a544..01f877b54 100644 --- a/classnlohmann_1_1basic__json_a80ceaa3bdd346292273b309e08525c1c.html +++ b/classnlohmann_1_1basic__json_a80ceaa3bdd346292273b309e08525c1c.html @@ -247,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 c22ff6c14..3c62fc085 100644 --- a/classnlohmann_1_1basic__json_a83cbbfbf5d3ecbad6de8ece0be6b36c4.html +++ b/classnlohmann_1_1basic__json_a83cbbfbf5d3ecbad6de8ece0be6b36c4.html @@ -285,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:3097
+
reference front()
access the first element
Definition: json.hpp:3133
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
@@ -299,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 3097 of file json.hpp.

+

Definition at line 3133 of file json.hpp.

@@ -309,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 73598cd0a..f2c78d524 100644 --- a/classnlohmann_1_1basic__json_a87db51b6b936fb2ea293cdbc8702dcb8.html +++ b/classnlohmann_1_1basic__json_a87db51b6b936fb2ea293cdbc8702dcb8.html @@ -300,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 4743 of file json.hpp.

+

Definition at line 4779 of file json.hpp.

@@ -310,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 c9c646bc1..bb8521a8c 100644 --- a/classnlohmann_1_1basic__json_a8b526709d395142b68d21abfbfff17c3.html +++ b/classnlohmann_1_1basic__json_a8b526709d395142b68d21abfbfff17c3.html @@ -285,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:3097
+
reference front()
access the first element
Definition: json.hpp:3133
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
@@ -299,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 3105 of file json.hpp.

+

Definition at line 3141 of file json.hpp.

@@ -309,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 d1d92ff87..0203b7d97 100644 --- a/classnlohmann_1_1basic__json_a8c40cd9ead4de7c82f28268bdf0ec98a.html +++ b/classnlohmann_1_1basic__json_a8c40cd9ead4de7c82f28268bdf0ec98a.html @@ -301,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:3947
+
void clear() noexcept
clears the contents
Definition: json.hpp:3983
Output (play with this example online):
null
 false
 0
@@ -312,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 3947 of file json.hpp.

+

Definition at line 3983 of file json.hpp.

@@ -322,7 +322,7 @@ false diff --git a/classnlohmann_1_1basic__json_a8e34088252a3ee6b2377f3a1f26dd1ba.html b/classnlohmann_1_1basic__json_a8e34088252a3ee6b2377f3a1f26dd1ba.html index 910172f9d..59bd8ee59 100644 --- a/classnlohmann_1_1basic__json_a8e34088252a3ee6b2377f3a1f26dd1ba.html +++ b/classnlohmann_1_1basic__json_a8e34088252a3ee6b2377f3a1f26dd1ba.html @@ -288,7 +288,7 @@ template<template< typename U, typename V, typename...Args > class Obje value() for access by value with a default value
Since
version 1.0
-

Definition at line 2891 of file json.hpp.

+

Definition at line 2927 of file json.hpp.

@@ -298,7 +298,7 @@ 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 ce97e5de7..bae4bce65 100644 --- a/classnlohmann_1_1basic__json_a8fa74698f4061e18ec664009f3af1ddf.html +++ b/classnlohmann_1_1basic__json_a8fa74698f4061e18ec664009f3af1ddf.html @@ -304,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:3586
-
iterator begin()
returns an iterator to the first element
Definition: json.hpp:3527
+
iterator end()
returns an iterator to one past the last element
Definition: json.hpp:3622
+
iterator begin()
returns an iterator to the first element
Definition: json.hpp:3563
namespace for Niels Lohmann
Definition: json.hpp:78
-
iterator insert(const_iterator pos, const basic_json &val)
inserts element
Definition: json.hpp:4146
+
iterator insert(const_iterator pos, const basic_json &val)
inserts element
Definition: json.hpp:4182
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 4247 of file json.hpp.

+

Definition at line 4283 of file json.hpp.

@@ -323,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 68c83420d..9e6428c66 100644 --- a/classnlohmann_1_1basic__json_a930e14150ffa067bcf56d35cb00271e1.html +++ b/classnlohmann_1_1basic__json_a930e14150ffa067bcf56d35cb00271e1.html @@ -279,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 04aa35887..ee14a2500 100644 --- a/classnlohmann_1_1basic__json_a960962c683909619d1d2fbbe856c022e.html +++ b/classnlohmann_1_1basic__json_a960962c683909619d1d2fbbe856c022e.html @@ -287,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:4013
+
void push_back(basic_json &&val)
add an object to an array
Definition: json.hpp:4049
namespace for Niels Lohmann
Definition: json.hpp:78
Output (play with this example online):
[1,2,3,4,5]
 null
@@ -296,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 4071 of file json.hpp.

+

Definition at line 4107 of file json.hpp.

@@ -306,7 +306,7 @@ null diff --git a/classnlohmann_1_1basic__json_a9730b9f7bc2150e641fe20198d4477c7.html b/classnlohmann_1_1basic__json_a9730b9f7bc2150e641fe20198d4477c7.html index 53773e3ec..c189bc737 100644 --- a/classnlohmann_1_1basic__json_a9730b9f7bc2150e641fe20198d4477c7.html +++ b/classnlohmann_1_1basic__json_a9730b9f7bc2150e641fe20198d4477c7.html @@ -298,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 4569 of file json.hpp.

+

Definition at line 4605 of file json.hpp.

@@ -308,7 +308,7 @@ null == nullptr true diff --git a/classnlohmann_1_1basic__json_a98e05a2c9b8f74bd60442772cddeee52.html b/classnlohmann_1_1basic__json_a98e05a2c9b8f74bd60442772cddeee52.html index e2510af73..7246f0ad2 100644 --- a/classnlohmann_1_1basic__json_a98e05a2c9b8f74bd60442772cddeee52.html +++ b/classnlohmann_1_1basic__json_a98e05a2c9b8f74bd60442772cddeee52.html @@ -298,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 4578 of file json.hpp.

+

Definition at line 4614 of file json.hpp.

@@ -308,7 +308,7 @@ null == nullptr true diff --git a/classnlohmann_1_1basic__json_a9993148cb0473365e52998c7315f9ada.html b/classnlohmann_1_1basic__json_a9993148cb0473365e52998c7315f9ada.html index fdd2db078..7f082baa8 100644 --- a/classnlohmann_1_1basic__json_a9993148cb0473365e52998c7315f9ada.html +++ b/classnlohmann_1_1basic__json_a9993148cb0473365e52998c7315f9ada.html @@ -301,7 +301,7 @@ false diff --git a/classnlohmann_1_1basic__json_a9a73d1b71c9e913aa2888d8b40c72ee9.html b/classnlohmann_1_1basic__json_a9a73d1b71c9e913aa2888d8b40c72ee9.html index eec5970e7..33303f6f7 100644 --- a/classnlohmann_1_1basic__json_a9a73d1b71c9e913aa2888d8b40c72ee9.html +++ b/classnlohmann_1_1basic__json_a9a73d1b71c9e913aa2888d8b40c72ee9.html @@ -284,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:7712
+
basic_json<> json
default JSON class
Definition: json.hpp:7748
a class to store JSON values
Definition: json.hpp:187
namespace for Niels Lohmann
Definition: json.hpp:78
Output (play with this example online):
[]
@@ -303,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 d2311d78e..2cbf96926 100644
--- a/classnlohmann_1_1basic__json_a9c26c5d0f4a519c7236149b9aeb3ef9e.html
+++ b/classnlohmann_1_1basic__json_a9c26c5d0f4a519c7236149b9aeb3ef9e.html
@@ -301,7 +301,7 @@ false
 
 
 
diff --git a/classnlohmann_1_1basic__json_a9daafb4c15ed5a008cb825bbd8c29d87.html b/classnlohmann_1_1basic__json_a9daafb4c15ed5a008cb825bbd8c29d87.html
index 4ad08d7b8..9df60ec7d 100644
--- a/classnlohmann_1_1basic__json_a9daafb4c15ed5a008cb825bbd8c29d87.html
+++ b/classnlohmann_1_1basic__json_a9daafb4c15ed5a008cb825bbd8c29d87.html
@@ -291,7 +291,7 @@ template<typename T , std::size_t n> 
 value() for access by value with a default value
 
Since
version 1.0
-

Definition at line 2982 of file json.hpp.

+

Definition at line 3018 of file json.hpp.

@@ -301,7 +301,7 @@ template<typename T , std::size_t n> diff --git a/classnlohmann_1_1basic__json_a9f17a0690155e3a5603246ccec81499e.html b/classnlohmann_1_1basic__json_a9f17a0690155e3a5603246ccec81499e.html index 305572dd7..e858208fc 100644 --- a/classnlohmann_1_1basic__json_a9f17a0690155e3a5603246ccec81499e.html +++ b/classnlohmann_1_1basic__json_a9f17a0690155e3a5603246ccec81499e.html @@ -298,7 +298,7 @@ true diff --git a/classnlohmann_1_1basic__json_aa0422e861b4cbd7cdcaad7a11a1304a9.html b/classnlohmann_1_1basic__json_aa0422e861b4cbd7cdcaad7a11a1304a9.html index cc55120e5..2f4de2be5 100644 --- a/classnlohmann_1_1basic__json_aa0422e861b4cbd7cdcaad7a11a1304a9.html +++ b/classnlohmann_1_1basic__json_aa0422e861b4cbd7cdcaad7a11a1304a9.html @@ -323,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:7712
+
basic_json<> json
default JSON class
Definition: json.hpp:7748
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:3947
+
void clear() noexcept
clears the contents
Definition: json.hpp:3983
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:4859
+
static basic_json parse(const string_t &s, parser_callback_t cb=nullptr)
deserialize from string
Definition: json.hpp:4895
parse_event_t
JSON callback events.
Definition: json.hpp:754
Output (play with this example online):
{
     "Image": {
@@ -369,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 4896 of file json.hpp.

+

Definition at line 4932 of file json.hpp.

@@ -379,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 4d1d00a0f..bccca36d6 100644 --- a/classnlohmann_1_1basic__json_aa1f3b3f1dca79392d6727b81f9668c6c.html +++ b/classnlohmann_1_1basic__json_aa1f3b3f1dca79392d6727b81f9668c6c.html @@ -289,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:3131
+
reference back()
access the last element
Definition: json.hpp:3167
Output (play with this example online):
true
 17
 23.42
@@ -299,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 3131 of file json.hpp.

+

Definition at line 3167 of file json.hpp.

@@ -309,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 62ebd7dc6..384b6a28e 100644 --- a/classnlohmann_1_1basic__json_aa5413178b8041f7ac685dec4b040dd2c.html +++ b/classnlohmann_1_1basic__json_aa5413178b8041f7ac685dec4b040dd2c.html @@ -278,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:3620
+
const_iterator cend() const
returns a const iterator to one past the last element
Definition: json.hpp:3656
namespace for Niels Lohmann
Definition: json.hpp:78
-
a const random access iterator for the basic_json class
Definition: json.hpp:5387
+
a const random access iterator for the basic_json class
Definition: json.hpp:5423
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 3596 of file json.hpp.

+

Definition at line 3632 of file json.hpp.

@@ -295,7 +295,7 @@ Illustration from cppreference.com diff --git a/classnlohmann_1_1basic__json_aa6a24b176f9599a21d662cc5f8e1ca76.html b/classnlohmann_1_1basic__json_aa6a24b176f9599a21d662cc5f8e1ca76.html index 9a4530b0f..86cee029d 100644 --- a/classnlohmann_1_1basic__json_aa6a24b176f9599a21d662cc5f8e1ca76.html +++ b/classnlohmann_1_1basic__json_aa6a24b176f9599a21d662cc5f8e1ca76.html @@ -266,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 6b90fea95..6a13fbce9 100644 --- a/classnlohmann_1_1basic__json_aa6c32f669a2e523666072003d0ea46f4.html +++ b/classnlohmann_1_1basic__json_aa6c32f669a2e523666072003d0ea46f4.html @@ -331,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 71d9cd273..8fb3df5be 100644 --- a/classnlohmann_1_1basic__json_aa71e977d31f470689883ac60d16ea4ac.html +++ b/classnlohmann_1_1basic__json_aa71e977d31f470689883ac60d16ea4ac.html @@ -283,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:3046
+
ValueType value(const typename object_t::key_type &key, ValueType default_value) const
access specified object element with default value
Definition: json.hpp:3082
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:4338
+
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:4374
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 4368 of file json.hpp.

+

Definition at line 4404 of file json.hpp.

@@ -301,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 da7068929..7441bb512 100644 --- a/classnlohmann_1_1basic__json_aabe4661644ea549089f0886c2551d2ac.html +++ b/classnlohmann_1_1basic__json_aabe4661644ea549089f0886c2551d2ac.html @@ -281,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 23c077a0c..a2d6de2b5 100644 --- a/classnlohmann_1_1basic__json_aac185a137428a7337aa620de07bfbbd7.html +++ b/classnlohmann_1_1basic__json_aac185a137428a7337aa620de07bfbbd7.html @@ -264,7 +264,7 @@ template<template< typename U, typename V, typename...Args > class Obje
Since
version 1.0
-

Definition at line 4465 of file json.hpp.

+

Definition at line 4501 of file json.hpp.

@@ -274,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 86f104c92..d98c0ea6c 100644 --- a/classnlohmann_1_1basic__json_aacd442b66140c764c594ac8ad7dfd5b3.html +++ b/classnlohmann_1_1basic__json_aacd442b66140c764c594ac8ad7dfd5b3.html @@ -304,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 4660 of file json.hpp.

+

Definition at line 4696 of file json.hpp.

@@ -314,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 58269cfad..ebeba1b91 100644 --- a/classnlohmann_1_1basic__json_aacf6c869f6a9c66ac1bc99e93f310044.html +++ b/classnlohmann_1_1basic__json_aacf6c869f6a9c66ac1bc99e93f310044.html @@ -269,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 c435234bf..203b1abc5 100644 --- a/classnlohmann_1_1basic__json_aaf363408931d76472ded14017e59c9e8.html +++ b/classnlohmann_1_1basic__json_aaf363408931d76472ded14017e59c9e8.html @@ -316,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 4934 of file json.hpp.

+

Definition at line 4970 of file json.hpp.

@@ -326,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 35c4547c6..49ca02324 100644 --- a/classnlohmann_1_1basic__json_aafa839f2a74dc1b5060314b3423143b8.html +++ b/classnlohmann_1_1basic__json_aafa839f2a74dc1b5060314b3423143b8.html @@ -255,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 e4bb1ee36..b0f265562 100644 --- a/classnlohmann_1_1basic__json_ab14e3503305622fb5ab01a7f490916e8.html +++ b/classnlohmann_1_1basic__json_ab14e3503305622fb5ab01a7f490916e8.html @@ -292,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:3586
+
iterator end()
returns an iterator to one past the last element
Definition: json.hpp:3622
namespace for Niels Lohmann
Definition: json.hpp:78
-
iterator insert(const_iterator pos, const basic_json &val)
inserts element
Definition: json.hpp:4146
+
iterator insert(const_iterator pos, const basic_json &val)
inserts element
Definition: json.hpp:4182
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 4301 of file json.hpp.

+

Definition at line 4337 of file json.hpp.

@@ -310,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 2feb086dc..66a7a6c53 100644 --- a/classnlohmann_1_1basic__json_ab2162bc76e10d8736cab9b2039956054.html +++ b/classnlohmann_1_1basic__json_ab2162bc76e10d8736cab9b2039956054.html @@ -277,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:5889
-
iterator end()
returns an iterator to one past the last element
Definition: json.hpp:3586
+
a mutable random access iterator for the basic_json class
Definition: json.hpp:5925
+
iterator end()
returns an iterator to one past the last element
Definition: json.hpp:3622
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 3586 of file json.hpp.

+

Definition at line 3622 of file json.hpp.

@@ -294,7 +294,7 @@ Illustration from cppreference.com diff --git a/classnlohmann_1_1basic__json_ab74b2398f29acc6ffbf48f1b8974a848.html b/classnlohmann_1_1basic__json_ab74b2398f29acc6ffbf48f1b8974a848.html index 3fad64fcb..04f122800 100644 --- a/classnlohmann_1_1basic__json_ab74b2398f29acc6ffbf48f1b8974a848.html +++ b/classnlohmann_1_1basic__json_ab74b2398f29acc6ffbf48f1b8974a848.html @@ -314,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 1afe44402..6fe1cda81 100644 --- a/classnlohmann_1_1basic__json_ab7d60fb6cb8e8f5740e588f9dc953819.html +++ b/classnlohmann_1_1basic__json_ab7d60fb6cb8e8f5740e588f9dc953819.html @@ -353,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 037f1df3e..b79bc209c 100644 --- a/classnlohmann_1_1basic__json_ab9a20bd1d391e9cb968db50c246f728d.html +++ b/classnlohmann_1_1basic__json_ab9a20bd1d391e9cb968db50c246f728d.html @@ -300,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:3830
+
size_type size() const noexcept
returns the number of elements
Definition: json.hpp:3866
object (unordered set of name/value pairs)
namespace for Niels Lohmann
Definition: json.hpp:78
array (ordered collection of values)
@@ -316,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 3830 of file json.hpp.

+

Definition at line 3866 of file json.hpp.

@@ -326,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 1df7f18b8..01040d130 100644 --- a/classnlohmann_1_1basic__json_ab9da2afc6f77295f25252725fde142a6.html +++ b/classnlohmann_1_1basic__json_ab9da2afc6f77295f25252725fde142a6.html @@ -289,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:3131
+
reference back()
access the last element
Definition: json.hpp:3167
Output (play with this example online):
true
 17
 23.42
@@ -299,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 3141 of file json.hpp.

+

Definition at line 3177 of file json.hpp.

@@ -309,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 e5d12a1c0..bd572d043 100644 --- a/classnlohmann_1_1basic__json_abe8f3224ca4041908ddb466cb9caecf1.html +++ b/classnlohmann_1_1basic__json_abe8f3224ca4041908ddb466cb9caecf1.html @@ -297,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:3890
+
size_type max_size() const noexcept
returns the maximum possible number of elements
Definition: json.hpp:3926
Output (play with this example online):
0
 1
 1
@@ -308,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 3890 of file json.hpp.

+

Definition at line 3926 of file json.hpp.

@@ -318,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 7efa22d96..b2c932144 100644 --- a/classnlohmann_1_1basic__json_ac160789f17d206a5404981ca0957e303.html +++ b/classnlohmann_1_1basic__json_ac160789f17d206a5404981ca0957e303.html @@ -291,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 4a222726d..27b91069f 100644 --- a/classnlohmann_1_1basic__json_ac4011bd0781e51afe4994d2b09fd27e9.html +++ b/classnlohmann_1_1basic__json_ac4011bd0781e51afe4994d2b09fd27e9.html @@ -247,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 8085f7579..3bab2b3c4 100644 --- a/classnlohmann_1_1basic__json_ac8163abe518595f19dbee68db1caaaf7.html +++ b/classnlohmann_1_1basic__json_ac8163abe518595f19dbee68db1caaaf7.html @@ -298,7 +298,7 @@ false diff --git a/classnlohmann_1_1basic__json_ac82abedf356d252e0589850c3d8b35ba.html b/classnlohmann_1_1basic__json_ac82abedf356d252e0589850c3d8b35ba.html index 5cdb54b9b..9549bb8f8 100644 --- a/classnlohmann_1_1basic__json_ac82abedf356d252e0589850c3d8b35ba.html +++ b/classnlohmann_1_1basic__json_ac82abedf356d252e0589850c3d8b35ba.html @@ -273,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 4d1ab1cff..81a31a0f0 100644 --- a/classnlohmann_1_1basic__json_ac943391891fcde0a71a15ce990e0f7f4.html +++ b/classnlohmann_1_1basic__json_ac943391891fcde0a71a15ce990e0f7f4.html @@ -300,7 +300,7 @@ true diff --git a/classnlohmann_1_1basic__json_acd08f9179c8c1e9f2cd7575a724ce27e.html b/classnlohmann_1_1basic__json_acd08f9179c8c1e9f2cd7575a724ce27e.html index df234b131..88b6a75fa 100644 --- a/classnlohmann_1_1basic__json_acd08f9179c8c1e9f2cd7575a724ce27e.html +++ b/classnlohmann_1_1basic__json_acd08f9179c8c1e9f2cd7575a724ce27e.html @@ -299,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 190598941..65eea6a59 100644 --- a/classnlohmann_1_1basic__json_acdf4445333649ec94198f09a62144884.html +++ b/classnlohmann_1_1basic__json_acdf4445333649ec94198f09a62144884.html @@ -274,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:5889
-
iterator begin()
returns an iterator to the first element
Definition: json.hpp:3527
+
a mutable random access iterator for the basic_json class
Definition: json.hpp:5925
+
iterator begin()
returns an iterator to the first element
Definition: json.hpp:3563
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 3527 of file json.hpp.

+

Definition at line 3563 of file json.hpp.

@@ -291,7 +291,7 @@ Illustration from cppreference.com diff --git a/classnlohmann_1_1basic__json_ace8338e57fdb11e1955c2a0c2d782069.html b/classnlohmann_1_1basic__json_ace8338e57fdb11e1955c2a0c2d782069.html index 8e14d6651..dda149955 100644 --- a/classnlohmann_1_1basic__json_ace8338e57fdb11e1955c2a0c2d782069.html +++ b/classnlohmann_1_1basic__json_ace8338e57fdb11e1955c2a0c2d782069.html @@ -268,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 0208c0c50..018161233 100644 --- a/classnlohmann_1_1basic__json_ad1f617d29e8923dd40c89153f792b1bc.html +++ b/classnlohmann_1_1basic__json_ad1f617d29e8923dd40c89153f792b1bc.html @@ -303,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 716687a58..7004e2d17 100644 --- a/classnlohmann_1_1basic__json_ad2c4513cef5d8db760c4b2d871eea42c.html +++ b/classnlohmann_1_1basic__json_ad2c4513cef5d8db760c4b2d871eea42c.html @@ -258,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 e6886efa7..354e0b353 100644 --- a/classnlohmann_1_1basic__json_ad497cbc4f80c8d79662ee6e19bf145dd.html +++ b/classnlohmann_1_1basic__json_ad497cbc4f80c8d79662ee6e19bf145dd.html @@ -322,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: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
+
iterator end()
returns an iterator to one past the last element
Definition: json.hpp:3622
+
iterator begin()
returns an iterator to the first element
Definition: json.hpp:3563
+
iterator find(typename object_t::key_type key)
find an element in a JSON object
Definition: json.hpp:3483
namespace for Niels Lohmann
Definition: json.hpp:78
-
InteratorType erase(InteratorType pos)
remove element given an iterator
Definition: json.hpp:3196
+
InteratorType erase(InteratorType pos)
remove element given an iterator
Definition: json.hpp:3232
Output (play with this example online):
null
 null
 null
@@ -341,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 3297 of file json.hpp.

+

Definition at line 3333 of file json.hpp.

@@ -351,7 +351,7 @@ null diff --git a/classnlohmann_1_1basic__json_ad6734c2b91b1b77aa2b43b65c3619c05.html b/classnlohmann_1_1basic__json_ad6734c2b91b1b77aa2b43b65c3619c05.html index ef60aebde..c2d249986 100644 --- a/classnlohmann_1_1basic__json_ad6734c2b91b1b77aa2b43b65c3619c05.html +++ b/classnlohmann_1_1basic__json_ad6734c2b91b1b77aa2b43b65c3619c05.html @@ -308,7 +308,7 @@ null diff --git a/classnlohmann_1_1basic__json_ad8e0c5d04f016d1b3ac7369e5c73bedf.html b/classnlohmann_1_1basic__json_ad8e0c5d04f016d1b3ac7369e5c73bedf.html index 746914607..790142a51 100644 --- a/classnlohmann_1_1basic__json_ad8e0c5d04f016d1b3ac7369e5c73bedf.html +++ b/classnlohmann_1_1basic__json_ad8e0c5d04f016d1b3ac7369e5c73bedf.html @@ -275,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:3561
+
const_iterator cbegin() const
returns a const iterator to the first element
Definition: json.hpp:3597
namespace for Niels Lohmann
Definition: json.hpp:78
-
a const random access iterator for the basic_json class
Definition: json.hpp:5387
+
a const random access iterator for the basic_json class
Definition: json.hpp:5423
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 3561 of file json.hpp.

+

Definition at line 3597 of file json.hpp.

@@ -292,7 +292,7 @@ Illustration from cppreference.com diff --git a/classnlohmann_1_1basic__json_ada8e01109a60088e4db2a670d4903b54.html b/classnlohmann_1_1basic__json_ada8e01109a60088e4db2a670d4903b54.html index c4c6c8369..372a049c0 100644 --- a/classnlohmann_1_1basic__json_ada8e01109a60088e4db2a670d4903b54.html +++ b/classnlohmann_1_1basic__json_ada8e01109a60088e4db2a670d4903b54.html @@ -258,8 +258,8 @@ template<template< typename U, typename V, typename...Args > class Obje
Returns
reference to the element at index idx
Exceptions
- - + +
std::domain_errorif JSON is not an array
std::out_of_rangeif the index idx is out of range of the array; that is, idx >= size()
std::domain_errorif the JSON value is not an array; example: "cannot use at() with string"
std::out_of_rangeif the index idx is out of range of the array; that is, idx >= size(); example: "array index 7 is out of range"
@@ -287,21 +287,21 @@ template<template< typename U, typename V, typename...Args > class Obje
21  {
22  array.at(5) = "sixth";
23  }
-
24  catch (std::out_of_range)
+
24  catch (std::out_of_range& e)
25  {
-
26  std::cout << "out of range" << '\n';
+
26  std::cout << "out of range: " << e.what() << '\n';
27  }
28 }
a class to store JSON values
Definition: json.hpp:187
-
reference at(size_type idx)
access specified array element with bounds checking
Definition: json.hpp:2616
+
reference at(size_type idx)
access specified array element with bounds checking
Definition: json.hpp:2617
namespace for Niels Lohmann
Definition: json.hpp:78
- Output (play with this example online):
"third"
+ Output (play with this example online): 
"third"
 ["first","second","third","fourth"]
-out of range
+out of range: array index 5 is out of range
 
The example code above can be translated with
g++ -std=c++11 -Isrc doc/examples/at__size_type.cpp -o at__size_type 
Since
version 1.0
-

Definition at line 2616 of file json.hpp.

+

Definition at line 2617 of file json.hpp.

@@ -311,7 +311,7 @@ out of range diff --git a/classnlohmann_1_1basic__json_adbd4c16c9ac641b2a4736bc2c6787d83.html b/classnlohmann_1_1basic__json_adbd4c16c9ac641b2a4736bc2c6787d83.html index 9e9a8326e..b105270a1 100644 --- a/classnlohmann_1_1basic__json_adbd4c16c9ac641b2a4736bc2c6787d83.html +++ b/classnlohmann_1_1basic__json_adbd4c16c9ac641b2a4736bc2c6787d83.html @@ -247,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 3b94c68cd..5d3daf73b 100644 --- a/classnlohmann_1_1basic__json_ade7bd6e0fe221fec9d3fa9b430f5ce76.html +++ b/classnlohmann_1_1basic__json_ade7bd6e0fe221fec9d3fa9b430f5ce76.html @@ -328,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 f8b7480e3..f64dd9cb3 100644 --- a/classnlohmann_1_1basic__json_adeaef2ab021997a11a826c378c2365e1.html +++ b/classnlohmann_1_1basic__json_adeaef2ab021997a11a826c378c2365e1.html @@ -287,7 +287,7 @@ false diff --git a/classnlohmann_1_1basic__json_adf5dea6fa9d7075ff89ca0796ab47a7e.html b/classnlohmann_1_1basic__json_adf5dea6fa9d7075ff89ca0796ab47a7e.html index 42d8ca562..3f4f118b8 100644 --- a/classnlohmann_1_1basic__json_adf5dea6fa9d7075ff89ca0796ab47a7e.html +++ b/classnlohmann_1_1basic__json_adf5dea6fa9d7075ff89ca0796ab47a7e.html @@ -294,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 4c0666d23..b2f642a58 100644 --- a/classnlohmann_1_1basic__json_ae347859ec88176ef76a0cbe5b4514fcf.html +++ b/classnlohmann_1_1basic__json_ae347859ec88176ef76a0cbe5b4514fcf.html @@ -298,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 4622 of file json.hpp.

+

Definition at line 4658 of file json.hpp.

@@ -308,7 +308,7 @@ null != nullptr false diff --git a/classnlohmann_1_1basic__json_ae50f22a1c646b8627e88f1313cceffd4.html b/classnlohmann_1_1basic__json_ae50f22a1c646b8627e88f1313cceffd4.html index fb7de861c..bdbd13d12 100644 --- a/classnlohmann_1_1basic__json_ae50f22a1c646b8627e88f1313cceffd4.html +++ b/classnlohmann_1_1basic__json_ae50f22a1c646b8627e88f1313cceffd4.html @@ -280,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:3046
+
ValueType value(const typename object_t::key_type &key, ValueType default_value) const
access specified object element with default value
Definition: json.hpp:3082
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
@@ -301,7 +301,7 @@ true diff --git a/classnlohmann_1_1basic__json_ae874cfc1746b560c53a03bcf5b7bbeed.html b/classnlohmann_1_1basic__json_ae874cfc1746b560c53a03bcf5b7bbeed.html index a9faae3d7..87c3cd1bb 100644 --- a/classnlohmann_1_1basic__json_ae874cfc1746b560c53a03bcf5b7bbeed.html +++ b/classnlohmann_1_1basic__json_ae874cfc1746b560c53a03bcf5b7bbeed.html @@ -298,7 +298,7 @@ false diff --git a/classnlohmann_1_1basic__json_ae928414b2805cf6ef56b4e4f8d235416.html b/classnlohmann_1_1basic__json_ae928414b2805cf6ef56b4e4f8d235416.html index a719670cc..1374c00df 100644 --- a/classnlohmann_1_1basic__json_ae928414b2805cf6ef56b4e4f8d235416.html +++ b/classnlohmann_1_1basic__json_ae928414b2805cf6ef56b4e4f8d235416.html @@ -247,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 95d2fc0fd..583bdacbd 100644 --- a/classnlohmann_1_1basic__json_ae960d2d6bc7b94fe39cc5e9f106edfa9.html +++ b/classnlohmann_1_1basic__json_ae960d2d6bc7b94fe39cc5e9f106edfa9.html @@ -276,13 +276,13 @@ template<template< typename U, typename V, typename...Args > class Obje
11  std::cout << array.at(2) << '\n';
12 }
a class to store JSON values
Definition: json.hpp:187
-
reference at(size_type idx)
access specified array element with bounds checking
Definition: json.hpp:2616
+
reference at(size_type idx)
access specified array element with bounds checking
Definition: json.hpp:2617
namespace for Niels Lohmann
Definition: json.hpp:78
Output (play with this example online):
"third"
 
The example code above can be translated with
g++ -std=c++11 -Isrc doc/examples/operatorarray__size_type_const.cpp -o operatorarray__size_type_const 
Since
version 1.0
-

Definition at line 2806 of file json.hpp.

+

Definition at line 2842 of file json.hpp.

@@ -292,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 28910cf42..a28251c58 100644 --- a/classnlohmann_1_1basic__json_aea1c863b719b4ca5b77188c171bbfafe.html +++ b/classnlohmann_1_1basic__json_aea1c863b719b4ca5b77188c171bbfafe.html @@ -277,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 9bd576846..396b82382 100644 --- a/classnlohmann_1_1basic__json_af073eec08d2e68924098aef09e9a10ba.html +++ b/classnlohmann_1_1basic__json_af073eec08d2e68924098aef09e9a10ba.html @@ -275,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:4338
+
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:4374
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 4338 of file json.hpp.

+

Definition at line 4374 of file json.hpp.

@@ -291,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 2dce148c8..725a70690 100644 --- a/classnlohmann_1_1basic__json_af0ebd1757acb971a6504b4acabf88584.html +++ b/classnlohmann_1_1basic__json_af0ebd1757acb971a6504b4acabf88584.html @@ -275,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:3644
+
reverse_iterator rbegin()
returns an iterator to the reverse-beginning
Definition: json.hpp:3680
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 3644 of file json.hpp.

+

Definition at line 3680 of file json.hpp.

@@ -291,7 +291,7 @@ Illustration from cppreference.com diff --git a/classnlohmann_1_1basic__json_af127fb69c580c17821da5f5be57e3585.html b/classnlohmann_1_1basic__json_af127fb69c580c17821da5f5be57e3585.html index ca8aab6a1..3b5d801ac 100644 --- a/classnlohmann_1_1basic__json_af127fb69c580c17821da5f5be57e3585.html +++ b/classnlohmann_1_1basic__json_af127fb69c580c17821da5f5be57e3585.html @@ -293,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 b368b1fbe..a6dec1eab 100644 --- a/classnlohmann_1_1basic__json_af1e3f9e079136abca2530c8191c56292.html +++ b/classnlohmann_1_1basic__json_af1e3f9e079136abca2530c8191c56292.html @@ -317,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:7712
+
basic_json<> json
default JSON class
Definition: json.hpp:7748
a class to store JSON values
Definition: json.hpp:187
namespace for Niels Lohmann
Definition: json.hpp:78
Output (play with this example online):
{}
@@ -341,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 2387469d9..c4d1c5ced 100644
--- a/classnlohmann_1_1basic__json_af2730bc8ffa6b28916875c13ee7b83f5.html
+++ b/classnlohmann_1_1basic__json_af2730bc8ffa6b28916875c13ee7b83f5.html
@@ -315,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:7712
+
basic_json<> json
default JSON class
Definition: json.hpp:7748
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:4859
+
static basic_json parse(const string_t &s, parser_callback_t cb=nullptr)
deserialize from string
Definition: json.hpp:4895
parse_event_t
JSON callback events.
Definition: json.hpp:754
Output (play with this example online):
{
     "Image": {
@@ -360,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 4859 of file json.hpp.

+

Definition at line 4895 of file json.hpp.

@@ -370,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 b26429af3..ef896fed6 100644 --- a/classnlohmann_1_1basic__json_af661bc209bf22097e2f76607a11b56bf.html +++ b/classnlohmann_1_1basic__json_af661bc209bf22097e2f76607a11b56bf.html @@ -298,7 +298,7 @@ false diff --git a/classnlohmann_1_1basic__json_af6b6050ccd906dddf7c9f47fe3ad62a5.html b/classnlohmann_1_1basic__json_af6b6050ccd906dddf7c9f47fe3ad62a5.html index 7d5e42a24..0a295a681 100644 --- a/classnlohmann_1_1basic__json_af6b6050ccd906dddf7c9f47fe3ad62a5.html +++ b/classnlohmann_1_1basic__json_af6b6050ccd906dddf7c9f47fe3ad62a5.html @@ -258,8 +258,8 @@ template<template< typename U, typename V, typename...Args > class Obje
Returns
const reference to the element at index idx
Exceptions
- - + +
std::domain_errorif JSON is not an array
std::out_of_rangeif the index idx is out of range of the array; that is, idx >= size()
std::domain_errorif the JSON value is not an array; example: "cannot use at() with string"
std::out_of_rangeif the index idx is out of range of the array; that is, idx >= size(); example: "array index 7 is out of range"
@@ -287,14 +287,14 @@ template<template< typename U, typename V, typename...Args > class Obje
21  }
22 }
a class to store JSON values
Definition: json.hpp:187
-
reference at(size_type idx)
access specified array element with bounds checking
Definition: json.hpp:2616
+
reference at(size_type idx)
access specified array element with bounds checking
Definition: json.hpp:2617
namespace for Niels Lohmann
Definition: json.hpp:78
Output (play with this example online):
"third"
 out of range
 
The example code above can be translated with
g++ -std=c++11 -Isrc doc/examples/at__size_type_const.cpp -o at__size_type_const 
Since
version 1.0
-

Definition at line 2650 of file json.hpp.

+

Definition at line 2660 of file json.hpp.

@@ -304,7 +304,7 @@ out of range diff --git a/classnlohmann_1_1basic__json_af709c079de0ac3507143ea2c60699bd0.html b/classnlohmann_1_1basic__json_af709c079de0ac3507143ea2c60699bd0.html index efa7f6bd1..099836441 100644 --- a/classnlohmann_1_1basic__json_af709c079de0ac3507143ea2c60699bd0.html +++ b/classnlohmann_1_1basic__json_af709c079de0ac3507143ea2c60699bd0.html @@ -339,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 1de4faba3..16b0ddfdb 100644 --- a/classnlohmann_1_1basic__json_af74581d177dafc38df5a126ccd358999.html +++ b/classnlohmann_1_1basic__json_af74581d177dafc38df5a126ccd358999.html @@ -321,7 +321,7 @@ template<template< typename U, typename V, typename...Args > class Obje value() for access by value with a default value
Since
version 1.0
-

Definition at line 2845 of file json.hpp.

+

Definition at line 2881 of file json.hpp.

@@ -331,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 989c33989..ddf035a10 100644 --- a/classnlohmann_1_1basic__json_af7d0adc984d04fc70c3d29fcd63e096a.html +++ b/classnlohmann_1_1basic__json_af7d0adc984d04fc70c3d29fcd63e096a.html @@ -292,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:3527
+
iterator begin()
returns an iterator to the first element
Definition: json.hpp:3563
namespace for Niels Lohmann
Definition: json.hpp:78
-
iterator insert(const_iterator pos, const basic_json &val)
inserts element
Definition: json.hpp:4146
+
iterator insert(const_iterator pos, const basic_json &val)
inserts element
Definition: json.hpp:4182
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 4146 of file json.hpp.

+

Definition at line 4182 of file json.hpp.

@@ -310,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 9b09013d1..ce5f68136 100644 --- a/classnlohmann_1_1basic__json_afc4223b5ad03b1b76e925374a8fff98e.html +++ b/classnlohmann_1_1basic__json_afc4223b5ad03b1b76e925374a8fff98e.html @@ -303,7 +303,7 @@ template<template< typename U, typename V, typename...Args > class Obje diff --git a/dir_68267d1309a1af8e8297ef4c3efbcdba.html b/dir_68267d1309a1af8e8297ef4c3efbcdba.html index dc3f404e9..8bad3d70d 100644 --- a/dir_68267d1309a1af8e8297ef4c3efbcdba.html +++ b/dir_68267d1309a1af8e8297ef4c3efbcdba.html @@ -92,7 +92,7 @@ Files diff --git a/functions.html b/functions.html index d7efb8374..d8ddb6663 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 8783f4273..e473ebcfc 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 707b894cf..4beb93af6 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 fbd68d760..af579ab24 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 ac5af846b..ddd8cdddf 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 4721f5cfb..12ccd6820 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 0fd6298ec..0658d5618 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 4644ce183..8bfc46cb7 100644 --- a/functions_func.html +++ b/functions_func.html @@ -415,7 +415,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/functions_g.html b/functions_g.html index 2f99657d2..3e4fcb159 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 9e458028c..a3b946d31 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 f3c25fb45..e2739d750 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 410f321b9..52cf911c0 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 1ad57c403..e3f9f5c8e 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 30ff66102..9da928137 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 73e190fec..50f07915b 100644 --- a/functions_o.html +++ b/functions_o.html @@ -216,7 +216,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/functions_p.html b/functions_p.html index e221928a0..103c76c4e 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 6e019fa60..32e851288 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 2f25e0957..370ee8e21 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 cfb28258f..4579b54eb 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 3438ce220..99a75a303 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 dd878ce93..fba48bdd4 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 b9a0b803a..ea567add7 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 3bab9ad5b..db8172afa 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 cca91d94c..581d40d7d 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 dd57309ed..68987d220 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 fe64aba01..3a8895204 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 4a20425f9..4a09c7ef5 100644 --- a/json_8hpp_source.html +++ b/json_8hpp_source.html @@ -1102,3769 +1102,3801 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
2589  // element access //
2591 
2594 
- -
2617  {
-
2618  // at only works for arrays
-
2619  if (is_array())
-
2620  {
-
2621  return m_value.array->at(idx);
-
2622  }
-
2623  else
-
2624  {
-
2625  throw std::domain_error("cannot use at() with " + type_name());
-
2626  }
-
2627  }
-
2628 
- -
2651  {
-
2652  // at only works for arrays
-
2653  if (is_array())
-
2654  {
-
2655  return m_value.array->at(idx);
-
2656  }
-
2657  else
-
2658  {
-
2659  throw std::domain_error("cannot use at() with " + type_name());
-
2660  }
-
2661  }
-
2662 
-
2688  reference at(const typename object_t::key_type& key)
-
2689  {
-
2690  // at only works for objects
-
2691  if (is_object())
-
2692  {
-
2693  return m_value.object->at(key);
-
2694  }
-
2695  else
-
2696  {
-
2697  throw std::domain_error("cannot use at() with " + type_name());
-
2698  }
-
2699  }
-
2700 
-
2726  const_reference at(const typename object_t::key_type& key) const
-
2727  {
-
2728  // at only works for objects
-
2729  if (is_object())
-
2730  {
-
2731  return m_value.object->at(key);
-
2732  }
-
2733  else
-
2734  {
-
2735  throw std::domain_error("cannot use at() with " + type_name());
-
2736  }
-
2737  }
-
2738 
- -
2764  {
-
2765  // implicitly convert null to object
-
2766  if (is_null())
-
2767  {
-
2768  m_type = value_t::array;
-
2769  m_value.array = create<array_t>();
-
2770  }
-
2771 
-
2772  // [] only works for arrays
-
2773  if (is_array())
-
2774  {
-
2775  for (size_t i = m_value.array->size(); i <= idx; ++i)
-
2776  {
-
2777  m_value.array->push_back(basic_json());
-
2778  }
-
2779 
-
2780  return m_value.array->operator[](idx);
-
2781  }
-
2782  else
-
2783  {
-
2784  throw std::domain_error("cannot use operator[] with " + type_name());
-
2785  }
-
2786  }
-
2787 
- -
2807  {
-
2808  // at only works for arrays
+ +
2618  {
+
2619  // at only works for arrays
+
2620  if (is_array())
+
2621  {
+
2622  try
+
2623  {
+
2624  return m_value.array->at(idx);
+
2625  }
+
2626  catch (std::out_of_range& e)
+
2627  {
+
2628  // create better exception explanation
+
2629  throw std::out_of_range("array index " + std::to_string(idx) + " is out of range");
+
2630  }
+
2631  }
+
2632  else
+
2633  {
+
2634  throw std::domain_error("cannot use at() with " + type_name());
+
2635  }
+
2636  }
+
2637 
+ +
2661  {
+
2662  // at only works for arrays
+
2663  if (is_array())
+
2664  {
+
2665  try
+
2666  {
+
2667  return m_value.array->at(idx);
+
2668  }
+
2669  catch (std::out_of_range& e)
+
2670  {
+
2671  // create better exception explanation
+
2672  throw std::out_of_range("array index " + std::to_string(idx) + " is out of range");
+
2673  }
+
2674  }
+
2675  else
+
2676  {
+
2677  throw std::domain_error("cannot use at() with " + type_name());
+
2678  }
+
2679  }
+
2680 
+
2707  reference at(const typename object_t::key_type& key)
+
2708  {
+
2709  // at only works for objects
+
2710  if (is_object())
+
2711  {
+
2712  try
+
2713  {
+
2714  return m_value.object->at(key);
+
2715  }
+
2716  catch (std::out_of_range& e)
+
2717  {
+
2718  // create better exception explanation
+
2719  throw std::out_of_range("key '" + key + "' not found");
+
2720  }
+
2721  }
+
2722  else
+
2723  {
+
2724  throw std::domain_error("cannot use at() with " + type_name());
+
2725  }
+
2726  }
+
2727 
+
2754  const_reference at(const typename object_t::key_type& key) const
+
2755  {
+
2756  // at only works for objects
+
2757  if (is_object())
+
2758  {
+
2759  try
+
2760  {
+
2761  return m_value.object->at(key);
+
2762  }
+
2763  catch (std::out_of_range& e)
+
2764  {
+
2765  // create better exception explanation
+
2766  throw std::out_of_range("key '" + key + "' not found");
+
2767  }
+
2768  }
+
2769  else
+
2770  {
+
2771  throw std::domain_error("cannot use at() with " + type_name());
+
2772  }
+
2773  }
+
2774 
+ +
2800  {
+
2801  // implicitly convert null to object
+
2802  if (is_null())
+
2803  {
+
2804  m_type = value_t::array;
+
2805  m_value.array = create<array_t>();
+
2806  }
+
2807 
+
2808  // [] only works for arrays
2809  if (is_array())
2810  {
-
2811  return m_value.array->operator[](idx);
-
2812  }
-
2813  else
-
2814  {
-
2815  throw std::domain_error("cannot use operator[] with " + type_name());
-
2816  }
-
2817  }
-
2818 
-
2845  reference operator[](const typename object_t::key_type& key)
-
2846  {
-
2847  // implicitly convert null to object
-
2848  if (is_null())
-
2849  {
-
2850  m_type = value_t::object;
-
2851  m_value.object = create<object_t>();
+
2811  for (size_t i = m_value.array->size(); i <= idx; ++i)
+
2812  {
+
2813  m_value.array->push_back(basic_json());
+
2814  }
+
2815 
+
2816  return m_value.array->operator[](idx);
+
2817  }
+
2818  else
+
2819  {
+
2820  throw std::domain_error("cannot use operator[] with " + type_name());
+
2821  }
+
2822  }
+
2823 
+ +
2843  {
+
2844  // at only works for arrays
+
2845  if (is_array())
+
2846  {
+
2847  return m_value.array->operator[](idx);
+
2848  }
+
2849  else
+
2850  {
+
2851  throw std::domain_error("cannot use operator[] with " + type_name());
2852  }
-
2853 
-
2854  // [] only works for objects
-
2855  if (is_object())
-
2856  {
-
2857  return m_value.object->operator[](key);
-
2858  }
-
2859  else
-
2860  {
-
2861  throw std::domain_error("cannot use operator[] with " + type_name());
-
2862  }
-
2863  }
-
2864 
-
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 
-
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;
+
2853  }
+
2854 
+
2881  reference operator[](const typename object_t::key_type& key)
+
2882  {
+
2883  // implicitly convert null to object
+
2884  if (is_null())
+
2885  {
+
2886  m_type = value_t::object;
+
2887  m_value.object = create<object_t>();
+
2888  }
+
2889 
+
2890  // [] only works for objects
+
2891  if (is_object())
+
2892  {
+
2893  return m_value.object->operator[](key);
+
2894  }
+
2895  else
+
2896  {
+
2897  throw std::domain_error("cannot use operator[] with " + type_name());
+
2898  }
+
2899  }
+
2900 
+
2927  const_reference operator[](const typename object_t::key_type& key) const
+
2928  {
+
2929  // [] only works for objects
+
2930  if (is_object())
+
2931  {
+
2932  return m_value.object->find(key)->second;
+
2933  }
+
2934  else
+
2935  {
+
2936  throw std::domain_error("cannot use operator[] with " + type_name());
+
2937  }
+
2938  }
+
2939 
+
2968  template<typename T, std::size_t n>
+
2969  reference operator[](const T (&key)[n])
+
2970  {
+
2971  // implicitly convert null to object
+
2972  if (is_null())
+
2973  {
+
2974  m_type = value_t::object;
+
2975  m_value = value_t::object;
+
2976  }
+
2977 
+
2978  // at only works for objects
+
2979  if (is_object())
+
2980  {
+
2981  return m_value.object->operator[](key);
+
2982  }
+
2983  else
+
2984  {
+
2985  throw std::domain_error("cannot use operator[] with " + type_name());
+
2986  }
+
2987  }
+
2988 
+
3017  template<typename T, std::size_t n>
+
3018  const_reference operator[](const T (&key)[n]) const
+
3019  {
+
3020  // at only works for objects
+
3021  if (is_object())
+
3022  {
+
3023  return m_value.object->find(key)->second;
+
3024  }
+
3025  else
+
3026  {
+
3027  throw std::domain_error("cannot use operator[] with " + type_name());
+
3028  }
+
3029  }
+
3030 
+
3078  template <class ValueType, typename
+
3079  std::enable_if<
+
3080  std::is_convertible<basic_json_t, ValueType>::value
+
3081  , int>::type = 0>
+
3082  ValueType value(const typename object_t::key_type& key, ValueType default_value) const
+
3083  {
+
3084  // at only works for objects
+
3085  if (is_object())
+
3086  {
+
3087  // if key is found, return value and given default value otherwise
+
3088  const auto it = find(key);
+
3089  if (it != end())
+
3090  {
+
3091  return *it;
+
3092  }
+
3093  else
+
3094  {
+
3095  return default_value;
+
3096  }
+
3097  }
+
3098  else
+
3099  {
+
3100  throw std::domain_error("cannot use value() with " + type_name());
+
3101  }
+
3102  }
+
3103 
+
3108  string_t value(const typename object_t::key_type& key, const char* default_value) const
+
3109  {
+
3110  return value(key, string_t(default_value));
+
3111  }
+
3112 
+ +
3134  {
+
3135  return *begin();
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  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  }
+
3143  return *cbegin();
+
3144  }
+
3145 
+ +
3168  {
+
3169  auto tmp = end();
+
3170  --tmp;
+
3171  return *tmp;
+
3172  }
+
3173 
+ +
3178  {
+
3179  auto tmp = cend();
+
3180  --tmp;
+
3181  return *tmp;
+
3182  }
+
3183 
+
3226  template <class InteratorType, typename
+
3227  std::enable_if<
+
3228  std::is_same<InteratorType, typename basic_json_t::iterator>::value or
+
3229  std::is_same<InteratorType, typename basic_json_t::const_iterator>::value
+
3230  , int>::type
+
3231  = 0>
+
3232  InteratorType erase(InteratorType pos)
+
3233  {
+
3234  // make sure iterator fits the current value
+
3235  if (this != pos.m_object)
+
3236  {
+
3237  throw std::domain_error("iterator does not fit current value");
+
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  result.m_it.array_iterator = m_value.array->erase(first.m_it.array_iterator,
-
3339  last.m_it.array_iterator);
-
3340  break;
-
3341  }
+
3240  InteratorType result = end();
+
3241 
+
3242  switch (m_type)
+
3243  {
+
3244  case value_t::boolean:
+
3245  case value_t::number_float:
+ +
3247  case value_t::string:
+
3248  {
+
3249  if (not pos.m_it.primitive_iterator.is_begin())
+
3250  {
+
3251  throw std::out_of_range("iterator out of range");
+
3252  }
+
3253 
+
3254  if (is_string())
+
3255  {
+
3256  delete m_value.string;
+
3257  m_value.string = nullptr;
+
3258  }
+
3259 
+
3260  m_type = value_t::null;
+
3261  break;
+
3262  }
+
3263 
+
3264  case value_t::object:
+
3265  {
+
3266  result.m_it.object_iterator = m_value.object->erase(pos.m_it.object_iterator);
+
3267  break;
+
3268  }
+
3269 
+
3270  case value_t::array:
+
3271  {
+
3272  result.m_it.array_iterator = m_value.array->erase(pos.m_it.array_iterator);
+
3273  break;
+
3274  }
+
3275 
+
3276  default:
+
3277  {
+
3278  throw std::domain_error("cannot use erase() with " + type_name());
+
3279  }
+
3280  }
+
3281 
+
3282  return result;
+
3283  }
+
3284 
+
3327  template <class InteratorType, typename
+
3328  std::enable_if<
+
3329  std::is_same<InteratorType, typename basic_json_t::iterator>::value or
+
3330  std::is_same<InteratorType, typename basic_json_t::const_iterator>::value
+
3331  , int>::type
+
3332  = 0>
+
3333  InteratorType erase(InteratorType first, InteratorType last)
+
3334  {
+
3335  // make sure iterator fits the current value
+
3336  if (this != first.m_object or this != last.m_object)
+
3337  {
+
3338  throw std::domain_error("iterators do not fit current value");
+
3339  }
+
3340 
+
3341  InteratorType result = end();
3342 
-
3343  default:
-
3344  {
-
3345  throw std::domain_error("cannot use erase with " + type_name());
-
3346  }
-
3347  }
-
3348 
-
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);
+
3343  switch (m_type)
+
3344  {
+
3345  case value_t::boolean:
+
3346  case value_t::number_float:
+ +
3348  case value_t::string:
+
3349  {
+
3350  if (not first.m_it.primitive_iterator.is_begin() or not last.m_it.primitive_iterator.is_end())
+
3351  {
+
3352  throw std::out_of_range("iterators out of range");
+
3353  }
+
3354 
+
3355  if (is_string())
+
3356  {
+
3357  delete m_value.string;
+
3358  m_value.string = nullptr;
+
3359  }
+
3360 
+
3361  m_type = value_t::null;
+
3362  break;
+
3363  }
+
3364 
+
3365  case value_t::object:
+
3366  {
+
3367  result.m_it.object_iterator = m_value.object->erase(first.m_it.object_iterator,
+
3368  last.m_it.object_iterator);
+
3369  break;
+
3370  }
+
3371 
+
3372  case value_t::array:
+
3373  {
+
3374  result.m_it.array_iterator = m_value.array->erase(first.m_it.array_iterator,
+
3375  last.m_it.array_iterator);
+
3376  break;
+
3377  }
+
3378 
+
3379  default:
+
3380  {
+
3381  throw std::domain_error("cannot use erase with " + type_name());
+
3382  }
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));
+
3384 
+
3385  return result;
+
3386  }
+
3387 
+
3413  size_type erase(const typename object_t::key_type& key)
+
3414  {
+
3415  // this erase only works for objects
+
3416  if (is_object())
+
3417  {
+
3418  return m_value.object->erase(key);
+
3419  }
+
3420  else
+
3421  {
+
3422  throw std::domain_error("cannot use erase() with " + type_name());
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())
+
3424  }
+
3425 
+
3448  void erase(const size_type idx)
+
3449  {
+
3450  // this erase only works for arrays
+
3451  if (is_array())
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 
- -
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  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 
-
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  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:
+
3453  if (idx >= size())
+
3454  {
+
3455  throw std::out_of_range("index out of range");
+
3456  }
+
3457 
+
3458  m_value.array->erase(m_value.array->begin() + static_cast<difference_type>(idx));
+
3459  }
+
3460  else
+
3461  {
+
3462  throw std::domain_error("cannot use erase() with " + type_name());
+
3463  }
+
3464  }
+
3465 
+
3483  iterator find(typename object_t::key_type key)
+
3484  {
+
3485  auto result = end();
+
3486 
+
3487  if (is_object())
+
3488  {
+
3489  result.m_it.object_iterator = m_value.object->find(key);
+
3490  }
+
3491 
+
3492  return result;
+
3493  }
+
3494 
+
3499  const_iterator find(typename object_t::key_type key) const
+
3500  {
+
3501  auto result = cend();
+
3502 
+
3503  if (is_object())
+
3504  {
+
3505  result.m_it.object_iterator = m_value.object->find(key);
+
3506  }
+
3507 
+
3508  return result;
+
3509  }
+
3510 
+
3529  size_type count(typename object_t::key_type key) const
+
3530  {
+
3531  // return 0 for all nonobject types
+
3532  return is_object() ? m_value.object->count(key) : 0;
+
3533  }
+
3534 
+
3536 
+
3537 
+
3539  // iterators //
+
3541 
+
3544 
+ +
3564  {
+
3565  iterator result(this);
+
3566  result.set_begin();
+
3567  return result;
+
3568  }
+
3569 
+ +
3574  {
+
3575  return cbegin();
+
3576  }
+
3577 
+ +
3598  {
+
3599  const_iterator result(this);
+
3600  result.set_begin();
+
3601  return result;
+
3602  }
+
3603 
+ +
3623  {
+
3624  iterator result(this);
+
3625  result.set_end();
+
3626  return result;
+
3627  }
+
3628 
+ +
3633  {
+
3634  return cend();
+
3635  }
+
3636 
+ +
3657  {
+
3658  const_iterator result(this);
+
3659  result.set_end();
+
3660  return result;
+
3661  }
+
3662 
+ +
3681  {
+
3682  return reverse_iterator(end());
+
3683  }
+
3684 
+ +
3689  {
+
3690  return crbegin();
+
3691  }
+
3692 
+ +
3712  {
+
3713  return reverse_iterator(begin());
+
3714  }
+
3715 
+ +
3720  {
+
3721  return crend();
+
3722  }
+
3723 
+ +
3743  {
+
3744  return const_reverse_iterator(cend());
+
3745  }
+
3746 
+ +
3766  {
+
3767  return const_reverse_iterator(cbegin());
+
3768  }
+
3769 
+
3771 
+
3772 
+
3774  // capacity //
+
3776 
+
3779 
+
3809  bool empty() const noexcept
+
3810  {
+
3811  switch (m_type)
+
3812  {
+
3813  case value_t::null:
+
3814  {
+
3815  // null values are empty
+
3816  return true;
+
3817  }
+
3818 
+
3819  case value_t::array:
+
3820  {
+
3821  return m_value.array->empty();
+
3822  }
+
3823 
+
3824  case value_t::object:
+
3825  {
+
3826  return m_value.object->empty();
+
3827  }
+
3828 
+
3829  default:
+
3830  {
+
3831  // all other types are nonempty
+
3832  return false;
+
3833  }
+
3834  }
+
3835  }
+
3836 
+
3866  size_type size() const noexcept
+
3867  {
+
3868  switch (m_type)
+
3869  {
+
3870  case value_t::null:
+
3871  {
+
3872  // null values are empty
+
3873  return 0;
+
3874  }
+
3875 
+
3876  case value_t::array:
+
3877  {
+
3878  return m_value.array->size();
+
3879  }
+
3880 
+
3881  case value_t::object:
+
3882  {
+
3883  return m_value.object->size();
+
3884  }
+
3885 
+
3886  default:
+
3887  {
+
3888  // all other types have size 1
+
3889  return 1;
+
3890  }
+
3891  }
+
3892  }
+
3893 
+
3926  size_type max_size() const noexcept
+
3927  {
+
3928  switch (m_type)
+
3929  {
+
3930  case value_t::array:
+
3931  {
+
3932  return m_value.array->max_size();
+
3933  }
+
3934 
+
3935  case value_t::object:
+
3936  {
+
3937  return m_value.object->max_size();
+
3938  }
+
3939 
+
3940  default:
+
3941  {
+
3942  // all other types have max_size() == size()
+
3943  return size();
+
3944  }
+
3945  }
+
3946  }
+
3947 
+
3949 
+
3950 
+
3952  // modifiers //
+
3954 
+
3957 
+
3983  void clear() noexcept
+
3984  {
+
3985  switch (m_type)
+
3986  {
+
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
+
3989  m_value.number_integer = 0;
+
3990  break;
+
3991  }
+
3992 
+
3993  case value_t::number_float:
+
3994  {
+
3995  m_value.number_float = 0.0;
+
3996  break;
+
3997  }
+
3998 
+
3999  case value_t::boolean:
+
4000  {
+
4001  m_value.boolean = false;
+
4002  break;
+
4003  }
+
4004 
+
4005  case value_t::string:
+
4006  {
+
4007  m_value.string->clear();
+
4008  break;
+
4009  }
+
4010 
+
4011  case value_t::array:
+
4012  {
+
4013  m_value.array->clear();
+
4014  break;
+
4015  }
+
4016 
+
4017  case value_t::object:
+
4018  {
+
4019  m_value.object->clear();
+
4020  break;
+
4021  }
+
4022 
+
4023  default:
+
4024  {
+
4025  break;
+
4026  }
+
4027  }
+
4028  }
+
4029 
+
4049  void push_back(basic_json&& val)
+
4050  {
+
4051  // push_back only works for null objects or arrays
+
4052  if (not(is_null() or is_array()))
+
4053  {
+
4054  throw std::domain_error("cannot use push_back() with " + type_name());
+
4055  }
+
4056 
+
4057  // transform null object into an array
+
4058  if (is_null())
+
4059  {
+
4060  m_type = value_t::array;
+
4061  m_value = value_t::array;
+
4062  }
+
4063 
+
4064  // add element to array (move semantics)
+
4065  m_value.array->push_back(std::move(val));
+
4066  // invalidate object
+
4067  val.m_type = value_t::null;
+
4068  }
+
4069 
+
4074  reference operator+=(basic_json&& val)
+
4075  {
+
4076  push_back(std::move(val));
+
4077  return *this;
+
4078  }
+
4079 
+
4084  void push_back(const basic_json& val)
+
4085  {
+
4086  // push_back only works for null objects or arrays
+
4087  if (not(is_null() or is_array()))
+
4088  {
+
4089  throw std::domain_error("cannot use push_back() with " + type_name());
+
4090  }
+
4091 
+
4092  // transform null object into an array
+
4093  if (is_null())
+
4094  {
+
4095  m_type = value_t::array;
+
4096  m_value = value_t::array;
+
4097  }
+
4098 
+
4099  // add element to array
+
4100  m_value.array->push_back(val);
+
4101  }
+
4102 
+
4107  reference operator+=(const basic_json& val)
+
4108  {
+
4109  push_back(val);
+
4110  return *this;
+
4111  }
+
4112 
+
4133  void push_back(const typename object_t::value_type& val)
+
4134  {
+
4135  // push_back only works for null objects or objects
+
4136  if (not(is_null() or is_object()))
+
4137  {
+
4138  throw std::domain_error("cannot use push_back() with " + type_name());
+
4139  }
+
4140 
+
4141  // transform null object into an object
+
4142  if (is_null())
+
4143  {
+
4144  m_type = value_t::object;
+
4145  m_value = value_t::object;
+
4146  }
+
4147 
+
4148  // add element to array
+
4149  m_value.object->insert(val);
+
4150  }
+
4151 
+
4156  reference operator+=(const typename object_t::value_type& val)
+
4157  {
+
4158  push_back(val);
+
4159  return operator[](val.first);
+
4160  }
+
4161 
+
4182  iterator insert(const_iterator pos, const basic_json& val)
+
4183  {
+
4184  // insert only works for arrays
+
4185  if (is_array())
+
4186  {
+
4187  // check if iterator pos fits to this JSON value
+
4188  if (pos.m_object != this)
+
4189  {
+
4190  throw std::domain_error("iterator does not fit current value");
+
4191  }
+
4192 
+
4193  // insert to array and return iterator
+
4194  iterator result(this);
+
4195  result.m_it.array_iterator = m_value.array->insert(pos.m_it.array_iterator, val);
+
4196  return result;
+
4197  }
+
4198  else
+
4199  {
+
4200  throw std::domain_error("cannot use insert() with " + type_name());
+
4201  }
+
4202  }
+
4203 
+
4208  iterator insert(const_iterator pos, basic_json&& val)
+
4209  {
+
4210  return insert(pos, val);
+
4211  }
+
4212 
+
4235  iterator insert(const_iterator pos, size_type cnt, const basic_json& val)
+
4236  {
+
4237  // insert only works for arrays
+
4238  if (is_array())
+
4239  {
+
4240  // check if iterator pos fits to this JSON value
+
4241  if (pos.m_object != this)
+
4242  {
+
4243  throw std::domain_error("iterator does not fit current value");
+
4244  }
+
4245 
+
4246  // insert to array and return iterator
+
4247  iterator result(this);
+
4248  result.m_it.array_iterator = m_value.array->insert(pos.m_it.array_iterator, cnt, val);
+
4249  return result;
+
4250  }
+
4251  else
+
4252  {
+
4253  throw std::domain_error("cannot use insert() with " + type_name());
+
4254  }
+
4255  }
+
4256 
+ +
4284  {
+
4285  // insert only works for arrays
+
4286  if (not is_array())
+
4287  {
+
4288  throw std::domain_error("cannot use insert() with " + type_name());
+
4289  }
+
4290 
+
4291  // check if iterator pos fits to this JSON value
+
4292  if (pos.m_object != this)
+
4293  {
+
4294  throw std::domain_error("iterator does not fit current value");
+
4295  }
+
4296 
+
4297  if (first.m_object != last.m_object)
+
4298  {
+
4299  throw std::domain_error("iterators do not fit");
+
4300  }
+
4301 
+
4302  if (first.m_object == this or last.m_object == this)
+
4303  {
+
4304  throw std::domain_error("passed iterators may not belong to container");
+
4305  }
+
4306 
+
4307  // insert to array and return iterator
+
4308  iterator result(this);
+
4309  result.m_it.array_iterator = m_value.array->insert(
+
4310  pos.m_it.array_iterator,
+
4311  first.m_it.array_iterator,
+
4312  last.m_it.array_iterator);
+
4313  return result;
+
4314  }
+
4315 
+
4337  iterator insert(const_iterator pos, std::initializer_list<basic_json> ilist)
+
4338  {
+
4339  // insert only works for arrays
+
4340  if (not is_array())
+
4341  {
+
4342  throw std::domain_error("cannot use insert() with " + type_name());
+
4343  }
+
4344 
+
4345  // check if iterator pos fits to this JSON value
+
4346  if (pos.m_object != this)
+
4347  {
+
4348  throw std::domain_error("iterator does not fit current value");
+
4349  }
+
4350 
+
4351  // insert to array and return iterator
+
4352  iterator result(this);
+
4353  result.m_it.array_iterator = m_value.array->insert(pos.m_it.array_iterator, ilist);
+
4354  return result;
+
4355  }
+
4356 
+
4374  void swap(reference other) noexcept (
+
4375  std::is_nothrow_move_constructible<value_t>::value and
+
4376  std::is_nothrow_move_assignable<value_t>::value and
+
4377  std::is_nothrow_move_constructible<json_value>::value and
+
4378  std::is_nothrow_move_assignable<json_value>::value
+
4379  )
+
4380  {
+
4381  std::swap(m_type, other.m_type);
+
4382  std::swap(m_value, other.m_value);
+
4383  }
+
4384 
+
4404  void swap(array_t& other)
+
4405  {
+
4406  // swap only works for arrays
+
4407  if (is_array())
4408  {
-
4409  throw std::domain_error("cannot use swap() with " + type_name());
+
4409  std::swap(*(m_value.array), other);
4410  }
-
4411  }
-
4412 
-
4432  void swap(string_t& other)
-
4433  {
-
4434  // swap only works for strings
-
4435  if (is_string())
-
4436  {
-
4437  std::swap(*(m_value.string), other);
-
4438  }
-
4439  else
+
4411  else
+
4412  {
+
4413  throw std::domain_error("cannot use swap() with " + type_name());
+
4414  }
+
4415  }
+
4416 
+
4436  void swap(object_t& other)
+
4437  {
+
4438  // swap only works for objects
+
4439  if (is_object())
4440  {
-
4441  throw std::domain_error("cannot use swap() with " + type_name());
+
4441  std::swap(*(m_value.object), other);
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  }
+
4443  else
+
4444  {
+
4445  throw std::domain_error("cannot use swap() with " + type_name());
+
4446  }
+
4447  }
+
4448 
+
4468  void swap(string_t& other)
+
4469  {
+
4470  // swap only works for strings
+
4471  if (is_string())
+
4472  {
+
4473  std::swap(*(m_value.string), other);
+
4474  }
+
4475  else
+
4476  {
+
4477  throw std::domain_error("cannot use swap() with " + type_name());
+
4478  }
+
4479  }
+
4480 
+
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  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);
+
4485  // lexicographical comparison operators //
+
4487 
+
4490 
+
4491  private:
+
4501  friend bool operator<(const value_t lhs, const value_t rhs)
+
4502  {
+
4503  static constexpr std::array<uint8_t, 7> order = {{
+
4504  0, // null
+
4505  3, // object
+
4506  4, // array
+
4507  5, // string
+
4508  1, // boolean
+
4509  2, // integer
+
4510  2 // float
+
4511  }
+
4512  };
+
4513 
+
4514  // discarded values are not comparable
+
4515  if (lhs == value_t::discarded or rhs == value_t::discarded)
+
4516  {
+
4517  return false;
+
4518  }
+
4519 
+
4520  return order[static_cast<std::size_t>(lhs)] < order[static_cast<std::size_t>(rhs)];
+
4521  }
+
4522 
+
4523  public:
+
4547  friend bool operator==(const_reference lhs, const_reference rhs) noexcept
+
4548  {
+
4549  const auto lhs_type = lhs.type();
+
4550  const auto rhs_type = rhs.type();
+
4551 
+
4552  if (lhs_type == rhs_type)
+
4553  {
+
4554  switch (lhs_type)
+
4555  {
+
4556  case value_t::array:
+
4557  return *lhs.m_value.array == *rhs.m_value.array;
+
4558  case value_t::object:
+
4559  return *lhs.m_value.object == *rhs.m_value.object;
+
4560  case value_t::null:
+
4561  return true;
+
4562  case value_t::string:
+
4563  return *lhs.m_value.string == *rhs.m_value.string;
+
4564  case value_t::boolean:
+
4565  return lhs.m_value.boolean == rhs.m_value.boolean;
+ +
4567  return lhs.m_value.number_integer == rhs.m_value.number_integer;
+
4568  case value_t::number_float:
+
4569  return approx(lhs.m_value.number_float, rhs.m_value.number_float);
+
4570  default:
+
4571  return false;
+
4572  }
+
4573  }
+
4574  else if (lhs_type == value_t::number_integer and rhs_type == value_t::number_float)
+
4575  {
+
4576  return approx(static_cast<number_float_t>(lhs.m_value.number_integer),
+
4577  rhs.m_value.number_float);
+
4578  }
+
4579  else if (lhs_type == value_t::number_float and rhs_type == value_t::number_integer)
+
4580  {
+
4581  return approx(lhs.m_value.number_float,
+
4582  static_cast<number_float_t>(rhs.m_value.number_integer));
+
4583  }
+
4584  return false;
+
4585  }
+
4586 
+
4605  friend bool operator==(const_reference v, std::nullptr_t) noexcept
+
4606  {
+
4607  return v.is_null();
+
4608  }
+
4609 
+
4614  friend bool operator==(std::nullptr_t, const_reference v) noexcept
+
4615  {
+
4616  return v.is_null();
+
4617  }
+
4618 
+
4635  friend bool operator!=(const_reference lhs, const_reference rhs) noexcept
+
4636  {
+
4637  return not (lhs == rhs);
+
4638  }
+
4639 
+
4658  friend bool operator!=(const_reference v, std::nullptr_t) noexcept
+
4659  {
+
4660  return not v.is_null();
+
4661  }
+
4662 
+
4667  friend bool operator!=(std::nullptr_t, const_reference v) noexcept
+
4668  {
+
4669  return not v.is_null();
+
4670  }
+
4671 
+
4696  friend bool operator<(const_reference lhs, const_reference rhs) noexcept
+
4697  {
+
4698  const auto lhs_type = lhs.type();
+
4699  const auto rhs_type = rhs.type();
+
4700 
+
4701  if (lhs_type == rhs_type)
+
4702  {
+
4703  switch (lhs_type)
+
4704  {
+
4705  case value_t::array:
+
4706  return *lhs.m_value.array < *rhs.m_value.array;
+
4707  case value_t::object:
+
4708  return *lhs.m_value.object < *rhs.m_value.object;
+
4709  case value_t::null:
+
4710  return false;
+
4711  case value_t::string:
+
4712  return *lhs.m_value.string < *rhs.m_value.string;
+
4713  case value_t::boolean:
+
4714  return lhs.m_value.boolean < rhs.m_value.boolean;
+ +
4716  return lhs.m_value.number_integer < rhs.m_value.number_integer;
+
4717  case value_t::number_float:
+
4718  return lhs.m_value.number_float < rhs.m_value.number_float;
+
4719  default:
+
4720  return false;
+
4721  }
+
4722  }
+
4723  else if (lhs_type == value_t::number_integer and rhs_type == value_t::number_float)
+
4724  {
+
4725  return static_cast<number_float_t>(lhs.m_value.number_integer) <
+
4726  rhs.m_value.number_float;
+
4727  }
+
4728  else if (lhs_type == value_t::number_float and rhs_type == value_t::number_integer)
+
4729  {
+
4730  return lhs.m_value.number_float <
+
4731  static_cast<number_float_t>(rhs.m_value.number_integer);
+
4732  }
+
4733 
+
4734  // We only reach this line if we cannot compare values. In that case,
+
4735  // we compare types. Note we have to call the operator explicitly,
+
4736  // because MSVC has problems otherwise.
+
4737  return operator<(lhs_type, rhs_type);
+
4738  }
+
4739 
+
4757  friend bool operator<=(const_reference lhs, const_reference rhs) noexcept
+
4758  {
+
4759  return not (rhs < lhs);
+
4760  }
+
4761 
+
4779  friend bool operator>(const_reference lhs, const_reference rhs) noexcept
+
4780  {
+
4781  return not (lhs <= rhs);
+
4782  }
+
4783 
+
4801  friend bool operator>=(const_reference lhs, const_reference rhs) noexcept
+
4802  {
+
4803  return not (lhs < rhs);
+
4804  }
+
4805 
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  }
+
4808 
+
4810  // serialization //
+
4812 
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  }
+
4838  friend std::ostream& operator<<(std::ostream& o, const basic_json& j)
+
4839  {
+
4840  // read width member and use it as indentation parameter if nonzero
+
4841  const bool pretty_print = (o.width() > 0);
+
4842  const auto indentation = (pretty_print ? o.width() : 0);
+
4843 
+
4844  // reset width to 0 for subsequent calls to this stream
+
4845  o.width(0);
+
4846 
+
4847  // do the actual serialization
+
4848  j.dump(o, pretty_print, static_cast<unsigned int>(indentation));
+
4849  return o;
+
4850  }
+
4851 
+
4856  friend std::ostream& operator>>(const basic_json& j, std::ostream& o)
+
4857  {
+
4858  return o << j;
+
4859  }
+
4860 
+
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 
-
4924  friend std::istream& operator<<(basic_json& j, std::istream& i)
+
4865  // deserialization //
+
4867 
+
4870 
+
4895  static basic_json parse(const string_t& s, parser_callback_t cb = nullptr)
+
4896  {
+
4897  return parser(s, cb).parse();
+
4898  }
+
4899 
+
4924  static basic_json parse(std::istream& i, parser_callback_t cb = nullptr)
4925  {
-
4926  j = parser(i).parse();
-
4927  return i;
-
4928  }
-
4929 
-
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 
-
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  }
+
4926  return parser(i, cb).parse();
+
4927  }
+
4928 
+
4932  static basic_json parse(std::istream&& i, parser_callback_t cb = nullptr)
+
4933  {
+
4934  return parser(i, cb).parse();
+
4935  }
+
4936 
+
4960  friend std::istream& operator<<(basic_json& j, std::istream& i)
+
4961  {
+
4962  j = parser(i).parse();
+
4963  return i;
+
4964  }
+
4965 
+
4970  friend std::istream& operator>>(std::istream& i, basic_json& j)
+
4971  {
+
4972  j = parser(i).parse();
+
4973  return i;
+
4974  }
+
4975 
+
4977 
+
4978 
+
4979  private:
+
4981  // convenience functions //
+
4983 
+
4985  string_t type_name() const
+
4986  {
+
4987  switch (m_type)
+
4988  {
+
4989  case value_t::null:
+
4990  return "null";
+
4991  case value_t::object:
+
4992  return "object";
+
4993  case value_t::array:
+
4994  return "array";
+
4995  case value_t::string:
+
4996  return "string";
+
4997  case value_t::boolean:
+
4998  return "boolean";
+
4999  case value_t::discarded:
+
5000  return "discarded";
+
5001  default:
+
5002  return "number";
+
5003  }
+
5004  }
+
5005 
+
5014  static std::size_t extra_space(const string_t& s) noexcept
+
5015  {
+
5016  std::size_t result = 0;
+
5017 
+
5018  for (const auto& c : s)
+
5019  {
+
5020  switch (c)
+
5021  {
+
5022  case '"':
+
5023  case '\\':
+
5024  case '\b':
+
5025  case '\f':
+
5026  case '\n':
+
5027  case '\r':
+
5028  case '\t':
+
5029  {
+
5030  // from c (1 byte) to \x (2 bytes)
+
5031  result += 1;
+
5032  break;
+
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 
-
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  }
+
5035  default:
+
5036  {
+
5037  if (c >= 0x00 and c <= 0x1f)
+
5038  {
+
5039  // from c (1 byte) to \uxxxx (6 bytes)
+
5040  result += 5;
+
5041  }
+
5042  break;
+
5043  }
+
5044  }
+
5045  }
+
5046 
+
5047  return result;
+
5048  }
+
5049 
+
5063  static string_t escape_string(const string_t& s) noexcept
+
5064  {
+
5065  const auto space = extra_space(s);
+
5066  if (space == 0)
+
5067  {
+
5068  return s;
+
5069  }
+
5070 
+
5071  // create a result string of necessary size
+
5072  string_t result(s.size() + space, '\\');
+
5073  std::size_t pos = 0;
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  }
+
5075  for (const auto& c : s)
+
5076  {
+
5077  switch (c)
+
5078  {
+
5079  // quotation mark (0x22)
+
5080  case '"':
+
5081  {
+
5082  result[pos + 1] = '"';
+
5083  pos += 2;
+
5084  break;
+
5085  }
+
5086 
+
5087  // reverse solidus (0x5c)
+
5088  case '\\':
+
5089  {
+
5090  // nothing to change
+
5091  pos += 2;
+
5092  break;
+
5093  }
+
5094 
+
5095  // backspace (0x08)
+
5096  case '\b':
+
5097  {
+
5098  result[pos + 1] = 'b';
+
5099  pos += 2;
+
5100  break;
+
5101  }
+
5102 
+
5103  // formfeed (0x0c)
+
5104  case '\f':
+
5105  {
+
5106  result[pos + 1] = 'f';
+
5107  pos += 2;
+
5108  break;
+
5109  }
+
5110 
+
5111  // newline (0x0a)
+
5112  case '\n':
+
5113  {
+
5114  result[pos + 1] = 'n';
+
5115  pos += 2;
+
5116  break;
+
5117  }
+
5118 
+
5119  // carriage return (0x0d)
+
5120  case '\r':
+
5121  {
+
5122  result[pos + 1] = 'r';
+
5123  pos += 2;
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  // 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  }
+
5126 
+
5127  // horizontal tab (0x09)
+
5128  case '\t':
+
5129  {
+
5130  result[pos + 1] = 't';
+
5131  pos += 2;
+
5132  break;
+
5133  }
+
5134 
+
5135  default:
+
5136  {
+
5137  if (c >= 0x00 and c <= 0x1f)
+
5138  {
+
5139  // convert a number 0..15 to its hex representation (0..f)
+
5140  auto hexify = [](const char v) -> char
+
5141  {
+
5142  return (v < 10) ? ('0' + v) : ('a' + v - 10);
+
5143  };
+
5144 
+
5145  // print character c as \uxxxx
+
5146  for (const char m :
+
5147  { 'u', '0', '0', hexify(c >> 4), hexify(c & 0x0f)
+
5148  })
+
5149  {
+
5150  result[++pos] = m;
+
5151  }
+
5152 
+
5153  ++pos;
+
5154  }
+
5155  else
+
5156  {
+
5157  // all other characters are added as-is
+
5158  result[pos++] = c;
+
5159  }
+
5160  break;
+
5161  }
+
5162  }
+
5163  }
+
5164 
+
5165  return result;
+
5166  }
+
5167 
+
5185  void dump(std::ostream& o,
+
5186  const bool pretty_print,
+
5187  const unsigned int indent_step,
+
5188  const unsigned int current_indent = 0) const
+
5189  {
+
5190  // variable to hold indentation for recursive calls
+
5191  unsigned int new_indent = current_indent;
+
5192 
+
5193  switch (m_type)
+
5194  {
+
5195  case value_t::object:
+
5196  {
+
5197  if (m_value.object->empty())
+
5198  {
+
5199  o << "{}";
+
5200  return;
+
5201  }
+
5202 
+
5203  o << "{";
+
5204 
+
5205  // increase indentation
+
5206  if (pretty_print)
+
5207  {
+
5208  new_indent += indent_step;
+
5209  o << "\n";
+
5210  }
+
5211 
+
5212  for (auto i = m_value.object->cbegin(); i != m_value.object->cend(); ++i)
+
5213  {
+
5214  if (i != m_value.object->cbegin())
+
5215  {
+
5216  o << (pretty_print ? ",\n" : ",");
+
5217  }
+
5218  o << string_t(new_indent, ' ') << "\""
+
5219  << escape_string(i->first) << "\":"
+
5220  << (pretty_print ? " " : "");
+
5221  i->second.dump(o, pretty_print, indent_step, new_indent);
+
5222  }
+
5223 
+
5224  // decrease indentation
+
5225  if (pretty_print)
+
5226  {
+
5227  new_indent -= indent_step;
+
5228  o << "\n";
+
5229  }
+
5230 
+
5231  o << string_t(new_indent, ' ') + "}";
+
5232  return;
+
5233  }
+
5234 
+
5235  case value_t::array:
+
5236  {
+
5237  if (m_value.array->empty())
+
5238  {
+
5239  o << "[]";
+
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 
-
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  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;
+
5243  o << "[";
+
5244 
+
5245  // increase indentation
+
5246  if (pretty_print)
+
5247  {
+
5248  new_indent += indent_step;
+
5249  o << "\n";
+
5250  }
+
5251 
+
5252  for (auto i = m_value.array->cbegin(); i != m_value.array->cend(); ++i)
+
5253  {
+
5254  if (i != m_value.array->cbegin())
+
5255  {
+
5256  o << (pretty_print ? ",\n" : ",");
+
5257  }
+
5258  o << string_t(new_indent, ' ');
+
5259  i->dump(o, pretty_print, indent_step, new_indent);
+
5260  }
+
5261 
+
5262  // decrease indentation
+
5263  if (pretty_print)
+
5264  {
+
5265  new_indent -= indent_step;
+
5266  o << "\n";
+
5267  }
+
5268 
+
5269  o << string_t(new_indent, ' ') << "]";
+
5270  return;
+
5271  }
+
5272 
+
5273  case value_t::string:
+
5274  {
+
5275  o << string_t("\"") << escape_string(*m_value.string) << "\"";
+
5276  return;
+
5277  }
+
5278 
+
5279  case value_t::boolean:
+
5280  {
+
5281  o << (m_value.boolean ? "true" : "false");
+
5282  return;
+
5283  }
+
5284 
+ +
5286  {
+
5287  o << m_value.number_integer;
+
5288  return;
+
5289  }
+
5290 
+
5291  case value_t::number_float:
+
5292  {
+
5293  // 15 digits of precision allows round-trip IEEE 754
+
5294  // string->double->string; to be safe, we read this value from
+
5295  // std::numeric_limits<number_float_t>::digits10
+
5296  o << std::setprecision(std::numeric_limits<number_float_t>::digits10) << m_value.number_float;
+
5297  return;
+
5298  }
+
5299 
+
5300  case value_t::discarded:
+
5301  {
+
5302  o << "<discarded>";
+
5303  return;
+
5304  }
+
5305 
+
5306  case value_t::null:
+
5307  {
+
5308  o << "null";
+
5309  return;
+
5310  }
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  }
+
5312  }
+
5313 
+
5314  private:
+
5316  // member variables //
+
5318 
+
5320  value_t m_type = value_t::null;
+
5321 
+
5323  json_value m_value = {};
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  operator difference_type () const
-
5339  {
-
5340  return m_it;
-
5341  }
-
5342 
-
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 
-
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;
+
5325 
+
5326  private:
+
5328  // iterators //
+
5330 
+
5340  class primitive_iterator_t
+
5341  {
+
5342  public:
+
5344  void set_begin()
+
5345  {
+
5346  m_it = begin_value;
+
5347  }
+
5348 
+
5350  void set_end()
+
5351  {
+
5352  m_it = end_value;
+
5353  }
+
5354 
+
5356  bool is_begin() const
+
5357  {
+
5358  return (m_it == begin_value);
+
5359  }
+
5360 
+
5362  bool is_end() const
+
5363  {
+
5364  return (m_it == end_value);
+
5365  }
5366 
-
5368  internal_iterator()
-
5369  : object_iterator(), array_iterator(), primitive_iterator()
-
5370  {}
-
5371  };
+
5368  operator difference_type& ()
+
5369  {
+
5370  return m_it;
+
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  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  }
+
5374  operator difference_type () const
+
5375  {
+
5376  return m_it;
+
5377  }
+
5378 
+
5379  private:
+
5380  static constexpr difference_type begin_value = 0;
+
5381  static constexpr difference_type end_value = begin_value + 1;
+
5382 
+
5384  difference_type m_it = std::numeric_limits<std::ptrdiff_t>::denorm_min();
+
5385  };
+
5386 
+
5394  struct internal_iterator
+
5395  {
+
5397  typename object_t::iterator object_iterator;
+
5399  typename array_t::iterator array_iterator;
+
5401  primitive_iterator_t primitive_iterator;
+
5402 
+
5404  internal_iterator()
+
5405  : object_iterator(), array_iterator(), primitive_iterator()
+
5406  {}
+
5407  };
+
5408 
+
5409  public:
+
5423  class const_iterator : public std::iterator<std::random_access_iterator_tag, const basic_json>
+
5424  {
+
5426  friend class basic_json;
+
5427 
+
5428  public:
+ + + + +
5438  using iterator_category = std::bidirectional_iterator_tag;
+
5439 
+
5441  const_iterator() = default;
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 
- -
5488  {
-
5489  m_it.array_iterator = m_object->m_value.array->begin();
-
5490  break;
-
5491  }
+
5444  const_iterator(pointer object) : m_object(object)
+
5445  {
+
5446  switch (m_object->m_type)
+
5447  {
+ +
5449  {
+
5450  m_it.object_iterator = typename object_t::iterator();
+
5451  break;
+
5452  }
+
5453 
+ +
5455  {
+
5456  m_it.array_iterator = typename array_t::iterator();
+
5457  break;
+
5458  }
+
5459 
+
5460  default:
+
5461  {
+
5462  m_it.primitive_iterator = primitive_iterator_t();
+
5463  break;
+
5464  }
+
5465  }
+
5466  }
+
5467 
+
5469  const_iterator(const iterator& other) : m_object(other.m_object)
+
5470  {
+
5471  switch (m_object->m_type)
+
5472  {
+ +
5474  {
+
5475  m_it.object_iterator = other.m_it.object_iterator;
+
5476  break;
+
5477  }
+
5478 
+ +
5480  {
+
5481  m_it.array_iterator = other.m_it.array_iterator;
+
5482  break;
+
5483  }
+
5484 
+
5485  default:
+
5486  {
+
5487  m_it.primitive_iterator = other.m_it.primitive_iterator;
+
5488  break;
+
5489  }
+
5490  }
+
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  }
+
5494  const_iterator(const const_iterator& other) noexcept
+
5495  : m_object(other.m_object), m_it(other.m_it)
+
5496  {}
+
5497 
+ +
5500  std::is_nothrow_move_constructible<pointer>::value and
+
5501  std::is_nothrow_move_assignable<pointer>::value and
+
5502  std::is_nothrow_move_constructible<internal_iterator>::value and
+
5503  std::is_nothrow_move_assignable<internal_iterator>::value
+
5504  )
+
5505  {
+
5506  std::swap(m_object, other.m_object);
+
5507  std::swap(m_it, other.m_it);
+
5508  return *this;
+
5509  }
+
5510 
+
5511  private:
+
5513  void set_begin()
+
5514  {
+
5515  switch (m_object->m_type)
+
5516  {
+ +
5518  {
+
5519  m_it.object_iterator = m_object->m_value.object->begin();
+
5520  break;
+
5521  }
+
5522 
+ +
5524  {
+
5525  m_it.array_iterator = m_object->m_value.array->begin();
+
5526  break;
+
5527  }
+
5528 
+ +
5530  {
+
5531  // set to end so begin()==end() is true: null is empty
+
5532  m_it.primitive_iterator.set_end();
+
5533  break;
+
5534  }
+
5535 
+
5536  default:
+
5537  {
+
5538  m_it.primitive_iterator.set_begin();
+
5539  break;
+
5540  }
+
5541  }
+
5542  }
5543 
- -
5545  {
-
5546  return *m_it.array_iterator;
-
5547  }
-
5548 
- +
5545  void set_end()
+
5546  {
+
5547  switch (m_object->m_type)
+
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  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  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  }
+
5551  m_it.object_iterator = m_object->m_value.object->end();
+
5552  break;
+
5553  }
+
5554 
+ +
5556  {
+
5557  m_it.array_iterator = m_object->m_value.array->end();
+
5558  break;
+
5559  }
+
5560 
+
5561  default:
+
5562  {
+
5563  m_it.primitive_iterator.set_end();
+
5564  break;
+
5565  }
+
5566  }
+
5567  }
+
5568 
+
5569  public:
+ +
5572  {
+
5573  switch (m_object->m_type)
+
5574  {
+ +
5576  {
+
5577  return m_it.object_iterator->second;
+
5578  }
+
5579 
+ +
5581  {
+
5582  return *m_it.array_iterator;
+
5583  }
+
5584 
+ +
5586  {
+
5587  throw std::out_of_range("cannot get value");
+
5588  }
+
5589 
+
5590  default:
+
5591  {
+
5592  if (m_it.primitive_iterator.is_begin())
+
5593  {
+
5594  return *m_object;
+
5595  }
+
5596  else
+
5597  {
+
5598  throw std::out_of_range("cannot get value");
+
5599  }
+
5600  }
+
5601  }
+
5602  }
+
5603 
+ +
5606  {
+
5607  switch (m_object->m_type)
+
5608  {
+ +
5610  {
+
5611  return &(m_it.object_iterator->second);
+
5612  }
+
5613 
+ +
5615  {
+
5616  return &*m_it.array_iterator;
+
5617  }
+
5618 
+
5619  default:
+
5620  {
+
5621  if (m_it.primitive_iterator.is_begin())
+
5622  {
+
5623  return m_object;
+
5624  }
+
5625  else
+
5626  {
+
5627  throw std::out_of_range("cannot get value");
+
5628  }
+
5629  }
+
5630  }
+
5631  }
+
5632 
+ +
5635  {
+
5636  auto result = *this;
+
5637  ++(*this);
+
5638  return result;
+
5639  }
+
5640 
+ +
5643  {
+
5644  switch (m_object->m_type)
+
5645  {
+ +
5647  {
+
5648  ++m_it.object_iterator;
+
5649  break;
+
5650  }
+
5651 
+ +
5653  {
+
5654  ++m_it.array_iterator;
+
5655  break;
+
5656  }
+
5657 
+
5658  default:
+
5659  {
+
5660  ++m_it.primitive_iterator;
+
5661  break;
+
5662  }
+
5663  }
+
5664 
+
5665  return *this;
+
5666  }
+
5667 
+ +
5670  {
+
5671  auto result = *this;
+
5672  --(*this);
+
5673  return result;
+
5674  }
5675 
-
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  default:
-
5689  {
-
5690  return (m_it.primitive_iterator == other.m_it.primitive_iterator);
+ +
5678  {
+
5679  switch (m_object->m_type)
+
5680  {
+ +
5682  {
+
5683  --m_it.object_iterator;
+
5684  break;
+
5685  }
+
5686 
+ +
5688  {
+
5689  --m_it.array_iterator;
+
5690  break;
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 
-
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;
+
5692 
+
5693  default:
+
5694  {
+
5695  --m_it.primitive_iterator;
+
5696  break;
+
5697  }
+
5698  }
+
5699 
+
5700  return *this;
+
5701  }
+
5702 
+
5704  bool operator==(const const_iterator& other) const
+
5705  {
+
5706  // if objects are not the same, the comparison is undefined
+
5707  if (m_object != other.m_object)
+
5708  {
+
5709  throw std::domain_error("cannot compare iterators of different containers");
+
5710  }
+
5711 
+
5712  switch (m_object->m_type)
+
5713  {
+ +
5715  {
+
5716  return (m_it.object_iterator == other.m_it.object_iterator);
+
5717  }
+
5718 
+ +
5720  {
+
5721  return (m_it.array_iterator == other.m_it.array_iterator);
+
5722  }
+
5723 
+
5724  default:
+
5725  {
+
5726  return (m_it.primitive_iterator == other.m_it.primitive_iterator);
+
5727  }
+
5728  }
+
5729  }
+
5730 
+
5732  bool operator!=(const const_iterator& other) const
+
5733  {
+
5734  return not operator==(other);
+
5735  }
+
5736 
+
5738  bool operator<(const const_iterator& other) const
+
5739  {
+
5740  // if objects are not the same, the comparison is undefined
+
5741  if (m_object != other.m_object)
+
5742  {
+
5743  throw std::domain_error("cannot compare iterators of different containers");
+
5744  }
+
5745 
+
5746  switch (m_object->m_type)
+
5747  {
+ +
5749  {
+
5750  throw std::domain_error("cannot use operator< for object iterators");
+
5751  }
+
5752 
+ +
5754  {
+
5755  return (m_it.array_iterator < other.m_it.array_iterator);
+
5756  }
+
5757 
+
5758  default:
+
5759  {
+
5760  return (m_it.primitive_iterator < other.m_it.primitive_iterator);
5761  }
-
5762 
-
5763  default:
-
5764  {
-
5765  m_it.primitive_iterator += i;
-
5766  break;
-
5767  }
-
5768  }
-
5769 
-
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");
+
5762  }
+
5763  }
+
5764 
+
5766  bool operator<=(const const_iterator& other) const
+
5767  {
+
5768  return not other.operator < (*this);
+
5769  }
+
5770 
+
5772  bool operator>(const const_iterator& other) const
+
5773  {
+
5774  return not operator<=(other);
+
5775  }
+
5776 
+
5778  bool operator>=(const const_iterator& other) const
+
5779  {
+
5780  return not operator<(other);
+
5781  }
+
5782 
+ +
5785  {
+
5786  switch (m_object->m_type)
+
5787  {
+ +
5789  {
+
5790  throw std::domain_error("cannot use operator+= for object iterators");
+
5791  }
+
5792 
+ +
5794  {
+
5795  m_it.array_iterator += i;
+
5796  break;
+
5797  }
+
5798 
+
5799  default:
+
5800  {
+
5801  m_it.primitive_iterator += i;
+
5802  break;
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  {
-
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 
-
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 
-
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  }
+
5804  }
+
5805 
+
5806  return *this;
+
5807  }
+
5808 
+ +
5811  {
+
5812  return operator+=(-i);
+
5813  }
+
5814 
+ +
5817  {
+
5818  auto result = *this;
+
5819  result += i;
+
5820  return result;
+
5821  }
+
5822 
+ +
5825  {
+
5826  auto result = *this;
+
5827  result -= i;
+
5828  return result;
+
5829  }
+
5830 
+ +
5833  {
+
5834  switch (m_object->m_type)
+
5835  {
+ +
5837  {
+
5838  throw std::domain_error("cannot use operator- for object iterators");
+
5839  }
+
5840 
+ +
5842  {
+
5843  return m_it.array_iterator - other.m_it.array_iterator;
+
5844  }
+
5845 
+
5846  default:
+
5847  {
+
5848  return m_it.primitive_iterator - other.m_it.primitive_iterator;
+
5849  }
+
5850  }
+
5851  }
+
5852 
+ +
5855  {
+
5856  switch (m_object->m_type)
+
5857  {
+ +
5859  {
+
5860  throw std::domain_error("cannot use operator[] for object iterators");
+
5861  }
+
5862 
+ +
5864  {
+
5865  return *(m_it.array_iterator + n);
+
5866  }
+
5867 
+ +
5869  {
+
5870  throw std::out_of_range("cannot get value");
+
5871  }
+
5872 
+
5873  default:
+
5874  {
+
5875  if (m_it.primitive_iterator == -n)
+
5876  {
+
5877  return *m_object;
+
5878  }
+
5879  else
+
5880  {
+
5881  throw std::out_of_range("cannot get value");
+
5882  }
+
5883  }
+
5884  }
+
5885  }
+
5886 
+
5888  typename object_t::key_type key() const
+
5889  {
+
5890  if (m_object->is_object())
+
5891  {
+
5892  return m_it.object_iterator->first;
+
5893  }
+
5894  else
+
5895  {
+
5896  throw std::domain_error("cannot use key() for non-object iterators");
+
5897  }
+
5898  }
+
5899 
+ +
5902  {
+
5903  return operator*();
+
5904  }
+
5905 
+
5906  private:
+
5908  pointer m_object = nullptr;
+
5910  internal_iterator m_it = internal_iterator();
+
5911  };
+
5912 
+
5925  class iterator : public const_iterator
+
5926  {
+
5927  public:
+ +
5929  using pointer = typename basic_json::pointer;
+
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 
- -
5957  {
- -
5959  return *this;
+
5933  iterator() = default;
+
5934 
+
5936  iterator(pointer object) noexcept : base_iterator(object)
+
5937  {}
+
5938 
+
5940  iterator(const iterator& other) noexcept
+
5941  : base_iterator(other)
+
5942  {}
+
5943 
+
5945  iterator& operator=(iterator other) noexcept(
+
5946  std::is_nothrow_move_constructible<pointer>::value and
+
5947  std::is_nothrow_move_assignable<pointer>::value and
+
5948  std::is_nothrow_move_constructible<internal_iterator>::value and
+
5949  std::is_nothrow_move_assignable<internal_iterator>::value
+
5950  )
+
5951  {
+
5952  base_iterator::operator=(other);
+
5953  return *this;
+
5954  }
+
5955 
+ +
5958  {
+
5959  return const_cast<reference>(base_iterator::operator*());
5960  }
5961 
- +
5964  {
- -
5966  return *this;
-
5967  }
-
5968 
- -
5971  {
- -
5973  return *this;
+
5965  return const_cast<pointer>(base_iterator::operator->());
+
5966  }
+
5967 
+ +
5970  {
+
5971  iterator result = *this;
+ +
5973  return result;
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  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 
- -
6064  {
-
6065  base_iterator::operator--();
-
6066  return *this;
-
6067  }
-
6068 
- -
6071  {
-
6072  base_iterator::operator+=(i);
-
6073  return *this;
-
6074  }
+ +
5980  return *this;
+
5981  }
+
5982 
+ +
5985  {
+
5986  iterator result = *this;
+ +
5988  return result;
+
5989  }
+
5990 
+ +
5993  {
+ +
5995  return *this;
+
5996  }
+
5997 
+ +
6000  {
+ +
6002  return *this;
+
6003  }
+
6004 
+ +
6007  {
+ +
6009  return *this;
+
6010  }
+
6011 
+ +
6014  {
+
6015  auto result = *this;
+
6016  result += i;
+
6017  return result;
+
6018  }
+
6019 
+ +
6022  {
+
6023  auto result = *this;
+
6024  result -= i;
+
6025  return result;
+
6026  }
+
6027 
+
6028  difference_type operator-(const iterator& other) const
+
6029  {
+
6030  return base_iterator::operator-(other);
+
6031  }
+
6032 
+ +
6035  {
+
6036  return const_cast<reference>(base_iterator::operator[](n));
+
6037  }
+
6038 
+ +
6041  {
+
6042  return const_cast<reference>(base_iterator::value());
+
6043  }
+
6044  };
+
6045 
+
6063  template<typename Base>
+
6064  class json_reverse_iterator : public std::reverse_iterator<Base>
+
6065  {
+
6066  public:
+
6068  using base_iterator = std::reverse_iterator<Base>;
+
6070  using reference = typename Base::reference;
+
6071 
+
6073  json_reverse_iterator(const typename base_iterator::iterator_type& it)
+
6074  : base_iterator(it) {}
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;
+ +
6078 
+ +
6081  {
+
6082  return base_iterator::operator++(1);
+
6083  }
+
6084 
+ +
6087  {
+
6088  base_iterator::operator++();
+
6089  return *this;
6090  }
6091 
- -
6094  {
-
6095  return this->base() - other.base();
+ +
6094  {
+
6095  return base_iterator::operator--(1);
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));
+ +
6100  {
+
6101  base_iterator::operator--();
+
6102  return *this;
+
6103  }
+
6104 
+ +
6107  {
+
6108  base_iterator::operator+=(i);
+
6109  return *this;
+
6110  }
+
6111 
+ +
6114  {
+
6115  auto result = *this;
+
6116  result += i;
+
6117  return result;
+
6118  }
+
6119 
+ +
6122  {
+
6123  auto result = *this;
+
6124  result -= i;
+
6125  return result;
+
6126  }
+
6127 
+ +
6130  {
+
6131  return this->base() - other.base();
+
6132  }
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::name_separator;
-
6654  }
-
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_56;
-
6669  }
-
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_51;
-
6677  }
-
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  if (yych <= '0')
-
6686  {
-
6687  goto basic_json_parser_50;
-
6688  }
-
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  if (yych == 'e')
-
6711  {
-
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  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;
+ +
6136  {
+
6137  return *(this->operator+(n));
+
6138  }
+
6139 
+
6141  typename object_t::key_type key() const
+
6142  {
+
6143  auto it = --this->base();
+
6144  return it.key();
+
6145  }
+
6146 
+ +
6149  {
+
6150  auto it = --this->base();
+
6151  return it.operator * ();
+
6152  }
+
6153  };
+
6154 
+ +
6163  {
+
6164  private:
+
6166  basic_json& container;
+
6168  using json_iterator = decltype(std::begin(container));
+
6169 
+
6171  class iterator_wrapper_internal
+
6172  {
+
6173  private:
+
6175  json_iterator anchor;
+
6177  size_t array_index = 0;
+
6178 
+
6179  public:
+
6181  iterator_wrapper_internal(json_iterator i) : anchor(i)
+
6182  {}
+
6183 
+
6185  iterator_wrapper_internal& operator*()
+
6186  {
+
6187  return *this;
+
6188  }
+
6189 
+
6191  iterator_wrapper_internal& operator++()
+
6192  {
+
6193  ++anchor;
+
6194  ++array_index;
+
6195 
+
6196  return *this;
+
6197  }
+
6198 
+
6200  bool operator!= (const iterator_wrapper_internal& o)
+
6201  {
+
6202  return anchor != o.anchor;
+
6203  }
+
6204 
+
6206  typename basic_json::string_t key() const
+
6207  {
+
6208  switch (anchor.m_object->type())
+
6209  {
+
6210  // use integer array index as key
+
6211  case value_t::array:
+
6212  {
+
6213  return std::to_string(array_index);
+
6214  }
+
6215 
+
6216  // use key from the object
+
6217  case value_t::object:
+
6218  {
+
6219  return anchor.key();
+
6220  }
+
6221 
+
6222  // use an empty key for all primitive types
+
6223  default:
+
6224  {
+
6225  return "";
+
6226  }
+
6227  }
+
6228  }
+
6229 
+
6231  typename json_iterator::reference value() const
+
6232  {
+
6233  return anchor.value();
+
6234  }
+
6235  };
+
6236 
+
6237  public:
+
6239  iterator_wrapper(basic_json& cont)
+
6240  : container(cont)
+
6241  {}
+
6242 
+
6244  iterator_wrapper_internal begin()
+
6245  {
+
6246  return iterator_wrapper_internal(container.begin());
+
6247  }
+
6248 
+
6250  iterator_wrapper_internal end()
+
6251  {
+
6252  return iterator_wrapper_internal(container.end());
+
6253  }
+
6254  };
+
6255 
+
6256  private:
+
6258  // lexer and parser //
+
6260 
+
6268  class lexer
+
6269  {
+
6270  public:
+
6272  enum class token_type
+
6273  {
+
6274  uninitialized,
+
6275  literal_true,
+
6276  literal_false,
+
6277  literal_null,
+
6278  value_string,
+
6279  value_number,
+
6280  begin_array,
+
6281  begin_object,
+
6282  end_array,
+
6283  end_object,
+
6284  name_separator,
+
6285  value_separator,
+
6286  parse_error,
+
6287  end_of_input
+
6288  };
+
6289 
+
6291  using lexer_char_t = unsigned char;
+
6292 
+
6294  explicit lexer(const string_t& s) noexcept
+
6295  : m_stream(nullptr), m_buffer(s)
+
6296  {
+
6297  m_content = reinterpret_cast<const lexer_char_t*>(s.c_str());
+
6298  m_start = m_cursor = m_content;
+
6299  m_limit = m_content + s.size();
+
6300  }
+
6301  explicit lexer(std::istream* s) noexcept
+
6302  : m_stream(s), m_buffer()
+
6303  {
+
6304  getline(*m_stream, m_buffer);
+
6305  m_content = reinterpret_cast<const lexer_char_t*>(m_buffer.c_str());
+
6306  m_start = m_cursor = m_content;
+
6307  m_limit = m_content + m_buffer.size();
+
6308  }
+
6309 
+
6311  lexer() = default;
+
6312 
+
6313  // switch of unwanted functions
+
6314  lexer(const lexer&) = delete;
+
6315  lexer operator=(const lexer&) = delete;
+
6316 
+
6328  static string_t to_unicode(const std::size_t codepoint1,
+
6329  const std::size_t codepoint2 = 0)
+
6330  {
+
6331  string_t result;
+
6332 
+
6333  // calculate the codepoint from the given code points
+
6334  std::size_t codepoint = codepoint1;
+
6335 
+
6336  // check if codepoint1 is a high surrogate
+
6337  if (codepoint1 >= 0xD800 and codepoint1 <= 0xDBFF)
+
6338  {
+
6339  // check if codepoint2 is a low surrogate
+
6340  if (codepoint2 >= 0xDC00 and codepoint2 <= 0xDFFF)
+
6341  {
+
6342  codepoint =
+
6343  // high surrogate occupies the most significant 22 bits
+
6344  (codepoint1 << 10)
+
6345  // low surrogate occupies the least significant 15 bits
+
6346  + codepoint2
+
6347  // there is still the 0xD800, 0xDC00 and 0x10000 noise
+
6348  // in the result so we have to substract with:
+
6349  // (0xD800 << 10) + DC00 - 0x10000 = 0x35FDC00
+
6350  - 0x35FDC00;
+
6351  }
+
6352  else
+
6353  {
+
6354  throw std::invalid_argument("missing or wrong low surrogate");
+
6355  }
+
6356  }
+
6357 
+
6358  if (codepoint < 0x80)
+
6359  {
+
6360  // 1-byte characters: 0xxxxxxx (ASCII)
+
6361  result.append(1, static_cast<typename string_t::value_type>(codepoint));
+
6362  }
+
6363  else if (codepoint <= 0x7ff)
+
6364  {
+
6365  // 2-byte characters: 110xxxxx 10xxxxxx
+
6366  result.append(1, static_cast<typename string_t::value_type>(0xC0 | ((codepoint >> 6) & 0x1F)));
+
6367  result.append(1, static_cast<typename string_t::value_type>(0x80 | (codepoint & 0x3F)));
+
6368  }
+
6369  else if (codepoint <= 0xffff)
+
6370  {
+
6371  // 3-byte characters: 1110xxxx 10xxxxxx 10xxxxxx
+
6372  result.append(1, static_cast<typename string_t::value_type>(0xE0 | ((codepoint >> 12) & 0x0F)));
+
6373  result.append(1, static_cast<typename string_t::value_type>(0x80 | ((codepoint >> 6) & 0x3F)));
+
6374  result.append(1, static_cast<typename string_t::value_type>(0x80 | (codepoint & 0x3F)));
+
6375  }
+
6376  else if (codepoint <= 0x10ffff)
+
6377  {
+
6378  // 4-byte characters: 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx
+
6379  result.append(1, static_cast<typename string_t::value_type>(0xF0 | ((codepoint >> 18) & 0x07)));
+
6380  result.append(1, static_cast<typename string_t::value_type>(0x80 | ((codepoint >> 12) & 0x3F)));
+
6381  result.append(1, static_cast<typename string_t::value_type>(0x80 | ((codepoint >> 6) & 0x3F)));
+
6382  result.append(1, static_cast<typename string_t::value_type>(0x80 | (codepoint & 0x3F)));
+
6383  }
+
6384  else
+
6385  {
+
6386  throw std::out_of_range("code points above 0x10FFFF are invalid");
+
6387  }
+
6388 
+
6389  return result;
+
6390  }
+
6391 
+
6393  static std::string token_type_name(token_type t)
+
6394  {
+
6395  switch (t)
+
6396  {
+
6397  case token_type::uninitialized:
+
6398  return "<uninitialized>";
+
6399  case token_type::literal_true:
+
6400  return "true literal";
+
6401  case token_type::literal_false:
+
6402  return "false literal";
+
6403  case token_type::literal_null:
+
6404  return "null literal";
+
6405  case token_type::value_string:
+
6406  return "string literal";
+
6407  case token_type::value_number:
+
6408  return "number literal";
+
6409  case token_type::begin_array:
+
6410  return "[";
+
6411  case token_type::begin_object:
+
6412  return "{";
+
6413  case token_type::end_array:
+
6414  return "]";
+
6415  case token_type::end_object:
+
6416  return "}";
+
6417  case token_type::name_separator:
+
6418  return ":";
+
6419  case token_type::value_separator:
+
6420  return ",";
+
6421  case token_type::parse_error:
+
6422  return "<parse error>";
+
6423  case token_type::end_of_input:
+
6424  return "<end of input>";
+
6425  default:
+
6426  {
+
6427  // catch non-enum values
+
6428  return "unknown token"; // LCOV_EXCL_LINE
+
6429  }
+
6430  }
+
6431  }
+
6432 
+
6443  token_type scan() noexcept
+
6444  {
+
6445  // pointer for backtracking information
+
6446  m_marker = nullptr;
+
6447 
+
6448  // remember the begin of the token
+
6449  m_start = m_cursor;
+
6450 
+
6451 
+
6452  {
+
6453  lexer_char_t yych;
+
6454  unsigned int yyaccept = 0;
+
6455  static const unsigned char yybm[] =
+
6456  {
+
6457  0, 0, 0, 0, 0, 0, 0, 0,
+
6458  0, 32, 32, 0, 0, 32, 0, 0,
+
6459  64, 64, 64, 64, 64, 64, 64, 64,
+
6460  64, 64, 64, 64, 64, 64, 64, 64,
+
6461  96, 64, 0, 64, 64, 64, 64, 64,
+
6462  64, 64, 64, 64, 64, 64, 64, 64,
+
6463  192, 192, 192, 192, 192, 192, 192, 192,
+
6464  192, 192, 64, 64, 64, 64, 64, 64,
+
6465  64, 64, 64, 64, 64, 64, 64, 64,
+
6466  64, 64, 64, 64, 64, 64, 64, 64,
+
6467  64, 64, 64, 64, 64, 64, 64, 64,
+
6468  64, 64, 64, 64, 0, 64, 64, 64,
+
6469  64, 64, 64, 64, 64, 64, 64, 64,
+
6470  64, 64, 64, 64, 64, 64, 64, 64,
+
6471  64, 64, 64, 64, 64, 64, 64, 64,
+
6472  64, 64, 64, 64, 64, 64, 64, 64,
+
6473  64, 64, 64, 64, 64, 64, 64, 64,
+
6474  64, 64, 64, 64, 64, 64, 64, 64,
+
6475  64, 64, 64, 64, 64, 64, 64, 64,
+
6476  64, 64, 64, 64, 64, 64, 64, 64,
+
6477  64, 64, 64, 64, 64, 64, 64, 64,
+
6478  64, 64, 64, 64, 64, 64, 64, 64,
+
6479  64, 64, 64, 64, 64, 64, 64, 64,
+
6480  64, 64, 64, 64, 64, 64, 64, 64,
+
6481  64, 64, 64, 64, 64, 64, 64, 64,
+
6482  64, 64, 64, 64, 64, 64, 64, 64,
+
6483  64, 64, 64, 64, 64, 64, 64, 64,
+
6484  64, 64, 64, 64, 64, 64, 64, 64,
+
6485  64, 64, 64, 64, 64, 64, 64, 64,
+
6486  64, 64, 64, 64, 64, 64, 64, 64,
+
6487  64, 64, 64, 64, 64, 64, 64, 64,
+
6488  64, 64, 64, 64, 64, 64, 64, 64,
+
6489  };
+
6490  if ((m_limit - m_cursor) < 5)
+
6491  {
+
6492  yyfill(); // LCOV_EXCL_LINE;
+
6493  }
+
6494  yych = *m_cursor;
+
6495  if (yych <= ':')
+
6496  {
+
6497  if (yych <= ' ')
+
6498  {
+
6499  if (yych <= '\n')
+
6500  {
+
6501  if (yych <= 0x00)
+
6502  {
+
6503  goto basic_json_parser_28;
+
6504  }
+
6505  if (yych <= 0x08)
+
6506  {
+
6507  goto basic_json_parser_30;
+
6508  }
+
6509  if (yych >= '\n')
+
6510  {
+
6511  goto basic_json_parser_4;
+
6512  }
+
6513  }
+
6514  else
+
6515  {
+
6516  if (yych == '\r')
+
6517  {
+
6518  goto basic_json_parser_2;
+
6519  }
+
6520  if (yych <= 0x1F)
+
6521  {
+
6522  goto basic_json_parser_30;
+
6523  }
+
6524  }
+
6525  }
+
6526  else
+
6527  {
+
6528  if (yych <= ',')
+
6529  {
+
6530  if (yych == '"')
+
6531  {
+
6532  goto basic_json_parser_27;
+
6533  }
+
6534  if (yych <= '+')
+
6535  {
+
6536  goto basic_json_parser_30;
+
6537  }
+
6538  goto basic_json_parser_16;
+
6539  }
+
6540  else
+
6541  {
+
6542  if (yych <= '/')
+
6543  {
+
6544  if (yych <= '-')
+
6545  {
+
6546  goto basic_json_parser_23;
+
6547  }
+
6548  goto basic_json_parser_30;
+
6549  }
+
6550  else
+
6551  {
+
6552  if (yych <= '0')
+
6553  {
+
6554  goto basic_json_parser_24;
+
6555  }
+
6556  if (yych <= '9')
+
6557  {
+
6558  goto basic_json_parser_26;
+
6559  }
+
6560  goto basic_json_parser_18;
+
6561  }
+
6562  }
+
6563  }
+
6564  }
+
6565  else
+
6566  {
+
6567  if (yych <= 'n')
+
6568  {
+
6569  if (yych <= ']')
+
6570  {
+
6571  if (yych == '[')
+
6572  {
+
6573  goto basic_json_parser_8;
+
6574  }
+
6575  if (yych <= '\\')
+
6576  {
+
6577  goto basic_json_parser_30;
+
6578  }
+
6579  goto basic_json_parser_10;
+
6580  }
+
6581  else
+
6582  {
+
6583  if (yych == 'f')
+
6584  {
+
6585  goto basic_json_parser_22;
+
6586  }
+
6587  if (yych <= 'm')
+
6588  {
+
6589  goto basic_json_parser_30;
+
6590  }
+
6591  goto basic_json_parser_20;
+
6592  }
+
6593  }
+
6594  else
+
6595  {
+
6596  if (yych <= '{')
+
6597  {
+
6598  if (yych == 't')
+
6599  {
+
6600  goto basic_json_parser_21;
+
6601  }
+
6602  if (yych <= 'z')
+
6603  {
+
6604  goto basic_json_parser_30;
+
6605  }
+
6606  goto basic_json_parser_12;
+
6607  }
+
6608  else
+
6609  {
+
6610  if (yych <= '}')
+
6611  {
+
6612  if (yych <= '|')
+
6613  {
+
6614  goto basic_json_parser_30;
+
6615  }
+
6616  goto basic_json_parser_14;
+
6617  }
+
6618  else
+
6619  {
+
6620  if (yych == 0xEF)
+
6621  {
+
6622  goto basic_json_parser_6;
+
6623  }
+
6624  goto basic_json_parser_30;
+
6625  }
+
6626  }
+
6627  }
+
6628  }
+
6629 basic_json_parser_2:
+
6630  ++m_cursor;
+
6631  yych = *m_cursor;
+
6632  goto basic_json_parser_5;
+
6633 basic_json_parser_3:
+
6634  {
+
6635  return scan();
+
6636  }
+
6637 basic_json_parser_4:
+
6638  ++m_cursor;
+
6639  if (m_limit <= m_cursor)
+
6640  {
+
6641  yyfill(); // LCOV_EXCL_LINE;
+
6642  }
+
6643  yych = *m_cursor;
+
6644 basic_json_parser_5:
+
6645  if (yybm[0 + yych] & 32)
+
6646  {
+
6647  goto basic_json_parser_4;
+
6648  }
+
6649  goto basic_json_parser_3;
+
6650 basic_json_parser_6:
+
6651  yyaccept = 0;
+
6652  yych = *(m_marker = ++m_cursor);
+
6653  if (yych == 0xBB)
+
6654  {
+
6655  goto basic_json_parser_64;
+
6656  }
+
6657 basic_json_parser_7:
+
6658  {
+
6659  return token_type::parse_error;
+
6660  }
+
6661 basic_json_parser_8:
+
6662  ++m_cursor;
+
6663  {
+
6664  return token_type::begin_array;
+
6665  }
+
6666 basic_json_parser_10:
+
6667  ++m_cursor;
+
6668  {
+
6669  return token_type::end_array;
+
6670  }
+
6671 basic_json_parser_12:
+
6672  ++m_cursor;
+
6673  {
+
6674  return token_type::begin_object;
+
6675  }
+
6676 basic_json_parser_14:
+
6677  ++m_cursor;
+
6678  {
+
6679  return token_type::end_object;
+
6680  }
+
6681 basic_json_parser_16:
+
6682  ++m_cursor;
+
6683  {
+
6684  return token_type::value_separator;
+
6685  }
+
6686 basic_json_parser_18:
+
6687  ++m_cursor;
+
6688  {
+
6689  return token_type::name_separator;
+
6690  }
+
6691 basic_json_parser_20:
+
6692  yyaccept = 0;
+
6693  yych = *(m_marker = ++m_cursor);
+
6694  if (yych == 'u')
+
6695  {
+
6696  goto basic_json_parser_60;
+
6697  }
+
6698  goto basic_json_parser_7;
+
6699 basic_json_parser_21:
+
6700  yyaccept = 0;
+
6701  yych = *(m_marker = ++m_cursor);
+
6702  if (yych == 'r')
+
6703  {
+
6704  goto basic_json_parser_56;
+
6705  }
+
6706  goto basic_json_parser_7;
+
6707 basic_json_parser_22:
+
6708  yyaccept = 0;
+
6709  yych = *(m_marker = ++m_cursor);
+
6710  if (yych == 'a')
+
6711  {
+
6712  goto basic_json_parser_51;
+
6713  }
+
6714  goto basic_json_parser_7;
+
6715 basic_json_parser_23:
+
6716  yych = *++m_cursor;
+
6717  if (yych <= '/')
+
6718  {
+
6719  goto basic_json_parser_7;
+
6720  }
+
6721  if (yych <= '0')
+
6722  {
+
6723  goto basic_json_parser_50;
+
6724  }
+
6725  if (yych <= '9')
+
6726  {
+
6727  goto basic_json_parser_41;
+
6728  }
+
6729  goto basic_json_parser_7;
+
6730 basic_json_parser_24:
+
6731  yyaccept = 1;
+
6732  yych = *(m_marker = ++m_cursor);
+
6733  if (yych <= 'D')
+
6734  {
+
6735  if (yych == '.')
+
6736  {
+
6737  goto basic_json_parser_43;
+
6738  }
+
6739  }
+
6740  else
+
6741  {
+
6742  if (yych <= 'E')
+
6743  {
+
6744  goto basic_json_parser_44;
+
6745  }
+
6746  if (yych == 'e')
+
6747  {
+
6748  goto basic_json_parser_44;
+
6749  }
6750  }
-
6751  if (yych <= 0x0F)
+
6751 basic_json_parser_25:
6752  {
-
6753  goto basic_json_parser_33;
+
6753  return token_type::value_number;
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)
+
6755 basic_json_parser_26:
+
6756  yyaccept = 1;
+
6757  yych = *(m_marker = ++m_cursor);
+
6758  goto basic_json_parser_42;
+
6759 basic_json_parser_27:
+
6760  yyaccept = 0;
+
6761  yych = *(m_marker = ++m_cursor);
+
6762  if (yych <= 0x0F)
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')
+
6766  goto basic_json_parser_32;
+
6767 basic_json_parser_28:
+
6768  ++m_cursor;
+
6769  {
+
6770  return token_type::end_of_input;
+
6771  }
+
6772 basic_json_parser_30:
+
6773  yych = *++m_cursor;
+
6774  goto basic_json_parser_7;
+
6775 basic_json_parser_31:
+
6776  ++m_cursor;
+
6777  if (m_limit <= m_cursor)
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 >= ':')
-
6868  {
-
6869  goto basic_json_parser_33;
-
6870  }
-
6871  }
-
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 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 <= '/')
-
6930  {
-
6931  goto basic_json_parser_33;
-
6932  }
-
6933  if (yych >= ':')
-
6934  {
-
6935  goto basic_json_parser_33;
-
6936  }
-
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  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)
+
6779  yyfill(); // LCOV_EXCL_LINE;
+
6780  }
+
6781  yych = *m_cursor;
+
6782 basic_json_parser_32:
+
6783  if (yybm[0 + yych] & 64)
+
6784  {
+
6785  goto basic_json_parser_31;
+
6786  }
+
6787  if (yych <= 0x0F)
+
6788  {
+
6789  goto basic_json_parser_33;
+
6790  }
+
6791  if (yych <= '"')
+
6792  {
+
6793  goto basic_json_parser_35;
+
6794  }
+
6795  goto basic_json_parser_34;
+
6796 basic_json_parser_33:
+
6797  m_cursor = m_marker;
+
6798  if (yyaccept == 0)
+
6799  {
+
6800  goto basic_json_parser_7;
+
6801  }
+
6802  else
+
6803  {
+
6804  goto basic_json_parser_25;
+
6805  }
+
6806 basic_json_parser_34:
+
6807  ++m_cursor;
+
6808  if (m_limit <= m_cursor)
+
6809  {
+
6810  yyfill(); // LCOV_EXCL_LINE;
+
6811  }
+
6812  yych = *m_cursor;
+
6813  if (yych <= 'e')
+
6814  {
+
6815  if (yych <= '/')
+
6816  {
+
6817  if (yych == '"')
+
6818  {
+
6819  goto basic_json_parser_31;
+
6820  }
+
6821  if (yych <= '.')
+
6822  {
+
6823  goto basic_json_parser_33;
+
6824  }
+
6825  goto basic_json_parser_31;
+
6826  }
+
6827  else
+
6828  {
+
6829  if (yych <= '\\')
+
6830  {
+
6831  if (yych <= '[')
+
6832  {
+
6833  goto basic_json_parser_33;
+
6834  }
+
6835  goto basic_json_parser_31;
+
6836  }
+
6837  else
+
6838  {
+
6839  if (yych == 'b')
+
6840  {
+
6841  goto basic_json_parser_31;
+
6842  }
+
6843  goto basic_json_parser_33;
+
6844  }
+
6845  }
+
6846  }
+
6847  else
+
6848  {
+
6849  if (yych <= 'q')
+
6850  {
+
6851  if (yych <= 'f')
+
6852  {
+
6853  goto basic_json_parser_31;
+
6854  }
+
6855  if (yych == 'n')
+
6856  {
+
6857  goto basic_json_parser_31;
+
6858  }
+
6859  goto basic_json_parser_33;
+
6860  }
+
6861  else
+
6862  {
+
6863  if (yych <= 's')
+
6864  {
+
6865  if (yych <= 'r')
+
6866  {
+
6867  goto basic_json_parser_31;
+
6868  }
+
6869  goto basic_json_parser_33;
+
6870  }
+
6871  else
+
6872  {
+
6873  if (yych <= 't')
+
6874  {
+
6875  goto basic_json_parser_31;
+
6876  }
+
6877  if (yych <= 'u')
+
6878  {
+
6879  goto basic_json_parser_37;
+
6880  }
+
6881  goto basic_json_parser_33;
+
6882  }
+
6883  }
+
6884  }
+
6885 basic_json_parser_35:
+
6886  ++m_cursor;
+
6887  {
+
6888  return token_type::value_string;
+
6889  }
+
6890 basic_json_parser_37:
+
6891  ++m_cursor;
+
6892  if (m_limit <= m_cursor)
+
6893  {
+
6894  yyfill(); // LCOV_EXCL_LINE;
+
6895  }
+
6896  yych = *m_cursor;
+
6897  if (yych <= '@')
+
6898  {
+
6899  if (yych <= '/')
+
6900  {
+
6901  goto basic_json_parser_33;
+
6902  }
+
6903  if (yych >= ':')
+
6904  {
+
6905  goto basic_json_parser_33;
+
6906  }
+
6907  }
+
6908  else
+
6909  {
+
6910  if (yych <= 'F')
+
6911  {
+
6912  goto basic_json_parser_38;
+
6913  }
+
6914  if (yych <= '`')
+
6915  {
+
6916  goto basic_json_parser_33;
+
6917  }
+
6918  if (yych >= 'g')
+
6919  {
+
6920  goto basic_json_parser_33;
+
6921  }
+
6922  }
+
6923 basic_json_parser_38:
+
6924  ++m_cursor;
+
6925  if (m_limit <= m_cursor)
+
6926  {
+
6927  yyfill(); // LCOV_EXCL_LINE;
+
6928  }
+
6929  yych = *m_cursor;
+
6930  if (yych <= '@')
+
6931  {
+
6932  if (yych <= '/')
+
6933  {
+
6934  goto basic_json_parser_33;
+
6935  }
+
6936  if (yych >= ':')
+
6937  {
+
6938  goto basic_json_parser_33;
+
6939  }
+
6940  }
+
6941  else
+
6942  {
+
6943  if (yych <= 'F')
+
6944  {
+
6945  goto basic_json_parser_39;
+
6946  }
+
6947  if (yych <= '`')
+
6948  {
+
6949  goto basic_json_parser_33;
+
6950  }
+
6951  if (yych >= 'g')
+
6952  {
+
6953  goto basic_json_parser_33;
+
6954  }
+
6955  }
+
6956 basic_json_parser_39:
+
6957  ++m_cursor;
+
6958  if (m_limit <= m_cursor)
+
6959  {
+
6960  yyfill(); // LCOV_EXCL_LINE;
+
6961  }
+
6962  yych = *m_cursor;
+
6963  if (yych <= '@')
+
6964  {
+
6965  if (yych <= '/')
+
6966  {
+
6967  goto basic_json_parser_33;
+
6968  }
+
6969  if (yych >= ':')
+
6970  {
+
6971  goto basic_json_parser_33;
+
6972  }
+
6973  }
+
6974  else
+
6975  {
+
6976  if (yych <= 'F')
+
6977  {
+
6978  goto basic_json_parser_40;
+
6979  }
+
6980  if (yych <= '`')
+
6981  {
+
6982  goto basic_json_parser_33;
+
6983  }
+
6984  if (yych >= 'g')
+
6985  {
+
6986  goto basic_json_parser_33;
+
6987  }
+
6988  }
+
6989 basic_json_parser_40:
+
6990  ++m_cursor;
+
6991  if (m_limit <= m_cursor)
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  }
+
6996  if (yych <= '@')
+
6997  {
+
6998  if (yych <= '/')
+
6999  {
+
7000  goto basic_json_parser_33;
+
7001  }
+
7002  if (yych <= '9')
+
7003  {
+
7004  goto basic_json_parser_31;
+
7005  }
+
7006  goto basic_json_parser_33;
7007  }
7008  else
7009  {
-
7010  if (yych <= 'E')
+
7010  if (yych <= 'F')
7011  {
-
7012  goto basic_json_parser_44;
+
7012  goto basic_json_parser_31;
7013  }
-
7014  if (yych == 'e')
+
7014  if (yych <= '`')
7015  {
-
7016  goto basic_json_parser_44;
+
7016  goto basic_json_parser_33;
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 <= ',')
+
7018  if (yych <= 'f')
+
7019  {
+
7020  goto basic_json_parser_31;
+
7021  }
+
7022  goto basic_json_parser_33;
+
7023  }
+
7024 basic_json_parser_41:
+
7025  yyaccept = 1;
+
7026  m_marker = ++m_cursor;
+
7027  if ((m_limit - m_cursor) < 3)
+
7028  {
+
7029  yyfill(); // LCOV_EXCL_LINE;
+
7030  }
+
7031  yych = *m_cursor;
+
7032 basic_json_parser_42:
+
7033  if (yybm[0 + yych] & 128)
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 <= '/')
+
7035  goto basic_json_parser_41;
+
7036  }
+
7037  if (yych <= 'D')
+
7038  {
+
7039  if (yych != '.')
+
7040  {
+
7041  goto basic_json_parser_25;
+
7042  }
+
7043  }
+
7044  else
+
7045  {
+
7046  if (yych <= 'E')
7047  {
-
7048  goto basic_json_parser_33;
+
7048  goto basic_json_parser_44;
7049  }
-
7050  if (yych <= '9')
+
7050  if (yych == 'e')
7051  {
-
7052  goto basic_json_parser_46;
+
7052  goto basic_json_parser_44;
7053  }
-
7054  goto basic_json_parser_33;
+
7054  goto basic_json_parser_25;
7055  }
-
7056 basic_json_parser_45:
+
7056 basic_json_parser_43:
7057  yych = *++m_cursor;
7058  if (yych <= '/')
7059  {
7060  goto basic_json_parser_33;
7061  }
-
7062  if (yych >= ':')
+
7062  if (yych <= '9')
7063  {
-
7064  goto basic_json_parser_33;
+
7064  goto basic_json_parser_48;
7065  }
-
7066 basic_json_parser_46:
-
7067  ++m_cursor;
-
7068  if (m_limit <= m_cursor)
-
7069  {
-
7070  yyfill(); // LCOV_EXCL_LINE;
-
7071  }
-
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;
+
7066  goto basic_json_parser_33;
+
7067 basic_json_parser_44:
+
7068  yych = *++m_cursor;
+
7069  if (yych <= ',')
+
7070  {
+
7071  if (yych != '+')
+
7072  {
+
7073  goto basic_json_parser_33;
+
7074  }
+
7075  }
+
7076  else
+
7077  {
+
7078  if (yych <= '-')
+
7079  {
+
7080  goto basic_json_parser_45;
+
7081  }
+
7082  if (yych <= '/')
+
7083  {
+
7084  goto basic_json_parser_33;
+
7085  }
+
7086  if (yych <= '9')
+
7087  {
+
7088  goto basic_json_parser_46;
+
7089  }
+
7090  goto basic_json_parser_33;
+
7091  }
+
7092 basic_json_parser_45:
+
7093  yych = *++m_cursor;
+
7094  if (yych <= '/')
+
7095  {
+
7096  goto basic_json_parser_33;
+
7097  }
+
7098  if (yych >= ':')
+
7099  {
+
7100  goto basic_json_parser_33;
7101  }
-
7102  else
-
7103  {
-
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;
+
7102 basic_json_parser_46:
+
7103  ++m_cursor;
+
7104  if (m_limit <= m_cursor)
+
7105  {
+
7106  yyfill(); // LCOV_EXCL_LINE;
+
7107  }
+
7108  yych = *m_cursor;
+
7109  if (yych <= '/')
+
7110  {
+
7111  goto basic_json_parser_25;
+
7112  }
+
7113  if (yych <= '9')
+
7114  {
+
7115  goto basic_json_parser_46;
+
7116  }
+
7117  goto basic_json_parser_25;
+
7118 basic_json_parser_48:
+
7119  yyaccept = 1;
+
7120  m_marker = ++m_cursor;
+
7121  if ((m_limit - m_cursor) < 3)
+
7122  {
+
7123  yyfill(); // LCOV_EXCL_LINE;
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;
+
7125  yych = *m_cursor;
+
7126  if (yych <= 'D')
+
7127  {
+
7128  if (yych <= '/')
+
7129  {
+
7130  goto basic_json_parser_25;
+
7131  }
+
7132  if (yych <= '9')
+
7133  {
+
7134  goto basic_json_parser_48;
+
7135  }
+
7136  goto basic_json_parser_25;
+
7137  }
+
7138  else
+
7139  {
+
7140  if (yych <= 'E')
+
7141  {
+
7142  goto basic_json_parser_44;
+
7143  }
+
7144  if (yych == 'e')
+
7145  {
+
7146  goto basic_json_parser_44;
+
7147  }
+
7148  goto basic_json_parser_25;
+
7149  }
+
7150 basic_json_parser_50:
+
7151  yyaccept = 1;
+
7152  yych = *(m_marker = ++m_cursor);
+
7153  if (yych <= 'D')
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)
+
7155  if (yych == '.')
+
7156  {
+
7157  goto basic_json_parser_43;
+
7158  }
+
7159  goto basic_json_parser_25;
+
7160  }
+
7161  else
+
7162  {
+
7163  if (yych <= 'E')
+
7164  {
+
7165  goto basic_json_parser_44;
+
7166  }
+
7167  if (yych == 'e')
+
7168  {
+
7169  goto basic_json_parser_44;
+
7170  }
+
7171  goto basic_json_parser_25;
+
7172  }
+
7173 basic_json_parser_51:
+
7174  yych = *++m_cursor;
+
7175  if (yych != 'l')
+
7176  {
+
7177  goto basic_json_parser_33;
+
7178  }
+
7179  yych = *++m_cursor;
+
7180  if (yych != 's')
+
7181  {
+
7182  goto basic_json_parser_33;
+
7183  }
+
7184  yych = *++m_cursor;
+
7185  if (yych != 'e')
+
7186  {
+
7187  goto basic_json_parser_33;
+
7188  }
+
7189  ++m_cursor;
7190  {
-
7191  goto basic_json_parser_33;
+
7191  return token_type::literal_false;
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 
-
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  }
+
7193 basic_json_parser_56:
+
7194  yych = *++m_cursor;
+
7195  if (yych != 'u')
+
7196  {
+
7197  goto basic_json_parser_33;
+
7198  }
+
7199  yych = *++m_cursor;
+
7200  if (yych != 'e')
+
7201  {
+
7202  goto basic_json_parser_33;
+
7203  }
+
7204  ++m_cursor;
+
7205  {
+
7206  return token_type::literal_true;
+
7207  }
+
7208 basic_json_parser_60:
+
7209  yych = *++m_cursor;
+
7210  if (yych != 'l')
+
7211  {
+
7212  goto basic_json_parser_33;
+
7213  }
+
7214  yych = *++m_cursor;
+
7215  if (yych != 'l')
+
7216  {
+
7217  goto basic_json_parser_33;
+
7218  }
+
7219  ++m_cursor;
+
7220  {
+
7221  return token_type::literal_null;
+
7222  }
+
7223 basic_json_parser_64:
+
7224  yych = *++m_cursor;
+
7225  if (yych != 0xBF)
+
7226  {
+
7227  goto basic_json_parser_33;
+
7228  }
+
7229  ++m_cursor;
+
7230  {
+
7231  return scan();
+
7232  }
+
7233  }
+
7234 
+
7235 
+
7236  }
+
7237 
+
7239  void yyfill() noexcept
+
7240  {
+
7241  if (not m_stream or not * m_stream)
+
7242  {
+
7243  return;
+
7244  }
+
7245 
+
7246  const ssize_t offset_start = m_start - m_content;
+
7247  const ssize_t offset_marker = m_marker - m_start;
+
7248  const ssize_t offset_cursor = m_cursor - m_start;
+
7249 
+
7250  m_buffer.erase(0, static_cast<size_t>(offset_start));
+
7251  std::string line;
+
7252  std::getline(*m_stream, line);
+
7253  m_buffer += "\n" + line; // add line with newline symbol
+
7254 
+
7255  m_content = reinterpret_cast<const lexer_char_t*>(m_buffer.c_str());
+
7256  m_start = m_content;
+
7257  m_marker = m_start + offset_marker;
+
7258  m_cursor = m_start + offset_cursor;
+
7259  m_limit = m_start + m_buffer.size() - 1;
+
7260  }
+
7261 
+
7263  string_t get_token() const noexcept
+
7264  {
+
7265  return string_t(reinterpret_cast<typename string_t::const_pointer>(m_start),
+
7266  static_cast<size_t>(m_cursor - m_start));
+
7267  }
+
7268 
+
7290  string_t get_string() const
+
7291  {
+
7292  string_t result;
+
7293  result.reserve(static_cast<size_t>(m_cursor - m_start - 2));
+
7294 
+
7295  // iterate the result between the quotes
+
7296  for (const lexer_char_t* i = m_start + 1; i < m_cursor - 1; ++i)
+
7297  {
+
7298  // process escaped characters
+
7299  if (*i == '\\')
+
7300  {
+
7301  // read next character
+
7302  ++i;
+
7303 
+
7304  switch (*i)
+
7305  {
+
7306  // the default escapes
+
7307  case 't':
+
7308  {
+
7309  result += "\t";
+
7310  break;
+
7311  }
+
7312  case 'b':
+
7313  {
+
7314  result += "\b";
+
7315  break;
+
7316  }
+
7317  case 'f':
+
7318  {
+
7319  result += "\f";
+
7320  break;
+
7321  }
+
7322  case 'n':
+
7323  {
+
7324  result += "\n";
+
7325  break;
+
7326  }
+
7327  case 'r':
+
7328  {
+
7329  result += "\r";
+
7330  break;
+
7331  }
+
7332  case '\\':
+
7333  {
+
7334  result += "\\";
+
7335  break;
+
7336  }
+
7337  case '/':
+
7338  {
+
7339  result += "/";
+
7340  break;
+
7341  }
+
7342  case '"':
+
7343  {
+
7344  result += "\"";
+
7345  break;
+
7346  }
+
7347 
+
7348  // unicode
+
7349  case 'u':
+
7350  {
+
7351  // get code xxxx from uxxxx
+
7352  auto codepoint = std::strtoul(std::string(reinterpret_cast<typename string_t::const_pointer>(i + 1),
+
7353  4).c_str(), nullptr, 16);
+
7354 
+
7355  // check if codepoint is a high surrogate
+
7356  if (codepoint >= 0xD800 and codepoint <= 0xDBFF)
+
7357  {
+
7358  // make sure there is a subsequent unicode
+
7359  if ((i + 6 >= m_limit) or * (i + 5) != '\\' or * (i + 6) != 'u')
+
7360  {
+
7361  throw std::invalid_argument("missing low surrogate");
+
7362  }
+
7363 
+
7364  // get code yyyy from uxxxx\uyyyy
+
7365  auto codepoint2 = std::strtoul(std::string(reinterpret_cast<typename string_t::const_pointer>
+
7366  (i + 7), 4).c_str(), nullptr, 16);
+
7367  result += to_unicode(codepoint, codepoint2);
+
7368  // skip the next 10 characters (xxxx\uyyyy)
+
7369  i += 10;
+
7370  }
+
7371  else
+
7372  {
+
7373  // add unicode character(s)
+
7374  result += to_unicode(codepoint);
+
7375  // skip the next four characters (xxxx)
+
7376  i += 4;
+
7377  }
+
7378  break;
+
7379  }
+
7380  }
+
7381  }
+
7382  else
+
7383  {
+
7384  // all other characters are just copied to the end of the
+
7385  // string
+
7386  result.append(1, static_cast<typename string_t::value_type>(*i));
+
7387  }
+
7388  }
+
7389 
+
7390  return result;
+
7391  }
+
7392 
+
7410  long double get_number() const
+
7411  {
+
7412  // conversion
+
7413  typename string_t::value_type* endptr;
+
7414  const auto float_val = std::strtold(reinterpret_cast<typename string_t::const_pointer>(m_start),
+
7415  &endptr);
+
7416 
+
7417  // return float_val if the whole number was translated and NAN
+
7418  // otherwise
+
7419  return (reinterpret_cast<lexer_char_t*>(endptr) == m_cursor) ? float_val : NAN;
+
7420  }
+
7421 
+
7422  private:
+
7424  std::istream* m_stream;
+
7426  string_t m_buffer;
+
7428  const lexer_char_t* m_content = nullptr;
+
7430  const lexer_char_t* m_start = nullptr;
+
7432  const lexer_char_t* m_marker = nullptr;
+
7434  const lexer_char_t* m_cursor = nullptr;
+
7436  const lexer_char_t* m_limit = nullptr;
+
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  // 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  }
+
7444  class parser
+
7445  {
+
7446  public:
+
7448  parser(const string_t& s, parser_callback_t cb = nullptr)
+
7449  : callback(cb), m_lexer(s)
+
7450  {
+
7451  // read first token
+
7452  get_token();
+
7453  }
+
7454 
+
7456  parser(std::istream& _is, parser_callback_t cb = nullptr)
+
7457  : callback(cb), m_lexer(&_is)
+
7458  {
+
7459  // read first token
+
7460  get_token();
+
7461  }
+
7462 
+
7464  basic_json parse()
+
7465  {
+
7466  basic_json result = parse_internal(true);
+
7467 
+
7468  expect(lexer::token_type::end_of_input);
7469 
-
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  // closing }
-
7515  expect(lexer::token_type::end_object);
-
7516  get_token();
-
7517  if (keep and callback and not callback(--depth, parse_event_t::object_end, result))
-
7518  {
-
7519  result = basic_json(value_t::discarded);
-
7520  }
+
7470  // return parser result and replace it with null in case the
+
7471  // top-level value was discarded by the callback function
+
7472  return result.is_discarded() ? basic_json() : result;
+
7473  }
+
7474 
+
7475  private:
+
7477  basic_json parse_internal(bool keep)
+
7478  {
+
7479  auto result = basic_json(value_t::discarded);
+
7480 
+
7481  switch (last_token)
+
7482  {
+
7483  case lexer::token_type::begin_object:
+
7484  {
+
7485  if (keep and (not callback or (keep = callback(depth++, parse_event_t::object_start, result))))
+
7486  {
+
7487  // explicitly set result to object to cope with {}
+
7488  result.m_type = value_t::object;
+
7489  result.m_value = json_value(value_t::object);
+
7490  }
+
7491 
+
7492  // read next token
+
7493  get_token();
+
7494 
+
7495  // closing } -> we are done
+
7496  if (last_token == lexer::token_type::end_object)
+
7497  {
+
7498  get_token();
+
7499  if (keep and callback and not callback(--depth, parse_event_t::object_end, result))
+
7500  {
+
7501  result = basic_json(value_t::discarded);
+
7502  }
+
7503  return result;
+
7504  }
+
7505 
+
7506  // no comma is expected here
+
7507  unexpect(lexer::token_type::value_separator);
+
7508 
+
7509  // otherwise: parse key-value pairs
+
7510  do
+
7511  {
+
7512  // ugly, but could be fixed with loop reorganization
+
7513  if (last_token == lexer::token_type::value_separator)
+
7514  {
+
7515  get_token();
+
7516  }
+
7517 
+
7518  // store key
+
7519  expect(lexer::token_type::value_string);
+
7520  const auto key = m_lexer.get_string();
7521 
-
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  // 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  // 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);
+
7522  bool keep_tag = false;
+
7523  if (keep)
+
7524  {
+
7525  if (callback)
+
7526  {
+
7527  basic_json k(key);
+
7528  keep_tag = callback(depth, parse_event_t::key, k);
+
7529  }
+
7530  else
+
7531  {
+
7532  keep_tag = true;
+
7533  }
+
7534  }
+
7535 
+
7536  // parse separator (:)
+
7537  get_token();
+
7538  expect(lexer::token_type::name_separator);
+
7539 
+
7540  // parse and add value
+
7541  get_token();
+
7542  auto value = parse_internal(keep);
+
7543  if (keep and keep_tag and not value.is_discarded())
+
7544  {
+
7545  result[key] = std::move(value);
+
7546  }
+
7547  }
+
7548  while (last_token == lexer::token_type::value_separator);
+
7549 
+
7550  // closing }
+
7551  expect(lexer::token_type::end_object);
+
7552  get_token();
+
7553  if (keep and callback and not callback(--depth, parse_event_t::object_end, result))
+
7554  {
+
7555  result = basic_json(value_t::discarded);
+
7556  }
+
7557 
+
7558  return result;
+
7559  }
+
7560 
+
7561  case lexer::token_type::begin_array:
+
7562  {
+
7563  if (keep and (not callback or (keep = callback(depth++, parse_event_t::array_start, result))))
+
7564  {
+
7565  // explicitly set result to object to cope with []
+
7566  result.m_type = value_t::array;
+
7567  result.m_value = json_value(value_t::array);
+
7568  }
+
7569 
+
7570  // read next token
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  }
+
7572 
+
7573  // closing ] -> we are done
+
7574  if (last_token == lexer::token_type::end_array)
+
7575  {
+
7576  get_token();
+
7577  if (callback and not callback(--depth, parse_event_t::array_end, result))
+
7578  {
+
7579  result = basic_json(value_t::discarded);
+
7580  }
+
7581  return result;
+
7582  }
+
7583 
+
7584  // no comma is expected here
+
7585  unexpect(lexer::token_type::value_separator);
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  }
+
7587  // otherwise: parse values
+
7588  do
+
7589  {
+
7590  // ugly, but could be fixed with loop reorganization
+
7591  if (last_token == lexer::token_type::value_separator)
+
7592  {
+
7593  get_token();
+
7594  }
+
7595 
+
7596  // parse value
+
7597  auto value = parse_internal(keep);
+
7598  if (keep and not value.is_discarded())
+
7599  {
+
7600  result.push_back(std::move(value));
+
7601  }
+
7602  }
+
7603  while (last_token == lexer::token_type::value_separator);
+
7604 
+
7605  // closing ]
+
7606  expect(lexer::token_type::end_array);
+
7607  get_token();
+
7608  if (keep and callback and not callback(--depth, parse_event_t::array_end, result))
+
7609  {
+
7610  result = basic_json(value_t::discarded);
+
7611  }
+
7612 
+
7613  return result;
+
7614  }
+
7615 
+
7616  case lexer::token_type::literal_null:
+
7617  {
+
7618  get_token();
+
7619  result.m_type = value_t::null;
+
7620  break;
+
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 
-
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 };
+
7623  case lexer::token_type::value_string:
+
7624  {
+
7625  const auto s = m_lexer.get_string();
+
7626  get_token();
+
7627  result = basic_json(s);
+
7628  break;
+
7629  }
+
7630 
+
7631  case lexer::token_type::literal_true:
+
7632  {
+
7633  get_token();
+
7634  result.m_type = value_t::boolean;
+
7635  result.m_value = true;
+
7636  break;
+
7637  }
+
7638 
+
7639  case lexer::token_type::literal_false:
+
7640  {
+
7641  get_token();
+
7642  result.m_type = value_t::boolean;
+
7643  result.m_value = false;
+
7644  break;
+
7645  }
+
7646 
+
7647  case lexer::token_type::value_number:
+
7648  {
+
7649  auto float_val = m_lexer.get_number();
+
7650 
+
7651  // NAN is returned if token could not be translated
+
7652  // completely
+
7653  if (std::isnan(float_val))
+
7654  {
+
7655  throw std::invalid_argument(std::string("parse error - ") +
+
7656  m_lexer.get_token() + " is not a number");
+
7657  }
+
7658 
+
7659  get_token();
+
7660 
+
7661  // check if conversion loses precision
+
7662  const auto int_val = static_cast<number_integer_t>(float_val);
+
7663  if (approx(float_val, static_cast<long double>(int_val)))
+
7664  {
+
7665  // we would not lose precision -> return int
+
7666  result.m_type = value_t::number_integer;
+
7667  result.m_value = int_val;
+
7668  }
+
7669  else
+
7670  {
+
7671  // we would lose precision -> return float
+
7672  result.m_type = value_t::number_float;
+
7673  result.m_value = static_cast<number_float_t>(float_val);
+
7674  }
+
7675  break;
+
7676  }
+
7677 
+
7678  default:
+
7679  {
+
7680  // the last token was unexpected
+
7681  unexpect(last_token);
+
7682  }
+
7683  }
+
7684 
+
7685  if (keep and callback and not callback(depth, parse_event_t::value, result))
+
7686  {
+
7687  result = basic_json(value_t::discarded);
+
7688  }
+
7689  return result;
+
7690  }
+
7691 
+
7693  typename lexer::token_type get_token()
+
7694  {
+
7695  last_token = m_lexer.scan();
+
7696  return last_token;
+
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)));
+
7699  void expect(typename lexer::token_type t) const
+
7700  {
+
7701  if (t != last_token)
+
7702  {
+
7703  std::string error_msg = "parse error - unexpected \'";
+
7704  error_msg += m_lexer.get_token();
+
7705  error_msg += "\' (" + lexer::token_type_name(last_token);
+
7706  error_msg += "); expected " + lexer::token_type_name(t);
+
7707  throw std::invalid_argument(error_msg);
+
7708  }
+
7709  }
+
7710 
+
7711  void unexpect(typename lexer::token_type t) const
+
7712  {
+
7713  if (t == last_token)
+
7714  {
+
7715  std::string error_msg = "parse error - unexpected \'";
+
7716  error_msg += m_lexer.get_token();
+
7717  error_msg += "\' (";
+
7718  error_msg += lexer::token_type_name(last_token) + ")";
+
7719  throw std::invalid_argument(error_msg);
+
7720  }
+
7721  }
+
7722 
+
7723  private:
+
7725  int depth = 0;
+
7727  parser_callback_t callback;
+
7729  typename lexer::token_type last_token = lexer::token_type::uninitialized;
+
7731  lexer m_lexer;
+
7732  };
+
7733 };
+
7734 
+
7735 
+
7737 // presets //
+
7739 
+ +
7749 }
+
7750 
+
7751 
+
7753 // nonmember functions //
+
7755 
+
7756 // specialization of std::swap, and std::hash
+
7757 namespace std
+
7758 {
+
7764 template <>
+
7765 inline void swap(nlohmann::json& j1,
+
7766  nlohmann::json& j2) noexcept(
+
7767  is_nothrow_move_constructible<nlohmann::json>::value and
+
7768  is_nothrow_move_assignable<nlohmann::json>::value
+
7769  )
+
7770 {
+
7771  j1.swap(j2);
7772 }
7773 
-
7774 #endif
+
7775 template <>
+
7776 struct hash<nlohmann::json>
+
7777 {
+
7783  std::size_t operator()(const nlohmann::json& j) const
+
7784  {
+
7785  // a naive hashing via the string representation
+
7786  const auto& h = hash<nlohmann::json::string_t>();
+
7787  return h(j.dump());
+
7788  }
+
7789 };
+
7790 }
+
7791 
+
7804 inline nlohmann::json operator "" _json(const char* s, std::size_t)
+
7805 {
+
7806  return nlohmann::json::parse(reinterpret_cast<nlohmann::json::string_t::value_type*>
+
7807  (const_cast<char*>(s)));
+
7808 }
+
7809 
+
7810 #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: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
+
iterator_wrapper(basic_json &cont)
construct iterator wrapper from a container
Definition: json.hpp:6239
+
bool operator!=(const const_iterator &other) const
comparison: not equal
Definition: json.hpp:5732
+
iterator insert(const_iterator pos, basic_json &&val)
inserts element
Definition: json.hpp:4208
+
iterator operator++(int)
post-increment (it++)
Definition: json.hpp:5969
+
friend bool operator<=(const_reference lhs, const_reference rhs) noexcept
comparison: less than or equal
Definition: json.hpp:4757
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:6085
+
json_reverse_iterator operator-(difference_type i) const
subtract from iterator
Definition: json.hpp:6121
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: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
+
const_reference operator[](size_type idx) const
access specified array element
Definition: json.hpp:2842
+
reference operator[](const T(&key)[n])
access specified object element
Definition: json.hpp:2969
+
typename basic_json::const_pointer pointer
defines a pointer to the type iterated over (value_type)
Definition: json.hpp:5434
+
const_iterator & operator--()
pre-decrement (–it)
Definition: json.hpp:5677
+
friend std::istream & operator>>(std::istream &i, basic_json &j)
deserialize from stream
Definition: json.hpp:4970
+
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:5499
+
typename basic_json::value_type value_type
the type of the values when the iterator is dereferenced
Definition: json.hpp:5430
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: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
+
iterator insert(const_iterator pos, const_iterator first, const_iterator last)
inserts elements
Definition: json.hpp:4283
+
iterator insert(const_iterator pos, size_type cnt, const basic_json &val)
inserts elements
Definition: json.hpp:4235
+
json_reverse_iterator operator--(int)
post-decrement (it–)
Definition: json.hpp:6093
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:4097
+
void push_back(const typename object_t::value_type &val)
add an object to an object
Definition: json.hpp:4133
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:5941
-
friend bool operator!=(const_reference lhs, const_reference rhs) noexcept
comparison: not equal
Definition: json.hpp:4599
+
iterator & operator++()
pre-increment (++it)
Definition: json.hpp:5977
+
friend bool operator!=(const_reference lhs, const_reference rhs) noexcept
comparison: not equal
Definition: json.hpp:4635
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: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
+
const_iterator & operator++()
pre-increment (++it)
Definition: json.hpp:5642
+
difference_type operator-(const json_reverse_iterator &other) const
return difference
Definition: json.hpp:6129
+
basic_json<> json
default JSON class
Definition: json.hpp:7748
+
reference front()
access the first element
Definition: json.hpp:3133
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: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
+
const_iterator find(typename object_t::key_type key) const
find an element in a JSON object
Definition: json.hpp:3499
+
std::reverse_iterator< Base > base_iterator
shortcut to the reverse iterator adaptor
Definition: json.hpp:6068
+
json_reverse_iterator(const typename base_iterator::iterator_type &it)
create reverse iterator from iterator
Definition: json.hpp:6073
a class to store JSON values
Definition: json.hpp:187
-
json_reverse_iterator & operator--()
pre-decrement (–it)
Definition: json.hpp:6063
+
json_reverse_iterator & operator--()
pre-decrement (–it)
Definition: json.hpp:6099
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: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
+
friend bool operator==(std::nullptr_t, const_reference v) noexcept
comparison: equal
Definition: json.hpp:4614
+
void push_back(basic_json &&val)
add an object to an array
Definition: json.hpp:4049
+
const_iterator cbegin() const
returns a const iterator to the first element
Definition: json.hpp:3597
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:5963
+
iterator & operator+=(difference_type i)
add to iterator
Definition: json.hpp:5999
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:5892
-
reference operator+=(basic_json &&val)
add an object to an array
Definition: json.hpp:4038
+
const_iterator base_iterator
Definition: json.hpp:5928
+
reference operator+=(basic_json &&val)
add an object to an array
Definition: json.hpp:4074
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: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
+
a mutable random access iterator for the basic_json class
Definition: json.hpp:5925
+
iterator & operator-=(difference_type i)
subtract from iterator
Definition: json.hpp:6006
+
static basic_json parse(std::istream &&i, parser_callback_t cb=nullptr)
deserialize from stream
Definition: json.hpp:4932
+
reference operator[](const typename object_t::key_type &key)
access specified object element
Definition: json.hpp:2881
STL namespace.
-
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:5852
-
iterator end()
returns an iterator to one past the last element
Definition: json.hpp:3586
+
difference_type operator-(const iterator &other) const
Definition: json.hpp:6028
+
reference value() const
return the value of an iterator
Definition: json.hpp:5901
+
const_iterator end() const
returns a const iterator to one past the last element
Definition: json.hpp:3632
+
const_iterator(const const_iterator &other) noexcept
copy constructor
Definition: json.hpp:5494
+
reference at(const typename object_t::key_type &key)
access specified object element with bounds checking
Definition: json.hpp:2707
+
object_t::key_type key() const
return the key of an object iterator
Definition: json.hpp:5888
+
iterator end()
returns an iterator to one past the last element
Definition: json.hpp:3622
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:5921
-
reverse_iterator rend()
returns an iterator to the reverse-end
Definition: json.hpp:3675
+
reference operator*()
return a reference to the value pointed to by the iterator
Definition: json.hpp:5957
+
reverse_iterator rend()
returns an iterator to the reverse-end
Definition: json.hpp:3711
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:5788
+
const_iterator operator-(difference_type i)
subtract from iterator
Definition: json.hpp:5824
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: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
+
typename basic_json::const_reference reference
defines a reference to the type iterated over (value_type)
Definition: json.hpp:5436
+
const_reverse_iterator rend() const
returns a const reverse iterator to one before the first
Definition: json.hpp:3719
+
size_type erase(const typename object_t::key_type &key)
remove element from a JSON object given a key
Definition: json.hpp:3413
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: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:4071
+
iterator begin()
returns an iterator to the first element
Definition: json.hpp:3563
+
const_reference at(const typename object_t::key_type &key) const
access specified object element with bounds checking
Definition: json.hpp:2754
+
reference operator+=(const basic_json &val)
add an object to an array
Definition: json.hpp:4107
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:5977
+
iterator operator+(difference_type i)
add to iterator
Definition: json.hpp:6013
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:3447
+
iterator find(typename object_t::key_type key)
find an element in a JSON object
Definition: json.hpp:3483
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: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
+
friend bool operator>=(const_reference lhs, const_reference rhs) noexcept
comparison: greater than or equal
Definition: json.hpp:4801
+
iterator & operator--()
pre-decrement (–it)
Definition: json.hpp:5992
+
friend bool operator<(const_reference lhs, const_reference rhs) noexcept
comparison: less than
Definition: json.hpp:4696
+
pointer operator->() const
dereference the iterator
Definition: json.hpp:5605
discarded by the the parser callback function
-
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
+
const_reference operator[](const typename object_t::key_type &key) const
read-only access specified object element
Definition: json.hpp:2927
+
const_iterator cend() const
returns a const iterator to one past the last element
Definition: json.hpp:3656
+
typename Base::reference reference
the reference type for the pointed-to element
Definition: json.hpp:6070
+
size_type size() const noexcept
returns the number of elements
Definition: json.hpp:3866
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
+
reference at(size_type idx)
access specified array element with bounds checking
Definition: json.hpp:2617
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:6041
-
iterator_wrapper_internal end()
return iterator end (needed for range-based for)
Definition: json.hpp:6214
+
json_reverse_iterator(const base_iterator &it)
create reverse iterator from base class
Definition: json.hpp:6077
+
iterator_wrapper_internal end()
return iterator end (needed for range-based for)
Definition: json.hpp:6250
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: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
+
friend std::ostream & operator>>(const basic_json &j, std::ostream &o)
serialize to stream
Definition: json.hpp:4856
+
ValueType value(const typename object_t::key_type &key, ValueType default_value) const
access specified object element with default value
Definition: json.hpp:3082
+
object_t::key_type key() const
return the key of an object iterator
Definition: json.hpp:6141
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: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
+
typename basic_json::difference_type difference_type
a type to represent differences between iterators
Definition: json.hpp:5432
+
void swap(array_t &other)
exchanges the values
Definition: json.hpp:4404
+
reverse_iterator rbegin()
returns an iterator to the reverse-beginning
Definition: json.hpp:3680
+
reference operator+=(const typename object_t::value_type &val)
add an object to an object
Definition: json.hpp:4156
-
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
+
iterator_wrapper_internal begin()
return iterator begin (needed for range-based for)
Definition: json.hpp:6244
+
reference operator[](difference_type n) const
access to successor
Definition: json.hpp:6034
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:3652
+
const_reverse_iterator rbegin() const
returns a const reverse iterator to the last element
Definition: json.hpp:3688
~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:5780
+
const_iterator operator+(difference_type i)
add to iterator
Definition: json.hpp:5816
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: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
+
void swap(string_t &other)
exchanges the values
Definition: json.hpp:4468
+
reference value() const
return the value of an iterator
Definition: json.hpp:6040
+
const_iterator operator--(int)
post-decrement (it–)
Definition: json.hpp:5669
+
void erase(const size_type idx)
remove element from a JSON array given an index
Definition: json.hpp:3448
+
void clear() noexcept
clears the contents
Definition: json.hpp:3983
+
pointer operator->()
dereference the iterator
Definition: json.hpp:5963
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: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
+
const_reference front() const
access the first element
Definition: json.hpp:3141
+
bool operator>=(const const_iterator &other) const
comparison: greater than or equal
Definition: json.hpp:5778
+
iterator insert(const_iterator pos, std::initializer_list< basic_json > ilist)
inserts elements
Definition: json.hpp:4337
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:5748
+
const_iterator & operator+=(difference_type i)
add to iterator
Definition: json.hpp:5784
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:5796
-
friend bool operator==(const_reference lhs, const_reference rhs) noexcept
comparison: equal
Definition: json.hpp:4511
+
difference_type operator-(const const_iterator &other) const
return difference
Definition: json.hpp:5832
+
friend bool operator==(const_reference lhs, const_reference rhs) noexcept
comparison: equal
Definition: json.hpp:4547
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:3729
+
const_reverse_iterator crend() const
returns a const reverse iterator to one before the first
Definition: json.hpp:3765
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: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
+
bool empty() const noexcept
checks whether the container is empty
Definition: json.hpp:3809
+
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:3108
+
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:4374
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:3706
-
reference value() const
return the value of an iterator
Definition: json.hpp:6112
+
const_reverse_iterator crbegin() const
returns a const reverse iterator to the last element
Definition: json.hpp:3742
+
reference value() const
return the value of an iterator
Definition: json.hpp:6148
-
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
+
const_iterator(pointer object)
constructor for a given JSON instance
Definition: json.hpp:5444
+
friend bool operator<(const value_t lhs, const value_t rhs)
comparison operator for JSON types
Definition: json.hpp:4501
+
iterator(pointer object) noexcept
constructor for a given JSON instance
Definition: json.hpp:5936
+
bool operator<(const const_iterator &other) const
comparison: smaller
Definition: json.hpp:5738
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:4622
-
const_iterator & operator-=(difference_type i)
subtract from iterator
Definition: json.hpp:5774
+
friend bool operator!=(const_reference v, std::nullptr_t) noexcept
comparison: not equal
Definition: json.hpp:4658
+
const_iterator & operator-=(difference_type i)
subtract from iterator
Definition: json.hpp:5810
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: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
+
static basic_json parse(const string_t &s, parser_callback_t cb=nullptr)
deserialize from string
Definition: json.hpp:4895
+
InteratorType erase(InteratorType first, InteratorType last)
remove elements given an iterator range
Definition: json.hpp:3333
+
json_reverse_iterator operator++(int)
post-increment (it++)
Definition: json.hpp:6080
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: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
+
const_iterator(const iterator &other)
copy constructor given a nonconst iterator
Definition: json.hpp:5469
+
friend bool operator!=(std::nullptr_t, const_reference v) noexcept
comparison: not equal
Definition: json.hpp:4667
+
InteratorType erase(InteratorType pos)
remove element given an iterator
Definition: json.hpp:3232
+
bool operator<=(const const_iterator &other) const
comparison: less than or equal
Definition: json.hpp:5766
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:3131
+
reference back()
access the last element
Definition: json.hpp:3167
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:5598
+
const_iterator operator++(int)
post-increment (it++)
Definition: json.hpp:5634
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:5904
-
const_reference back() const
access the last element
Definition: json.hpp:3141
+
iterator(const iterator &other) noexcept
copy constructor
Definition: json.hpp:5940
+
const_reference back() const
access the last element
Definition: json.hpp:3177
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: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
+
static basic_json parse(std::istream &i, parser_callback_t cb=nullptr)
deserialize from stream
Definition: json.hpp:4924
+
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:3529
+
size_type max_size() const noexcept
returns the maximum possible number of elements
Definition: json.hpp:3926
+
void push_back(const basic_json &val)
add an object to an array
Definition: json.hpp:4084
+
bool operator==(const const_iterator &other) const
comparison: equal
Definition: json.hpp:5704
+
json_reverse_iterator & operator++()
pre-increment (++it)
Definition: json.hpp:6086
+
bool operator>(const const_iterator &other) const
comparison: greater than
Definition: json.hpp:5772
+
friend bool operator>(const_reference lhs, const_reference rhs) noexcept
comparison: greater than
Definition: json.hpp:4779
basic_json(basic_json &&other) noexcept
move constructor
Definition: json.hpp:1738
-
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:6070
-
a const random access iterator for the basic_json class
Definition: json.hpp:5387
+
const_reference operator[](const T(&key)[n]) const
read-only access specified object element
Definition: json.hpp:3018
+
const_iterator begin() const
returns a const iterator to the first element
Definition: json.hpp:3573
+
const_reference at(size_type idx) const
access specified array element with bounds checking
Definition: json.hpp:2660
+
json_reverse_iterator & operator+=(difference_type i)
add to iterator
Definition: json.hpp:6106
+
a const random access iterator for the basic_json class
Definition: json.hpp:5423
a template for a reverse iterator class
Definition: json.hpp:232
-
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
+
void swap(object_t &other)
exchanges the values
Definition: json.hpp:4436
+
std::bidirectional_iterator_tag iterator_category
the category of the iterator
Definition: json.hpp:5438
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:4146
-
friend bool operator==(const_reference v, std::nullptr_t) noexcept
comparison: equal
Definition: json.hpp:4569
+
iterator insert(const_iterator pos, const basic_json &val)
inserts element
Definition: json.hpp:4182
+
friend bool operator==(const_reference v, std::nullptr_t) noexcept
comparison: equal
Definition: json.hpp:4605
-
reference operator[](difference_type n) const
access to successor
Definition: json.hpp:6099
+
reference operator[](difference_type n) const
access to successor
Definition: json.hpp:6135
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:5818
-
reference operator*() const
return a reference to the value pointed to by the iterator
Definition: json.hpp:5535
+
reference operator[](difference_type n) const
access to successor
Definition: json.hpp:5854
+
reference operator*() const
return a reference to the value pointed to by the iterator
Definition: json.hpp:5571
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:4924
+
friend std::istream & operator<<(basic_json &j, std::istream &i)
deserialize from stream
Definition: json.hpp:4960
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: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
+
std::size_t operator()(const nlohmann::json &j) const
return a hash value for a JSON object
Definition: json.hpp:7783
+
friend std::ostream & operator<<(std::ostream &o, const basic_json &j)
serialize to stream
Definition: json.hpp:4838
+
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:5945
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:5948
-
json_reverse_iterator operator+(difference_type i) const
add to iterator
Definition: json.hpp:6077
+
reference operator[](size_type idx)
access specified array element
Definition: json.hpp:2799
+
iterator operator--(int)
post-decrement (it–)
Definition: json.hpp:5984
+
json_reverse_iterator operator+(difference_type i) const
add to iterator
Definition: json.hpp:6113
parse_event_t
JSON callback events.
Definition: json.hpp:754
-
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
+
iterator operator-(difference_type i)
subtract from iterator
Definition: json.hpp:6021
+
wrapper to access iterator member functions in range-based for
Definition: json.hpp:6162
diff --git a/namespacemembers.html b/namespacemembers.html index a48d378d3..72ea3d1ac 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 47f928371..83dd12f21 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 ed4c30795..58b67a2f5 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 8263db394..3db75f4c1 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 ea49e6c4d..5a1db3643 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 7712 of file json.hpp.

+

Definition at line 7748 of file json.hpp.

@@ -111,7 +111,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); 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 565c6e649..d83c9e079 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 f7244b47d..8eb1320e1 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 7740 of file json.hpp.

+

Definition at line 7776 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 5103bb987..86fe3e8f6 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 7747 of file json.hpp.

+

Definition at line 7783 of file json.hpp.

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