From ace055f63ba54af1e825c151bbd75f2890ce7162 Mon Sep 17 00:00:00 2001 From: Niels Date: Sun, 27 Dec 2015 15:34:08 +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 +- ...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 | 8 +- ...son_a07c9c38a1f01675759e05d5d34627343.html | 10 +- ...son_a088460b5d95f384a4f2ec9e52f4f66ba.html | 6 +- ...son_a0afa4512f03406db0d0432657e9c7361.html | 2 +- ...son_a114095c452ca2f4ba976548df3da68be.html | 6 +- ...son_a11c3dd843c21c58daa651e84046a82af.html | 6 +- ...son_a122640e7e2db1814fc7bbb3c122ec76e.html | 4 +- ...son_a13e5642dbfa1602c937d295a085413cc.html | 2 +- ...son_a1683189bd539313b5559f07961166c8b.html | 2 +- ...son_a16a275d0201e9aedc87c933c764b8869.html | 6 +- ...son_a1dc0c521042807e216d11110d2f002ff.html | 2 +- ...son_a231b02148577b69a154b2ce2c87a5522.html | 2 +- ...son_a234f03dce002783748ca401a42bc6472.html | 8 +- ...son_a266c4dd24d11a86e4831523af5d9df4d.html | 6 +- ...son_a26b7e4876af25eae5800ce43f93aaef2.html | 9 +- ...son_a2adfc8d24bea3908398cbf325b5dc1d7.html | 6 +- ...son_a2f07bcf7e75c34396476dd1790f26ce8.html | 8 +- ...son_a3173944e7b1809a333def4078a0b92a3.html | 8 +- ...son_a317b01b0fba3ac458561f1634759ea3b.html | 7 +- ...son_a3287df6546c905fb0a5786deb4b1cf32.html | 6 +- ...son_a33f1632cfdbf460b4913f4e8a43dd9e4.html | 4 +- ...son_a34d6a60dd99e9f33b8273a1c8db5669b.html | 4 +- ...son_a3d4e4bab95b24ccab42ed37e0ede2d98.html | 2 +- ...son_a42f9133f978dde4cce5851b2c2434a0c.html | 6 +- ...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 | 8 +- ...son_a53a2abfdd4f72c7df5aba1155bf03e48.html | 6 +- ...son_a57703688bee6b9736ab3a430d8d246f2.html | 7 +- ...son_a57a96ab3ff1ce7b48a754129fb12c982.html | 6 +- ...son_a5a2d4dbcdbc8ea065b87daf52cd786b9.html | 2 +- ...son_a5c8bb5200f5eac10d31e26be46e5b1ac.html | 4 +- ...son_a5d428360d75a52f6af74751d1cc912c6.html | 4 +- ...son_a5e34c5435e557d0bf666bd7311211405.html | 4 +- ...son_a5f0aad50ed7e8aec3128fe018c18b3fe.html | 8 +- ...son_a5fd8b54389698edf0c08e2dd001f610b.html | 2 +- ...son_a60ca396028b8d9714c6e10efbf475af6.html | 4 +- ...son_a63691315292df8e1522b00d37ebb1ffc.html | 2 +- ...son_a652414dd930cb3af3b6f454cc535a23e.html | 6 +- ...son_a656939a3dc9a6047e4afacd9e11b83a6.html | 8 +- ...son_a66f936cfbd252f85bd3dc2598e37a64b.html | 8 +- ...son_a6944904b3b59769b1cf62ac2532cbe33.html | 2 +- ...son_a696ced74d8edc0b63a000a72907ab109.html | 6 +- ...son_a6a7f45095675ac6fd1d018a0e41874be.html | 17 +- ...son_a6b7428e8c1169497f47b81667001cbfb.html | 10 +- ...son_a6bbd3e72a870f1ba81ff6886b063b0fe.html | 2 +- ...son_a6dff6a02a2be250b8f8dc2f47be65544.html | 11 +- ...son_a6e2e21da48f5d9471716cd868a068327.html | 4 +- ...son_a71eba33d906745e66f340952b79fbce3.html | 2 +- ...son_a72442ccbb378b4464a24a2da1e784041.html | 9 +- ...son_a72ba20783ecb3eec98bd6a3b870d565c.html | 8 +- ...son_a74472977b798c7b7989e6e7cb960ecff.html | 2 +- ...son_a74a943800c7f103d0990d7eef82c6453.html | 4 +- ...son_a74ccfa471a0c061876b247f820f3c741.html | 10 +- ...son_a75a1754e0d39f33095d3102a8bdb9881.html | 18 +- ...son_a76cfc5062bf6223396ab82c753cd4634.html | 8 +- ...son_a7c08f966200af98db0313a3b517ce0a9.html | 6 +- ...son_a7c19a5c3be6cc755377ee41eade78baf.html | 8 +- ...son_a7d0db3b728d820d4984df78d97d2b104.html | 2 +- ...son_a7d1b990f2c12fecb57db1504fdadd0bb.html | 8 +- ...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 | 7 +- ...son_a8e4e11999b4e7faa8f31f21164ebd65a.html | 7 +- ...son_a8fa74698f4061e18ec664009f3af1ddf.html | 17 +- ...son_a930e14150ffa067bcf56d35cb00271e1.html | 2 +- ...son_a960962c683909619d1d2fbbe856c022e.html | 8 +- ...son_a9730b9f7bc2150e641fe20198d4477c7.html | 4 +- ...son_a98e05a2c9b8f74bd60442772cddeee52.html | 4 +- ...son_a9993148cb0473365e52998c7315f9ada.html | 6 +- ...son_a9a73d1b71c9e913aa2888d8b40c72ee9.html | 6 +- ...son_a9c26c5d0f4a519c7236149b9aeb3ef9e.html | 6 +- ...son_a9daafb4c15ed5a008cb825bbd8c29d87.html | 7 +- ...son_a9f17a0690155e3a5603246ccec81499e.html | 6 +- ...son_aa0422e861b4cbd7cdcaad7a11a1304a9.html | 10 +- ...son_aa1f3b3f1dca79392d6727b81f9668c6c.html | 6 +- ...son_aa5413178b8041f7ac685dec4b040dd2c.html | 8 +- ...son_aa6a24b176f9599a21d662cc5f8e1ca76.html | 4 +- ...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 | 10 +- ...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 | 6 +- ...son_ac82abedf356d252e0589850c3d8b35ba.html | 2 +- ...son_ac943391891fcde0a71a15ce990e0f7f4.html | 4 +- ...son_acd08f9179c8c1e9f2cd7575a724ce27e.html | 2 +- ...son_acdf4445333649ec94198f09a62144884.html | 8 +- ...son_ace8338e57fdb11e1955c2a0c2d782069.html | 2 +- ...son_ad1f617d29e8923dd40c89153f792b1bc.html | 6 +- ...son_ad2c4513cef5d8db760c4b2d871eea42c.html | 2 +- ...son_ad497cbc4f80c8d79662ee6e19bf145dd.html | 19 +- ...son_ad6734c2b91b1b77aa2b43b65c3619c05.html | 2 +- ...son_ad8e0c5d04f016d1b3ac7369e5c73bedf.html | 8 +- ...son_ada8e01109a60088e4db2a670d4903b54.html | 6 +- ...son_adbd4c16c9ac641b2a4736bc2c6787d83.html | 2 +- ...son_ade7bd6e0fe221fec9d3fa9b430f5ce76.html | 6 +- ...son_adeaef2ab021997a11a826c378c2365e1.html | 2 +- ...son_adf5dea6fa9d7075ff89ca0796ab47a7e.html | 4 +- ...son_ae347859ec88176ef76a0cbe5b4514fcf.html | 4 +- ...son_ae50f22a1c646b8627e88f1313cceffd4.html | 8 +- ...son_ae874cfc1746b560c53a03bcf5b7bbeed.html | 6 +- ...son_ae928414b2805cf6ef56b4e4f8d235416.html | 2 +- ...son_ae960d2d6bc7b94fe39cc5e9f106edfa9.html | 9 +- ...son_aea1c863b719b4ca5b77188c171bbfafe.html | 2 +- ...son_af073eec08d2e68924098aef09e9a10ba.html | 6 +- ...son_af0ebd1757acb971a6504b4acabf88584.html | 6 +- ...son_af127fb69c580c17821da5f5be57e3585.html | 2 +- ...son_af1e3f9e079136abca2530c8191c56292.html | 9 +- ...son_af2730bc8ffa6b28916875c13ee7b83f5.html | 8 +- ...son_af661bc209bf22097e2f76607a11b56bf.html | 6 +- ...son_af6b6050ccd906dddf7c9f47fe3ad62a5.html | 6 +- ...son_af709c079de0ac3507143ea2c60699bd0.html | 4 +- ...son_af74581d177dafc38df5a126ccd358999.html | 6 +- ...son_af7d0adc984d04fc70c3d29fcd63e096a.html | 10 +- ...son_afc4223b5ad03b1b76e925374a8fff98e.html | 6 +- 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 | 8549 +++++++++-------- 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 +- 251 files changed, 4855 insertions(+), 4839 deletions(-) diff --git a/annotated.html b/annotated.html index 9a7bf91ee..9c418f4cf 100644 --- a/annotated.html +++ b/annotated.html @@ -101,7 +101,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/classes.html b/classes.html index 6ee7563b9..0223a34fc 100644 --- a/classes.html +++ b/classes.html @@ -103,7 +103,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 e71068d65..d7850c49a 100644 --- a/classnlohmann_1_1basic__json-members.html +++ b/classnlohmann_1_1basic__json-members.html @@ -236,7 +236,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/classnlohmann_1_1basic__json.html b/classnlohmann_1_1basic__json.html index 48b6ee814..7f1b7f21f 100644 --- a/classnlohmann_1_1basic__json.html +++ b/classnlohmann_1_1basic__json.html @@ -662,7 +662,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 afc11a187..9bb051c7a 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 f9f7b36fc..bd47b9cbf 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 5449 of file json.hpp.

+

Definition at line 5570 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 26a125451..822c851c3 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 5695 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_a17e5f5d3598e6901f3c1c1f7dc60589f.html b/classnlohmann_1_1basic__json_1_1const__iterator_a17e5f5d3598e6901f3c1c1f7dc60589f.html index bfb186bdc..30efd618c 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 5798 of file json.hpp.

+

Definition at line 5919 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 cc9e950d7..5e5c007b7 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 5880 of file json.hpp.

+

Definition at line 6001 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 6a8c49c0a..c053beda4 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 5525 of file json.hpp.

+

Definition at line 5646 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 84c2f2594..1a88a976e 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 5631 of file json.hpp.

+

Definition at line 5752 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 ba48bb52f..457314dff 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 5730 of file json.hpp.

+

Definition at line 5851 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 a93b9a649..c39cf176f 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 5597 of file json.hpp.

+

Definition at line 5718 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 447273f03..dac9fb13b 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 5460 of file json.hpp.

+

Definition at line 5581 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 4ff9c3570..fbf8fb303 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 5495 of file json.hpp.

+

Definition at line 5616 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 be6323a21..4c21d36cf 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 5850 of file json.hpp.

+

Definition at line 5971 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 67e1fdb54..39332e56d 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 5456 of file json.hpp.

+

Definition at line 5577 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 1cc293eb5..222801154 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 5804 of file json.hpp.

+

Definition at line 5925 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 e66012340..008478b6d 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 5470 of file json.hpp.

+

Definition at line 5591 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 bc6d490ed..8eebf4a33 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 f77b8154d..7b5029061 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 5914 of file json.hpp.

+

Definition at line 6035 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 2925ea744..9a665eaca 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 5810 of file json.hpp.

+

Definition at line 5931 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 37291c33c..77abdc8eb 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 5927 of file json.hpp.

+

Definition at line 6048 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 4f758b012..239231718 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 5758 of file json.hpp.

+

Definition at line 5879 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 82a893125..9ddb52f35 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 5703 of file json.hpp.

+

Definition at line 5824 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 3d4fd0174..6f9f6962d 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 5668 of file json.hpp.

+

Definition at line 5789 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 6ed752e9c..3e1864c75 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 5458 of file json.hpp.

+

Definition at line 5579 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 587a1c882..598d60a38 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 5842 of file json.hpp.

+

Definition at line 5963 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 d98e7b3ed..1891d25a5 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 5764 of file json.hpp.

+

Definition at line 5885 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 0e0d8004b..69f6545a8 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 5452 of file json.hpp.

+

Definition at line 5573 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 0c4d9fdbc..84dfd2b6e 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 5462 of file json.hpp.

+

Definition at line 5583 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 baf064218..29192916a 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 5858 of file json.hpp.

+

Definition at line 5979 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 29d37a4e8..533092b3a 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 5660 of file json.hpp.

+

Definition at line 5781 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 b84306cfc..61247d2c7 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 5464 of file json.hpp.

+

Definition at line 5585 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 4a640df5c..b25f5c8a9 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 5792 of file json.hpp.

+

Definition at line 5913 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 259d666cf..157a17e1c 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 5836 of file json.hpp.

+

Definition at line 5957 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 cdd21f692..8dda7a047 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 5520 of file json.hpp.

+

Definition at line 5641 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 88145f2ec..d01ed0e98 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 657482357..fd3aedff1 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 5951 of file json.hpp.

+

Definition at line 6072 of file json.hpp.

diff --git a/classnlohmann_1_1basic__json_1_1iterator_a037e5f3de196ff4cea8a95a8a4e35882.html b/classnlohmann_1_1basic__json_1_1iterator_a037e5f3de196ff4cea8a95a8a4e35882.html index 0bd592e37..218cbe072 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 6003 of file json.hpp.

+

Definition at line 6125 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 03f42f944..be14f2793 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 6032 of file json.hpp.

+

Definition at line 6154 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 7f3966b18..eb1746e0f 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 6047 of file json.hpp.

+

Definition at line 6169 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 8c38d203b..9fbdc0d43 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 6060 of file json.hpp.

+

Definition at line 6182 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 0d07257ce..1c2ef81a3 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 5989 of file json.hpp.

+

Definition at line 6111 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 4b4126e2f..ce083334a 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 6018 of file json.hpp.

+

Definition at line 6140 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 6dbb05ca7..4c144e7ea 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 6054 of file json.hpp.

+

Definition at line 6176 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 d45d49ec5..ca6dd8cf8 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 5983 of file json.hpp.

+

Definition at line 6105 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 c18469bbb..2eacac08d 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 6010 of file json.hpp.

+

Definition at line 6132 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 fc4b0b58c..be631e843 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 3cb9051e3..925cf0f75 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 5971 of file json.hpp.

+

Definition at line 6093 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 7ca0f9f58..c00059d27 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 6025 of file json.hpp.

+

Definition at line 6147 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 fcd409c6e..db8922e99 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 5966 of file json.hpp.

+

Definition at line 6088 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 a5a2f4e60..da17c142f 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 5995 of file json.hpp.

+

Definition at line 6117 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 b2b792d35..2c54c3948 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 5956 of file json.hpp.

+

Definition at line 6077 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 5b15a2ff4..49e2989a8 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 5962 of file json.hpp.

+

Definition at line 6083 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 986b0608c..a5e4b863c 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 6039 of file json.hpp.

+

Definition at line 6161 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 d905ea96c..875c9f287 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 5954 of file json.hpp.

+

Definition at line 6075 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 8016b976f..708c189d5 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 6066 of file json.hpp.

+

Definition at line 6188 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 d94d80bf8..fe81d6771 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 5955 of file json.hpp.

+

Definition at line 6076 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 9d48541af..035ef67d7 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 fca0dcaaa..2eeb0ed0f 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 18a5a6e2f..de3488258 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 6147 of file json.hpp.

+

Definition at line 6272 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 c2f794d8c..9fd94bea8 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 6099 of file json.hpp.

+

Definition at line 6221 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 d732542c0..964f7f2be 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 6112 of file json.hpp.

+

Definition at line 6237 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 acbcc5fee..9c593796e 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 6139 of file json.hpp.

+

Definition at line 6264 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 d0f1cd150..3cc754f76 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 6132 of file json.hpp.

+

Definition at line 6257 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 0031d2150..157c0b489 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 6096 of file json.hpp.

+

Definition at line 6218 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 c0656f8b6..7dde9d947 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 6174 of file json.hpp.

+

Definition at line 6299 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 e58836ec0..2cca73090 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 6119 of file json.hpp.

+

Definition at line 6244 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 89eccb644..fb7eba679 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 6103 of file json.hpp.

+

Definition at line 6226 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 49489437b..3d0eaac07 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 6106 of file json.hpp.

+

Definition at line 6231 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 fedefd8f2..d0fa245ce 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 6094 of file json.hpp.

+

Definition at line 6216 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 ea142b3b3..bf5fa18d3 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 6155 of file json.hpp.

+

Definition at line 6280 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 3e8198641..2c87c9d20 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 6125 of file json.hpp.

+

Definition at line 6250 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 fad688986..1785e6b02 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 6161 of file json.hpp.

+

Definition at line 6286 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 89bd1297a..fb1075c7f 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 6167 of file json.hpp.

+

Definition at line 6292 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 b76791149..5c79352d6 100644 --- a/classnlohmann_1_1basic__json_a01a2643289b69cd71d9b3f3fc209b748.html +++ b/classnlohmann_1_1basic__json_a01a2643289b69cd71d9b3f3fc209b748.html @@ -279,13 +279,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:3529
+
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:3546
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 3529 of file json.hpp.

+

Definition at line 3546 of file json.hpp.

@@ -295,7 +295,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 b936ddd0d..06bf4fb68 100644 --- a/classnlohmann_1_1basic__json_a0703ae5cbd2daac5e6c0ae01d3a1b114.html +++ b/classnlohmann_1_1basic__json_a0703ae5cbd2daac5e6c0ae01d3a1b114.html @@ -259,7 +259,7 @@ template<template< typename U, typename V, typename...Args > class Obje
Exceptions
- +
std::domain_errorwhen called on a type other than JSON object or null
std::domain_errorwhen called on a type other than JSON object or null; example: "cannot use push_back() with number"
@@ -289,7 +289,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:4075
+
void push_back(basic_json &&val)
add an object to an array
Definition: json.hpp:4096
namespace for Niels Lohmann
Definition: json.hpp:78
Output (play with this example online):
{"one":1,"two":2}
 null
@@ -298,7 +298,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 4182 of file json.hpp.

+

Definition at line 4203 of file json.hpp.

@@ -308,7 +308,7 @@ null diff --git a/classnlohmann_1_1basic__json_a07c9c38a1f01675759e05d5d34627343.html b/classnlohmann_1_1basic__json_a07c9c38a1f01675759e05d5d34627343.html index daa383d9e..f099fb399 100644 --- a/classnlohmann_1_1basic__json_a07c9c38a1f01675759e05d5d34627343.html +++ b/classnlohmann_1_1basic__json_a07c9c38a1f01675759e05d5d34627343.html @@ -272,7 +272,7 @@ template<template< typename U, typename V, typename...Args > class Obje
Exceptions
- +
std::domain_errorif called on JSON values other than arrays
std::domain_errorif pos is not an iterator of *this
std::domain_errorif pos is not an iterator of *this; example: "iterator does not fit current value"
@@ -294,15 +294,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:3563
+
iterator begin()
returns an iterator to the first element
Definition: json.hpp:3580
namespace for Niels Lohmann
Definition: json.hpp:78
-
iterator insert(const_iterator pos, const basic_json &val)
inserts element
Definition: json.hpp:4208
+
iterator insert(const_iterator pos, const basic_json &val)
inserts element
Definition: json.hpp:4230
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 4234 of file json.hpp.

+

Definition at line 4256 of file json.hpp.

@@ -312,7 +312,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 f585b8b15..5c92c292d 100644 --- a/classnlohmann_1_1basic__json_a088460b5d95f384a4f2ec9e52f4f66ba.html +++ b/classnlohmann_1_1basic__json_a088460b5d95f384a4f2ec9e52f4f66ba.html @@ -278,7 +278,7 @@ template<template< typename U, typename V, typename...Args > class Obje
24  std::cout << j_string.is_string() << '\n';
25 }
a class to store JSON values
Definition: json.hpp:187
-
bool is_string() const noexcept
return whether value is a string
Definition: json.hpp:2100
+
bool is_string() const noexcept
return whether value is a string
Definition: json.hpp:2103
namespace for Niels Lohmann
Definition: json.hpp:78
Output (play with this example online):
false
 false
@@ -290,7 +290,7 @@ true
 
The example code above can be translated with
g++ -std=c++11 -Isrc doc/examples/is_string.cpp -o is_string 
Since
version 1.0
-

Definition at line 2100 of file json.hpp.

+

Definition at line 2103 of file json.hpp.

@@ -300,7 +300,7 @@ true diff --git a/classnlohmann_1_1basic__json_a0afa4512f03406db0d0432657e9c7361.html b/classnlohmann_1_1basic__json_a0afa4512f03406db0d0432657e9c7361.html index 3ab79bb3c..b694daceb 100644 --- a/classnlohmann_1_1basic__json_a0afa4512f03406db0d0432657e9c7361.html +++ b/classnlohmann_1_1basic__json_a0afa4512f03406db0d0432657e9c7361.html @@ -346,7 +346,7 @@ false diff --git a/classnlohmann_1_1basic__json_a114095c452ca2f4ba976548df3da68be.html b/classnlohmann_1_1basic__json_a114095c452ca2f4ba976548df3da68be.html index 07060e53d..5bcc03754 100644 --- a/classnlohmann_1_1basic__json_a114095c452ca2f4ba976548df3da68be.html +++ b/classnlohmann_1_1basic__json_a114095c452ca2f4ba976548df3da68be.html @@ -279,7 +279,7 @@ template<template< typename U, typename V, typename...Args > class Obje
25 }
a class to store JSON values
Definition: json.hpp:187
namespace for Niels Lohmann
Definition: json.hpp:78
-
bool is_null() const noexcept
return whether value is null
Definition: json.hpp:1954
+
bool is_null() const noexcept
return whether value is null
Definition: json.hpp:1957
Output (play with this example online):
true
 false
 false
@@ -290,7 +290,7 @@ false
 
The example code above can be translated with
g++ -std=c++11 -Isrc doc/examples/is_null.cpp -o is_null 
Since
version 1.0
-

Definition at line 1954 of file json.hpp.

+

Definition at line 1957 of file json.hpp.

@@ -300,7 +300,7 @@ false diff --git a/classnlohmann_1_1basic__json_a11c3dd843c21c58daa651e84046a82af.html b/classnlohmann_1_1basic__json_a11c3dd843c21c58daa651e84046a82af.html index 32f3fd230..f209741f7 100644 --- a/classnlohmann_1_1basic__json_a11c3dd843c21c58daa651e84046a82af.html +++ b/classnlohmann_1_1basic__json_a11c3dd843c21c58daa651e84046a82af.html @@ -277,7 +277,7 @@ template<template< typename U, typename V, typename...Args > class Obje
23  std::cout << j_array.is_array() << '\n';
24  std::cout << j_string.is_array() << '\n';
25 }
-
bool is_array() const noexcept
return whether value is an array
Definition: json.hpp:2081
+
bool is_array() const noexcept
return whether value is an array
Definition: json.hpp:2084
a class to store JSON values
Definition: json.hpp:187
namespace for Niels Lohmann
Definition: json.hpp:78
Output (play with this example online):
false
@@ -290,7 +290,7 @@ false
 
The example code above can be translated with
g++ -std=c++11 -Isrc doc/examples/is_array.cpp -o is_array 
Since
version 1.0
-

Definition at line 2081 of file json.hpp.

+

Definition at line 2084 of file json.hpp.

@@ -300,7 +300,7 @@ false diff --git a/classnlohmann_1_1basic__json_a122640e7e2db1814fc7bbb3c122ec76e.html b/classnlohmann_1_1basic__json_a122640e7e2db1814fc7bbb3c122ec76e.html index 19102d809..49bba0e87 100644 --- a/classnlohmann_1_1basic__json_a122640e7e2db1814fc7bbb3c122ec76e.html +++ b/classnlohmann_1_1basic__json_a122640e7e2db1814fc7bbb3c122ec76e.html @@ -306,7 +306,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 4573 of file json.hpp.

+

Definition at line 4600 of file json.hpp.

@@ -316,7 +316,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 f931ebb78..def50bd67 100644 --- a/classnlohmann_1_1basic__json_a13e5642dbfa1602c937d295a085413cc.html +++ b/classnlohmann_1_1basic__json_a13e5642dbfa1602c937d295a085413cc.html @@ -249,7 +249,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 ea72110e1..a974ae64a 100644 --- a/classnlohmann_1_1basic__json_a1683189bd539313b5559f07961166c8b.html +++ b/classnlohmann_1_1basic__json_a1683189bd539313b5559f07961166c8b.html @@ -249,7 +249,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 29271bd93..300681967 100644 --- a/classnlohmann_1_1basic__json_a16a275d0201e9aedc87c933c764b8869.html +++ b/classnlohmann_1_1basic__json_a16a275d0201e9aedc87c933c764b8869.html @@ -294,7 +294,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:2617
+
reference at(size_type idx)
access specified array element with bounds checking
Definition: json.hpp:2620
namespace for Niels Lohmann
Definition: json.hpp:78
Output (play with this example online):
"il brutto"
 out of range
@@ -304,7 +304,7 @@ out of range
 value() for access by value with a default value
 
Since
version 1.0
-

Definition at line 2754 of file json.hpp.

+

Definition at line 2757 of file json.hpp.

@@ -314,7 +314,7 @@ out of range diff --git a/classnlohmann_1_1basic__json_a1dc0c521042807e216d11110d2f002ff.html b/classnlohmann_1_1basic__json_a1dc0c521042807e216d11110d2f002ff.html index 5890dea1a..70cab2fa9 100644 --- a/classnlohmann_1_1basic__json_a1dc0c521042807e216d11110d2f002ff.html +++ b/classnlohmann_1_1basic__json_a1dc0c521042807e216d11110d2f002ff.html @@ -306,7 +306,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 01103d0a8..7960abe21 100644 --- a/classnlohmann_1_1basic__json_a231b02148577b69a154b2ce2c87a5522.html +++ b/classnlohmann_1_1basic__json_a231b02148577b69a154b2ce2c87a5522.html @@ -285,7 +285,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 f62c5dae1..f95b5468f 100644 --- a/classnlohmann_1_1basic__json_a234f03dce002783748ca401a42bc6472.html +++ b/classnlohmann_1_1basic__json_a234f03dce002783748ca401a42bc6472.html @@ -282,9 +282,9 @@ 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:3082
+
ValueType value(const typename object_t::key_type &key, ValueType default_value) const
access specified object element with default value
Definition: json.hpp:3092
namespace for Niels Lohmann
Definition: json.hpp:78
-
PointerType get_ptr() noexcept
get a pointer value (implicit)
Definition: json.hpp:2524
+
PointerType get_ptr() noexcept
get a pointer value (implicit)
Definition: json.hpp:2527
NumberIntegerType number_integer_t
a type for a number (integer)
Definition: json.hpp:527
NumberFloatType number_float_t
a type for a number (floating-point)
Definition: json.hpp:592
Output (play with this example online):
17 17 17 17
@@ -292,7 +292,7 @@ true
 
The example code above can be translated with
g++ -std=c++11 -Isrc doc/examples/get_ptr.cpp -o get_ptr 
Since
version 1.0
-

Definition at line 2539 of file json.hpp.

+

Definition at line 2542 of file json.hpp.

@@ -302,7 +302,7 @@ true diff --git a/classnlohmann_1_1basic__json_a266c4dd24d11a86e4831523af5d9df4d.html b/classnlohmann_1_1basic__json_a266c4dd24d11a86e4831523af5d9df4d.html index 95521ebc7..55227de4e 100644 --- a/classnlohmann_1_1basic__json_a266c4dd24d11a86e4831523af5d9df4d.html +++ b/classnlohmann_1_1basic__json_a266c4dd24d11a86e4831523af5d9df4d.html @@ -265,7 +265,7 @@ This function is required for compatibility reasons with Clang.
Returns
reference to the element at key key
Exceptions
- +
std::domain_errorif JSON is not an object or null
std::domain_errorif JSON is not an object or null; example: "cannot use operator[] with null"
@@ -327,7 +327,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 2969 of file json.hpp.

+

Definition at line 2977 of file json.hpp.

@@ -337,7 +337,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 54e830b9d..d2e6735d5 100644 --- a/classnlohmann_1_1basic__json_a26b7e4876af25eae5800ce43f93aaef2.html +++ b/classnlohmann_1_1basic__json_a26b7e4876af25eae5800ce43f93aaef2.html @@ -287,7 +287,8 @@ Unlike
Returns
copy of the element at key key or default_value if key is not found
Exceptions
- +
std::domain_errorif JSON is not an object
std::domain_errorif JSON is not an object; example: "cannot use +value() with null"
@@ -322,7 +323,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:3082
+
ValueType value(const typename object_t::key_type &key, ValueType default_value) const
access specified object element with default value
Definition: json.hpp:3092
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 
@@ -331,7 +332,7 @@ Unlike operator[](const typename object_t::key_type&) for unchecked access by reference
Since
version 1.0
-

Definition at line 3082 of file json.hpp.

+

Definition at line 3092 of file json.hpp.

@@ -341,7 +342,7 @@ Unlike diff --git a/classnlohmann_1_1basic__json_a2adfc8d24bea3908398cbf325b5dc1d7.html b/classnlohmann_1_1basic__json_a2adfc8d24bea3908398cbf325b5dc1d7.html index 3b186c8e1..66c537498 100644 --- a/classnlohmann_1_1basic__json_a2adfc8d24bea3908398cbf325b5dc1d7.html +++ b/classnlohmann_1_1basic__json_a2adfc8d24bea3908398cbf325b5dc1d7.html @@ -277,13 +277,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:3742
+
const_reverse_iterator crbegin() const
returns a const reverse iterator to the last element
Definition: json.hpp:3759
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 3688 of file json.hpp.

+

Definition at line 3705 of file json.hpp.

@@ -293,7 +293,7 @@ Illustration from cppreference.com diff --git a/classnlohmann_1_1basic__json_a2f07bcf7e75c34396476dd1790f26ce8.html b/classnlohmann_1_1basic__json_a2f07bcf7e75c34396476dd1790f26ce8.html index 71aa32d98..805736090 100644 --- a/classnlohmann_1_1basic__json_a2f07bcf7e75c34396476dd1790f26ce8.html +++ b/classnlohmann_1_1basic__json_a2f07bcf7e75c34396476dd1790f26ce8.html @@ -259,7 +259,7 @@ template<template< typename U, typename V, typename...Args > class Obje
Exceptions
- +
std::domain_errorwhen called on a type other than JSON object or null
std::domain_errorwhen called on a type other than JSON object or null; example: "cannot use push_back() with number"
@@ -289,7 +289,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:4075
+
void push_back(basic_json &&val)
add an object to an array
Definition: json.hpp:4096
namespace for Niels Lohmann
Definition: json.hpp:78
Output (play with this example online):
{"one":1,"two":2}
 null
@@ -298,7 +298,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 4159 of file json.hpp.

+

Definition at line 4180 of file json.hpp.

@@ -308,7 +308,7 @@ null diff --git a/classnlohmann_1_1basic__json_a3173944e7b1809a333def4078a0b92a3.html b/classnlohmann_1_1basic__json_a3173944e7b1809a333def4078a0b92a3.html index 492c8ba78..089b7f3cf 100644 --- a/classnlohmann_1_1basic__json_a3173944e7b1809a333def4078a0b92a3.html +++ b/classnlohmann_1_1basic__json_a3173944e7b1809a333def4078a0b92a3.html @@ -259,7 +259,7 @@ template<template< typename U, typename V, typename...Args > class Obje
Exceptions
- +
std::domain_errorwhen called on a type other than JSON array or null
std::domain_errorwhen called on a type other than JSON array or null; example: "cannot use push_back() with number"
@@ -289,7 +289,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:4075
+
void push_back(basic_json &&val)
add an object to an array
Definition: json.hpp:4096
namespace for Niels Lohmann
Definition: json.hpp:78
Output (play with this example online):
[1,2,3,4,5]
 null
@@ -298,7 +298,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 4100 of file json.hpp.

+

Definition at line 4121 of file json.hpp.

@@ -308,7 +308,7 @@ null diff --git a/classnlohmann_1_1basic__json_a317b01b0fba3ac458561f1634759ea3b.html b/classnlohmann_1_1basic__json_a317b01b0fba3ac458561f1634759ea3b.html index fb606e887..e102f8916 100644 --- a/classnlohmann_1_1basic__json_a317b01b0fba3ac458561f1634759ea3b.html +++ b/classnlohmann_1_1basic__json_a317b01b0fba3ac458561f1634759ea3b.html @@ -250,9 +250,10 @@ template<template< typename U, typename V, typename...Args > class Obje
-

This functuion 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.

+

This functuion 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.

+
Note
The name of this function is not yet final and may change in the future.
-

Definition at line 3783 of file json.hpp.

+

Definition at line 3803 of file json.hpp.

@@ -262,7 +263,7 @@ template<template< typename U, typename V, typename...Args > class Obje diff --git a/classnlohmann_1_1basic__json_a3287df6546c905fb0a5786deb4b1cf32.html b/classnlohmann_1_1basic__json_a3287df6546c905fb0a5786deb4b1cf32.html index 49cff6268..ba5a4c36f 100644 --- a/classnlohmann_1_1basic__json_a3287df6546c905fb0a5786deb4b1cf32.html +++ b/classnlohmann_1_1basic__json_a3287df6546c905fb0a5786deb4b1cf32.html @@ -306,7 +306,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:3835
+
bool empty() const noexcept
checks whether the container is empty
Definition: json.hpp:3855
Output (play with this example online):
true
 false
 false
@@ -319,7 +319,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 3835 of file json.hpp.

+

Definition at line 3855 of file json.hpp.

@@ -329,7 +329,7 @@ false diff --git a/classnlohmann_1_1basic__json_a33f1632cfdbf460b4913f4e8a43dd9e4.html b/classnlohmann_1_1basic__json_a33f1632cfdbf460b4913f4e8a43dd9e4.html index aa20c3bad..47c8ad5b9 100644 --- a/classnlohmann_1_1basic__json_a33f1632cfdbf460b4913f4e8a43dd9e4.html +++ b/classnlohmann_1_1basic__json_a33f1632cfdbf460b4913f4e8a43dd9e4.html @@ -282,7 +282,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/basic_json__moveconstructor.cpp -o basic_json__moveconstructor 
Since
version 1.0
-

Definition at line 1738 of file json.hpp.

+

Definition at line 1741 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_a34d6a60dd99e9f33b8273a1c8db5669b.html b/classnlohmann_1_1basic__json_a34d6a60dd99e9f33b8273a1c8db5669b.html index 4d7b86529..b2795b430 100644 --- a/classnlohmann_1_1basic__json_a34d6a60dd99e9f33b8273a1c8db5669b.html +++ b/classnlohmann_1_1basic__json_a34d6a60dd99e9f33b8273a1c8db5669b.html @@ -310,7 +310,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 4882 of file json.hpp.

+

Definition at line 4909 of file json.hpp.

@@ -320,7 +320,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 52934fb51..704006b7c 100644 --- a/classnlohmann_1_1basic__json_a3d4e4bab95b24ccab42ed37e0ede2d98.html +++ b/classnlohmann_1_1basic__json_a3d4e4bab95b24ccab42ed37e0ede2d98.html @@ -297,7 +297,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 63de5c8cf..28703a832 100644 --- a/classnlohmann_1_1basic__json_a42f9133f978dde4cce5851b2c2434a0c.html +++ b/classnlohmann_1_1basic__json_a42f9133f978dde4cce5851b2c2434a0c.html @@ -279,7 +279,7 @@ template<template< typename U, typename V, typename...Args > class Obje
25 }
a class to store JSON values
Definition: json.hpp:187
object (unordered set of name/value pairs)
-
value_t type() const noexcept
return the type of the JSON value (explicit)
Definition: json.hpp:1894
+
value_t type() const noexcept
return the type of the JSON value (explicit)
Definition: json.hpp:1897
namespace for Niels Lohmann
Definition: json.hpp:78
string value
array (ordered collection of values)
@@ -297,7 +297,7 @@ true The example code above can be translated with
g++ -std=c++11 -Isrc doc/examples/type.cpp -o type 
Since
version 1.0
-

Definition at line 1894 of file json.hpp.

+

Definition at line 1897 of file json.hpp.

@@ -307,7 +307,7 @@ true diff --git a/classnlohmann_1_1basic__json_a4361aa791f3980abb239e4155a3450cb.html b/classnlohmann_1_1basic__json_a4361aa791f3980abb239e4155a3450cb.html index 9482e7fb8..4323f722b 100644 --- a/classnlohmann_1_1basic__json_a4361aa791f3980abb239e4155a3450cb.html +++ b/classnlohmann_1_1basic__json_a4361aa791f3980abb239e4155a3450cb.html @@ -277,14 +277,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:3597
+
const_iterator cbegin() const
returns a const iterator to the first element
Definition: json.hpp:3614
namespace for Niels Lohmann
Definition: json.hpp:78
-
a const random access iterator for the basic_json class
Definition: json.hpp:5449
+
a const random access iterator for the basic_json class
Definition: json.hpp:5570
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 3573 of file json.hpp.

+

Definition at line 3590 of file json.hpp.

@@ -294,7 +294,7 @@ Illustration from cppreference.com diff --git a/classnlohmann_1_1basic__json_a457fec897d7b6283c60ca236ebb1f5e8.html b/classnlohmann_1_1basic__json_a457fec897d7b6283c60ca236ebb1f5e8.html index 7ec2eb5fa..fd586791b 100644 --- a/classnlohmann_1_1basic__json_a457fec897d7b6283c60ca236ebb1f5e8.html +++ b/classnlohmann_1_1basic__json_a457fec897d7b6283c60ca236ebb1f5e8.html @@ -297,7 +297,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 478954a71..aca0589fb 100644 --- a/classnlohmann_1_1basic__json_a48c8d153bc2fd1af655063a4b984feac.html +++ b/classnlohmann_1_1basic__json_a48c8d153bc2fd1af655063a4b984feac.html @@ -299,7 +299,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 1c5f7c60c..0939c01e5 100644 --- a/classnlohmann_1_1basic__json_a4943b7f16ddc4e0df33c0cae7ef14471.html +++ b/classnlohmann_1_1basic__json_a4943b7f16ddc4e0df33c0cae7ef14471.html @@ -280,13 +280,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:3765
+
const_reverse_iterator crend() const
returns a const reverse iterator to one before the first
Definition: json.hpp:3782
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 3765 of file json.hpp.

+

Definition at line 3782 of file json.hpp.

@@ -296,7 +296,7 @@ Illustration from cppreference.com diff --git a/classnlohmann_1_1basic__json_a4ad3f27ecece8f644e8dca69a97eb67f.html b/classnlohmann_1_1basic__json_a4ad3f27ecece8f644e8dca69a97eb67f.html index 8b406e3a6..6776aff4f 100644 --- a/classnlohmann_1_1basic__json_a4ad3f27ecece8f644e8dca69a97eb67f.html +++ b/classnlohmann_1_1basic__json_a4ad3f27ecece8f644e8dca69a97eb67f.html @@ -280,13 +280,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:3765
+
const_reverse_iterator crend() const
returns a const reverse iterator to one before the first
Definition: json.hpp:3782
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 3719 of file json.hpp.

+

Definition at line 3736 of file json.hpp.

@@ -296,7 +296,7 @@ Illustration from cppreference.com diff --git a/classnlohmann_1_1basic__json_a4bf695ddf4a00ea8feea2c725ec847f1.html b/classnlohmann_1_1basic__json_a4bf695ddf4a00ea8feea2c725ec847f1.html index 62d596e70..e90c08dca 100644 --- a/classnlohmann_1_1basic__json_a4bf695ddf4a00ea8feea2c725ec847f1.html +++ b/classnlohmann_1_1basic__json_a4bf695ddf4a00ea8feea2c725ec847f1.html @@ -286,13 +286,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:4400
+
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:4427
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 4462 of file json.hpp.

+

Definition at line 4489 of file json.hpp.

@@ -302,7 +302,7 @@ object = {"one":"eins","two":"zwei"} diff --git a/classnlohmann_1_1basic__json_a4d688b5ff534d3ab4e284b3191061529.html b/classnlohmann_1_1basic__json_a4d688b5ff534d3ab4e284b3191061529.html index 10e06c277..0058db12c 100644 --- a/classnlohmann_1_1basic__json_a4d688b5ff534d3ab4e284b3191061529.html +++ b/classnlohmann_1_1basic__json_a4d688b5ff534d3ab4e284b3191061529.html @@ -277,13 +277,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:3742
+
const_reverse_iterator crbegin() const
returns a const reverse iterator to the last element
Definition: json.hpp:3759
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 3742 of file json.hpp.

+

Definition at line 3759 of file json.hpp.

@@ -293,7 +293,7 @@ Illustration from cppreference.com diff --git a/classnlohmann_1_1basic__json_a5114ed5eb394a2805da0bd1acba95ae2.html b/classnlohmann_1_1basic__json_a5114ed5eb394a2805da0bd1acba95ae2.html index de048ae85..06c6d3f00 100644 --- a/classnlohmann_1_1basic__json_a5114ed5eb394a2805da0bd1acba95ae2.html +++ b/classnlohmann_1_1basic__json_a5114ed5eb394a2805da0bd1acba95ae2.html @@ -259,7 +259,7 @@ template<template< typename U, typename V, typename...Args > class Obje
Exceptions
- +
std::domain_errorwhen called on a type other than JSON array or null
std::domain_errorwhen called on a type other than JSON array or null; example: "cannot use push_back() with number"
@@ -289,7 +289,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:4075
+
void push_back(basic_json &&val)
add an object to an array
Definition: json.hpp:4096
namespace for Niels Lohmann
Definition: json.hpp:78
Output (play with this example online):
[1,2,3,4,5]
 null
@@ -298,7 +298,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 4110 of file json.hpp.

+

Definition at line 4131 of file json.hpp.

@@ -308,7 +308,7 @@ null diff --git a/classnlohmann_1_1basic__json_a53a2abfdd4f72c7df5aba1155bf03e48.html b/classnlohmann_1_1basic__json_a53a2abfdd4f72c7df5aba1155bf03e48.html index 00cebc5f0..8da8dab27 100644 --- a/classnlohmann_1_1basic__json_a53a2abfdd4f72c7df5aba1155bf03e48.html +++ b/classnlohmann_1_1basic__json_a53a2abfdd4f72c7df5aba1155bf03e48.html @@ -279,7 +279,7 @@ template<template< typename U, typename V, typename...Args > class Obje
24  std::cout << j_string.is_discarded() << '\n';
25 }
a class to store JSON values
Definition: json.hpp:187
-
bool is_discarded() const noexcept
return whether value is discarded
Definition: json.hpp:2124
+
bool is_discarded() const noexcept
return whether value is discarded
Definition: json.hpp:2127
namespace for Niels Lohmann
Definition: json.hpp:78
Output (play with this example online):
false
 false
@@ -291,7 +291,7 @@ false
 
The example code above can be translated with
g++ -std=c++11 -Isrc doc/examples/is_discarded.cpp -o is_discarded 
Since
version 1.0
-

Definition at line 2124 of file json.hpp.

+

Definition at line 2127 of file json.hpp.

@@ -301,7 +301,7 @@ false diff --git a/classnlohmann_1_1basic__json_a57703688bee6b9736ab3a430d8d246f2.html b/classnlohmann_1_1basic__json_a57703688bee6b9736ab3a430d8d246f2.html index 30b8929f2..77d6fda70 100644 --- a/classnlohmann_1_1basic__json_a57703688bee6b9736ab3a430d8d246f2.html +++ b/classnlohmann_1_1basic__json_a57703688bee6b9736ab3a430d8d246f2.html @@ -261,7 +261,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 or null
std::domain_errorif JSON is not an array or null; example: "cannot +use operator[] with null"
@@ -298,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/operatorarray__size_type.cpp -o operatorarray__size_type 
Since
version 1.0
-

Definition at line 2799 of file json.hpp.

+

Definition at line 2803 of file json.hpp.

@@ -308,7 +309,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 6cae0f377..fffe7c2e3 100644 --- a/classnlohmann_1_1basic__json_a57a96ab3ff1ce7b48a754129fb12c982.html +++ b/classnlohmann_1_1basic__json_a57a96ab3ff1ce7b48a754129fb12c982.html @@ -286,13 +286,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:4400
+
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:4427
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 4494 of file json.hpp.

+

Definition at line 4521 of file json.hpp.

@@ -302,7 +302,7 @@ string = the bad diff --git a/classnlohmann_1_1basic__json_a5a2d4dbcdbc8ea065b87daf52cd786b9.html b/classnlohmann_1_1basic__json_a5a2d4dbcdbc8ea065b87daf52cd786b9.html index 7a614ee14..53c567335 100644 --- a/classnlohmann_1_1basic__json_a5a2d4dbcdbc8ea065b87daf52cd786b9.html +++ b/classnlohmann_1_1basic__json_a5a2d4dbcdbc8ea065b87daf52cd786b9.html @@ -283,7 +283,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 18aacb8bc..6b4397579 100644 --- a/classnlohmann_1_1basic__json_a5c8bb5200f5eac10d31e26be46e5b1ac.html +++ b/classnlohmann_1_1basic__json_a5c8bb5200f5eac10d31e26be46e5b1ac.html @@ -302,7 +302,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 4783 of file json.hpp.

+

Definition at line 4810 of file json.hpp.

@@ -312,7 +312,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 6800fb6d0..c520c5e8f 100644 --- a/classnlohmann_1_1basic__json_a5d428360d75a52f6af74751d1cc912c6.html +++ b/classnlohmann_1_1basic__json_a5d428360d75a52f6af74751d1cc912c6.html @@ -306,7 +306,7 @@ true The example code above can be translated with
g++ -std=c++11 -Isrc doc/examples/operator__value_t.cpp -o operator__value_t 
Since
version 1.0
-

Definition at line 2144 of file json.hpp.

+

Definition at line 2147 of file json.hpp.

@@ -316,7 +316,7 @@ true diff --git a/classnlohmann_1_1basic__json_a5e34c5435e557d0bf666bd7311211405.html b/classnlohmann_1_1basic__json_a5e34c5435e557d0bf666bd7311211405.html index ecbaa39a5..64c567446 100644 --- a/classnlohmann_1_1basic__json_a5e34c5435e557d0bf666bd7311211405.html +++ b/classnlohmann_1_1basic__json_a5e34c5435e557d0bf666bd7311211405.html @@ -310,7 +310,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 4864 of file json.hpp.

+

Definition at line 4891 of file json.hpp.

@@ -320,7 +320,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 3c4a1ff07..08ca1af70 100644 --- a/classnlohmann_1_1basic__json_a5f0aad50ed7e8aec3128fe018c18b3fe.html +++ b/classnlohmann_1_1basic__json_a5f0aad50ed7e8aec3128fe018c18b3fe.html @@ -261,7 +261,7 @@ template<typename ValueType , typename std::enable_if<
Returns
copy of the JSON value, converted to type ValueType
Exceptions
- +
std::domain_errorin case passed type ValueType is incompatible to JSON
std::domain_errorin case passed type ValueType is incompatible to JSON; example: "type must be object, but is null"
@@ -317,7 +317,7 @@ template<typename ValueType , typename std::enable_if<
49 }
a class to store JSON values
Definition: json.hpp:187
namespace for Niels Lohmann
Definition: json.hpp:78
-
ValueType get() const
get a value (explicit)
Definition: json.hpp:2440
+
ValueType get() const
get a value (explicit)
Definition: json.hpp:2443
Output (play with this example online):
1
 42 42
 17.23 17
@@ -335,7 +335,7 @@ array: [1,2,3,4,5]
 get() for pointer-member access
 
Since
version 1.0
-

Definition at line 2440 of file json.hpp.

+

Definition at line 2443 of file json.hpp.

@@ -345,7 +345,7 @@ array: [1,2,3,4,5] diff --git a/classnlohmann_1_1basic__json_a5fd8b54389698edf0c08e2dd001f610b.html b/classnlohmann_1_1basic__json_a5fd8b54389698edf0c08e2dd001f610b.html index 66dd4eed8..3e401b11f 100644 --- a/classnlohmann_1_1basic__json_a5fd8b54389698edf0c08e2dd001f610b.html +++ b/classnlohmann_1_1basic__json_a5fd8b54389698edf0c08e2dd001f610b.html @@ -249,7 +249,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 7564f9b27..5e610df1f 100644 --- a/classnlohmann_1_1basic__json_a60ca396028b8d9714c6e10efbf475af6.html +++ b/classnlohmann_1_1basic__json_a60ca396028b8d9714c6e10efbf475af6.html @@ -318,7 +318,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 4986 of file json.hpp.

+

Definition at line 5013 of file json.hpp.

@@ -328,7 +328,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 84c96bb6e..680cccaaf 100644 --- a/classnlohmann_1_1basic__json_a63691315292df8e1522b00d37ebb1ffc.html +++ b/classnlohmann_1_1basic__json_a63691315292df8e1522b00d37ebb1ffc.html @@ -286,7 +286,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 96459b191..5e0dd88e8 100644 --- a/classnlohmann_1_1basic__json_a652414dd930cb3af3b6f454cc535a23e.html +++ b/classnlohmann_1_1basic__json_a652414dd930cb3af3b6f454cc535a23e.html @@ -300,7 +300,7 @@ template<template< typename U, typename V, typename...Args > class Obje
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:2617
+
reference at(size_type idx)
access specified array element with bounds checking
Definition: json.hpp:2620
namespace for Niels Lohmann
Definition: json.hpp:78
Output (play with this example online):
"il brutto"
 {"the bad":"il cattivo","the good":"il buono","the ugly":"il brutto"}
@@ -311,7 +311,7 @@ out of range: key 'the fast' not found
 value() for access by value with a default value
 
Since
version 1.0
-

Definition at line 2707 of file json.hpp.

+

Definition at line 2710 of file json.hpp.

@@ -321,7 +321,7 @@ out of range: key 'the fast' not found diff --git a/classnlohmann_1_1basic__json_a656939a3dc9a6047e4afacd9e11b83a6.html b/classnlohmann_1_1basic__json_a656939a3dc9a6047e4afacd9e11b83a6.html index 24e91545d..fec11a2aa 100644 --- a/classnlohmann_1_1basic__json_a656939a3dc9a6047e4afacd9e11b83a6.html +++ b/classnlohmann_1_1basic__json_a656939a3dc9a6047e4afacd9e11b83a6.html @@ -282,9 +282,9 @@ 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:3082
+
ValueType value(const typename object_t::key_type &key, ValueType default_value) const
access specified object element with default value
Definition: json.hpp:3092
namespace for Niels Lohmann
Definition: json.hpp:78
-
PointerType get_ptr() noexcept
get a pointer value (implicit)
Definition: json.hpp:2524
+
PointerType get_ptr() noexcept
get a pointer value (implicit)
Definition: json.hpp:2527
NumberIntegerType number_integer_t
a type for a number (integer)
Definition: json.hpp:527
NumberFloatType number_float_t
a type for a number (floating-point)
Definition: json.hpp:592
Output (play with this example online):
17 17 17 17
@@ -292,7 +292,7 @@ true
 
The example code above can be translated with
g++ -std=c++11 -Isrc doc/examples/get_ptr.cpp -o get_ptr 
Since
version 1.0
-

Definition at line 2524 of file json.hpp.

+

Definition at line 2527 of file json.hpp.

@@ -302,7 +302,7 @@ true diff --git a/classnlohmann_1_1basic__json_a66f936cfbd252f85bd3dc2598e37a64b.html b/classnlohmann_1_1basic__json_a66f936cfbd252f85bd3dc2598e37a64b.html index e18a57503..2f51b5343 100644 --- a/classnlohmann_1_1basic__json_a66f936cfbd252f85bd3dc2598e37a64b.html +++ b/classnlohmann_1_1basic__json_a66f936cfbd252f85bd3dc2598e37a64b.html @@ -259,7 +259,7 @@ template<template< typename U, typename V, typename...Args > class Obje
Exceptions
- +
std::domain_errorwhen called on a type other than JSON array or null
std::domain_errorwhen called on a type other than JSON array or null; example: "cannot use push_back() with number"
@@ -289,7 +289,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:4075
+
void push_back(basic_json &&val)
add an object to an array
Definition: json.hpp:4096
namespace for Niels Lohmann
Definition: json.hpp:78
Output (play with this example online):
[1,2,3,4,5]
 null
@@ -298,7 +298,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 4075 of file json.hpp.

+

Definition at line 4096 of file json.hpp.

@@ -308,7 +308,7 @@ null diff --git a/classnlohmann_1_1basic__json_a6944904b3b59769b1cf62ac2532cbe33.html b/classnlohmann_1_1basic__json_a6944904b3b59769b1cf62ac2532cbe33.html index ddd5d5456..1aae661ed 100644 --- a/classnlohmann_1_1basic__json_a6944904b3b59769b1cf62ac2532cbe33.html +++ b/classnlohmann_1_1basic__json_a6944904b3b59769b1cf62ac2532cbe33.html @@ -275,7 +275,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 5faef940b..1abd8b476 100644 --- a/classnlohmann_1_1basic__json_a696ced74d8edc0b63a000a72907ab109.html +++ b/classnlohmann_1_1basic__json_a696ced74d8edc0b63a000a72907ab109.html @@ -279,7 +279,7 @@ template<template< typename U, typename V, typename...Args > class Obje
25 }
a class to store JSON values
Definition: json.hpp:187
namespace for Niels Lohmann
Definition: json.hpp:78
-
bool is_number() const noexcept
return whether value is a number
Definition: json.hpp:1997
+
bool is_number() const noexcept
return whether value is a number
Definition: json.hpp:2000
Output (play with this example online):
false
 false
 true
@@ -293,7 +293,7 @@ false
 is_number_float() – check if value is a floating-point number
 
Since
version 1.0
-

Definition at line 1997 of file json.hpp.

+

Definition at line 2000 of file json.hpp.

@@ -303,7 +303,7 @@ false diff --git a/classnlohmann_1_1basic__json_a6a7f45095675ac6fd1d018a0e41874be.html b/classnlohmann_1_1basic__json_a6a7f45095675ac6fd1d018a0e41874be.html index e925b9728..faea018b9 100644 --- a/classnlohmann_1_1basic__json_a6a7f45095675ac6fd1d018a0e41874be.html +++ b/classnlohmann_1_1basic__json_a6a7f45095675ac6fd1d018a0e41874be.html @@ -282,10 +282,11 @@ template<class InputIT , typename std::enable_if<
Exceptions
- - + + - +
std::domain_errorif iterators are not compatible; that is, do not belong to the same JSON value
std::out_of_rangeif iterators are for a primitive type (number, boolean, or string) where an out of range error can be detected easily
std::domain_errorif iterators are not compatible; that is, do not belong to the same JSON value; example: "iterators are not compatible"
std::out_of_rangeif iterators are for a primitive type (number, boolean, or string) where an out of range error can be detected easily; example: "iterators out of range"
std::bad_allocif allocation for object, array, or string fails
std::domain_errorif called with a null value
std::domain_errorif called with a null value; example: "cannot use +construct with iterators from null"
@@ -312,9 +313,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: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
+
iterator end()
returns an iterator to one past the last element
Definition: json.hpp:3639
+
iterator begin()
returns an iterator to the first element
Definition: json.hpp:3580
+
iterator find(typename object_t::key_type key)
find an element in a JSON object
Definition: json.hpp:3500
namespace for Niels Lohmann
Definition: json.hpp:78
Output (play with this example online):
["bravo","charly"]
 42
@@ -322,7 +323,7 @@ template<class InputIT , typename std::enable_if<
 
The example code above can be translated with
g++ -std=c++11 -Isrc doc/examples/basic_json__InputIt_InputIt.cpp -o basic_json__InputIt_InputIt 
Since
version 1.0
-

Definition at line 1574 of file json.hpp.

+

Definition at line 1577 of file json.hpp.

@@ -332,7 +333,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 437446a64..479adab22 100644 --- a/classnlohmann_1_1basic__json_a6b7428e8c1169497f47b81667001cbfb.html +++ b/classnlohmann_1_1basic__json_a6b7428e8c1169497f47b81667001cbfb.html @@ -279,7 +279,7 @@ template<template< typename U, typename V, typename...Args > class Obje
Exceptions
- +
std::domain_errorif called on JSON values other than arrays
std::domain_errorif pos is not an iterator of *this
std::domain_errorif pos is not an iterator of *this; example: "iterator does not fit current value"
@@ -301,15 +301,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:3563
+
iterator begin()
returns an iterator to the first element
Definition: json.hpp:3580
namespace for Niels Lohmann
Definition: json.hpp:78
-
iterator insert(const_iterator pos, const basic_json &val)
inserts element
Definition: json.hpp:4208
+
iterator insert(const_iterator pos, const basic_json &val)
inserts element
Definition: json.hpp:4230
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 4261 of file json.hpp.

+

Definition at line 4284 of file json.hpp.

@@ -319,7 +319,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 58067e0c9..4eeb9c32c 100644 --- a/classnlohmann_1_1basic__json_a6bbd3e72a870f1ba81ff6886b063b0fe.html +++ b/classnlohmann_1_1basic__json_a6bbd3e72a870f1ba81ff6886b063b0fe.html @@ -249,7 +249,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 1bf582866..33b48c7fb 100644 --- a/classnlohmann_1_1basic__json_a6dff6a02a2be250b8f8dc2f47be65544.html +++ b/classnlohmann_1_1basic__json_a6dff6a02a2be250b8f8dc2f47be65544.html @@ -259,8 +259,9 @@ template<template< typename U, typename V, typename...Args > class Obje
Exceptions
- - + +
std::domain_errorwhen called on a type other than JSON array
std::out_of_rangewhen idx >= size()
std::domain_errorwhen called on a type other than JSON array; example: "cannot use erase() with null"
std::out_of_rangewhen idx >= size(); example: "index out of +range"
@@ -282,7 +283,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:3232
+
InteratorType erase(InteratorType pos)
remove element given an iterator
Definition: json.hpp:3244
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
@@ -292,7 +293,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 3448 of file json.hpp.

+

Definition at line 3465 of file json.hpp.

@@ -302,7 +303,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 daace6ef5..6a838cbd5 100644 --- a/classnlohmann_1_1basic__json_a6e2e21da48f5d9471716cd868a068327.html +++ b/classnlohmann_1_1basic__json_a6e2e21da48f5d9471716cd868a068327.html @@ -302,7 +302,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 4661 of file json.hpp.

+

Definition at line 4688 of file json.hpp.

@@ -312,7 +312,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 14956292e..ccf293870 100644 --- a/classnlohmann_1_1basic__json_a71eba33d906745e66f340952b79fbce3.html +++ b/classnlohmann_1_1basic__json_a71eba33d906745e66f340952b79fbce3.html @@ -249,7 +249,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 d75c774d8..5ca5a2bb7 100644 --- a/classnlohmann_1_1basic__json_a72442ccbb378b4464a24a2da1e784041.html +++ b/classnlohmann_1_1basic__json_a72442ccbb378b4464a24a2da1e784041.html @@ -285,7 +285,8 @@ Unlike
Returns
copy of the element at key key or default_value if key is not found
Exceptions
- +
std::domain_errorif JSON is not an object
std::domain_errorif JSON is not an object; example: "cannot use +value() with null"
@@ -320,7 +321,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:3082
+
ValueType value(const typename object_t::key_type &key, ValueType default_value) const
access specified object element with default value
Definition: json.hpp:3092
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 +330,7 @@ Unlike operator[](const typename object_t::key_type&) for unchecked access by reference
Since
version 1.0
-

Definition at line 3108 of file json.hpp.

+

Definition at line 3118 of file json.hpp.

@@ -339,7 +340,7 @@ Unlike diff --git a/classnlohmann_1_1basic__json_a72ba20783ecb3eec98bd6a3b870d565c.html b/classnlohmann_1_1basic__json_a72ba20783ecb3eec98bd6a3b870d565c.html index 72ec1bed5..354e0250f 100644 --- a/classnlohmann_1_1basic__json_a72ba20783ecb3eec98bd6a3b870d565c.html +++ b/classnlohmann_1_1basic__json_a72ba20783ecb3eec98bd6a3b870d565c.html @@ -280,14 +280,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:3656
+
const_iterator cend() const
returns a const iterator to one past the last element
Definition: json.hpp:3673
namespace for Niels Lohmann
Definition: json.hpp:78
-
a const random access iterator for the basic_json class
Definition: json.hpp:5449
+
a const random access iterator for the basic_json class
Definition: json.hpp:5570
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 3656 of file json.hpp.

+

Definition at line 3673 of file json.hpp.

@@ -297,7 +297,7 @@ Illustration from cppreference.com diff --git a/classnlohmann_1_1basic__json_a74472977b798c7b7989e6e7cb960ecff.html b/classnlohmann_1_1basic__json_a74472977b798c7b7989e6e7cb960ecff.html index d2c619f0e..a7dc8586f 100644 --- a/classnlohmann_1_1basic__json_a74472977b798c7b7989e6e7cb960ecff.html +++ b/classnlohmann_1_1basic__json_a74472977b798c7b7989e6e7cb960ecff.html @@ -303,7 +303,7 @@ null diff --git a/classnlohmann_1_1basic__json_a74a943800c7f103d0990d7eef82c6453.html b/classnlohmann_1_1basic__json_a74a943800c7f103d0990d7eef82c6453.html index 3c6ebd910..3cd7c2c20 100644 --- a/classnlohmann_1_1basic__json_a74a943800c7f103d0990d7eef82c6453.html +++ b/classnlohmann_1_1basic__json_a74a943800c7f103d0990d7eef82c6453.html @@ -302,7 +302,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 4827 of file json.hpp.

+

Definition at line 4854 of file json.hpp.

@@ -312,7 +312,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 2b050b423..701683964 100644 --- a/classnlohmann_1_1basic__json_a74ccfa471a0c061876b247f820f3c741.html +++ b/classnlohmann_1_1basic__json_a74ccfa471a0c061876b247f820f3c741.html @@ -325,13 +325,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:7770
+
basic_json<> json
default JSON class
Definition: json.hpp:7799
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:4009
+
void clear() noexcept
clears the contents
Definition: json.hpp:4029
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:4921
+
static basic_json parse(const string_t &s, parser_callback_t cb=nullptr)
deserialize from string
Definition: json.hpp:4948
parse_event_t
JSON callback events.
Definition: json.hpp:754
Output (play with this example online):
{
     "Image": {
@@ -371,7 +371,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 4950 of file json.hpp.

+

Definition at line 4977 of file json.hpp.

@@ -381,7 +381,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 58386ccd7..66f487662 100644 --- a/classnlohmann_1_1basic__json_a75a1754e0d39f33095d3102a8bdb9881.html +++ b/classnlohmann_1_1basic__json_a75a1754e0d39f33095d3102a8bdb9881.html @@ -269,9 +269,11 @@ template<class InteratorType , typename std::enable_if<
Exceptions
- - - + + +
std::domain_errorif called on a null value
std::domain_errorif called on an iterator which does not belong to the current JSON value
std::out_of_rangeif called on a primitive type with invalid iterator (i.e., any iterator which is not end())
std::domain_errorif called on a null value; example: "cannot use +erase() with null"
std::domain_errorif called on an iterator which does not belong to the current JSON value; example: "iterator does not fit current value"
std::out_of_rangeif called on a primitive type with invalid iterator (i.e., any iterator which is not end()); example: "iterator out +of range"
@@ -313,10 +315,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:3563
-
iterator find(typename object_t::key_type key)
find an element in a JSON object
Definition: json.hpp:3483
+
iterator begin()
returns an iterator to the first element
Definition: json.hpp:3580
+
iterator find(typename object_t::key_type key)
find an element in a JSON object
Definition: json.hpp:3500
namespace for Niels Lohmann
Definition: json.hpp:78
-
InteratorType erase(InteratorType pos)
remove element given an iterator
Definition: json.hpp:3232
+
InteratorType erase(InteratorType pos)
remove element given an iterator
Definition: json.hpp:3244
Output (play with this example online):
null
 null
 null
@@ -331,7 +333,7 @@ null
 erase(const size_type) – removes the element from an array at the given index
 
Since
version 1.0
-

Definition at line 3232 of file json.hpp.

+

Definition at line 3244 of file json.hpp.

@@ -341,7 +343,7 @@ null diff --git a/classnlohmann_1_1basic__json_a76cfc5062bf6223396ab82c753cd4634.html b/classnlohmann_1_1basic__json_a76cfc5062bf6223396ab82c753cd4634.html index 04b324675..817947fd3 100644 --- a/classnlohmann_1_1basic__json_a76cfc5062bf6223396ab82c753cd4634.html +++ b/classnlohmann_1_1basic__json_a76cfc5062bf6223396ab82c753cd4634.html @@ -282,9 +282,9 @@ 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:3082
+
ValueType value(const typename object_t::key_type &key, ValueType default_value) const
access specified object element with default value
Definition: json.hpp:3092
namespace for Niels Lohmann
Definition: json.hpp:78
-
ValueType get() const
get a value (explicit)
Definition: json.hpp:2440
+
ValueType get() const
get a value (explicit)
Definition: json.hpp:2443
NumberIntegerType number_integer_t
a type for a number (integer)
Definition: json.hpp:527
NumberFloatType number_float_t
a type for a number (floating-point)
Definition: json.hpp:592
Output (play with this example online):
17 17 17 17
@@ -293,7 +293,7 @@ true
 
See also
get_ptr() for explicit pointer-member access
Since
version 1.0
-

Definition at line 2489 of file json.hpp.

+

Definition at line 2492 of file json.hpp.

@@ -303,7 +303,7 @@ true diff --git a/classnlohmann_1_1basic__json_a7c08f966200af98db0313a3b517ce0a9.html b/classnlohmann_1_1basic__json_a7c08f966200af98db0313a3b517ce0a9.html index 3097ac8bc..7858c7964 100644 --- a/classnlohmann_1_1basic__json_a7c08f966200af98db0313a3b517ce0a9.html +++ b/classnlohmann_1_1basic__json_a7c08f966200af98db0313a3b517ce0a9.html @@ -279,14 +279,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:3711
+
reverse_iterator rend()
returns an iterator to the reverse-end
Definition: json.hpp:3728
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 3711 of file json.hpp.

+

Definition at line 3728 of file json.hpp.

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

+

Definition at line 3516 of file json.hpp.

@@ -298,7 +298,7 @@ value at key "two": 2 diff --git a/classnlohmann_1_1basic__json_a7d0db3b728d820d4984df78d97d2b104.html b/classnlohmann_1_1basic__json_a7d0db3b728d820d4984df78d97d2b104.html index 500ccf089..427976238 100644 --- a/classnlohmann_1_1basic__json_a7d0db3b728d820d4984df78d97d2b104.html +++ b/classnlohmann_1_1basic__json_a7d0db3b728d820d4984df78d97d2b104.html @@ -249,7 +249,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 475ef3d01..8771b60da 100644 --- a/classnlohmann_1_1basic__json_a7d1b990f2c12fecb57db1504fdadd0bb.html +++ b/classnlohmann_1_1basic__json_a7d1b990f2c12fecb57db1504fdadd0bb.html @@ -260,7 +260,7 @@ template<template< typename U, typename V, typename...Args > class Obje
Returns
Number of elements removed. If ObjectType is the default std::map type, the return value will always be 0 (key was not found) or 1 (key was found).
Exceptions
- +
std::domain_errorwhen called on a type other than JSON object
std::domain_errorwhen called on a type other than JSON object; example: "cannot use erase() with null"
@@ -284,7 +284,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:3232
+
InteratorType erase(InteratorType pos)
remove element given an iterator
Definition: json.hpp:3244
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 
@@ -295,7 +295,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 3413 of file json.hpp.

+

Definition at line 3428 of file json.hpp.

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

+

Definition at line 3500 of file json.hpp.

@@ -298,7 +298,7 @@ value at key "two": 2 diff --git a/classnlohmann_1_1basic__json_a7f97a91ad8f1d5cf0b9213bd24f247c4.html b/classnlohmann_1_1basic__json_a7f97a91ad8f1d5cf0b9213bd24f247c4.html index a1c3bf3f7..193769804 100644 --- a/classnlohmann_1_1basic__json_a7f97a91ad8f1d5cf0b9213bd24f247c4.html +++ b/classnlohmann_1_1basic__json_a7f97a91ad8f1d5cf0b9213bd24f247c4.html @@ -300,7 +300,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 4693 of file json.hpp.

+

Definition at line 4720 of file json.hpp.

@@ -310,7 +310,7 @@ null != nullptr false diff --git a/classnlohmann_1_1basic__json_a80ceaa3bdd346292273b309e08525c1c.html b/classnlohmann_1_1basic__json_a80ceaa3bdd346292273b309e08525c1c.html index 64da93fb5..07739887e 100644 --- a/classnlohmann_1_1basic__json_a80ceaa3bdd346292273b309e08525c1c.html +++ b/classnlohmann_1_1basic__json_a80ceaa3bdd346292273b309e08525c1c.html @@ -249,7 +249,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 b4e130d68..ca61db278 100644 --- a/classnlohmann_1_1basic__json_a83cbbfbf5d3ecbad6de8ece0be6b36c4.html +++ b/classnlohmann_1_1basic__json_a83cbbfbf5d3ecbad6de8ece0be6b36c4.html @@ -287,7 +287,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:3133
+
reference front()
access the first element
Definition: json.hpp:3143
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
@@ -301,7 +301,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 3133 of file json.hpp.

+

Definition at line 3143 of file json.hpp.

@@ -311,7 +311,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 8194d30f1..31f813f94 100644 --- a/classnlohmann_1_1basic__json_a87db51b6b936fb2ea293cdbc8702dcb8.html +++ b/classnlohmann_1_1basic__json_a87db51b6b936fb2ea293cdbc8702dcb8.html @@ -302,7 +302,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 4805 of file json.hpp.

+

Definition at line 4832 of file json.hpp.

@@ -312,7 +312,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 d916b2939..175ef282a 100644 --- a/classnlohmann_1_1basic__json_a8b526709d395142b68d21abfbfff17c3.html +++ b/classnlohmann_1_1basic__json_a8b526709d395142b68d21abfbfff17c3.html @@ -287,7 +287,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:3133
+
reference front()
access the first element
Definition: json.hpp:3143
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
@@ -301,7 +301,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 3141 of file json.hpp.

+

Definition at line 3151 of file json.hpp.

@@ -311,7 +311,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 8f0ef688a..9ec6afb87 100644 --- a/classnlohmann_1_1basic__json_a8c40cd9ead4de7c82f28268bdf0ec98a.html +++ b/classnlohmann_1_1basic__json_a8c40cd9ead4de7c82f28268bdf0ec98a.html @@ -303,7 +303,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:4009
+
void clear() noexcept
clears the contents
Definition: json.hpp:4029
Output (play with this example online):
null
 false
 0
@@ -314,7 +314,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 4009 of file json.hpp.

+

Definition at line 4029 of file json.hpp.

@@ -324,7 +324,7 @@ false diff --git a/classnlohmann_1_1basic__json_a8e34088252a3ee6b2377f3a1f26dd1ba.html b/classnlohmann_1_1basic__json_a8e34088252a3ee6b2377f3a1f26dd1ba.html index d79605e16..7c47e8ece 100644 --- a/classnlohmann_1_1basic__json_a8e34088252a3ee6b2377f3a1f26dd1ba.html +++ b/classnlohmann_1_1basic__json_a8e34088252a3ee6b2377f3a1f26dd1ba.html @@ -261,7 +261,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::domain_errorif JSON is not an object; example: "cannot use +operator[] with null"
@@ -290,7 +291,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 2927 of file json.hpp.

+

Definition at line 2934 of file json.hpp.

@@ -300,7 +301,7 @@ template<template< typename U, typename V, typename...Args > class Obje diff --git a/classnlohmann_1_1basic__json_a8e4e11999b4e7faa8f31f21164ebd65a.html b/classnlohmann_1_1basic__json_a8e4e11999b4e7faa8f31f21164ebd65a.html index 74bc85557..50251ec87 100644 --- a/classnlohmann_1_1basic__json_a8e4e11999b4e7faa8f31f21164ebd65a.html +++ b/classnlohmann_1_1basic__json_a8e4e11999b4e7faa8f31f21164ebd65a.html @@ -250,9 +250,10 @@ template<template< typename U, typename V, typename...Args > class Obje
-

This functuion 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.

+

This functuion 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.

+
Note
The name of this function is not yet final and may change in the future.
-

Definition at line 3791 of file json.hpp.

+

Definition at line 3811 of file json.hpp.

@@ -262,7 +263,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 8ada152fb..be233b565 100644 --- a/classnlohmann_1_1basic__json_a8fa74698f4061e18ec664009f3af1ddf.html +++ b/classnlohmann_1_1basic__json_a8fa74698f4061e18ec664009f3af1ddf.html @@ -278,9 +278,10 @@ template<template< typename U, typename V, typename...Args > class Obje
Exceptions
- - - + + +
std::domain_errorif called on JSON values other than arrays
std::domain_errorif pos is not an iterator of *this
std::domain_errorif first and last do not belong to the same JSON value
std::domain_errorif first or last are iterators into container for which insert is called
std::domain_errorif pos is not an iterator of *this; example: "iterator does not fit current value"
std::domain_errorif first and last do not belong to the same JSON value; example: "iterators do not fit"
std::domain_errorif first or last are iterators into container for which insert is called; example: "passed iterators may not +belong to container"
@@ -306,16 +307,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:3622
-
iterator begin()
returns an iterator to the first element
Definition: json.hpp:3563
+
iterator end()
returns an iterator to one past the last element
Definition: json.hpp:3639
+
iterator begin()
returns an iterator to the first element
Definition: json.hpp:3580
namespace for Niels Lohmann
Definition: json.hpp:78
-
iterator insert(const_iterator pos, const basic_json &val)
inserts element
Definition: json.hpp:4208
+
iterator insert(const_iterator pos, const basic_json &val)
inserts element
Definition: json.hpp:4230
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 4309 of file json.hpp.

+

Definition at line 4335 of file json.hpp.

@@ -325,7 +326,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 948eac007..84f8065ab 100644 --- a/classnlohmann_1_1basic__json_a930e14150ffa067bcf56d35cb00271e1.html +++ b/classnlohmann_1_1basic__json_a930e14150ffa067bcf56d35cb00271e1.html @@ -281,7 +281,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 b08a65416..f6d313463 100644 --- a/classnlohmann_1_1basic__json_a960962c683909619d1d2fbbe856c022e.html +++ b/classnlohmann_1_1basic__json_a960962c683909619d1d2fbbe856c022e.html @@ -259,7 +259,7 @@ template<template< typename U, typename V, typename...Args > class Obje
Exceptions
- +
std::domain_errorwhen called on a type other than JSON array or null
std::domain_errorwhen called on a type other than JSON array or null; example: "cannot use push_back() with number"
@@ -289,7 +289,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:4075
+
void push_back(basic_json &&val)
add an object to an array
Definition: json.hpp:4096
namespace for Niels Lohmann
Definition: json.hpp:78
Output (play with this example online):
[1,2,3,4,5]
 null
@@ -298,7 +298,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 4133 of file json.hpp.

+

Definition at line 4154 of file json.hpp.

@@ -308,7 +308,7 @@ null diff --git a/classnlohmann_1_1basic__json_a9730b9f7bc2150e641fe20198d4477c7.html b/classnlohmann_1_1basic__json_a9730b9f7bc2150e641fe20198d4477c7.html index dc0b6ea74..f029ab669 100644 --- a/classnlohmann_1_1basic__json_a9730b9f7bc2150e641fe20198d4477c7.html +++ b/classnlohmann_1_1basic__json_a9730b9f7bc2150e641fe20198d4477c7.html @@ -300,7 +300,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 4631 of file json.hpp.

+

Definition at line 4658 of file json.hpp.

@@ -310,7 +310,7 @@ null == nullptr true diff --git a/classnlohmann_1_1basic__json_a98e05a2c9b8f74bd60442772cddeee52.html b/classnlohmann_1_1basic__json_a98e05a2c9b8f74bd60442772cddeee52.html index 499d954a3..a5fe329d2 100644 --- a/classnlohmann_1_1basic__json_a98e05a2c9b8f74bd60442772cddeee52.html +++ b/classnlohmann_1_1basic__json_a98e05a2c9b8f74bd60442772cddeee52.html @@ -300,7 +300,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 4640 of file json.hpp.

+

Definition at line 4667 of file json.hpp.

@@ -310,7 +310,7 @@ null == nullptr true diff --git a/classnlohmann_1_1basic__json_a9993148cb0473365e52998c7315f9ada.html b/classnlohmann_1_1basic__json_a9993148cb0473365e52998c7315f9ada.html index 8b5bb8304..a48331468 100644 --- a/classnlohmann_1_1basic__json_a9993148cb0473365e52998c7315f9ada.html +++ b/classnlohmann_1_1basic__json_a9993148cb0473365e52998c7315f9ada.html @@ -278,7 +278,7 @@ template<template< typename U, typename V, typename...Args > class Obje
24  std::cout << j_string.is_number_integer() << '\n';
25 }
a class to store JSON values
Definition: json.hpp:187
-
bool is_number_integer() const noexcept
return whether value is an integer number
Definition: json.hpp:2020
+
bool is_number_integer() const noexcept
return whether value is an integer number
Definition: json.hpp:2023
namespace for Niels Lohmann
Definition: json.hpp:78
Output (play with this example online):
false
 false
@@ -293,7 +293,7 @@ false
 is_number_float() – check if value is a floating-point number
 
Since
version 1.0
-

Definition at line 2020 of file json.hpp.

+

Definition at line 2023 of file json.hpp.

@@ -303,7 +303,7 @@ false diff --git a/classnlohmann_1_1basic__json_a9a73d1b71c9e913aa2888d8b40c72ee9.html b/classnlohmann_1_1basic__json_a9a73d1b71c9e913aa2888d8b40c72ee9.html index e60450797..2da1edaf9 100644 --- a/classnlohmann_1_1basic__json_a9a73d1b71c9e913aa2888d8b40c72ee9.html +++ b/classnlohmann_1_1basic__json_a9a73d1b71c9e913aa2888d8b40c72ee9.html @@ -286,7 +286,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:7770
+
basic_json<> json
default JSON class
Definition: json.hpp:7799
a class to store JSON values
Definition: json.hpp:187
namespace for Niels Lohmann
Definition: json.hpp:78
Output (play with this example online):
[]
@@ -295,7 +295,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/basic_json__size_type_basic_json.cpp -o basic_json__size_type_basic_json 
Since
version 1.0
-

Definition at line 1530 of file json.hpp.

+

Definition at line 1531 of file json.hpp.

@@ -305,7 +305,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 bba533b37..1ee408997 100644 --- a/classnlohmann_1_1basic__json_a9c26c5d0f4a519c7236149b9aeb3ef9e.html +++ b/classnlohmann_1_1basic__json_a9c26c5d0f4a519c7236149b9aeb3ef9e.html @@ -279,7 +279,7 @@ template<template< typename U, typename V, typename...Args > class Obje
25 }
a class to store JSON values
Definition: json.hpp:187
namespace for Niels Lohmann
Definition: json.hpp:78
-
bool is_number_float() const noexcept
return whether value is a floating-point number
Definition: json.hpp:2043
+
bool is_number_float() const noexcept
return whether value is a floating-point number
Definition: json.hpp:2046
Output (play with this example online):
false
 false
 false
@@ -293,7 +293,7 @@ false
 is_number_integer() – check if value is an integer number
 
Since
version 1.0
-

Definition at line 2043 of file json.hpp.

+

Definition at line 2046 of file json.hpp.

@@ -303,7 +303,7 @@ false diff --git a/classnlohmann_1_1basic__json_a9daafb4c15ed5a008cb825bbd8c29d87.html b/classnlohmann_1_1basic__json_a9daafb4c15ed5a008cb825bbd8c29d87.html index 3a8bfaadd..02a805b9f 100644 --- a/classnlohmann_1_1basic__json_a9daafb4c15ed5a008cb825bbd8c29d87.html +++ b/classnlohmann_1_1basic__json_a9daafb4c15ed5a008cb825bbd8c29d87.html @@ -264,7 +264,8 @@ template<typename T , std::size_t n>
Returns
const reference to the element at key key
Exceptions
- +
std::domain_errorif JSON is not an object
std::domain_errorif JSON is not an object; example: "cannot use +operator[] with null"
@@ -293,7 +294,7 @@ template<typename T , std::size_t n> value() for access by value with a default value
Since
version 1.0
-

Definition at line 3018 of file json.hpp.

+

Definition at line 3027 of file json.hpp.

@@ -303,7 +304,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 09564d8c5..e5abcfb05 100644 --- a/classnlohmann_1_1basic__json_a9f17a0690155e3a5603246ccec81499e.html +++ b/classnlohmann_1_1basic__json_a9f17a0690155e3a5603246ccec81499e.html @@ -279,7 +279,7 @@ template<template< typename U, typename V, typename...Args > class Obje
25 }
a class to store JSON values
Definition: json.hpp:187
namespace for Niels Lohmann
Definition: json.hpp:78
-
bool is_primitive() const noexcept
return whether type is primitive
Definition: json.hpp:1915
+
bool is_primitive() const noexcept
return whether type is primitive
Definition: json.hpp:1918
Output (play with this example online):
true
 true
 true
@@ -290,7 +290,7 @@ true
 
The example code above can be translated with
g++ -std=c++11 -Isrc doc/examples/is_primitive.cpp -o is_primitive 
Since
version 1.0
-

Definition at line 1915 of file json.hpp.

+

Definition at line 1918 of file json.hpp.

@@ -300,7 +300,7 @@ true diff --git a/classnlohmann_1_1basic__json_aa0422e861b4cbd7cdcaad7a11a1304a9.html b/classnlohmann_1_1basic__json_aa0422e861b4cbd7cdcaad7a11a1304a9.html index 9f1b2f2a9..973aa99e9 100644 --- a/classnlohmann_1_1basic__json_aa0422e861b4cbd7cdcaad7a11a1304a9.html +++ b/classnlohmann_1_1basic__json_aa0422e861b4cbd7cdcaad7a11a1304a9.html @@ -325,13 +325,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:7770
+
basic_json<> json
default JSON class
Definition: json.hpp:7799
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:4009
+
void clear() noexcept
clears the contents
Definition: json.hpp:4029
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:4921
+
static basic_json parse(const string_t &s, parser_callback_t cb=nullptr)
deserialize from string
Definition: json.hpp:4948
parse_event_t
JSON callback events.
Definition: json.hpp:754
Output (play with this example online):
{
     "Image": {
@@ -371,7 +371,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 4958 of file json.hpp.

+

Definition at line 4985 of file json.hpp.

@@ -381,7 +381,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 bd865824f..700c50d14 100644 --- a/classnlohmann_1_1basic__json_aa1f3b3f1dca79392d6727b81f9668c6c.html +++ b/classnlohmann_1_1basic__json_aa1f3b3f1dca79392d6727b81f9668c6c.html @@ -291,7 +291,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:3167
+
reference back()
access the last element
Definition: json.hpp:3177
Output (play with this example online):
true
 17
 23.42
@@ -301,7 +301,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 3167 of file json.hpp.

+

Definition at line 3177 of file json.hpp.

@@ -311,7 +311,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 d47c08260..aa5276b8d 100644 --- a/classnlohmann_1_1basic__json_aa5413178b8041f7ac685dec4b040dd2c.html +++ b/classnlohmann_1_1basic__json_aa5413178b8041f7ac685dec4b040dd2c.html @@ -280,14 +280,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:3656
+
const_iterator cend() const
returns a const iterator to one past the last element
Definition: json.hpp:3673
namespace for Niels Lohmann
Definition: json.hpp:78
-
a const random access iterator for the basic_json class
Definition: json.hpp:5449
+
a const random access iterator for the basic_json class
Definition: json.hpp:5570
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 3632 of file json.hpp.

+

Definition at line 3649 of file json.hpp.

@@ -297,7 +297,7 @@ Illustration from cppreference.com diff --git a/classnlohmann_1_1basic__json_aa6a24b176f9599a21d662cc5f8e1ca76.html b/classnlohmann_1_1basic__json_aa6a24b176f9599a21d662cc5f8e1ca76.html index 2038f902d..2fc9f5905 100644 --- a/classnlohmann_1_1basic__json_aa6a24b176f9599a21d662cc5f8e1ca76.html +++ b/classnlohmann_1_1basic__json_aa6a24b176f9599a21d662cc5f8e1ca76.html @@ -258,7 +258,7 @@ template<template< typename U, typename V, typename...Args > class Obje
Since
version 1.0
-

Definition at line 1794 of file json.hpp.

+

Definition at line 1797 of file json.hpp.

@@ -268,7 +268,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 41537ce2d..44e3198eb 100644 --- a/classnlohmann_1_1basic__json_aa6c32f669a2e523666072003d0ea46f4.html +++ b/classnlohmann_1_1basic__json_aa6c32f669a2e523666072003d0ea46f4.html @@ -333,7 +333,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 efe941657..d5668da66 100644 --- a/classnlohmann_1_1basic__json_aa71e977d31f470689883ac60d16ea4ac.html +++ b/classnlohmann_1_1basic__json_aa71e977d31f470689883ac60d16ea4ac.html @@ -285,15 +285,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:3082
+
ValueType value(const typename object_t::key_type &key, ValueType default_value) const
access specified object element with default value
Definition: json.hpp:3092
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:4400
+
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:4427
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 4430 of file json.hpp.

+

Definition at line 4457 of file json.hpp.

@@ -303,7 +303,7 @@ array = [1,2,3,4] diff --git a/classnlohmann_1_1basic__json_aabe4661644ea549089f0886c2551d2ac.html b/classnlohmann_1_1basic__json_aabe4661644ea549089f0886c2551d2ac.html index 6e84a8206..10aad8a11 100644 --- a/classnlohmann_1_1basic__json_aabe4661644ea549089f0886c2551d2ac.html +++ b/classnlohmann_1_1basic__json_aabe4661644ea549089f0886c2551d2ac.html @@ -283,7 +283,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 7fde947cd..3e8ef9abf 100644 --- a/classnlohmann_1_1basic__json_aac185a137428a7337aa620de07bfbbd7.html +++ b/classnlohmann_1_1basic__json_aac185a137428a7337aa620de07bfbbd7.html @@ -266,7 +266,7 @@ template<template< typename U, typename V, typename...Args > class Obje
Since
version 1.0
-

Definition at line 4527 of file json.hpp.

+

Definition at line 4554 of file json.hpp.

@@ -276,7 +276,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 a270e3e53..caba00416 100644 --- a/classnlohmann_1_1basic__json_aacd442b66140c764c594ac8ad7dfd5b3.html +++ b/classnlohmann_1_1basic__json_aacd442b66140c764c594ac8ad7dfd5b3.html @@ -306,7 +306,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 4722 of file json.hpp.

+

Definition at line 4749 of file json.hpp.

@@ -316,7 +316,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 fc2f43896..94a9f6f72 100644 --- a/classnlohmann_1_1basic__json_aacf6c869f6a9c66ac1bc99e93f310044.html +++ b/classnlohmann_1_1basic__json_aacf6c869f6a9c66ac1bc99e93f310044.html @@ -271,7 +271,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 80fcddf82..1a04ec2d4 100644 --- a/classnlohmann_1_1basic__json_aaf363408931d76472ded14017e59c9e8.html +++ b/classnlohmann_1_1basic__json_aaf363408931d76472ded14017e59c9e8.html @@ -318,7 +318,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 4996 of file json.hpp.

+

Definition at line 5023 of file json.hpp.

@@ -328,7 +328,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 15cdb50fa..71be563b7 100644 --- a/classnlohmann_1_1basic__json_aafa839f2a74dc1b5060314b3423143b8.html +++ b/classnlohmann_1_1basic__json_aafa839f2a74dc1b5060314b3423143b8.html @@ -257,7 +257,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 45f1b940c..46556631f 100644 --- a/classnlohmann_1_1basic__json_ab14e3503305622fb5ab01a7f490916e8.html +++ b/classnlohmann_1_1basic__json_ab14e3503305622fb5ab01a7f490916e8.html @@ -271,7 +271,7 @@ template<template< typename U, typename V, typename...Args > class Obje
Exceptions
- +
std::domain_errorif called on JSON values other than arrays
std::domain_errorif pos is not an iterator of *this
std::domain_errorif pos is not an iterator of *this; example: "iterator does not fit current value"
@@ -294,15 +294,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:3622
+
iterator end()
returns an iterator to one past the last element
Definition: json.hpp:3639
namespace for Niels Lohmann
Definition: json.hpp:78
-
iterator insert(const_iterator pos, const basic_json &val)
inserts element
Definition: json.hpp:4208
+
iterator insert(const_iterator pos, const basic_json &val)
inserts element
Definition: json.hpp:4230
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 4363 of file json.hpp.

+

Definition at line 4390 of file json.hpp.

@@ -312,7 +312,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 15b656215..20c4fe9df 100644 --- a/classnlohmann_1_1basic__json_ab2162bc76e10d8736cab9b2039956054.html +++ b/classnlohmann_1_1basic__json_ab2162bc76e10d8736cab9b2039956054.html @@ -279,14 +279,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:5951
-
iterator end()
returns an iterator to one past the last element
Definition: json.hpp:3622
+
a mutable random access iterator for the basic_json class
Definition: json.hpp:6072
+
iterator end()
returns an iterator to one past the last element
Definition: json.hpp:3639
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 3622 of file json.hpp.

+

Definition at line 3639 of file json.hpp.

@@ -296,7 +296,7 @@ Illustration from cppreference.com diff --git a/classnlohmann_1_1basic__json_ab74b2398f29acc6ffbf48f1b8974a848.html b/classnlohmann_1_1basic__json_ab74b2398f29acc6ffbf48f1b8974a848.html index 7d20a25e5..52565e7c7 100644 --- a/classnlohmann_1_1basic__json_ab74b2398f29acc6ffbf48f1b8974a848.html +++ b/classnlohmann_1_1basic__json_ab74b2398f29acc6ffbf48f1b8974a848.html @@ -316,7 +316,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 bb6b18ef8..4f4ea5191 100644 --- a/classnlohmann_1_1basic__json_ab7d60fb6cb8e8f5740e588f9dc953819.html +++ b/classnlohmann_1_1basic__json_ab7d60fb6cb8e8f5740e588f9dc953819.html @@ -355,7 +355,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 d38b94acd..f763aea6c 100644 --- a/classnlohmann_1_1basic__json_ab9a20bd1d391e9cb968db50c246f728d.html +++ b/classnlohmann_1_1basic__json_ab9a20bd1d391e9cb968db50c246f728d.html @@ -302,7 +302,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:3892
+
size_type size() const noexcept
returns the number of elements
Definition: json.hpp:3912
object (unordered set of name/value pairs)
namespace for Niels Lohmann
Definition: json.hpp:78
array (ordered collection of values)
@@ -318,7 +318,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 3892 of file json.hpp.

+

Definition at line 3912 of file json.hpp.

@@ -328,7 +328,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 f990b49c3..8680e1fdb 100644 --- a/classnlohmann_1_1basic__json_ab9da2afc6f77295f25252725fde142a6.html +++ b/classnlohmann_1_1basic__json_ab9da2afc6f77295f25252725fde142a6.html @@ -291,7 +291,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:3167
+
reference back()
access the last element
Definition: json.hpp:3177
Output (play with this example online):
true
 17
 23.42
@@ -301,7 +301,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 3177 of file json.hpp.

+

Definition at line 3187 of file json.hpp.

@@ -311,7 +311,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 fe345928a..3f93ce642 100644 --- a/classnlohmann_1_1basic__json_abe8f3224ca4041908ddb466cb9caecf1.html +++ b/classnlohmann_1_1basic__json_abe8f3224ca4041908ddb466cb9caecf1.html @@ -299,7 +299,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:3952
+
size_type max_size() const noexcept
returns the maximum possible number of elements
Definition: json.hpp:3972
Output (play with this example online):
0
 1
 1
@@ -310,7 +310,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 3952 of file json.hpp.

+

Definition at line 3972 of file json.hpp.

@@ -320,7 +320,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 42fe74bb7..50dc66cd3 100644 --- a/classnlohmann_1_1basic__json_ac160789f17d206a5404981ca0957e303.html +++ b/classnlohmann_1_1basic__json_ac160789f17d206a5404981ca0957e303.html @@ -293,7 +293,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 5b7c9831f..e259a21b6 100644 --- a/classnlohmann_1_1basic__json_ac4011bd0781e51afe4994d2b09fd27e9.html +++ b/classnlohmann_1_1basic__json_ac4011bd0781e51afe4994d2b09fd27e9.html @@ -249,7 +249,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 c6a3abc7a..3108e4018 100644 --- a/classnlohmann_1_1basic__json_ac8163abe518595f19dbee68db1caaaf7.html +++ b/classnlohmann_1_1basic__json_ac8163abe518595f19dbee68db1caaaf7.html @@ -278,7 +278,7 @@ template<template< typename U, typename V, typename...Args > class Obje
24  std::cout << j_string.is_object() << '\n';
25 }
a class to store JSON values
Definition: json.hpp:187
-
bool is_object() const noexcept
return whether value is an object
Definition: json.hpp:2062
+
bool is_object() const noexcept
return whether value is an object
Definition: json.hpp:2065
namespace for Niels Lohmann
Definition: json.hpp:78
Output (play with this example online):
false
 false
@@ -290,7 +290,7 @@ false
 
The example code above can be translated with
g++ -std=c++11 -Isrc doc/examples/is_object.cpp -o is_object 
Since
version 1.0
-

Definition at line 2062 of file json.hpp.

+

Definition at line 2065 of file json.hpp.

@@ -300,7 +300,7 @@ false diff --git a/classnlohmann_1_1basic__json_ac82abedf356d252e0589850c3d8b35ba.html b/classnlohmann_1_1basic__json_ac82abedf356d252e0589850c3d8b35ba.html index 6289d7545..928bce053 100644 --- a/classnlohmann_1_1basic__json_ac82abedf356d252e0589850c3d8b35ba.html +++ b/classnlohmann_1_1basic__json_ac82abedf356d252e0589850c3d8b35ba.html @@ -275,7 +275,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 d34bfe635..23139a59f 100644 --- a/classnlohmann_1_1basic__json_ac943391891fcde0a71a15ce990e0f7f4.html +++ b/classnlohmann_1_1basic__json_ac943391891fcde0a71a15ce990e0f7f4.html @@ -292,7 +292,7 @@ true
The example code above can be translated with
g++ -std=c++11 -Isrc doc/examples/basic_json__basic_json.cpp -o basic_json__basic_json 
Since
version 1.0
-

Definition at line 1672 of file json.hpp.

+

Definition at line 1675 of file json.hpp.

@@ -302,7 +302,7 @@ true diff --git a/classnlohmann_1_1basic__json_acd08f9179c8c1e9f2cd7575a724ce27e.html b/classnlohmann_1_1basic__json_acd08f9179c8c1e9f2cd7575a724ce27e.html index 737c6a243..9ee572b38 100644 --- a/classnlohmann_1_1basic__json_acd08f9179c8c1e9f2cd7575a724ce27e.html +++ b/classnlohmann_1_1basic__json_acd08f9179c8c1e9f2cd7575a724ce27e.html @@ -301,7 +301,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 de16d51be..068eb7d28 100644 --- a/classnlohmann_1_1basic__json_acdf4445333649ec94198f09a62144884.html +++ b/classnlohmann_1_1basic__json_acdf4445333649ec94198f09a62144884.html @@ -276,14 +276,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:5951
-
iterator begin()
returns an iterator to the first element
Definition: json.hpp:3563
+
a mutable random access iterator for the basic_json class
Definition: json.hpp:6072
+
iterator begin()
returns an iterator to the first element
Definition: json.hpp:3580
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 3563 of file json.hpp.

+

Definition at line 3580 of file json.hpp.

@@ -293,7 +293,7 @@ Illustration from cppreference.com diff --git a/classnlohmann_1_1basic__json_ace8338e57fdb11e1955c2a0c2d782069.html b/classnlohmann_1_1basic__json_ace8338e57fdb11e1955c2a0c2d782069.html index 74c5c98b3..6668de07f 100644 --- a/classnlohmann_1_1basic__json_ace8338e57fdb11e1955c2a0c2d782069.html +++ b/classnlohmann_1_1basic__json_ace8338e57fdb11e1955c2a0c2d782069.html @@ -270,7 +270,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 f0a1b7159..d9fbb870c 100644 --- a/classnlohmann_1_1basic__json_ad1f617d29e8923dd40c89153f792b1bc.html +++ b/classnlohmann_1_1basic__json_ad1f617d29e8923dd40c89153f792b1bc.html @@ -283,7 +283,7 @@ template<template< typename U, typename V, typename...Args > class Obje
15  std::cout << j_empty_init_list << '\n';
16  std::cout << j_list_of_pairs << '\n';
17 }
-
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
+
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:1507
a class to store JSON values
Definition: json.hpp:187
namespace for Niels Lohmann
Definition: json.hpp:78
Output (play with this example online):
{}
@@ -295,7 +295,7 @@ template<template< typename U, typename V, typename...Args > class Obje
 array(std::initializer_list<basic_json>) – create a JSON array value from an initializer list
 
Since
version 1.0
-

Definition at line 1506 of file json.hpp.

+

Definition at line 1507 of file json.hpp.

@@ -305,7 +305,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 f1e482eae..bc1e0f1a1 100644 --- a/classnlohmann_1_1basic__json_ad2c4513cef5d8db760c4b2d871eea42c.html +++ b/classnlohmann_1_1basic__json_ad2c4513cef5d8db760c4b2d871eea42c.html @@ -260,7 +260,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 70ee04161..a7e53a5c9 100644 --- a/classnlohmann_1_1basic__json_ad497cbc4f80c8d79662ee6e19bf145dd.html +++ b/classnlohmann_1_1basic__json_ad497cbc4f80c8d79662ee6e19bf145dd.html @@ -280,9 +280,10 @@ template<class InteratorType , typename std::enable_if<
Exceptions
- - - + + +
std::domain_errorif called on a null value
std::domain_errorif called on iterators which does not belong to the current JSON value
std::out_of_rangeif called on a primitive type with invalid iterators (i.e., if first != begin() and last != end())
std::domain_errorif called on a null value; example: "cannot use +erase() with null"
std::domain_errorif called on iterators which does not belong to the current JSON value; example: "iterators do not fit current value"
std::out_of_rangeif called on a primitive type with invalid iterators (i.e., if first != begin() and last != end()); example: "iterators out of range"
@@ -324,11 +325,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: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
+
iterator end()
returns an iterator to one past the last element
Definition: json.hpp:3639
+
iterator begin()
returns an iterator to the first element
Definition: json.hpp:3580
+
iterator find(typename object_t::key_type key)
find an element in a JSON object
Definition: json.hpp:3500
namespace for Niels Lohmann
Definition: json.hpp:78
-
InteratorType erase(InteratorType pos)
remove element given an iterator
Definition: json.hpp:3232
+
InteratorType erase(InteratorType pos)
remove element given an iterator
Definition: json.hpp:3244
Output (play with this example online):
null
 null
 null
@@ -343,7 +344,7 @@ null
 erase(const size_type) – removes the element from an array at the given index
 
Since
version 1.0
-

Definition at line 3333 of file json.hpp.

+

Definition at line 3347 of file json.hpp.

@@ -353,7 +354,7 @@ null diff --git a/classnlohmann_1_1basic__json_ad6734c2b91b1b77aa2b43b65c3619c05.html b/classnlohmann_1_1basic__json_ad6734c2b91b1b77aa2b43b65c3619c05.html index 16ba823ba..c8876018e 100644 --- a/classnlohmann_1_1basic__json_ad6734c2b91b1b77aa2b43b65c3619c05.html +++ b/classnlohmann_1_1basic__json_ad6734c2b91b1b77aa2b43b65c3619c05.html @@ -310,7 +310,7 @@ null diff --git a/classnlohmann_1_1basic__json_ad8e0c5d04f016d1b3ac7369e5c73bedf.html b/classnlohmann_1_1basic__json_ad8e0c5d04f016d1b3ac7369e5c73bedf.html index 95ae9ff35..0a0d950ae 100644 --- a/classnlohmann_1_1basic__json_ad8e0c5d04f016d1b3ac7369e5c73bedf.html +++ b/classnlohmann_1_1basic__json_ad8e0c5d04f016d1b3ac7369e5c73bedf.html @@ -277,14 +277,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:3597
+
const_iterator cbegin() const
returns a const iterator to the first element
Definition: json.hpp:3614
namespace for Niels Lohmann
Definition: json.hpp:78
-
a const random access iterator for the basic_json class
Definition: json.hpp:5449
+
a const random access iterator for the basic_json class
Definition: json.hpp:5570
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 3597 of file json.hpp.

+

Definition at line 3614 of file json.hpp.

@@ -294,7 +294,7 @@ Illustration from cppreference.com diff --git a/classnlohmann_1_1basic__json_ada8e01109a60088e4db2a670d4903b54.html b/classnlohmann_1_1basic__json_ada8e01109a60088e4db2a670d4903b54.html index 39c2c4e11..8116ca82e 100644 --- a/classnlohmann_1_1basic__json_ada8e01109a60088e4db2a670d4903b54.html +++ b/classnlohmann_1_1basic__json_ada8e01109a60088e4db2a670d4903b54.html @@ -295,7 +295,7 @@ template<template< typename U, typename V, typename...Args > class Obje
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:2617
+
reference at(size_type idx)
access specified array element with bounds checking
Definition: json.hpp:2620
namespace for Niels Lohmann
Definition: json.hpp:78
Output (play with this example online):
"third"
 ["first","second","third","fourth"]
@@ -303,7 +303,7 @@ 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 2617 of file json.hpp.

+

Definition at line 2620 of file json.hpp.

@@ -313,7 +313,7 @@ out of range: array index 5 is out of range diff --git a/classnlohmann_1_1basic__json_adbd4c16c9ac641b2a4736bc2c6787d83.html b/classnlohmann_1_1basic__json_adbd4c16c9ac641b2a4736bc2c6787d83.html index 7eedebd0a..149bd2b08 100644 --- a/classnlohmann_1_1basic__json_adbd4c16c9ac641b2a4736bc2c6787d83.html +++ b/classnlohmann_1_1basic__json_adbd4c16c9ac641b2a4736bc2c6787d83.html @@ -249,7 +249,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 07b9a102e..03c960230 100644 --- a/classnlohmann_1_1basic__json_ade7bd6e0fe221fec9d3fa9b430f5ce76.html +++ b/classnlohmann_1_1basic__json_ade7bd6e0fe221fec9d3fa9b430f5ce76.html @@ -281,7 +281,7 @@ template<template< typename U, typename V, typename...Args > class Obje
20 }
a class to store JSON values
Definition: json.hpp:187
namespace for Niels Lohmann
Definition: json.hpp:78
-
string_t dump(const int indent=-1) const
serialization
Definition: json.hpp:1863
+
string_t dump(const int indent=-1) const
serialization
Definition: json.hpp:1866
Output (play with this example online):
{"one":1,"two":2}
 
 {"one":1,"two":2}
@@ -320,7 +320,7 @@ template<template< typename U, typename V, typename...Args > class Obje
 
See also
https://docs.python.org/2/library/json.html#json.dump
Since
version 1.0
-

Definition at line 1863 of file json.hpp.

+

Definition at line 1866 of file json.hpp.

@@ -330,7 +330,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 9d6b744de..c5101bd5e 100644 --- a/classnlohmann_1_1basic__json_adeaef2ab021997a11a826c378c2365e1.html +++ b/classnlohmann_1_1basic__json_adeaef2ab021997a11a826c378c2365e1.html @@ -289,7 +289,7 @@ false diff --git a/classnlohmann_1_1basic__json_adf5dea6fa9d7075ff89ca0796ab47a7e.html b/classnlohmann_1_1basic__json_adf5dea6fa9d7075ff89ca0796ab47a7e.html index 2f293792e..6558984ee 100644 --- a/classnlohmann_1_1basic__json_adf5dea6fa9d7075ff89ca0796ab47a7e.html +++ b/classnlohmann_1_1basic__json_adf5dea6fa9d7075ff89ca0796ab47a7e.html @@ -286,7 +286,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/basic_json__copyassignment.cpp -o basic_json__copyassignment 
Since
version 1.0
-

Definition at line 1768 of file json.hpp.

+

Definition at line 1771 of file json.hpp.

@@ -296,7 +296,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 28d9cf90c..62cf563e9 100644 --- a/classnlohmann_1_1basic__json_ae347859ec88176ef76a0cbe5b4514fcf.html +++ b/classnlohmann_1_1basic__json_ae347859ec88176ef76a0cbe5b4514fcf.html @@ -300,7 +300,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 4684 of file json.hpp.

+

Definition at line 4711 of file json.hpp.

@@ -310,7 +310,7 @@ null != nullptr false diff --git a/classnlohmann_1_1basic__json_ae50f22a1c646b8627e88f1313cceffd4.html b/classnlohmann_1_1basic__json_ae50f22a1c646b8627e88f1313cceffd4.html index f7ae4f5c4..3942f033e 100644 --- a/classnlohmann_1_1basic__json_ae50f22a1c646b8627e88f1313cceffd4.html +++ b/classnlohmann_1_1basic__json_ae50f22a1c646b8627e88f1313cceffd4.html @@ -282,9 +282,9 @@ 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:3082
+
ValueType value(const typename object_t::key_type &key, ValueType default_value) const
access specified object element with default value
Definition: json.hpp:3092
namespace for Niels Lohmann
Definition: json.hpp:78
-
ValueType get() const
get a value (explicit)
Definition: json.hpp:2440
+
ValueType get() const
get a value (explicit)
Definition: json.hpp:2443
NumberIntegerType number_integer_t
a type for a number (integer)
Definition: json.hpp:527
NumberFloatType number_float_t
a type for a number (floating-point)
Definition: json.hpp:592
Output (play with this example online):
17 17 17 17
@@ -293,7 +293,7 @@ true
 
See also
get_ptr() for explicit pointer-member access
Since
version 1.0
-

Definition at line 2475 of file json.hpp.

+

Definition at line 2478 of file json.hpp.

@@ -303,7 +303,7 @@ true diff --git a/classnlohmann_1_1basic__json_ae874cfc1746b560c53a03bcf5b7bbeed.html b/classnlohmann_1_1basic__json_ae874cfc1746b560c53a03bcf5b7bbeed.html index 6c8a216b9..761523f23 100644 --- a/classnlohmann_1_1basic__json_ae874cfc1746b560c53a03bcf5b7bbeed.html +++ b/classnlohmann_1_1basic__json_ae874cfc1746b560c53a03bcf5b7bbeed.html @@ -278,7 +278,7 @@ template<template< typename U, typename V, typename...Args > class Obje
24  std::cout << j_string.is_structured() << '\n';
25 }
a class to store JSON values
Definition: json.hpp:187
-
bool is_structured() const noexcept
return whether type is structured
Definition: json.hpp:1935
+
bool is_structured() const noexcept
return whether type is structured
Definition: json.hpp:1938
namespace for Niels Lohmann
Definition: json.hpp:78
Output (play with this example online):
false
 false
@@ -290,7 +290,7 @@ false
 
The example code above can be translated with
g++ -std=c++11 -Isrc doc/examples/is_structured.cpp -o is_structured 
Since
version 1.0
-

Definition at line 1935 of file json.hpp.

+

Definition at line 1938 of file json.hpp.

@@ -300,7 +300,7 @@ false diff --git a/classnlohmann_1_1basic__json_ae928414b2805cf6ef56b4e4f8d235416.html b/classnlohmann_1_1basic__json_ae928414b2805cf6ef56b4e4f8d235416.html index 289a102ce..d1bed5796 100644 --- a/classnlohmann_1_1basic__json_ae928414b2805cf6ef56b4e4f8d235416.html +++ b/classnlohmann_1_1basic__json_ae928414b2805cf6ef56b4e4f8d235416.html @@ -249,7 +249,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 ff92688e2..5a3d2343e 100644 --- a/classnlohmann_1_1basic__json_ae960d2d6bc7b94fe39cc5e9f106edfa9.html +++ b/classnlohmann_1_1basic__json_ae960d2d6bc7b94fe39cc5e9f106edfa9.html @@ -260,7 +260,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::domain_errorif JSON is not an array; example: "cannot use +operator[] with null"
@@ -278,13 +279,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:2617
+
reference at(size_type idx)
access specified array element with bounds checking
Definition: json.hpp:2620
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 2842 of file json.hpp.

+

Definition at line 2847 of file json.hpp.

@@ -294,7 +295,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 c91d1a43a..c152d6ba8 100644 --- a/classnlohmann_1_1basic__json_aea1c863b719b4ca5b77188c171bbfafe.html +++ b/classnlohmann_1_1basic__json_aea1c863b719b4ca5b77188c171bbfafe.html @@ -279,7 +279,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 8593fac92..5ef5ca952 100644 --- a/classnlohmann_1_1basic__json_af073eec08d2e68924098aef09e9a10ba.html +++ b/classnlohmann_1_1basic__json_af073eec08d2e68924098aef09e9a10ba.html @@ -277,13 +277,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:4400
+
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:4427
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 4400 of file json.hpp.

+

Definition at line 4427 of file json.hpp.

@@ -293,7 +293,7 @@ j2 = [1,2,3,4,5] diff --git a/classnlohmann_1_1basic__json_af0ebd1757acb971a6504b4acabf88584.html b/classnlohmann_1_1basic__json_af0ebd1757acb971a6504b4acabf88584.html index 668bd1c7b..abec97ad2 100644 --- a/classnlohmann_1_1basic__json_af0ebd1757acb971a6504b4acabf88584.html +++ b/classnlohmann_1_1basic__json_af0ebd1757acb971a6504b4acabf88584.html @@ -277,13 +277,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:3680
+
reverse_iterator rbegin()
returns an iterator to the reverse-beginning
Definition: json.hpp:3697
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 3680 of file json.hpp.

+

Definition at line 3697 of file json.hpp.

@@ -293,7 +293,7 @@ Illustration from cppreference.com diff --git a/classnlohmann_1_1basic__json_af127fb69c580c17821da5f5be57e3585.html b/classnlohmann_1_1basic__json_af127fb69c580c17821da5f5be57e3585.html index cade23b2b..ce198f61d 100644 --- a/classnlohmann_1_1basic__json_af127fb69c580c17821da5f5be57e3585.html +++ b/classnlohmann_1_1basic__json_af127fb69c580c17821da5f5be57e3585.html @@ -295,7 +295,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 c8782a70b..c76486314 100644 --- a/classnlohmann_1_1basic__json_af1e3f9e079136abca2530c8191c56292.html +++ b/classnlohmann_1_1basic__json_af1e3f9e079136abca2530c8191c56292.html @@ -294,7 +294,8 @@ template<template< typename U, typename V, typename...Args > class Obje
Exceptions
- +
std::domain_errorif type_deduction is false, manual_type is value_t::object, but init contains an element which is not a pair whose first element is a string
std::domain_errorif type_deduction is false, manual_type is value_t::object, but init contains an element which is not a pair whose first element is a string; example: "cannot create object from +initializer list"
@@ -319,7 +320,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:7770
+
basic_json<> json
default JSON class
Definition: json.hpp:7799
a class to store JSON values
Definition: json.hpp:187
namespace for Niels Lohmann
Definition: json.hpp:78
Output (play with this example online):
{}
@@ -333,7 +334,7 @@ template<template< typename U, typename V, typename...Args > class Obje
 object(std::initializer_list<basic_json>) – create a JSON object value from an initializer list
 
Since
version 1.0
-

Definition at line 1376 of file json.hpp.

+

Definition at line 1377 of file json.hpp.

@@ -343,7 +344,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 2fcb3bb23..c3a1ec500 100644 --- a/classnlohmann_1_1basic__json_af2730bc8ffa6b28916875c13ee7b83f5.html +++ b/classnlohmann_1_1basic__json_af2730bc8ffa6b28916875c13ee7b83f5.html @@ -317,12 +317,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:7770
+
basic_json<> json
default JSON class
Definition: json.hpp:7799
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:4921
+
static basic_json parse(const string_t &s, parser_callback_t cb=nullptr)
deserialize from string
Definition: json.hpp:4948
parse_event_t
JSON callback events.
Definition: json.hpp:754
Output (play with this example online):
{
     "Image": {
@@ -362,7 +362,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 4921 of file json.hpp.

+

Definition at line 4948 of file json.hpp.

@@ -372,7 +372,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 9d91f63c7..98332bc96 100644 --- a/classnlohmann_1_1basic__json_af661bc209bf22097e2f76607a11b56bf.html +++ b/classnlohmann_1_1basic__json_af661bc209bf22097e2f76607a11b56bf.html @@ -278,7 +278,7 @@ template<template< typename U, typename V, typename...Args > class Obje
24  std::cout << j_string.is_boolean() << '\n';
25 }
a class to store JSON values
Definition: json.hpp:187
-
bool is_boolean() const noexcept
return whether value is a boolean
Definition: json.hpp:1973
+
bool is_boolean() const noexcept
return whether value is a boolean
Definition: json.hpp:1976
namespace for Niels Lohmann
Definition: json.hpp:78
Output (play with this example online):
false
 true
@@ -290,7 +290,7 @@ false
 
The example code above can be translated with
g++ -std=c++11 -Isrc doc/examples/is_boolean.cpp -o is_boolean 
Since
version 1.0
-

Definition at line 1973 of file json.hpp.

+

Definition at line 1976 of file json.hpp.

@@ -300,7 +300,7 @@ false diff --git a/classnlohmann_1_1basic__json_af6b6050ccd906dddf7c9f47fe3ad62a5.html b/classnlohmann_1_1basic__json_af6b6050ccd906dddf7c9f47fe3ad62a5.html index 127b16a5c..d85756aed 100644 --- a/classnlohmann_1_1basic__json_af6b6050ccd906dddf7c9f47fe3ad62a5.html +++ b/classnlohmann_1_1basic__json_af6b6050ccd906dddf7c9f47fe3ad62a5.html @@ -289,14 +289,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:2617
+
reference at(size_type idx)
access specified array element with bounds checking
Definition: json.hpp:2620
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 2660 of file json.hpp.

+

Definition at line 2663 of file json.hpp.

@@ -306,7 +306,7 @@ out of range diff --git a/classnlohmann_1_1basic__json_af709c079de0ac3507143ea2c60699bd0.html b/classnlohmann_1_1basic__json_af709c079de0ac3507143ea2c60699bd0.html index 8adf4c80a..acb14a0e8 100644 --- a/classnlohmann_1_1basic__json_af709c079de0ac3507143ea2c60699bd0.html +++ b/classnlohmann_1_1basic__json_af709c079de0ac3507143ea2c60699bd0.html @@ -331,7 +331,7 @@ array: [1,2,3,4,5]
The example code above can be translated with
g++ -std=c++11 -Isrc doc/examples/operator__ValueType.cpp -o operator__ValueType 
Since
version 1.0
-

Definition at line 2579 of file json.hpp.

+

Definition at line 2582 of file json.hpp.

@@ -341,7 +341,7 @@ array: [1,2,3,4,5] diff --git a/classnlohmann_1_1basic__json_af74581d177dafc38df5a126ccd358999.html b/classnlohmann_1_1basic__json_af74581d177dafc38df5a126ccd358999.html index 7fe9b769a..cdd9253fb 100644 --- a/classnlohmann_1_1basic__json_af74581d177dafc38df5a126ccd358999.html +++ b/classnlohmann_1_1basic__json_af74581d177dafc38df5a126ccd358999.html @@ -261,7 +261,7 @@ 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 or null
std::domain_errorif JSON is not an object or null; example: "cannot use operator[] with null"
@@ -323,7 +323,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 2881 of file json.hpp.

+

Definition at line 2887 of file json.hpp.

@@ -333,7 +333,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 4b23cbfcc..eac544ced 100644 --- a/classnlohmann_1_1basic__json_af7d0adc984d04fc70c3d29fcd63e096a.html +++ b/classnlohmann_1_1basic__json_af7d0adc984d04fc70c3d29fcd63e096a.html @@ -272,7 +272,7 @@ template<template< typename U, typename V, typename...Args > class Obje
Exceptions
- +
std::domain_errorif called on JSON values other than arrays
std::domain_errorif pos is not an iterator of *this
std::domain_errorif pos is not an iterator of *this; example: "iterator does not fit current value"
@@ -294,15 +294,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:3563
+
iterator begin()
returns an iterator to the first element
Definition: json.hpp:3580
namespace for Niels Lohmann
Definition: json.hpp:78
-
iterator insert(const_iterator pos, const basic_json &val)
inserts element
Definition: json.hpp:4208
+
iterator insert(const_iterator pos, const basic_json &val)
inserts element
Definition: json.hpp:4230
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 4208 of file json.hpp.

+

Definition at line 4230 of file json.hpp.

@@ -312,7 +312,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 3030ebe31..a875a07c3 100644 --- a/classnlohmann_1_1basic__json_afc4223b5ad03b1b76e925374a8fff98e.html +++ b/classnlohmann_1_1basic__json_afc4223b5ad03b1b76e925374a8fff98e.html @@ -282,7 +282,7 @@ template<template< typename U, typename V, typename...Args > class Obje
16  std::cout << j_nonempty_init_list << '\n';
17  std::cout << j_list_of_pairs << '\n';
18 }
-
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
+
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:1467
a class to store JSON values
Definition: json.hpp:187
namespace for Niels Lohmann
Definition: json.hpp:78
Output (play with this example online):
[]
@@ -295,7 +295,7 @@ template<template< typename U, typename V, typename...Args > class Obje
 object(std::initializer_list<basic_json>) – create a JSON object value from an initializer list
 
Since
version 1.0
-

Definition at line 1466 of file json.hpp.

+

Definition at line 1467 of file json.hpp.

@@ -305,7 +305,7 @@ template<template< typename U, typename V, typename...Args > class Obje diff --git a/dir_68267d1309a1af8e8297ef4c3efbcdba.html b/dir_68267d1309a1af8e8297ef4c3efbcdba.html index 7f332ae84..9fc0b842f 100644 --- a/dir_68267d1309a1af8e8297ef4c3efbcdba.html +++ b/dir_68267d1309a1af8e8297ef4c3efbcdba.html @@ -92,7 +92,7 @@ Files diff --git a/functions.html b/functions.html index f699f7ef2..51eff1a76 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 82a35f58f..69d4c92c5 100644 --- a/functions_b.html +++ b/functions_b.html @@ -139,7 +139,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/functions_c.html b/functions_c.html index 4a7718075..ba7573a5e 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 208be9c2a..234353a0b 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 303049f03..07e46ca87 100644 --- a/functions_e.html +++ b/functions_e.html @@ -131,7 +131,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/functions_enum.html b/functions_enum.html index 03a5f2b29..8c5f8c423 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 9dea14d1d..d8b54ad6a 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 cd55547b2..d51278fb6 100644 --- a/functions_func.html +++ b/functions_func.html @@ -413,7 +413,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/functions_g.html b/functions_g.html index ecedb3ecb..749e317fa 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 4a43f9c16..01c1f9988 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 8daf2fb9e..afb2d275f 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 592fa382c..0f365e142 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 6389b9d72..8476fc725 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 100b62ca4..162a8488f 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 2c74f12b8..0cbed62fb 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 defa0e19b..505121456 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 c44076659..6a5da7564 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 0bcdae5bc..48ab084f7 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 71d34dd24..cf313f2fd 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 06376ce29..6a834d047 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 7faeb00b4..91fad4629 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 561a321b6..dfd0e51e1 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 27a975f25..cf328b8ad 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 6a0574568..a9d8aedc4 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 c8d59fd82..ca13d8a39 100644 --- a/hierarchy.html +++ b/hierarchy.html @@ -101,7 +101,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/index.html b/index.html index 3e14b4c4a..5e8717c7d 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 82ed55682..3baa5dbfa 100644 --- a/json_8hpp_source.html +++ b/json_8hpp_source.html @@ -459,4461 +459,4462 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
1305  : basic_json(number_float_t(val))
1306  {}
1307 
-
1376  basic_json(std::initializer_list<basic_json> init,
-
1377  bool type_deduction = true,
-
1378  value_t manual_type = value_t::array)
-
1379  {
-
1380  // the initializer list could describe an object
-
1381  bool is_an_object = true;
-
1382 
-
1383  // check if each element is an array with two elements whose first
-
1384  // element is a string
-
1385  for (const auto& element : init)
-
1386  {
-
1387  if (not element.is_array() or element.size() != 2
-
1388  or not element[0].is_string())
-
1389  {
-
1390  // we found an element that makes it impossible to use the
-
1391  // initializer list as object
-
1392  is_an_object = false;
-
1393  break;
-
1394  }
-
1395  }
-
1396 
-
1397  // adjust type if type deduction is not wanted
-
1398  if (not type_deduction)
-
1399  {
-
1400  // if array is wanted, do not create an object though possible
-
1401  if (manual_type == value_t::array)
-
1402  {
-
1403  is_an_object = false;
-
1404  }
-
1405 
-
1406  // if object is wanted but impossible, throw an exception
-
1407  if (manual_type == value_t::object and not is_an_object)
-
1408  {
-
1409  throw std::domain_error("cannot create object from initializer list");
-
1410  }
-
1411  }
-
1412 
-
1413  if (is_an_object)
-
1414  {
-
1415  // the initializer list is a list of pairs -> create object
-
1416  m_type = value_t::object;
-
1417  m_value = value_t::object;
-
1418 
-
1419  for (auto& element : init)
-
1420  {
-
1421  m_value.object->emplace(std::move(*(element[0].m_value.string)), std::move(element[1]));
-
1422  }
-
1423  }
-
1424  else
-
1425  {
-
1426  // the initializer list describes an array -> create array
-
1427  m_type = value_t::array;
-
1428  m_value.array = create<array_t>(std::move(init));
-
1429  }
-
1430  }
-
1431 
-
1466  static basic_json array(std::initializer_list<basic_json> init =
-
1467  std::initializer_list<basic_json>())
-
1468  {
-
1469  return basic_json(init, false, value_t::array);
-
1470  }
-
1471 
-
1506  static basic_json object(std::initializer_list<basic_json> init =
-
1507  std::initializer_list<basic_json>())
-
1508  {
-
1509  return basic_json(init, false, value_t::object);
-
1510  }
-
1511 
-
1530  basic_json(size_type cnt, const basic_json& val)
-
1531  : m_type(value_t::array)
-
1532  {
-
1533  m_value.array = create<array_t>(cnt, val);
-
1534  }
-
1535 
-
1568  template <class InputIT, typename
-
1569  std::enable_if<
-
1570  std::is_same<InputIT, typename basic_json_t::iterator>::value or
-
1571  std::is_same<InputIT, typename basic_json_t::const_iterator>::value
-
1572  , int>::type
-
1573  = 0>
-
1574  basic_json(InputIT first, InputIT last) : m_type(first.m_object->m_type)
-
1575  {
-
1576  // make sure iterator fits the current value
-
1577  if (first.m_object != last.m_object)
-
1578  {
-
1579  throw std::domain_error("iterators are not compatible");
-
1580  }
-
1581 
-
1582  // check if iterator range is complete for primitive values
-
1583  switch (m_type)
-
1584  {
-
1585  case value_t::boolean:
-
1586  case value_t::number_float:
- -
1588  case value_t::string:
-
1589  {
-
1590  if (not first.m_it.primitive_iterator.is_begin() or not last.m_it.primitive_iterator.is_end())
-
1591  {
-
1592  throw std::out_of_range("iterators out of range");
-
1593  }
-
1594  break;
-
1595  }
-
1596 
-
1597  default:
-
1598  {
-
1599  break;
-
1600  }
-
1601  }
-
1602 
-
1603  switch (m_type)
-
1604  {
- -
1606  {
-
1607  m_value.number_integer = first.m_object->m_value.number_integer;
-
1608  break;
-
1609  }
-
1610 
-
1611  case value_t::number_float:
-
1612  {
-
1613  m_value.number_float = first.m_object->m_value.number_float;
-
1614  break;
-
1615  }
-
1616 
-
1617  case value_t::boolean:
-
1618  {
-
1619  m_value.boolean = first.m_object->m_value.boolean;
-
1620  break;
-
1621  }
-
1622 
-
1623  case value_t::string:
-
1624  {
-
1625  m_value = *first.m_object->m_value.string;
-
1626  break;
-
1627  }
-
1628 
-
1629  case value_t::object:
-
1630  {
-
1631  m_value.object = create<object_t>(first.m_it.object_iterator, last.m_it.object_iterator);
-
1632  break;
-
1633  }
-
1634 
-
1635  case value_t::array:
-
1636  {
-
1637  m_value.array = create<array_t>(first.m_it.array_iterator, last.m_it.array_iterator);
-
1638  break;
-
1639  }
-
1640 
-
1641  default:
-
1642  {
-
1643  throw std::domain_error("cannot use construct with iterators from " + first.m_object->type_name());
-
1644  }
-
1645  }
-
1646  }
-
1647 
-
1649  // other constructors and destructor //
-
1651 
-
1672  basic_json(const basic_json& other)
-
1673  : m_type(other.m_type)
-
1674  {
-
1675  switch (m_type)
-
1676  {
-
1677  case value_t::object:
-
1678  {
-
1679  m_value = *other.m_value.object;
-
1680  break;
-
1681  }
-
1682 
-
1683  case value_t::array:
-
1684  {
-
1685  m_value = *other.m_value.array;
-
1686  break;
-
1687  }
-
1688 
-
1689  case value_t::string:
-
1690  {
-
1691  m_value = *other.m_value.string;
-
1692  break;
-
1693  }
-
1694 
-
1695  case value_t::boolean:
-
1696  {
-
1697  m_value = other.m_value.boolean;
-
1698  break;
-
1699  }
-
1700 
- -
1702  {
-
1703  m_value = other.m_value.number_integer;
-
1704  break;
-
1705  }
-
1706 
-
1707  case value_t::number_float:
-
1708  {
-
1709  m_value = other.m_value.number_float;
-
1710  break;
-
1711  }
-
1712 
-
1713  default:
-
1714  {
-
1715  break;
-
1716  }
-
1717  }
-
1718  }
-
1719 
-
1738  basic_json(basic_json&& other) noexcept
-
1739  : m_type(std::move(other.m_type)),
-
1740  m_value(std::move(other.m_value))
-
1741  {
-
1742  // invalidate payload
-
1743  other.m_type = value_t::null;
-
1744  other.m_value = {};
-
1745  }
-
1746 
-
1768  reference& operator=(basic_json other) noexcept (
-
1769  std::is_nothrow_move_constructible<value_t>::value and
-
1770  std::is_nothrow_move_assignable<value_t>::value and
-
1771  std::is_nothrow_move_constructible<json_value>::value and
-
1772  std::is_nothrow_move_assignable<json_value>::value
-
1773  )
-
1774  {
-
1775  using std::swap;
-
1776  swap(m_type, other.m_type);
-
1777  swap(m_value, other.m_value);
-
1778  return *this;
-
1779  }
-
1780 
- -
1795  {
-
1796  switch (m_type)
-
1797  {
-
1798  case value_t::object:
-
1799  {
-
1800  AllocatorType<object_t> alloc;
-
1801  alloc.destroy(m_value.object);
-
1802  alloc.deallocate(m_value.object, 1);
-
1803  break;
-
1804  }
-
1805 
-
1806  case value_t::array:
-
1807  {
-
1808  AllocatorType<array_t> alloc;
-
1809  alloc.destroy(m_value.array);
-
1810  alloc.deallocate(m_value.array, 1);
-
1811  break;
-
1812  }
-
1813 
-
1814  case value_t::string:
-
1815  {
-
1816  AllocatorType<string_t> alloc;
-
1817  alloc.destroy(m_value.string);
-
1818  alloc.deallocate(m_value.string, 1);
-
1819  break;
-
1820  }
-
1821 
-
1822  default:
-
1823  {
-
1824  // all other types need no specific destructor
-
1825  break;
-
1826  }
-
1827  }
-
1828  }
-
1829 
-
1831 
-
1832  public:
-
1834  // object inspection //
-
1836 
-
1839 
-
1863  string_t dump(const int indent = -1) const
-
1864  {
-
1865  std::stringstream ss;
-
1866 
-
1867  if (indent >= 0)
-
1868  {
-
1869  dump(ss, true, static_cast<unsigned int>(indent));
-
1870  }
-
1871  else
-
1872  {
-
1873  dump(ss, false, 0);
-
1874  }
-
1875 
-
1876  return ss.str();
-
1877  }
+
1377  basic_json(std::initializer_list<basic_json> init,
+
1378  bool type_deduction = true,
+
1379  value_t manual_type = value_t::array)
+
1380  {
+
1381  // the initializer list could describe an object
+
1382  bool is_an_object = true;
+
1383 
+
1384  // check if each element is an array with two elements whose first
+
1385  // element is a string
+
1386  for (const auto& element : init)
+
1387  {
+
1388  if (not element.is_array() or element.size() != 2
+
1389  or not element[0].is_string())
+
1390  {
+
1391  // we found an element that makes it impossible to use the
+
1392  // initializer list as object
+
1393  is_an_object = false;
+
1394  break;
+
1395  }
+
1396  }
+
1397 
+
1398  // adjust type if type deduction is not wanted
+
1399  if (not type_deduction)
+
1400  {
+
1401  // if array is wanted, do not create an object though possible
+
1402  if (manual_type == value_t::array)
+
1403  {
+
1404  is_an_object = false;
+
1405  }
+
1406 
+
1407  // if object is wanted but impossible, throw an exception
+
1408  if (manual_type == value_t::object and not is_an_object)
+
1409  {
+
1410  throw std::domain_error("cannot create object from initializer list");
+
1411  }
+
1412  }
+
1413 
+
1414  if (is_an_object)
+
1415  {
+
1416  // the initializer list is a list of pairs -> create object
+
1417  m_type = value_t::object;
+
1418  m_value = value_t::object;
+
1419 
+
1420  for (auto& element : init)
+
1421  {
+
1422  m_value.object->emplace(std::move(*(element[0].m_value.string)), std::move(element[1]));
+
1423  }
+
1424  }
+
1425  else
+
1426  {
+
1427  // the initializer list describes an array -> create array
+
1428  m_type = value_t::array;
+
1429  m_value.array = create<array_t>(std::move(init));
+
1430  }
+
1431  }
+
1432 
+
1467  static basic_json array(std::initializer_list<basic_json> init =
+
1468  std::initializer_list<basic_json>())
+
1469  {
+
1470  return basic_json(init, false, value_t::array);
+
1471  }
+
1472 
+
1507  static basic_json object(std::initializer_list<basic_json> init =
+
1508  std::initializer_list<basic_json>())
+
1509  {
+
1510  return basic_json(init, false, value_t::object);
+
1511  }
+
1512 
+
1531  basic_json(size_type cnt, const basic_json& val)
+
1532  : m_type(value_t::array)
+
1533  {
+
1534  m_value.array = create<array_t>(cnt, val);
+
1535  }
+
1536 
+
1571  template <class InputIT, typename
+
1572  std::enable_if<
+
1573  std::is_same<InputIT, typename basic_json_t::iterator>::value or
+
1574  std::is_same<InputIT, typename basic_json_t::const_iterator>::value
+
1575  , int>::type
+
1576  = 0>
+
1577  basic_json(InputIT first, InputIT last) : m_type(first.m_object->m_type)
+
1578  {
+
1579  // make sure iterator fits the current value
+
1580  if (first.m_object != last.m_object)
+
1581  {
+
1582  throw std::domain_error("iterators are not compatible");
+
1583  }
+
1584 
+
1585  // check if iterator range is complete for primitive values
+
1586  switch (m_type)
+
1587  {
+
1588  case value_t::boolean:
+
1589  case value_t::number_float:
+ +
1591  case value_t::string:
+
1592  {
+
1593  if (not first.m_it.primitive_iterator.is_begin() or not last.m_it.primitive_iterator.is_end())
+
1594  {
+
1595  throw std::out_of_range("iterators out of range");
+
1596  }
+
1597  break;
+
1598  }
+
1599 
+
1600  default:
+
1601  {
+
1602  break;
+
1603  }
+
1604  }
+
1605 
+
1606  switch (m_type)
+
1607  {
+ +
1609  {
+
1610  m_value.number_integer = first.m_object->m_value.number_integer;
+
1611  break;
+
1612  }
+
1613 
+
1614  case value_t::number_float:
+
1615  {
+
1616  m_value.number_float = first.m_object->m_value.number_float;
+
1617  break;
+
1618  }
+
1619 
+
1620  case value_t::boolean:
+
1621  {
+
1622  m_value.boolean = first.m_object->m_value.boolean;
+
1623  break;
+
1624  }
+
1625 
+
1626  case value_t::string:
+
1627  {
+
1628  m_value = *first.m_object->m_value.string;
+
1629  break;
+
1630  }
+
1631 
+
1632  case value_t::object:
+
1633  {
+
1634  m_value.object = create<object_t>(first.m_it.object_iterator, last.m_it.object_iterator);
+
1635  break;
+
1636  }
+
1637 
+
1638  case value_t::array:
+
1639  {
+
1640  m_value.array = create<array_t>(first.m_it.array_iterator, last.m_it.array_iterator);
+
1641  break;
+
1642  }
+
1643 
+
1644  default:
+
1645  {
+
1646  throw std::domain_error("cannot use construct with iterators from " + first.m_object->type_name());
+
1647  }
+
1648  }
+
1649  }
+
1650 
+
1652  // other constructors and destructor //
+
1654 
+
1675  basic_json(const basic_json& other)
+
1676  : m_type(other.m_type)
+
1677  {
+
1678  switch (m_type)
+
1679  {
+
1680  case value_t::object:
+
1681  {
+
1682  m_value = *other.m_value.object;
+
1683  break;
+
1684  }
+
1685 
+
1686  case value_t::array:
+
1687  {
+
1688  m_value = *other.m_value.array;
+
1689  break;
+
1690  }
+
1691 
+
1692  case value_t::string:
+
1693  {
+
1694  m_value = *other.m_value.string;
+
1695  break;
+
1696  }
+
1697 
+
1698  case value_t::boolean:
+
1699  {
+
1700  m_value = other.m_value.boolean;
+
1701  break;
+
1702  }
+
1703 
+ +
1705  {
+
1706  m_value = other.m_value.number_integer;
+
1707  break;
+
1708  }
+
1709 
+
1710  case value_t::number_float:
+
1711  {
+
1712  m_value = other.m_value.number_float;
+
1713  break;
+
1714  }
+
1715 
+
1716  default:
+
1717  {
+
1718  break;
+
1719  }
+
1720  }
+
1721  }
+
1722 
+
1741  basic_json(basic_json&& other) noexcept
+
1742  : m_type(std::move(other.m_type)),
+
1743  m_value(std::move(other.m_value))
+
1744  {
+
1745  // invalidate payload
+
1746  other.m_type = value_t::null;
+
1747  other.m_value = {};
+
1748  }
+
1749 
+
1771  reference& operator=(basic_json other) noexcept (
+
1772  std::is_nothrow_move_constructible<value_t>::value and
+
1773  std::is_nothrow_move_assignable<value_t>::value and
+
1774  std::is_nothrow_move_constructible<json_value>::value and
+
1775  std::is_nothrow_move_assignable<json_value>::value
+
1776  )
+
1777  {
+
1778  using std::swap;
+
1779  swap(m_type, other.m_type);
+
1780  swap(m_value, other.m_value);
+
1781  return *this;
+
1782  }
+
1783 
+ +
1798  {
+
1799  switch (m_type)
+
1800  {
+
1801  case value_t::object:
+
1802  {
+
1803  AllocatorType<object_t> alloc;
+
1804  alloc.destroy(m_value.object);
+
1805  alloc.deallocate(m_value.object, 1);
+
1806  break;
+
1807  }
+
1808 
+
1809  case value_t::array:
+
1810  {
+
1811  AllocatorType<array_t> alloc;
+
1812  alloc.destroy(m_value.array);
+
1813  alloc.deallocate(m_value.array, 1);
+
1814  break;
+
1815  }
+
1816 
+
1817  case value_t::string:
+
1818  {
+
1819  AllocatorType<string_t> alloc;
+
1820  alloc.destroy(m_value.string);
+
1821  alloc.deallocate(m_value.string, 1);
+
1822  break;
+
1823  }
+
1824 
+
1825  default:
+
1826  {
+
1827  // all other types need no specific destructor
+
1828  break;
+
1829  }
+
1830  }
+
1831  }
+
1832 
+
1834 
+
1835  public:
+
1837  // object inspection //
+
1839 
+
1842 
+
1866  string_t dump(const int indent = -1) const
+
1867  {
+
1868  std::stringstream ss;
+
1869 
+
1870  if (indent >= 0)
+
1871  {
+
1872  dump(ss, true, static_cast<unsigned int>(indent));
+
1873  }
+
1874  else
+
1875  {
+
1876  dump(ss, false, 0);
+
1877  }
1878 
-
1894  value_t type() const noexcept
-
1895  {
-
1896  return m_type;
-
1897  }
-
1898 
-
1915  bool is_primitive() const noexcept
-
1916  {
-
1917  return is_null() or is_string() or is_boolean() or is_number();
-
1918  }
-
1919 
-
1935  bool is_structured() const noexcept
-
1936  {
-
1937  return is_array() or is_object();
-
1938  }
-
1939 
-
1954  bool is_null() const noexcept
-
1955  {
-
1956  return m_type == value_t::null;
-
1957  }
-
1958 
-
1973  bool is_boolean() const noexcept
-
1974  {
-
1975  return m_type == value_t::boolean;
-
1976  }
-
1977 
-
1997  bool is_number() const noexcept
-
1998  {
-
1999  return is_number_integer() or is_number_float();
-
2000  }
-
2001 
-
2020  bool is_number_integer() const noexcept
-
2021  {
-
2022  return m_type == value_t::number_integer;
-
2023  }
-
2024 
-
2043  bool is_number_float() const noexcept
-
2044  {
-
2045  return m_type == value_t::number_float;
-
2046  }
-
2047 
-
2062  bool is_object() const noexcept
-
2063  {
-
2064  return m_type == value_t::object;
-
2065  }
-
2066 
-
2081  bool is_array() const noexcept
-
2082  {
-
2083  return m_type == value_t::array;
-
2084  }
-
2085 
-
2100  bool is_string() const noexcept
-
2101  {
-
2102  return m_type == value_t::string;
-
2103  }
-
2104 
-
2124  bool is_discarded() const noexcept
-
2125  {
-
2126  return m_type == value_t::discarded;
-
2127  }
-
2128 
-
2144  operator value_t() const noexcept
-
2145  {
-
2146  return m_type;
-
2147  }
-
2148 
-
2150 
-
2151  private:
-
2153  // value access //
-
2155 
-
2157  template <class T, typename
-
2158  std::enable_if<
-
2159  std::is_convertible<typename object_t::key_type, typename T::key_type>::value and
-
2160  std::is_convertible<basic_json_t, typename T::mapped_type>::value
-
2161  , int>::type = 0>
-
2162  T get_impl(T*) const
-
2163  {
-
2164  if (is_object())
-
2165  {
-
2166  return T(m_value.object->begin(), m_value.object->end());
-
2167  }
-
2168  else
-
2169  {
-
2170  throw std::domain_error("type must be object, but is " + type_name());
-
2171  }
-
2172  }
-
2173 
-
2175  object_t get_impl(object_t*) const
-
2176  {
-
2177  if (is_object())
-
2178  {
-
2179  return *(m_value.object);
-
2180  }
-
2181  else
-
2182  {
-
2183  throw std::domain_error("type must be object, but is " + type_name());
-
2184  }
-
2185  }
-
2186 
-
2188  template <class T, typename
-
2189  std::enable_if<
-
2190  std::is_convertible<basic_json_t, typename T::value_type>::value and
-
2191  not std::is_same<basic_json_t, typename T::value_type>::value and
-
2192  not std::is_arithmetic<T>::value and
-
2193  not std::is_convertible<std::string, T>::value and
-
2194  not has_mapped_type<T>::value
-
2195  , int>::type = 0>
-
2196  T get_impl(T*) const
-
2197  {
-
2198  if (is_array())
-
2199  {
-
2200  T to_vector;
-
2201  std::transform(m_value.array->begin(), m_value.array->end(),
-
2202  std::inserter(to_vector, to_vector.end()), [](basic_json i)
-
2203  {
-
2204  return i.get<typename T::value_type>();
-
2205  });
-
2206  return to_vector;
-
2207  }
-
2208  else
-
2209  {
-
2210  throw std::domain_error("type must be array, but is " + type_name());
-
2211  }
-
2212  }
-
2213 
-
2215  template <class T, typename
-
2216  std::enable_if<
-
2217  std::is_convertible<basic_json_t, T>::value and
-
2218  not std::is_same<basic_json_t, T>::value
-
2219  , int>::type = 0>
-
2220  std::vector<T> get_impl(std::vector<T>*) const
-
2221  {
-
2222  if (is_array())
-
2223  {
-
2224  std::vector<T> to_vector;
-
2225  to_vector.reserve(m_value.array->size());
-
2226  std::transform(m_value.array->begin(), m_value.array->end(),
-
2227  std::inserter(to_vector, to_vector.end()), [](basic_json i)
-
2228  {
-
2229  return i.get<T>();
-
2230  });
-
2231  return to_vector;
-
2232  }
-
2233  else
-
2234  {
-
2235  throw std::domain_error("type must be array, but is " + type_name());
-
2236  }
-
2237  }
-
2238 
-
2240  template <class T, typename
-
2241  std::enable_if<
-
2242  std::is_same<basic_json, typename T::value_type>::value and
-
2243  not has_mapped_type<T>::value
-
2244  , int>::type = 0>
-
2245  T get_impl(T*) const
-
2246  {
-
2247  if (is_array())
-
2248  {
-
2249  return T(m_value.array->begin(), m_value.array->end());
-
2250  }
-
2251  else
-
2252  {
-
2253  throw std::domain_error("type must be array, but is " + type_name());
-
2254  }
-
2255  }
-
2256 
-
2258  array_t get_impl(array_t*) const
-
2259  {
-
2260  if (is_array())
-
2261  {
-
2262  return *(m_value.array);
-
2263  }
-
2264  else
-
2265  {
-
2266  throw std::domain_error("type must be array, but is " + type_name());
-
2267  }
-
2268  }
-
2269 
-
2271  template <typename T, typename
-
2272  std::enable_if<
-
2273  std::is_convertible<string_t, T>::value
-
2274  , int>::type = 0>
-
2275  T get_impl(T*) const
-
2276  {
-
2277  if (is_string())
-
2278  {
-
2279  return *m_value.string;
-
2280  }
-
2281  else
-
2282  {
-
2283  throw std::domain_error("type must be string, but is " + type_name());
-
2284  }
-
2285  }
-
2286 
-
2288  template<typename T, typename
-
2289  std::enable_if<
-
2290  std::is_arithmetic<T>::value
-
2291  , int>::type = 0>
-
2292  T get_impl(T*) const
-
2293  {
-
2294  switch (m_type)
-
2295  {
- -
2297  {
-
2298  return static_cast<T>(m_value.number_integer);
-
2299  }
-
2300 
-
2301  case value_t::number_float:
-
2302  {
-
2303  return static_cast<T>(m_value.number_float);
-
2304  }
-
2305 
-
2306  default:
-
2307  {
-
2308  throw std::domain_error("type must be number, but is " + type_name());
-
2309  }
-
2310  }
-
2311  }
-
2312 
-
2314  boolean_t get_impl(boolean_t*) const
-
2315  {
-
2316  if (is_boolean())
-
2317  {
-
2318  return m_value.boolean;
-
2319  }
-
2320  else
-
2321  {
-
2322  throw std::domain_error("type must be boolean, but is " + type_name());
-
2323  }
-
2324  }
-
2325 
-
2327  object_t* get_impl_ptr(object_t*) noexcept
-
2328  {
-
2329  return is_object() ? m_value.object : nullptr;
-
2330  }
-
2331 
-
2333  const object_t* get_impl_ptr(const object_t*) const noexcept
-
2334  {
-
2335  return is_object() ? m_value.object : nullptr;
-
2336  }
-
2337 
-
2339  array_t* get_impl_ptr(array_t*) noexcept
-
2340  {
-
2341  return is_array() ? m_value.array : nullptr;
-
2342  }
-
2343 
-
2345  const array_t* get_impl_ptr(const array_t*) const noexcept
-
2346  {
-
2347  return is_array() ? m_value.array : nullptr;
-
2348  }
-
2349 
-
2351  string_t* get_impl_ptr(string_t*) noexcept
-
2352  {
-
2353  return is_string() ? m_value.string : nullptr;
-
2354  }
-
2355 
-
2357  const string_t* get_impl_ptr(const string_t*) const noexcept
-
2358  {
-
2359  return is_string() ? m_value.string : nullptr;
-
2360  }
-
2361 
-
2363  boolean_t* get_impl_ptr(boolean_t*) noexcept
-
2364  {
-
2365  return is_boolean() ? &m_value.boolean : nullptr;
-
2366  }
-
2367 
-
2369  const boolean_t* get_impl_ptr(const boolean_t*) const noexcept
-
2370  {
-
2371  return is_boolean() ? &m_value.boolean : nullptr;
-
2372  }
-
2373 
-
2375  number_integer_t* get_impl_ptr(number_integer_t*) noexcept
-
2376  {
-
2377  return is_number_integer() ? &m_value.number_integer : nullptr;
-
2378  }
-
2379 
-
2381  const number_integer_t* get_impl_ptr(const number_integer_t*) const noexcept
-
2382  {
-
2383  return is_number_integer() ? &m_value.number_integer : nullptr;
-
2384  }
-
2385 
-
2387  number_float_t* get_impl_ptr(number_float_t*) noexcept
-
2388  {
-
2389  return is_number_float() ? &m_value.number_float : nullptr;
-
2390  }
-
2391 
-
2393  const number_float_t* get_impl_ptr(const number_float_t*) const noexcept
-
2394  {
-
2395  return is_number_float() ? &m_value.number_float : nullptr;
-
2396  }
-
2397 
-
2398  public:
-
2399 
+
1879  return ss.str();
+
1880  }
+
1881 
+
1897  value_t type() const noexcept
+
1898  {
+
1899  return m_type;
+
1900  }
+
1901 
+
1918  bool is_primitive() const noexcept
+
1919  {
+
1920  return is_null() or is_string() or is_boolean() or is_number();
+
1921  }
+
1922 
+
1938  bool is_structured() const noexcept
+
1939  {
+
1940  return is_array() or is_object();
+
1941  }
+
1942 
+
1957  bool is_null() const noexcept
+
1958  {
+
1959  return m_type == value_t::null;
+
1960  }
+
1961 
+
1976  bool is_boolean() const noexcept
+
1977  {
+
1978  return m_type == value_t::boolean;
+
1979  }
+
1980 
+
2000  bool is_number() const noexcept
+
2001  {
+
2002  return is_number_integer() or is_number_float();
+
2003  }
+
2004 
+
2023  bool is_number_integer() const noexcept
+
2024  {
+
2025  return m_type == value_t::number_integer;
+
2026  }
+
2027 
+
2046  bool is_number_float() const noexcept
+
2047  {
+
2048  return m_type == value_t::number_float;
+
2049  }
+
2050 
+
2065  bool is_object() const noexcept
+
2066  {
+
2067  return m_type == value_t::object;
+
2068  }
+
2069 
+
2084  bool is_array() const noexcept
+
2085  {
+
2086  return m_type == value_t::array;
+
2087  }
+
2088 
+
2103  bool is_string() const noexcept
+
2104  {
+
2105  return m_type == value_t::string;
+
2106  }
+
2107 
+
2127  bool is_discarded() const noexcept
+
2128  {
+
2129  return m_type == value_t::discarded;
+
2130  }
+
2131 
+
2147  operator value_t() const noexcept
+
2148  {
+
2149  return m_type;
+
2150  }
+
2151 
+
2153 
+
2154  private:
+
2156  // value access //
+
2158 
+
2160  template <class T, typename
+
2161  std::enable_if<
+
2162  std::is_convertible<typename object_t::key_type, typename T::key_type>::value and
+
2163  std::is_convertible<basic_json_t, typename T::mapped_type>::value
+
2164  , int>::type = 0>
+
2165  T get_impl(T*) const
+
2166  {
+
2167  if (is_object())
+
2168  {
+
2169  return T(m_value.object->begin(), m_value.object->end());
+
2170  }
+
2171  else
+
2172  {
+
2173  throw std::domain_error("type must be object, but is " + type_name());
+
2174  }
+
2175  }
+
2176 
+
2178  object_t get_impl(object_t*) const
+
2179  {
+
2180  if (is_object())
+
2181  {
+
2182  return *(m_value.object);
+
2183  }
+
2184  else
+
2185  {
+
2186  throw std::domain_error("type must be object, but is " + type_name());
+
2187  }
+
2188  }
+
2189 
+
2191  template <class T, typename
+
2192  std::enable_if<
+
2193  std::is_convertible<basic_json_t, typename T::value_type>::value and
+
2194  not std::is_same<basic_json_t, typename T::value_type>::value and
+
2195  not std::is_arithmetic<T>::value and
+
2196  not std::is_convertible<std::string, T>::value and
+
2197  not has_mapped_type<T>::value
+
2198  , int>::type = 0>
+
2199  T get_impl(T*) const
+
2200  {
+
2201  if (is_array())
+
2202  {
+
2203  T to_vector;
+
2204  std::transform(m_value.array->begin(), m_value.array->end(),
+
2205  std::inserter(to_vector, to_vector.end()), [](basic_json i)
+
2206  {
+
2207  return i.get<typename T::value_type>();
+
2208  });
+
2209  return to_vector;
+
2210  }
+
2211  else
+
2212  {
+
2213  throw std::domain_error("type must be array, but is " + type_name());
+
2214  }
+
2215  }
+
2216 
+
2218  template <class T, typename
+
2219  std::enable_if<
+
2220  std::is_convertible<basic_json_t, T>::value and
+
2221  not std::is_same<basic_json_t, T>::value
+
2222  , int>::type = 0>
+
2223  std::vector<T> get_impl(std::vector<T>*) const
+
2224  {
+
2225  if (is_array())
+
2226  {
+
2227  std::vector<T> to_vector;
+
2228  to_vector.reserve(m_value.array->size());
+
2229  std::transform(m_value.array->begin(), m_value.array->end(),
+
2230  std::inserter(to_vector, to_vector.end()), [](basic_json i)
+
2231  {
+
2232  return i.get<T>();
+
2233  });
+
2234  return to_vector;
+
2235  }
+
2236  else
+
2237  {
+
2238  throw std::domain_error("type must be array, but is " + type_name());
+
2239  }
+
2240  }
+
2241 
+
2243  template <class T, typename
+
2244  std::enable_if<
+
2245  std::is_same<basic_json, typename T::value_type>::value and
+
2246  not has_mapped_type<T>::value
+
2247  , int>::type = 0>
+
2248  T get_impl(T*) const
+
2249  {
+
2250  if (is_array())
+
2251  {
+
2252  return T(m_value.array->begin(), m_value.array->end());
+
2253  }
+
2254  else
+
2255  {
+
2256  throw std::domain_error("type must be array, but is " + type_name());
+
2257  }
+
2258  }
+
2259 
+
2261  array_t get_impl(array_t*) const
+
2262  {
+
2263  if (is_array())
+
2264  {
+
2265  return *(m_value.array);
+
2266  }
+
2267  else
+
2268  {
+
2269  throw std::domain_error("type must be array, but is " + type_name());
+
2270  }
+
2271  }
+
2272 
+
2274  template <typename T, typename
+
2275  std::enable_if<
+
2276  std::is_convertible<string_t, T>::value
+
2277  , int>::type = 0>
+
2278  T get_impl(T*) const
+
2279  {
+
2280  if (is_string())
+
2281  {
+
2282  return *m_value.string;
+
2283  }
+
2284  else
+
2285  {
+
2286  throw std::domain_error("type must be string, but is " + type_name());
+
2287  }
+
2288  }
+
2289 
+
2291  template<typename T, typename
+
2292  std::enable_if<
+
2293  std::is_arithmetic<T>::value
+
2294  , int>::type = 0>
+
2295  T get_impl(T*) const
+
2296  {
+
2297  switch (m_type)
+
2298  {
+ +
2300  {
+
2301  return static_cast<T>(m_value.number_integer);
+
2302  }
+
2303 
+
2304  case value_t::number_float:
+
2305  {
+
2306  return static_cast<T>(m_value.number_float);
+
2307  }
+
2308 
+
2309  default:
+
2310  {
+
2311  throw std::domain_error("type must be number, but is " + type_name());
+
2312  }
+
2313  }
+
2314  }
+
2315 
+
2317  boolean_t get_impl(boolean_t*) const
+
2318  {
+
2319  if (is_boolean())
+
2320  {
+
2321  return m_value.boolean;
+
2322  }
+
2323  else
+
2324  {
+
2325  throw std::domain_error("type must be boolean, but is " + type_name());
+
2326  }
+
2327  }
+
2328 
+
2330  object_t* get_impl_ptr(object_t*) noexcept
+
2331  {
+
2332  return is_object() ? m_value.object : nullptr;
+
2333  }
+
2334 
+
2336  const object_t* get_impl_ptr(const object_t*) const noexcept
+
2337  {
+
2338  return is_object() ? m_value.object : nullptr;
+
2339  }
+
2340 
+
2342  array_t* get_impl_ptr(array_t*) noexcept
+
2343  {
+
2344  return is_array() ? m_value.array : nullptr;
+
2345  }
+
2346 
+
2348  const array_t* get_impl_ptr(const array_t*) const noexcept
+
2349  {
+
2350  return is_array() ? m_value.array : nullptr;
+
2351  }
+
2352 
+
2354  string_t* get_impl_ptr(string_t*) noexcept
+
2355  {
+
2356  return is_string() ? m_value.string : nullptr;
+
2357  }
+
2358 
+
2360  const string_t* get_impl_ptr(const string_t*) const noexcept
+
2361  {
+
2362  return is_string() ? m_value.string : nullptr;
+
2363  }
+
2364 
+
2366  boolean_t* get_impl_ptr(boolean_t*) noexcept
+
2367  {
+
2368  return is_boolean() ? &m_value.boolean : nullptr;
+
2369  }
+
2370 
+
2372  const boolean_t* get_impl_ptr(const boolean_t*) const noexcept
+
2373  {
+
2374  return is_boolean() ? &m_value.boolean : nullptr;
+
2375  }
+
2376 
+
2378  number_integer_t* get_impl_ptr(number_integer_t*) noexcept
+
2379  {
+
2380  return is_number_integer() ? &m_value.number_integer : nullptr;
+
2381  }
+
2382 
+
2384  const number_integer_t* get_impl_ptr(const number_integer_t*) const noexcept
+
2385  {
+
2386  return is_number_integer() ? &m_value.number_integer : nullptr;
+
2387  }
+
2388 
+
2390  number_float_t* get_impl_ptr(number_float_t*) noexcept
+
2391  {
+
2392  return is_number_float() ? &m_value.number_float : nullptr;
+
2393  }
+
2394 
+
2396  const number_float_t* get_impl_ptr(const number_float_t*) const noexcept
+
2397  {
+
2398  return is_number_float() ? &m_value.number_float : nullptr;
+
2399  }
+
2400 
+
2401  public:
2402 
-
2436  template<typename ValueType, typename
-
2437  std::enable_if<
-
2438  not std::is_pointer<ValueType>::value
-
2439  , int>::type = 0>
-
2440  ValueType get() const
-
2441  {
-
2442  return get_impl(static_cast<ValueType*>(nullptr));
-
2443  }
-
2444 
-
2471  template<typename PointerType, typename
-
2472  std::enable_if<
-
2473  std::is_pointer<PointerType>::value
-
2474  , int>::type = 0>
-
2475  PointerType get() noexcept
-
2476  {
-
2477  // delegate the call to get_ptr
-
2478  return get_ptr<PointerType>();
-
2479  }
-
2480 
-
2485  template<typename PointerType, typename
-
2486  std::enable_if<
-
2487  std::is_pointer<PointerType>::value
-
2488  , int>::type = 0>
-
2489  const PointerType get() const noexcept
-
2490  {
-
2491  // delegate the call to get_ptr
-
2492  return get_ptr<PointerType>();
-
2493  }
-
2494 
-
2520  template<typename PointerType, typename
-
2521  std::enable_if<
-
2522  std::is_pointer<PointerType>::value
-
2523  , int>::type = 0>
-
2524  PointerType get_ptr() noexcept
-
2525  {
-
2526  // delegate the call to get_impl_ptr<>()
-
2527  return get_impl_ptr(static_cast<PointerType>(nullptr));
-
2528  }
-
2529 
-
2534  template<typename PointerType, typename
-
2535  std::enable_if<
-
2536  std::is_pointer<PointerType>::value
-
2537  and std::is_const<typename std::remove_pointer<PointerType>::type>::value
-
2538  , int>::type = 0>
-
2539  const PointerType get_ptr() const noexcept
-
2540  {
-
2541  // delegate the call to get_impl_ptr<>() const
-
2542  return get_impl_ptr(static_cast<const PointerType>(nullptr));
-
2543  }
-
2544 
-
2573  template<typename ValueType, typename
-
2574  std::enable_if<
-
2575  not std::is_pointer<ValueType>::value
-
2576  and not std::is_same<ValueType, typename string_t::value_type>::value
-
2577  and not std::is_same<ValueType, std::initializer_list<typename string_t::value_type>>::value
-
2578  , int>::type = 0>
-
2579  operator ValueType() const
-
2580  {
-
2581  // delegate the call to get<>() const
-
2582  return get<ValueType>();
-
2583  }
-
2584 
-
2586 
+
2405 
+
2439  template<typename ValueType, typename
+
2440  std::enable_if<
+
2441  not std::is_pointer<ValueType>::value
+
2442  , int>::type = 0>
+
2443  ValueType get() const
+
2444  {
+
2445  return get_impl(static_cast<ValueType*>(nullptr));
+
2446  }
+
2447 
+
2474  template<typename PointerType, typename
+
2475  std::enable_if<
+
2476  std::is_pointer<PointerType>::value
+
2477  , int>::type = 0>
+
2478  PointerType get() noexcept
+
2479  {
+
2480  // delegate the call to get_ptr
+
2481  return get_ptr<PointerType>();
+
2482  }
+
2483 
+
2488  template<typename PointerType, typename
+
2489  std::enable_if<
+
2490  std::is_pointer<PointerType>::value
+
2491  , int>::type = 0>
+
2492  const PointerType get() const noexcept
+
2493  {
+
2494  // delegate the call to get_ptr
+
2495  return get_ptr<PointerType>();
+
2496  }
+
2497 
+
2523  template<typename PointerType, typename
+
2524  std::enable_if<
+
2525  std::is_pointer<PointerType>::value
+
2526  , int>::type = 0>
+
2527  PointerType get_ptr() noexcept
+
2528  {
+
2529  // delegate the call to get_impl_ptr<>()
+
2530  return get_impl_ptr(static_cast<PointerType>(nullptr));
+
2531  }
+
2532 
+
2537  template<typename PointerType, typename
+
2538  std::enable_if<
+
2539  std::is_pointer<PointerType>::value
+
2540  and std::is_const<typename std::remove_pointer<PointerType>::type>::value
+
2541  , int>::type = 0>
+
2542  const PointerType get_ptr() const noexcept
+
2543  {
+
2544  // delegate the call to get_impl_ptr<>() const
+
2545  return get_impl_ptr(static_cast<const PointerType>(nullptr));
+
2546  }
+
2547 
+
2576  template<typename ValueType, typename
+
2577  std::enable_if<
+
2578  not std::is_pointer<ValueType>::value
+
2579  and not std::is_same<ValueType, typename string_t::value_type>::value
+
2580  and not std::is_same<ValueType, std::initializer_list<typename string_t::value_type>>::value
+
2581  , int>::type = 0>
+
2582  operator ValueType() const
+
2583  {
+
2584  // delegate the call to get<>() const
+
2585  return get<ValueType>();
+
2586  }
2587 
-
2589  // element access //
-
2591 
-
2594 
- -
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  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());
+
2589 
+
2590 
+
2592  // element access //
+
2594 
+
2597 
+ +
2621  {
+
2622  // at only works for arrays
+
2623  if (is_array())
+
2624  {
+
2625  try
+
2626  {
+
2627  return m_value.array->at(idx);
+
2628  }
+
2629  catch (std::out_of_range& e)
+
2630  {
+
2631  // create better exception explanation
+
2632  throw std::out_of_range("array index " + std::to_string(idx) + " is out of range");
+
2633  }
+
2634  }
+
2635  else
+
2636  {
+
2637  throw std::domain_error("cannot use at() with " + type_name());
+
2638  }
+
2639  }
+
2640 
+ +
2664  {
+
2665  // at only works for arrays
+
2666  if (is_array())
+
2667  {
+
2668  try
+
2669  {
+
2670  return m_value.array->at(idx);
+
2671  }
+
2672  catch (std::out_of_range& e)
+
2673  {
+
2674  // create better exception explanation
+
2675  throw std::out_of_range("array index " + std::to_string(idx) + " is out of range");
+
2676  }
+
2677  }
+
2678  else
+
2679  {
+
2680  throw std::domain_error("cannot use at() with " + type_name());
+
2681  }
+
2682  }
+
2683 
+
2710  reference at(const typename object_t::key_type& key)
+
2711  {
+
2712  // at only works for objects
+
2713  if (is_object())
+
2714  {
+
2715  try
+
2716  {
+
2717  return m_value.object->at(key);
+
2718  }
+
2719  catch (std::out_of_range& e)
+
2720  {
+
2721  // create better exception explanation
+
2722  throw std::out_of_range("key '" + key + "' not found");
+
2723  }
+
2724  }
+
2725  else
+
2726  {
+
2727  throw std::domain_error("cannot use at() with " + type_name());
+
2728  }
+
2729  }
+
2730 
+
2757  const_reference at(const typename object_t::key_type& key) const
+
2758  {
+
2759  // at only works for objects
+
2760  if (is_object())
+
2761  {
+
2762  try
+
2763  {
+
2764  return m_value.object->at(key);
+
2765  }
+
2766  catch (std::out_of_range& e)
+
2767  {
+
2768  // create better exception explanation
+
2769  throw std::out_of_range("key '" + key + "' not found");
+
2770  }
+
2771  }
+
2772  else
+
2773  {
+
2774  throw std::domain_error("cannot use at() with " + type_name());
+
2775  }
+
2776  }
+
2777 
+ +
2804  {
+
2805  // implicitly convert null to object
+
2806  if (is_null())
+
2807  {
+
2808  m_type = value_t::array;
+
2809  m_value.array = create<array_t>();
+
2810  }
+
2811 
+
2812  // [] only works for arrays
+
2813  if (is_array())
+
2814  {
+
2815  for (size_t i = m_value.array->size(); i <= idx; ++i)
+
2816  {
+
2817  m_value.array->push_back(basic_json());
+
2818  }
+
2819 
+
2820  return m_value.array->operator[](idx);
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 
-
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);
+
2822  else
+
2823  {
+
2824  throw std::domain_error("cannot use operator[] with " + type_name());
+
2825  }
+
2826  }
+
2827 
+ +
2848  {
+
2849  // at only works for arrays
+
2850  if (is_array())
+
2851  {
+
2852  return m_value.array->operator[](idx);
+
2853  }
+
2854  else
+
2855  {
+
2856  throw std::domain_error("cannot use operator[] with " + type_name());
+
2857  }
+
2858  }
+
2859 
+
2887  reference operator[](const typename object_t::key_type& key)
+
2888  {
+
2889  // implicitly convert null to object
+
2890  if (is_null())
+
2891  {
+
2892  m_type = value_t::object;
+
2893  m_value.object = create<object_t>();
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  return *cbegin();
-
3144  }
-
3145 
- -
3168  {
-
3169  auto tmp = end();
-
3170  --tmp;
-
3171  return *tmp;
-
3172  }
-
3173 
- -
3178  {
-
3179  auto tmp = cend();
+
2895 
+
2896  // [] only works for objects
+
2897  if (is_object())
+
2898  {
+
2899  return m_value.object->operator[](key);
+
2900  }
+
2901  else
+
2902  {
+
2903  throw std::domain_error("cannot use operator[] with " + type_name());
+
2904  }
+
2905  }
+
2906 
+
2934  const_reference operator[](const typename object_t::key_type& key) const
+
2935  {
+
2936  // [] only works for objects
+
2937  if (is_object())
+
2938  {
+
2939  return m_value.object->find(key)->second;
+
2940  }
+
2941  else
+
2942  {
+
2943  throw std::domain_error("cannot use operator[] with " + type_name());
+
2944  }
+
2945  }
+
2946 
+
2976  template<typename T, std::size_t n>
+
2977  reference operator[](const T (&key)[n])
+
2978  {
+
2979  // implicitly convert null to object
+
2980  if (is_null())
+
2981  {
+
2982  m_type = value_t::object;
+
2983  m_value = value_t::object;
+
2984  }
+
2985 
+
2986  // at only works for objects
+
2987  if (is_object())
+
2988  {
+
2989  return m_value.object->operator[](key);
+
2990  }
+
2991  else
+
2992  {
+
2993  throw std::domain_error("cannot use operator[] with " + type_name());
+
2994  }
+
2995  }
+
2996 
+
3026  template<typename T, std::size_t n>
+
3027  const_reference operator[](const T (&key)[n]) const
+
3028  {
+
3029  // at only works for objects
+
3030  if (is_object())
+
3031  {
+
3032  return m_value.object->find(key)->second;
+
3033  }
+
3034  else
+
3035  {
+
3036  throw std::domain_error("cannot use operator[] with " + type_name());
+
3037  }
+
3038  }
+
3039 
+
3088  template <class ValueType, typename
+
3089  std::enable_if<
+
3090  std::is_convertible<basic_json_t, ValueType>::value
+
3091  , int>::type = 0>
+
3092  ValueType value(const typename object_t::key_type& key, ValueType default_value) const
+
3093  {
+
3094  // at only works for objects
+
3095  if (is_object())
+
3096  {
+
3097  // if key is found, return value and given default value otherwise
+
3098  const auto it = find(key);
+
3099  if (it != end())
+
3100  {
+
3101  return *it;
+
3102  }
+
3103  else
+
3104  {
+
3105  return default_value;
+
3106  }
+
3107  }
+
3108  else
+
3109  {
+
3110  throw std::domain_error("cannot use value() with " + type_name());
+
3111  }
+
3112  }
+
3113 
+
3118  string_t value(const typename object_t::key_type& key, const char* default_value) const
+
3119  {
+
3120  return value(key, string_t(default_value));
+
3121  }
+
3122 
+ +
3144  {
+
3145  return *begin();
+
3146  }
+
3147 
+ +
3152  {
+
3153  return *cbegin();
+
3154  }
+
3155 
+ +
3178  {
+
3179  auto tmp = end();
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  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  }
+ +
3188  {
+
3189  auto tmp = cend();
+
3190  --tmp;
+
3191  return *tmp;
+
3192  }
+
3193 
+
3238  template <class InteratorType, typename
+
3239  std::enable_if<
+
3240  std::is_same<InteratorType, typename basic_json_t::iterator>::value or
+
3241  std::is_same<InteratorType, typename basic_json_t::const_iterator>::value
+
3242  , int>::type
+
3243  = 0>
+
3244  InteratorType erase(InteratorType pos)
+
3245  {
+
3246  // make sure iterator fits the current value
+
3247  if (this != pos.m_object)
+
3248  {
+
3249  throw std::domain_error("iterator does not fit current value");
+
3250  }
+
3251 
+
3252  InteratorType result = end();
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);
+
3254  switch (m_type)
+
3255  {
+
3256  case value_t::boolean:
+
3257  case value_t::number_float:
+ +
3259  case value_t::string:
+
3260  {
+
3261  if (not pos.m_it.primitive_iterator.is_begin())
+
3262  {
+
3263  throw std::out_of_range("iterator out of range");
+
3264  }
+
3265 
+
3266  if (is_string())
+
3267  {
+
3268  delete m_value.string;
+
3269  m_value.string = nullptr;
+
3270  }
+
3271 
+
3272  m_type = value_t::null;
3273  break;
3274  }
3275 
-
3276  default:
+
3276  case value_t::object:
3277  {
-
3278  throw std::domain_error("cannot use erase() with " + type_name());
-
3279  }
-
3280  }
+
3278  result.m_it.object_iterator = m_value.object->erase(pos.m_it.object_iterator);
+
3279  break;
+
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  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  }
+
3282  case value_t::array:
+
3283  {
+
3284  result.m_it.array_iterator = m_value.array->erase(pos.m_it.array_iterator);
+
3285  break;
+
3286  }
+
3287 
+
3288  default:
+
3289  {
+
3290  throw std::domain_error("cannot use erase() with " + type_name());
+
3291  }
+
3292  }
+
3293 
+
3294  return result;
+
3295  }
+
3296 
+
3341  template <class InteratorType, typename
+
3342  std::enable_if<
+
3343  std::is_same<InteratorType, typename basic_json_t::iterator>::value or
+
3344  std::is_same<InteratorType, typename basic_json_t::const_iterator>::value
+
3345  , int>::type
+
3346  = 0>
+
3347  InteratorType erase(InteratorType first, InteratorType last)
+
3348  {
+
3349  // make sure iterator fits the current value
+
3350  if (this != first.m_object or this != last.m_object)
+
3351  {
+
3352  throw std::domain_error("iterators do not fit current value");
+
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);
+
3355  InteratorType result = end();
+
3356 
+
3357  switch (m_type)
+
3358  {
+
3359  case value_t::boolean:
+
3360  case value_t::number_float:
+ +
3362  case value_t::string:
+
3363  {
+
3364  if (not first.m_it.primitive_iterator.is_begin() or not last.m_it.primitive_iterator.is_end())
+
3365  {
+
3366  throw std::out_of_range("iterators out of range");
+
3367  }
+
3368 
+
3369  if (is_string())
+
3370  {
+
3371  delete m_value.string;
+
3372  m_value.string = nullptr;
+
3373  }
+
3374 
+
3375  m_type = value_t::null;
3376  break;
3377  }
3378 
-
3379  default:
+
3379  case value_t::object:
3380  {
-
3381  throw std::domain_error("cannot use erase with " + type_name());
-
3382  }
-
3383  }
-
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  }
-
3425 
-
3448  void erase(const size_type idx)
-
3449  {
-
3450  // this erase only works for arrays
-
3451  if (is_array())
-
3452  {
-
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 
-
3770  private:
-
3771  // forward declaration
-
3772  template<typename IteratorType> class iteration_proxy;
-
3773 
-
3774  public:
-
3783  static iteration_proxy<iterator> iterator_wrapper(reference cont)
-
3784  {
-
3785  return iteration_proxy<iterator>(cont);
-
3786  }
-
3787 
-
3791  static iteration_proxy<const_iterator> iterator_wrapper(const_reference cont)
-
3792  {
-
3793  return iteration_proxy<const_iterator>(cont);
-
3794  }
-
3795 
-
3797 
-
3798 
-
3800  // capacity //
-
3802 
-
3805 
-
3835  bool empty() const noexcept
-
3836  {
-
3837  switch (m_type)
-
3838  {
-
3839  case value_t::null:
-
3840  {
-
3841  // null values are empty
-
3842  return true;
-
3843  }
-
3844 
-
3845  case value_t::array:
-
3846  {
-
3847  return m_value.array->empty();
-
3848  }
-
3849 
-
3850  case value_t::object:
-
3851  {
-
3852  return m_value.object->empty();
-
3853  }
-
3854 
-
3855  default:
-
3856  {
-
3857  // all other types are nonempty
-
3858  return false;
-
3859  }
-
3860  }
-
3861  }
-
3862 
-
3892  size_type size() const noexcept
-
3893  {
-
3894  switch (m_type)
-
3895  {
-
3896  case value_t::null:
-
3897  {
-
3898  // null values are empty
-
3899  return 0;
-
3900  }
-
3901 
-
3902  case value_t::array:
-
3903  {
-
3904  return m_value.array->size();
-
3905  }
-
3906 
-
3907  case value_t::object:
-
3908  {
-
3909  return m_value.object->size();
-
3910  }
-
3911 
-
3912  default:
-
3913  {
-
3914  // all other types have size 1
-
3915  return 1;
-
3916  }
-
3917  }
-
3918  }
-
3919 
-
3952  size_type max_size() const noexcept
-
3953  {
-
3954  switch (m_type)
-
3955  {
-
3956  case value_t::array:
-
3957  {
-
3958  return m_value.array->max_size();
-
3959  }
-
3960 
-
3961  case value_t::object:
-
3962  {
-
3963  return m_value.object->max_size();
-
3964  }
-
3965 
-
3966  default:
-
3967  {
-
3968  // all other types have max_size() == size()
-
3969  return size();
-
3970  }
-
3971  }
-
3972  }
-
3973 
-
3975 
-
3976 
-
3978  // modifiers //
-
3980 
-
3983 
-
4009  void clear() noexcept
-
4010  {
-
4011  switch (m_type)
-
4012  {
- -
4014  {
-
4015  m_value.number_integer = 0;
-
4016  break;
-
4017  }
-
4018 
-
4019  case value_t::number_float:
-
4020  {
-
4021  m_value.number_float = 0.0;
-
4022  break;
-
4023  }
-
4024 
-
4025  case value_t::boolean:
-
4026  {
-
4027  m_value.boolean = false;
-
4028  break;
-
4029  }
-
4030 
-
4031  case value_t::string:
-
4032  {
-
4033  m_value.string->clear();
-
4034  break;
-
4035  }
-
4036 
-
4037  case value_t::array:
-
4038  {
-
4039  m_value.array->clear();
-
4040  break;
-
4041  }
-
4042 
-
4043  case value_t::object:
-
4044  {
-
4045  m_value.object->clear();
-
4046  break;
-
4047  }
-
4048 
-
4049  default:
-
4050  {
-
4051  break;
-
4052  }
-
4053  }
-
4054  }
-
4055 
-
4075  void push_back(basic_json&& val)
-
4076  {
-
4077  // push_back only works for null objects or arrays
-
4078  if (not(is_null() or is_array()))
-
4079  {
-
4080  throw std::domain_error("cannot use push_back() with " + type_name());
-
4081  }
-
4082 
-
4083  // transform null object into an array
-
4084  if (is_null())
-
4085  {
-
4086  m_type = value_t::array;
-
4087  m_value = value_t::array;
-
4088  }
-
4089 
-
4090  // add element to array (move semantics)
-
4091  m_value.array->push_back(std::move(val));
-
4092  // invalidate object
-
4093  val.m_type = value_t::null;
-
4094  }
-
4095 
-
4100  reference operator+=(basic_json&& val)
-
4101  {
-
4102  push_back(std::move(val));
-
4103  return *this;
-
4104  }
-
4105 
-
4110  void push_back(const basic_json& val)
-
4111  {
-
4112  // push_back only works for null objects or arrays
-
4113  if (not(is_null() or is_array()))
-
4114  {
-
4115  throw std::domain_error("cannot use push_back() with " + type_name());
-
4116  }
-
4117 
-
4118  // transform null object into an array
-
4119  if (is_null())
-
4120  {
-
4121  m_type = value_t::array;
-
4122  m_value = value_t::array;
-
4123  }
-
4124 
-
4125  // add element to array
-
4126  m_value.array->push_back(val);
-
4127  }
-
4128 
-
4133  reference operator+=(const basic_json& val)
-
4134  {
-
4135  push_back(val);
-
4136  return *this;
-
4137  }
+
3381  result.m_it.object_iterator = m_value.object->erase(first.m_it.object_iterator,
+
3382  last.m_it.object_iterator);
+
3383  break;
+
3384  }
+
3385 
+
3386  case value_t::array:
+
3387  {
+
3388  result.m_it.array_iterator = m_value.array->erase(first.m_it.array_iterator,
+
3389  last.m_it.array_iterator);
+
3390  break;
+
3391  }
+
3392 
+
3393  default:
+
3394  {
+
3395  throw std::domain_error("cannot use erase() with " + type_name());
+
3396  }
+
3397  }
+
3398 
+
3399  return result;
+
3400  }
+
3401 
+
3428  size_type erase(const typename object_t::key_type& key)
+
3429  {
+
3430  // this erase only works for objects
+
3431  if (is_object())
+
3432  {
+
3433  return m_value.object->erase(key);
+
3434  }
+
3435  else
+
3436  {
+
3437  throw std::domain_error("cannot use erase() with " + type_name());
+
3438  }
+
3439  }
+
3440 
+
3465  void erase(const size_type idx)
+
3466  {
+
3467  // this erase only works for arrays
+
3468  if (is_array())
+
3469  {
+
3470  if (idx >= size())
+
3471  {
+
3472  throw std::out_of_range("index out of range");
+
3473  }
+
3474 
+
3475  m_value.array->erase(m_value.array->begin() + static_cast<difference_type>(idx));
+
3476  }
+
3477  else
+
3478  {
+
3479  throw std::domain_error("cannot use erase() with " + type_name());
+
3480  }
+
3481  }
+
3482 
+
3500  iterator find(typename object_t::key_type key)
+
3501  {
+
3502  auto result = end();
+
3503 
+
3504  if (is_object())
+
3505  {
+
3506  result.m_it.object_iterator = m_value.object->find(key);
+
3507  }
+
3508 
+
3509  return result;
+
3510  }
+
3511 
+
3516  const_iterator find(typename object_t::key_type key) const
+
3517  {
+
3518  auto result = cend();
+
3519 
+
3520  if (is_object())
+
3521  {
+
3522  result.m_it.object_iterator = m_value.object->find(key);
+
3523  }
+
3524 
+
3525  return result;
+
3526  }
+
3527 
+
3546  size_type count(typename object_t::key_type key) const
+
3547  {
+
3548  // return 0 for all nonobject types
+
3549  return is_object() ? m_value.object->count(key) : 0;
+
3550  }
+
3551 
+
3553 
+
3554 
+
3556  // iterators //
+
3558 
+
3561 
+ +
3581  {
+
3582  iterator result(this);
+
3583  result.set_begin();
+
3584  return result;
+
3585  }
+
3586 
+ +
3591  {
+
3592  return cbegin();
+
3593  }
+
3594 
+ +
3615  {
+
3616  const_iterator result(this);
+
3617  result.set_begin();
+
3618  return result;
+
3619  }
+
3620 
+ +
3640  {
+
3641  iterator result(this);
+
3642  result.set_end();
+
3643  return result;
+
3644  }
+
3645 
+ +
3650  {
+
3651  return cend();
+
3652  }
+
3653 
+ +
3674  {
+
3675  const_iterator result(this);
+
3676  result.set_end();
+
3677  return result;
+
3678  }
+
3679 
+ +
3698  {
+
3699  return reverse_iterator(end());
+
3700  }
+
3701 
+ +
3706  {
+
3707  return crbegin();
+
3708  }
+
3709 
+ +
3729  {
+
3730  return reverse_iterator(begin());
+
3731  }
+
3732 
+ +
3737  {
+
3738  return crend();
+
3739  }
+
3740 
+ +
3760  {
+
3761  return const_reverse_iterator(cend());
+
3762  }
+
3763 
+ +
3783  {
+
3784  return const_reverse_iterator(cbegin());
+
3785  }
+
3786 
+
3787  private:
+
3788  // forward declaration
+
3789  template<typename IteratorType> class iteration_proxy;
+
3790 
+
3791  public:
+
3803  static iteration_proxy<iterator> iterator_wrapper(reference cont)
+
3804  {
+
3805  return iteration_proxy<iterator>(cont);
+
3806  }
+
3807 
+
3811  static iteration_proxy<const_iterator> iterator_wrapper(const_reference cont)
+
3812  {
+
3813  return iteration_proxy<const_iterator>(cont);
+
3814  }
+
3815 
+
3817 
+
3818 
+
3820  // capacity //
+
3822 
+
3825 
+
3855  bool empty() const noexcept
+
3856  {
+
3857  switch (m_type)
+
3858  {
+
3859  case value_t::null:
+
3860  {
+
3861  // null values are empty
+
3862  return true;
+
3863  }
+
3864 
+
3865  case value_t::array:
+
3866  {
+
3867  return m_value.array->empty();
+
3868  }
+
3869 
+
3870  case value_t::object:
+
3871  {
+
3872  return m_value.object->empty();
+
3873  }
+
3874 
+
3875  default:
+
3876  {
+
3877  // all other types are nonempty
+
3878  return false;
+
3879  }
+
3880  }
+
3881  }
+
3882 
+
3912  size_type size() const noexcept
+
3913  {
+
3914  switch (m_type)
+
3915  {
+
3916  case value_t::null:
+
3917  {
+
3918  // null values are empty
+
3919  return 0;
+
3920  }
+
3921 
+
3922  case value_t::array:
+
3923  {
+
3924  return m_value.array->size();
+
3925  }
+
3926 
+
3927  case value_t::object:
+
3928  {
+
3929  return m_value.object->size();
+
3930  }
+
3931 
+
3932  default:
+
3933  {
+
3934  // all other types have size 1
+
3935  return 1;
+
3936  }
+
3937  }
+
3938  }
+
3939 
+
3972  size_type max_size() const noexcept
+
3973  {
+
3974  switch (m_type)
+
3975  {
+
3976  case value_t::array:
+
3977  {
+
3978  return m_value.array->max_size();
+
3979  }
+
3980 
+
3981  case value_t::object:
+
3982  {
+
3983  return m_value.object->max_size();
+
3984  }
+
3985 
+
3986  default:
+
3987  {
+
3988  // all other types have max_size() == size()
+
3989  return size();
+
3990  }
+
3991  }
+
3992  }
+
3993 
+
3995 
+
3996 
+
3998  // modifiers //
+
4000 
+
4003 
+
4029  void clear() noexcept
+
4030  {
+
4031  switch (m_type)
+
4032  {
+ +
4034  {
+
4035  m_value.number_integer = 0;
+
4036  break;
+
4037  }
+
4038 
+
4039  case value_t::number_float:
+
4040  {
+
4041  m_value.number_float = 0.0;
+
4042  break;
+
4043  }
+
4044 
+
4045  case value_t::boolean:
+
4046  {
+
4047  m_value.boolean = false;
+
4048  break;
+
4049  }
+
4050 
+
4051  case value_t::string:
+
4052  {
+
4053  m_value.string->clear();
+
4054  break;
+
4055  }
+
4056 
+
4057  case value_t::array:
+
4058  {
+
4059  m_value.array->clear();
+
4060  break;
+
4061  }
+
4062 
+
4063  case value_t::object:
+
4064  {
+
4065  m_value.object->clear();
+
4066  break;
+
4067  }
+
4068 
+
4069  default:
+
4070  {
+
4071  break;
+
4072  }
+
4073  }
+
4074  }
+
4075 
+
4096  void push_back(basic_json&& val)
+
4097  {
+
4098  // push_back only works for null objects or arrays
+
4099  if (not(is_null() or is_array()))
+
4100  {
+
4101  throw std::domain_error("cannot use push_back() with " + type_name());
+
4102  }
+
4103 
+
4104  // transform null object into an array
+
4105  if (is_null())
+
4106  {
+
4107  m_type = value_t::array;
+
4108  m_value = value_t::array;
+
4109  }
+
4110 
+
4111  // add element to array (move semantics)
+
4112  m_value.array->push_back(std::move(val));
+
4113  // invalidate object
+
4114  val.m_type = value_t::null;
+
4115  }
+
4116 
+
4121  reference operator+=(basic_json&& val)
+
4122  {
+
4123  push_back(std::move(val));
+
4124  return *this;
+
4125  }
+
4126 
+
4131  void push_back(const basic_json& val)
+
4132  {
+
4133  // push_back only works for null objects or arrays
+
4134  if (not(is_null() or is_array()))
+
4135  {
+
4136  throw std::domain_error("cannot use push_back() with " + type_name());
+
4137  }
4138 
-
4159  void push_back(const typename object_t::value_type& val)
-
4160  {
-
4161  // push_back only works for null objects or objects
-
4162  if (not(is_null() or is_object()))
-
4163  {
-
4164  throw std::domain_error("cannot use push_back() with " + type_name());
-
4165  }
-
4166 
-
4167  // transform null object into an object
-
4168  if (is_null())
-
4169  {
-
4170  m_type = value_t::object;
-
4171  m_value = value_t::object;
-
4172  }
-
4173 
-
4174  // add element to array
-
4175  m_value.object->insert(val);
-
4176  }
-
4177 
-
4182  reference operator+=(const typename object_t::value_type& val)
-
4183  {
-
4184  push_back(val);
-
4185  return operator[](val.first);
-
4186  }
+
4139  // transform null object into an array
+
4140  if (is_null())
+
4141  {
+
4142  m_type = value_t::array;
+
4143  m_value = value_t::array;
+
4144  }
+
4145 
+
4146  // add element to array
+
4147  m_value.array->push_back(val);
+
4148  }
+
4149 
+
4154  reference operator+=(const basic_json& val)
+
4155  {
+
4156  push_back(val);
+
4157  return *this;
+
4158  }
+
4159 
+
4180  void push_back(const typename object_t::value_type& val)
+
4181  {
+
4182  // push_back only works for null objects or objects
+
4183  if (not(is_null() or is_object()))
+
4184  {
+
4185  throw std::domain_error("cannot use push_back() with " + type_name());
+
4186  }
4187 
-
4208  iterator insert(const_iterator pos, const basic_json& val)
-
4209  {
-
4210  // insert only works for arrays
-
4211  if (is_array())
-
4212  {
-
4213  // check if iterator pos fits to this JSON value
-
4214  if (pos.m_object != this)
-
4215  {
-
4216  throw std::domain_error("iterator does not fit current value");
-
4217  }
-
4218 
-
4219  // insert to array and return iterator
-
4220  iterator result(this);
-
4221  result.m_it.array_iterator = m_value.array->insert(pos.m_it.array_iterator, val);
-
4222  return result;
-
4223  }
-
4224  else
-
4225  {
-
4226  throw std::domain_error("cannot use insert() with " + type_name());
-
4227  }
-
4228  }
-
4229 
-
4234  iterator insert(const_iterator pos, basic_json&& val)
-
4235  {
-
4236  return insert(pos, val);
-
4237  }
-
4238 
-
4261  iterator insert(const_iterator pos, size_type cnt, const basic_json& val)
-
4262  {
-
4263  // insert only works for arrays
-
4264  if (is_array())
-
4265  {
-
4266  // check if iterator pos fits to this JSON value
-
4267  if (pos.m_object != this)
-
4268  {
-
4269  throw std::domain_error("iterator does not fit current value");
-
4270  }
-
4271 
-
4272  // insert to array and return iterator
-
4273  iterator result(this);
-
4274  result.m_it.array_iterator = m_value.array->insert(pos.m_it.array_iterator, cnt, val);
-
4275  return result;
-
4276  }
-
4277  else
-
4278  {
-
4279  throw std::domain_error("cannot use insert() with " + type_name());
-
4280  }
-
4281  }
-
4282 
- -
4310  {
-
4311  // insert only works for arrays
-
4312  if (not is_array())
-
4313  {
-
4314  throw std::domain_error("cannot use insert() with " + type_name());
-
4315  }
-
4316 
-
4317  // check if iterator pos fits to this JSON value
-
4318  if (pos.m_object != this)
-
4319  {
-
4320  throw std::domain_error("iterator does not fit current value");
-
4321  }
-
4322 
-
4323  if (first.m_object != last.m_object)
-
4324  {
-
4325  throw std::domain_error("iterators do not fit");
-
4326  }
-
4327 
-
4328  if (first.m_object == this or last.m_object == this)
-
4329  {
-
4330  throw std::domain_error("passed iterators may not belong to container");
-
4331  }
-
4332 
-
4333  // insert to array and return iterator
-
4334  iterator result(this);
-
4335  result.m_it.array_iterator = m_value.array->insert(
-
4336  pos.m_it.array_iterator,
-
4337  first.m_it.array_iterator,
-
4338  last.m_it.array_iterator);
-
4339  return result;
-
4340  }
-
4341 
-
4363  iterator insert(const_iterator pos, std::initializer_list<basic_json> ilist)
-
4364  {
-
4365  // insert only works for arrays
-
4366  if (not is_array())
-
4367  {
-
4368  throw std::domain_error("cannot use insert() with " + type_name());
-
4369  }
-
4370 
-
4371  // check if iterator pos fits to this JSON value
-
4372  if (pos.m_object != this)
-
4373  {
-
4374  throw std::domain_error("iterator does not fit current value");
-
4375  }
-
4376 
-
4377  // insert to array and return iterator
-
4378  iterator result(this);
-
4379  result.m_it.array_iterator = m_value.array->insert(pos.m_it.array_iterator, ilist);
-
4380  return result;
-
4381  }
-
4382 
-
4400  void swap(reference other) noexcept (
-
4401  std::is_nothrow_move_constructible<value_t>::value and
-
4402  std::is_nothrow_move_assignable<value_t>::value and
-
4403  std::is_nothrow_move_constructible<json_value>::value and
-
4404  std::is_nothrow_move_assignable<json_value>::value
-
4405  )
-
4406  {
-
4407  std::swap(m_type, other.m_type);
-
4408  std::swap(m_value, other.m_value);
-
4409  }
-
4410 
-
4430  void swap(array_t& other)
-
4431  {
-
4432  // swap only works for arrays
-
4433  if (is_array())
-
4434  {
-
4435  std::swap(*(m_value.array), other);
-
4436  }
-
4437  else
-
4438  {
-
4439  throw std::domain_error("cannot use swap() with " + type_name());
-
4440  }
-
4441  }
-
4442 
-
4462  void swap(object_t& other)
-
4463  {
-
4464  // swap only works for objects
-
4465  if (is_object())
-
4466  {
-
4467  std::swap(*(m_value.object), other);
-
4468  }
-
4469  else
-
4470  {
-
4471  throw std::domain_error("cannot use swap() with " + type_name());
-
4472  }
-
4473  }
-
4474 
-
4494  void swap(string_t& other)
-
4495  {
-
4496  // swap only works for strings
-
4497  if (is_string())
-
4498  {
-
4499  std::swap(*(m_value.string), other);
-
4500  }
-
4501  else
-
4502  {
-
4503  throw std::domain_error("cannot use swap() with " + type_name());
-
4504  }
-
4505  }
-
4506 
-
4508 
-
4509 
-
4511  // lexicographical comparison operators //
-
4513 
-
4516 
-
4517  private:
-
4527  friend bool operator<(const value_t lhs, const value_t rhs)
-
4528  {
-
4529  static constexpr std::array<uint8_t, 7> order = {{
-
4530  0, // null
-
4531  3, // object
-
4532  4, // array
-
4533  5, // string
-
4534  1, // boolean
-
4535  2, // integer
-
4536  2 // float
-
4537  }
-
4538  };
-
4539 
-
4540  // discarded values are not comparable
-
4541  if (lhs == value_t::discarded or rhs == value_t::discarded)
-
4542  {
-
4543  return false;
-
4544  }
-
4545 
-
4546  return order[static_cast<std::size_t>(lhs)] < order[static_cast<std::size_t>(rhs)];
-
4547  }
-
4548 
-
4549  public:
-
4573  friend bool operator==(const_reference lhs, const_reference rhs) noexcept
-
4574  {
-
4575  const auto lhs_type = lhs.type();
-
4576  const auto rhs_type = rhs.type();
-
4577 
-
4578  if (lhs_type == rhs_type)
-
4579  {
-
4580  switch (lhs_type)
-
4581  {
-
4582  case value_t::array:
-
4583  return *lhs.m_value.array == *rhs.m_value.array;
-
4584  case value_t::object:
-
4585  return *lhs.m_value.object == *rhs.m_value.object;
-
4586  case value_t::null:
-
4587  return true;
-
4588  case value_t::string:
-
4589  return *lhs.m_value.string == *rhs.m_value.string;
-
4590  case value_t::boolean:
-
4591  return lhs.m_value.boolean == rhs.m_value.boolean;
- -
4593  return lhs.m_value.number_integer == rhs.m_value.number_integer;
-
4594  case value_t::number_float:
-
4595  return approx(lhs.m_value.number_float, rhs.m_value.number_float);
-
4596  default:
-
4597  return false;
-
4598  }
-
4599  }
-
4600  else if (lhs_type == value_t::number_integer and rhs_type == value_t::number_float)
-
4601  {
-
4602  return approx(static_cast<number_float_t>(lhs.m_value.number_integer),
-
4603  rhs.m_value.number_float);
-
4604  }
-
4605  else if (lhs_type == value_t::number_float and rhs_type == value_t::number_integer)
+
4188  // transform null object into an object
+
4189  if (is_null())
+
4190  {
+
4191  m_type = value_t::object;
+
4192  m_value = value_t::object;
+
4193  }
+
4194 
+
4195  // add element to array
+
4196  m_value.object->insert(val);
+
4197  }
+
4198 
+
4203  reference operator+=(const typename object_t::value_type& val)
+
4204  {
+
4205  push_back(val);
+
4206  return operator[](val.first);
+
4207  }
+
4208 
+
4230  iterator insert(const_iterator pos, const basic_json& val)
+
4231  {
+
4232  // insert only works for arrays
+
4233  if (is_array())
+
4234  {
+
4235  // check if iterator pos fits to this JSON value
+
4236  if (pos.m_object != this)
+
4237  {
+
4238  throw std::domain_error("iterator does not fit current value");
+
4239  }
+
4240 
+
4241  // insert to array and return iterator
+
4242  iterator result(this);
+
4243  result.m_it.array_iterator = m_value.array->insert(pos.m_it.array_iterator, val);
+
4244  return result;
+
4245  }
+
4246  else
+
4247  {
+
4248  throw std::domain_error("cannot use insert() with " + type_name());
+
4249  }
+
4250  }
+
4251 
+
4256  iterator insert(const_iterator pos, basic_json&& val)
+
4257  {
+
4258  return insert(pos, val);
+
4259  }
+
4260 
+
4284  iterator insert(const_iterator pos, size_type cnt, const basic_json& val)
+
4285  {
+
4286  // insert only works for arrays
+
4287  if (is_array())
+
4288  {
+
4289  // check if iterator pos fits to this JSON value
+
4290  if (pos.m_object != this)
+
4291  {
+
4292  throw std::domain_error("iterator does not fit current value");
+
4293  }
+
4294 
+
4295  // insert to array and return iterator
+
4296  iterator result(this);
+
4297  result.m_it.array_iterator = m_value.array->insert(pos.m_it.array_iterator, cnt, val);
+
4298  return result;
+
4299  }
+
4300  else
+
4301  {
+
4302  throw std::domain_error("cannot use insert() with " + type_name());
+
4303  }
+
4304  }
+
4305 
+ +
4336  {
+
4337  // insert only works for arrays
+
4338  if (not is_array())
+
4339  {
+
4340  throw std::domain_error("cannot use insert() with " + type_name());
+
4341  }
+
4342 
+
4343  // check if iterator pos fits to this JSON value
+
4344  if (pos.m_object != this)
+
4345  {
+
4346  throw std::domain_error("iterator does not fit current value");
+
4347  }
+
4348 
+
4349  if (first.m_object != last.m_object)
+
4350  {
+
4351  throw std::domain_error("iterators do not fit");
+
4352  }
+
4353 
+
4354  if (first.m_object == this or last.m_object == this)
+
4355  {
+
4356  throw std::domain_error("passed iterators may not belong to container");
+
4357  }
+
4358 
+
4359  // insert to array and return iterator
+
4360  iterator result(this);
+
4361  result.m_it.array_iterator = m_value.array->insert(
+
4362  pos.m_it.array_iterator,
+
4363  first.m_it.array_iterator,
+
4364  last.m_it.array_iterator);
+
4365  return result;
+
4366  }
+
4367 
+
4390  iterator insert(const_iterator pos, std::initializer_list<basic_json> ilist)
+
4391  {
+
4392  // insert only works for arrays
+
4393  if (not is_array())
+
4394  {
+
4395  throw std::domain_error("cannot use insert() with " + type_name());
+
4396  }
+
4397 
+
4398  // check if iterator pos fits to this JSON value
+
4399  if (pos.m_object != this)
+
4400  {
+
4401  throw std::domain_error("iterator does not fit current value");
+
4402  }
+
4403 
+
4404  // insert to array and return iterator
+
4405  iterator result(this);
+
4406  result.m_it.array_iterator = m_value.array->insert(pos.m_it.array_iterator, ilist);
+
4407  return result;
+
4408  }
+
4409 
+
4427  void swap(reference other) noexcept (
+
4428  std::is_nothrow_move_constructible<value_t>::value and
+
4429  std::is_nothrow_move_assignable<value_t>::value and
+
4430  std::is_nothrow_move_constructible<json_value>::value and
+
4431  std::is_nothrow_move_assignable<json_value>::value
+
4432  )
+
4433  {
+
4434  std::swap(m_type, other.m_type);
+
4435  std::swap(m_value, other.m_value);
+
4436  }
+
4437 
+
4457  void swap(array_t& other)
+
4458  {
+
4459  // swap only works for arrays
+
4460  if (is_array())
+
4461  {
+
4462  std::swap(*(m_value.array), other);
+
4463  }
+
4464  else
+
4465  {
+
4466  throw std::domain_error("cannot use swap() with " + type_name());
+
4467  }
+
4468  }
+
4469 
+
4489  void swap(object_t& other)
+
4490  {
+
4491  // swap only works for objects
+
4492  if (is_object())
+
4493  {
+
4494  std::swap(*(m_value.object), other);
+
4495  }
+
4496  else
+
4497  {
+
4498  throw std::domain_error("cannot use swap() with " + type_name());
+
4499  }
+
4500  }
+
4501 
+
4521  void swap(string_t& other)
+
4522  {
+
4523  // swap only works for strings
+
4524  if (is_string())
+
4525  {
+
4526  std::swap(*(m_value.string), other);
+
4527  }
+
4528  else
+
4529  {
+
4530  throw std::domain_error("cannot use swap() with " + type_name());
+
4531  }
+
4532  }
+
4533 
+
4535 
+
4536 
+
4538  // lexicographical comparison operators //
+
4540 
+
4543 
+
4544  private:
+
4554  friend bool operator<(const value_t lhs, const value_t rhs)
+
4555  {
+
4556  static constexpr std::array<uint8_t, 7> order = {{
+
4557  0, // null
+
4558  3, // object
+
4559  4, // array
+
4560  5, // string
+
4561  1, // boolean
+
4562  2, // integer
+
4563  2 // float
+
4564  }
+
4565  };
+
4566 
+
4567  // discarded values are not comparable
+
4568  if (lhs == value_t::discarded or rhs == value_t::discarded)
+
4569  {
+
4570  return false;
+
4571  }
+
4572 
+
4573  return order[static_cast<std::size_t>(lhs)] < order[static_cast<std::size_t>(rhs)];
+
4574  }
+
4575 
+
4576  public:
+
4600  friend bool operator==(const_reference lhs, const_reference rhs) noexcept
+
4601  {
+
4602  const auto lhs_type = lhs.type();
+
4603  const auto rhs_type = rhs.type();
+
4604 
+
4605  if (lhs_type == rhs_type)
4606  {
-
4607  return approx(lhs.m_value.number_float,
-
4608  static_cast<number_float_t>(rhs.m_value.number_integer));
-
4609  }
-
4610  return false;
-
4611  }
-
4612 
-
4631  friend bool operator==(const_reference v, std::nullptr_t) noexcept
-
4632  {
-
4633  return v.is_null();
-
4634  }
-
4635 
-
4640  friend bool operator==(std::nullptr_t, const_reference v) noexcept
-
4641  {
-
4642  return v.is_null();
-
4643  }
-
4644 
-
4661  friend bool operator!=(const_reference lhs, const_reference rhs) noexcept
-
4662  {
-
4663  return not (lhs == rhs);
-
4664  }
-
4665 
-
4684  friend bool operator!=(const_reference v, std::nullptr_t) noexcept
-
4685  {
-
4686  return not v.is_null();
-
4687  }
-
4688 
-
4693  friend bool operator!=(std::nullptr_t, const_reference v) noexcept
-
4694  {
-
4695  return not v.is_null();
-
4696  }
-
4697 
-
4722  friend bool operator<(const_reference lhs, const_reference rhs) noexcept
-
4723  {
-
4724  const auto lhs_type = lhs.type();
-
4725  const auto rhs_type = rhs.type();
-
4726 
-
4727  if (lhs_type == rhs_type)
-
4728  {
-
4729  switch (lhs_type)
-
4730  {
-
4731  case value_t::array:
-
4732  return *lhs.m_value.array < *rhs.m_value.array;
-
4733  case value_t::object:
-
4734  return *lhs.m_value.object < *rhs.m_value.object;
-
4735  case value_t::null:
-
4736  return false;
-
4737  case value_t::string:
-
4738  return *lhs.m_value.string < *rhs.m_value.string;
-
4739  case value_t::boolean:
-
4740  return lhs.m_value.boolean < rhs.m_value.boolean;
- -
4742  return lhs.m_value.number_integer < rhs.m_value.number_integer;
-
4743  case value_t::number_float:
-
4744  return lhs.m_value.number_float < rhs.m_value.number_float;
-
4745  default:
-
4746  return false;
-
4747  }
-
4748  }
-
4749  else if (lhs_type == value_t::number_integer and rhs_type == value_t::number_float)
-
4750  {
-
4751  return static_cast<number_float_t>(lhs.m_value.number_integer) <
-
4752  rhs.m_value.number_float;
-
4753  }
-
4754  else if (lhs_type == value_t::number_float and rhs_type == value_t::number_integer)
+
4607  switch (lhs_type)
+
4608  {
+
4609  case value_t::array:
+
4610  return *lhs.m_value.array == *rhs.m_value.array;
+
4611  case value_t::object:
+
4612  return *lhs.m_value.object == *rhs.m_value.object;
+
4613  case value_t::null:
+
4614  return true;
+
4615  case value_t::string:
+
4616  return *lhs.m_value.string == *rhs.m_value.string;
+
4617  case value_t::boolean:
+
4618  return lhs.m_value.boolean == rhs.m_value.boolean;
+ +
4620  return lhs.m_value.number_integer == rhs.m_value.number_integer;
+
4621  case value_t::number_float:
+
4622  return approx(lhs.m_value.number_float, rhs.m_value.number_float);
+
4623  default:
+
4624  return false;
+
4625  }
+
4626  }
+
4627  else if (lhs_type == value_t::number_integer and rhs_type == value_t::number_float)
+
4628  {
+
4629  return approx(static_cast<number_float_t>(lhs.m_value.number_integer),
+
4630  rhs.m_value.number_float);
+
4631  }
+
4632  else if (lhs_type == value_t::number_float and rhs_type == value_t::number_integer)
+
4633  {
+
4634  return approx(lhs.m_value.number_float,
+
4635  static_cast<number_float_t>(rhs.m_value.number_integer));
+
4636  }
+
4637  return false;
+
4638  }
+
4639 
+
4658  friend bool operator==(const_reference v, std::nullptr_t) noexcept
+
4659  {
+
4660  return v.is_null();
+
4661  }
+
4662 
+
4667  friend bool operator==(std::nullptr_t, const_reference v) noexcept
+
4668  {
+
4669  return v.is_null();
+
4670  }
+
4671 
+
4688  friend bool operator!=(const_reference lhs, const_reference rhs) noexcept
+
4689  {
+
4690  return not (lhs == rhs);
+
4691  }
+
4692 
+
4711  friend bool operator!=(const_reference v, std::nullptr_t) noexcept
+
4712  {
+
4713  return not v.is_null();
+
4714  }
+
4715 
+
4720  friend bool operator!=(std::nullptr_t, const_reference v) noexcept
+
4721  {
+
4722  return not v.is_null();
+
4723  }
+
4724 
+
4749  friend bool operator<(const_reference lhs, const_reference rhs) noexcept
+
4750  {
+
4751  const auto lhs_type = lhs.type();
+
4752  const auto rhs_type = rhs.type();
+
4753 
+
4754  if (lhs_type == rhs_type)
4755  {
-
4756  return lhs.m_value.number_float <
-
4757  static_cast<number_float_t>(rhs.m_value.number_integer);
-
4758  }
-
4759 
-
4760  // We only reach this line if we cannot compare values. In that case,
-
4761  // we compare types. Note we have to call the operator explicitly,
-
4762  // because MSVC has problems otherwise.
-
4763  return operator<(lhs_type, rhs_type);
-
4764  }
-
4765 
-
4783  friend bool operator<=(const_reference lhs, const_reference rhs) noexcept
-
4784  {
-
4785  return not (rhs < lhs);
-
4786  }
-
4787 
-
4805  friend bool operator>(const_reference lhs, const_reference rhs) noexcept
-
4806  {
-
4807  return not (lhs <= rhs);
-
4808  }
-
4809 
-
4827  friend bool operator>=(const_reference lhs, const_reference rhs) noexcept
-
4828  {
-
4829  return not (lhs < rhs);
-
4830  }
-
4831 
-
4833 
-
4834 
-
4836  // serialization //
-
4838 
-
4841 
-
4864  friend std::ostream& operator<<(std::ostream& o, const basic_json& j)
-
4865  {
-
4866  // read width member and use it as indentation parameter if nonzero
-
4867  const bool pretty_print = (o.width() > 0);
-
4868  const auto indentation = (pretty_print ? o.width() : 0);
-
4869 
-
4870  // reset width to 0 for subsequent calls to this stream
-
4871  o.width(0);
-
4872 
-
4873  // do the actual serialization
-
4874  j.dump(o, pretty_print, static_cast<unsigned int>(indentation));
-
4875  return o;
-
4876  }
-
4877 
-
4882  friend std::ostream& operator>>(const basic_json& j, std::ostream& o)
-
4883  {
-
4884  return o << j;
-
4885  }
-
4886 
-
4888 
-
4889 
-
4891  // deserialization //
-
4893 
+
4756  switch (lhs_type)
+
4757  {
+
4758  case value_t::array:
+
4759  return *lhs.m_value.array < *rhs.m_value.array;
+
4760  case value_t::object:
+
4761  return *lhs.m_value.object < *rhs.m_value.object;
+
4762  case value_t::null:
+
4763  return false;
+
4764  case value_t::string:
+
4765  return *lhs.m_value.string < *rhs.m_value.string;
+
4766  case value_t::boolean:
+
4767  return lhs.m_value.boolean < rhs.m_value.boolean;
+ +
4769  return lhs.m_value.number_integer < rhs.m_value.number_integer;
+
4770  case value_t::number_float:
+
4771  return lhs.m_value.number_float < rhs.m_value.number_float;
+
4772  default:
+
4773  return false;
+
4774  }
+
4775  }
+
4776  else if (lhs_type == value_t::number_integer and rhs_type == value_t::number_float)
+
4777  {
+
4778  return static_cast<number_float_t>(lhs.m_value.number_integer) <
+
4779  rhs.m_value.number_float;
+
4780  }
+
4781  else if (lhs_type == value_t::number_float and rhs_type == value_t::number_integer)
+
4782  {
+
4783  return lhs.m_value.number_float <
+
4784  static_cast<number_float_t>(rhs.m_value.number_integer);
+
4785  }
+
4786 
+
4787  // We only reach this line if we cannot compare values. In that case,
+
4788  // we compare types. Note we have to call the operator explicitly,
+
4789  // because MSVC has problems otherwise.
+
4790  return operator<(lhs_type, rhs_type);
+
4791  }
+
4792 
+
4810  friend bool operator<=(const_reference lhs, const_reference rhs) noexcept
+
4811  {
+
4812  return not (rhs < lhs);
+
4813  }
+
4814 
+
4832  friend bool operator>(const_reference lhs, const_reference rhs) noexcept
+
4833  {
+
4834  return not (lhs <= rhs);
+
4835  }
+
4836 
+
4854  friend bool operator>=(const_reference lhs, const_reference rhs) noexcept
+
4855  {
+
4856  return not (lhs < rhs);
+
4857  }
+
4858 
+
4860 
+
4861 
+
4863  // serialization //
+
4865 
+
4868 
+
4891  friend std::ostream& operator<<(std::ostream& o, const basic_json& j)
+
4892  {
+
4893  // read width member and use it as indentation parameter if nonzero
+
4894  const bool pretty_print = (o.width() > 0);
+
4895  const auto indentation = (pretty_print ? o.width() : 0);
4896 
-
4921  static basic_json parse(const string_t& s, parser_callback_t cb = nullptr)
-
4922  {
-
4923  return parser(s, cb).parse();
-
4924  }
-
4925 
-
4950  static basic_json parse(std::istream& i, parser_callback_t cb = nullptr)
-
4951  {
-
4952  return parser(i, cb).parse();
-
4953  }
-
4954 
-
4958  static basic_json parse(std::istream&& i, parser_callback_t cb = nullptr)
-
4959  {
-
4960  return parser(i, cb).parse();
-
4961  }
-
4962 
-
4986  friend std::istream& operator<<(basic_json& j, std::istream& i)
-
4987  {
-
4988  j = parser(i).parse();
-
4989  return i;
-
4990  }
-
4991 
-
4996  friend std::istream& operator>>(std::istream& i, basic_json& j)
-
4997  {
-
4998  j = parser(i).parse();
-
4999  return i;
-
5000  }
-
5001 
-
5003 
-
5004 
-
5005  private:
-
5007  // convenience functions //
-
5009 
-
5011  string_t type_name() const
-
5012  {
-
5013  switch (m_type)
-
5014  {
-
5015  case value_t::null:
-
5016  return "null";
-
5017  case value_t::object:
-
5018  return "object";
-
5019  case value_t::array:
-
5020  return "array";
-
5021  case value_t::string:
-
5022  return "string";
-
5023  case value_t::boolean:
-
5024  return "boolean";
-
5025  case value_t::discarded:
-
5026  return "discarded";
-
5027  default:
-
5028  return "number";
-
5029  }
-
5030  }
+
4897  // reset width to 0 for subsequent calls to this stream
+
4898  o.width(0);
+
4899 
+
4900  // do the actual serialization
+
4901  j.dump(o, pretty_print, static_cast<unsigned int>(indentation));
+
4902  return o;
+
4903  }
+
4904 
+
4909  friend std::ostream& operator>>(const basic_json& j, std::ostream& o)
+
4910  {
+
4911  return o << j;
+
4912  }
+
4913 
+
4915 
+
4916 
+
4918  // deserialization //
+
4920 
+
4923 
+
4948  static basic_json parse(const string_t& s, parser_callback_t cb = nullptr)
+
4949  {
+
4950  return parser(s, cb).parse();
+
4951  }
+
4952 
+
4977  static basic_json parse(std::istream& i, parser_callback_t cb = nullptr)
+
4978  {
+
4979  return parser(i, cb).parse();
+
4980  }
+
4981 
+
4985  static basic_json parse(std::istream&& i, parser_callback_t cb = nullptr)
+
4986  {
+
4987  return parser(i, cb).parse();
+
4988  }
+
4989 
+
5013  friend std::istream& operator<<(basic_json& j, std::istream& i)
+
5014  {
+
5015  j = parser(i).parse();
+
5016  return i;
+
5017  }
+
5018 
+
5023  friend std::istream& operator>>(std::istream& i, basic_json& j)
+
5024  {
+
5025  j = parser(i).parse();
+
5026  return i;
+
5027  }
+
5028 
+
5030 
5031 
-
5040  static std::size_t extra_space(const string_t& s) noexcept
-
5041  {
-
5042  std::size_t result = 0;
-
5043 
-
5044  for (const auto& c : s)
-
5045  {
-
5046  switch (c)
-
5047  {
-
5048  case '"':
-
5049  case '\\':
-
5050  case '\b':
-
5051  case '\f':
-
5052  case '\n':
-
5053  case '\r':
-
5054  case '\t':
-
5055  {
-
5056  // from c (1 byte) to \x (2 bytes)
-
5057  result += 1;
-
5058  break;
-
5059  }
-
5060 
-
5061  default:
-
5062  {
-
5063  if (c >= 0x00 and c <= 0x1f)
-
5064  {
-
5065  // from c (1 byte) to \uxxxx (6 bytes)
-
5066  result += 5;
-
5067  }
-
5068  break;
-
5069  }
-
5070  }
-
5071  }
-
5072 
-
5073  return result;
-
5074  }
-
5075 
-
5089  static string_t escape_string(const string_t& s) noexcept
-
5090  {
-
5091  const auto space = extra_space(s);
-
5092  if (space == 0)
-
5093  {
-
5094  return s;
-
5095  }
-
5096 
-
5097  // create a result string of necessary size
-
5098  string_t result(s.size() + space, '\\');
-
5099  std::size_t pos = 0;
-
5100 
-
5101  for (const auto& c : s)
-
5102  {
-
5103  switch (c)
-
5104  {
-
5105  // quotation mark (0x22)
-
5106  case '"':
-
5107  {
-
5108  result[pos + 1] = '"';
-
5109  pos += 2;
-
5110  break;
-
5111  }
-
5112 
-
5113  // reverse solidus (0x5c)
-
5114  case '\\':
-
5115  {
-
5116  // nothing to change
-
5117  pos += 2;
-
5118  break;
-
5119  }
-
5120 
-
5121  // backspace (0x08)
-
5122  case '\b':
-
5123  {
-
5124  result[pos + 1] = 'b';
-
5125  pos += 2;
-
5126  break;
-
5127  }
-
5128 
-
5129  // formfeed (0x0c)
-
5130  case '\f':
-
5131  {
-
5132  result[pos + 1] = 'f';
-
5133  pos += 2;
-
5134  break;
-
5135  }
-
5136 
-
5137  // newline (0x0a)
-
5138  case '\n':
-
5139  {
-
5140  result[pos + 1] = 'n';
-
5141  pos += 2;
-
5142  break;
-
5143  }
-
5144 
-
5145  // carriage return (0x0d)
-
5146  case '\r':
-
5147  {
-
5148  result[pos + 1] = 'r';
-
5149  pos += 2;
-
5150  break;
-
5151  }
-
5152 
-
5153  // horizontal tab (0x09)
-
5154  case '\t':
-
5155  {
-
5156  result[pos + 1] = 't';
-
5157  pos += 2;
-
5158  break;
-
5159  }
-
5160 
-
5161  default:
-
5162  {
-
5163  if (c >= 0x00 and c <= 0x1f)
-
5164  {
-
5165  // convert a number 0..15 to its hex representation (0..f)
-
5166  auto hexify = [](const char v) -> char
-
5167  {
-
5168  return (v < 10) ? ('0' + v) : ('a' + v - 10);
-
5169  };
-
5170 
-
5171  // print character c as \uxxxx
-
5172  for (const char m :
-
5173  { 'u', '0', '0', hexify(c >> 4), hexify(c & 0x0f)
-
5174  })
-
5175  {
-
5176  result[++pos] = m;
-
5177  }
-
5178 
-
5179  ++pos;
-
5180  }
-
5181  else
-
5182  {
-
5183  // all other characters are added as-is
-
5184  result[pos++] = c;
-
5185  }
-
5186  break;
-
5187  }
-
5188  }
-
5189  }
-
5190 
-
5191  return result;
-
5192  }
-
5193 
-
5211  void dump(std::ostream& o,
-
5212  const bool pretty_print,
-
5213  const unsigned int indent_step,
-
5214  const unsigned int current_indent = 0) const
-
5215  {
-
5216  // variable to hold indentation for recursive calls
-
5217  unsigned int new_indent = current_indent;
-
5218 
-
5219  switch (m_type)
-
5220  {
-
5221  case value_t::object:
-
5222  {
-
5223  if (m_value.object->empty())
-
5224  {
-
5225  o << "{}";
-
5226  return;
-
5227  }
-
5228 
-
5229  o << "{";
-
5230 
-
5231  // increase indentation
-
5232  if (pretty_print)
-
5233  {
-
5234  new_indent += indent_step;
-
5235  o << "\n";
-
5236  }
-
5237 
-
5238  for (auto i = m_value.object->cbegin(); i != m_value.object->cend(); ++i)
-
5239  {
-
5240  if (i != m_value.object->cbegin())
-
5241  {
-
5242  o << (pretty_print ? ",\n" : ",");
-
5243  }
-
5244  o << string_t(new_indent, ' ') << "\""
-
5245  << escape_string(i->first) << "\":"
-
5246  << (pretty_print ? " " : "");
-
5247  i->second.dump(o, pretty_print, indent_step, new_indent);
-
5248  }
-
5249 
-
5250  // decrease indentation
-
5251  if (pretty_print)
-
5252  {
-
5253  new_indent -= indent_step;
-
5254  o << "\n";
-
5255  }
-
5256 
-
5257  o << string_t(new_indent, ' ') + "}";
-
5258  return;
-
5259  }
-
5260 
-
5261  case value_t::array:
-
5262  {
-
5263  if (m_value.array->empty())
-
5264  {
-
5265  o << "[]";
-
5266  return;
-
5267  }
-
5268 
-
5269  o << "[";
-
5270 
-
5271  // increase indentation
-
5272  if (pretty_print)
-
5273  {
-
5274  new_indent += indent_step;
-
5275  o << "\n";
-
5276  }
-
5277 
-
5278  for (auto i = m_value.array->cbegin(); i != m_value.array->cend(); ++i)
+
5032  private:
+
5034  // convenience functions //
+
5036 
+
5038  string_t type_name() const
+
5039  {
+
5040  switch (m_type)
+
5041  {
+
5042  case value_t::null:
+
5043  return "null";
+
5044  case value_t::object:
+
5045  return "object";
+
5046  case value_t::array:
+
5047  return "array";
+
5048  case value_t::string:
+
5049  return "string";
+
5050  case value_t::boolean:
+
5051  return "boolean";
+
5052  case value_t::discarded:
+
5053  return "discarded";
+
5054  default:
+
5055  return "number";
+
5056  }
+
5057  }
+
5058 
+
5067  static std::size_t extra_space(const string_t& s) noexcept
+
5068  {
+
5069  std::size_t result = 0;
+
5070 
+
5071  for (const auto& c : s)
+
5072  {
+
5073  switch (c)
+
5074  {
+
5075  case '"':
+
5076  case '\\':
+
5077  case '\b':
+
5078  case '\f':
+
5079  case '\n':
+
5080  case '\r':
+
5081  case '\t':
+
5082  {
+
5083  // from c (1 byte) to \x (2 bytes)
+
5084  result += 1;
+
5085  break;
+
5086  }
+
5087 
+
5088  default:
+
5089  {
+
5090  if (c >= 0x00 and c <= 0x1f)
+
5091  {
+
5092  // from c (1 byte) to \uxxxx (6 bytes)
+
5093  result += 5;
+
5094  }
+
5095  break;
+
5096  }
+
5097  }
+
5098  }
+
5099 
+
5100  return result;
+
5101  }
+
5102 
+
5116  static string_t escape_string(const string_t& s) noexcept
+
5117  {
+
5118  const auto space = extra_space(s);
+
5119  if (space == 0)
+
5120  {
+
5121  return s;
+
5122  }
+
5123 
+
5124  // create a result string of necessary size
+
5125  string_t result(s.size() + space, '\\');
+
5126  std::size_t pos = 0;
+
5127 
+
5128  for (const auto& c : s)
+
5129  {
+
5130  switch (c)
+
5131  {
+
5132  // quotation mark (0x22)
+
5133  case '"':
+
5134  {
+
5135  result[pos + 1] = '"';
+
5136  pos += 2;
+
5137  break;
+
5138  }
+
5139 
+
5140  // reverse solidus (0x5c)
+
5141  case '\\':
+
5142  {
+
5143  // nothing to change
+
5144  pos += 2;
+
5145  break;
+
5146  }
+
5147 
+
5148  // backspace (0x08)
+
5149  case '\b':
+
5150  {
+
5151  result[pos + 1] = 'b';
+
5152  pos += 2;
+
5153  break;
+
5154  }
+
5155 
+
5156  // formfeed (0x0c)
+
5157  case '\f':
+
5158  {
+
5159  result[pos + 1] = 'f';
+
5160  pos += 2;
+
5161  break;
+
5162  }
+
5163 
+
5164  // newline (0x0a)
+
5165  case '\n':
+
5166  {
+
5167  result[pos + 1] = 'n';
+
5168  pos += 2;
+
5169  break;
+
5170  }
+
5171 
+
5172  // carriage return (0x0d)
+
5173  case '\r':
+
5174  {
+
5175  result[pos + 1] = 'r';
+
5176  pos += 2;
+
5177  break;
+
5178  }
+
5179 
+
5180  // horizontal tab (0x09)
+
5181  case '\t':
+
5182  {
+
5183  result[pos + 1] = 't';
+
5184  pos += 2;
+
5185  break;
+
5186  }
+
5187 
+
5188  default:
+
5189  {
+
5190  if (c >= 0x00 and c <= 0x1f)
+
5191  {
+
5192  // convert a number 0..15 to its hex representation (0..f)
+
5193  auto hexify = [](const char v) -> char
+
5194  {
+
5195  return (v < 10) ? ('0' + v) : ('a' + v - 10);
+
5196  };
+
5197 
+
5198  // print character c as \uxxxx
+
5199  for (const char m :
+
5200  { 'u', '0', '0', hexify(c >> 4), hexify(c & 0x0f)
+
5201  })
+
5202  {
+
5203  result[++pos] = m;
+
5204  }
+
5205 
+
5206  ++pos;
+
5207  }
+
5208  else
+
5209  {
+
5210  // all other characters are added as-is
+
5211  result[pos++] = c;
+
5212  }
+
5213  break;
+
5214  }
+
5215  }
+
5216  }
+
5217 
+
5218  return result;
+
5219  }
+
5220 
+
5238  void dump(std::ostream& o,
+
5239  const bool pretty_print,
+
5240  const unsigned int indent_step,
+
5241  const unsigned int current_indent = 0) const
+
5242  {
+
5243  // variable to hold indentation for recursive calls
+
5244  unsigned int new_indent = current_indent;
+
5245 
+
5246  switch (m_type)
+
5247  {
+
5248  case value_t::object:
+
5249  {
+
5250  if (m_value.object->empty())
+
5251  {
+
5252  o << "{}";
+
5253  return;
+
5254  }
+
5255 
+
5256  o << "{";
+
5257 
+
5258  // increase indentation
+
5259  if (pretty_print)
+
5260  {
+
5261  new_indent += indent_step;
+
5262  o << "\n";
+
5263  }
+
5264 
+
5265  for (auto i = m_value.object->cbegin(); i != m_value.object->cend(); ++i)
+
5266  {
+
5267  if (i != m_value.object->cbegin())
+
5268  {
+
5269  o << (pretty_print ? ",\n" : ",");
+
5270  }
+
5271  o << string_t(new_indent, ' ') << "\""
+
5272  << escape_string(i->first) << "\":"
+
5273  << (pretty_print ? " " : "");
+
5274  i->second.dump(o, pretty_print, indent_step, new_indent);
+
5275  }
+
5276 
+
5277  // decrease indentation
+
5278  if (pretty_print)
5279  {
-
5280  if (i != m_value.array->cbegin())
-
5281  {
-
5282  o << (pretty_print ? ",\n" : ",");
-
5283  }
-
5284  o << string_t(new_indent, ' ');
-
5285  i->dump(o, pretty_print, indent_step, new_indent);
-
5286  }
+
5280  new_indent -= indent_step;
+
5281  o << "\n";
+
5282  }
+
5283 
+
5284  o << string_t(new_indent, ' ') + "}";
+
5285  return;
+
5286  }
5287 
-
5288  // decrease indentation
-
5289  if (pretty_print)
-
5290  {
-
5291  new_indent -= indent_step;
-
5292  o << "\n";
-
5293  }
-
5294 
-
5295  o << string_t(new_indent, ' ') << "]";
-
5296  return;
-
5297  }
-
5298 
-
5299  case value_t::string:
-
5300  {
-
5301  o << string_t("\"") << escape_string(*m_value.string) << "\"";
-
5302  return;
-
5303  }
+
5288  case value_t::array:
+
5289  {
+
5290  if (m_value.array->empty())
+
5291  {
+
5292  o << "[]";
+
5293  return;
+
5294  }
+
5295 
+
5296  o << "[";
+
5297 
+
5298  // increase indentation
+
5299  if (pretty_print)
+
5300  {
+
5301  new_indent += indent_step;
+
5302  o << "\n";
+
5303  }
5304 
-
5305  case value_t::boolean:
-
5306  {
-
5307  o << (m_value.boolean ? "true" : "false");
-
5308  return;
-
5309  }
-
5310 
- -
5312  {
-
5313  o << m_value.number_integer;
-
5314  return;
-
5315  }
-
5316 
-
5317  case value_t::number_float:
-
5318  {
-
5319  // 15 digits of precision allows round-trip IEEE 754
-
5320  // string->double->string; to be safe, we read this value from
-
5321  // std::numeric_limits<number_float_t>::digits10
-
5322  o << std::setprecision(std::numeric_limits<number_float_t>::digits10) << m_value.number_float;
+
5305  for (auto i = m_value.array->cbegin(); i != m_value.array->cend(); ++i)
+
5306  {
+
5307  if (i != m_value.array->cbegin())
+
5308  {
+
5309  o << (pretty_print ? ",\n" : ",");
+
5310  }
+
5311  o << string_t(new_indent, ' ');
+
5312  i->dump(o, pretty_print, indent_step, new_indent);
+
5313  }
+
5314 
+
5315  // decrease indentation
+
5316  if (pretty_print)
+
5317  {
+
5318  new_indent -= indent_step;
+
5319  o << "\n";
+
5320  }
+
5321 
+
5322  o << string_t(new_indent, ' ') << "]";
5323  return;
5324  }
5325 
-
5326  case value_t::discarded:
+
5326  case value_t::string:
5327  {
-
5328  o << "<discarded>";
+
5328  o << string_t("\"") << escape_string(*m_value.string) << "\"";
5329  return;
5330  }
5331 
-
5332  case value_t::null:
+
5332  case value_t::boolean:
5333  {
-
5334  o << "null";
+
5334  o << (m_value.boolean ? "true" : "false");
5335  return;
5336  }
-
5337  }
-
5338  }
-
5339 
-
5340  private:
-
5342  // member variables //
-
5344 
-
5346  value_t m_type = value_t::null;
-
5347 
-
5349  json_value m_value = {};
-
5350 
-
5351 
-
5352  private:
-
5354  // iterators //
-
5356 
-
5366  class primitive_iterator_t
-
5367  {
-
5368  public:
-
5370  void set_begin()
-
5371  {
-
5372  m_it = begin_value;
-
5373  }
+
5337 
+ +
5339  {
+
5340  o << m_value.number_integer;
+
5341  return;
+
5342  }
+
5343 
+
5344  case value_t::number_float:
+
5345  {
+
5346  // 15 digits of precision allows round-trip IEEE 754
+
5347  // string->double->string; to be safe, we read this value from
+
5348  // std::numeric_limits<number_float_t>::digits10
+
5349  o << std::setprecision(std::numeric_limits<number_float_t>::digits10) << m_value.number_float;
+
5350  return;
+
5351  }
+
5352 
+
5353  case value_t::discarded:
+
5354  {
+
5355  o << "<discarded>";
+
5356  return;
+
5357  }
+
5358 
+
5359  case value_t::null:
+
5360  {
+
5361  o << "null";
+
5362  return;
+
5363  }
+
5364  }
+
5365  }
+
5366 
+
5367  private:
+
5369  // member variables //
+
5371 
+
5373  value_t m_type = value_t::null;
5374 
-
5376  void set_end()
-
5377  {
-
5378  m_it = end_value;
-
5379  }
-
5380 
-
5382  bool is_begin() const
-
5383  {
-
5384  return (m_it == begin_value);
-
5385  }
-
5386 
-
5388  bool is_end() const
-
5389  {
-
5390  return (m_it == end_value);
-
5391  }
-
5392 
-
5394  operator difference_type& ()
-
5395  {
-
5396  return m_it;
-
5397  }
-
5398 
-
5400  operator difference_type () const
-
5401  {
-
5402  return m_it;
-
5403  }
-
5404 
-
5405  private:
-
5406  static constexpr difference_type begin_value = 0;
-
5407  static constexpr difference_type end_value = begin_value + 1;
-
5408 
-
5410  difference_type m_it = std::numeric_limits<std::ptrdiff_t>::denorm_min();
-
5411  };
-
5412 
-
5420  struct internal_iterator
-
5421  {
-
5423  typename object_t::iterator object_iterator;
-
5425  typename array_t::iterator array_iterator;
-
5427  primitive_iterator_t primitive_iterator;
-
5428 
-
5430  internal_iterator()
-
5431  : object_iterator(), array_iterator(), primitive_iterator()
-
5432  {}
-
5433  };
-
5434 
-
5435  public:
-
5449  class const_iterator : public std::iterator<std::random_access_iterator_tag, const basic_json>
-
5450  {
-
5452  friend class basic_json;
-
5453 
-
5454  public:
- - - - -
5464  using iterator_category = std::bidirectional_iterator_tag;
-
5465 
-
5467  const_iterator() = default;
-
5468 
-
5470  const_iterator(pointer object) : m_object(object)
-
5471  {
-
5472  switch (m_object->m_type)
-
5473  {
- -
5475  {
-
5476  m_it.object_iterator = typename object_t::iterator();
-
5477  break;
-
5478  }
-
5479 
- -
5481  {
-
5482  m_it.array_iterator = typename array_t::iterator();
-
5483  break;
-
5484  }
-
5485 
-
5486  default:
-
5487  {
-
5488  m_it.primitive_iterator = primitive_iterator_t();
-
5489  break;
-
5490  }
-
5491  }
-
5492  }
-
5493 
-
5495  const_iterator(const iterator& other) : m_object(other.m_object)
-
5496  {
-
5497  switch (m_object->m_type)
+
5376  json_value m_value = {};
+
5377 
+
5378 
+
5379  private:
+
5381  // iterators //
+
5383 
+
5393  class primitive_iterator_t
+
5394  {
+
5395  public:
+
5397  void set_begin()
+
5398  {
+
5399  m_it = begin_value;
+
5400  }
+
5401 
+
5403  void set_end()
+
5404  {
+
5405  m_it = end_value;
+
5406  }
+
5407 
+
5409  bool is_begin() const
+
5410  {
+
5411  return (m_it == begin_value);
+
5412  }
+
5413 
+
5415  bool is_end() const
+
5416  {
+
5417  return (m_it == end_value);
+
5418  }
+
5419 
+
5421  operator difference_type& ()
+
5422  {
+
5423  return m_it;
+
5424  }
+
5425 
+
5427  operator difference_type () const
+
5428  {
+
5429  return m_it;
+
5430  }
+
5431 
+
5432  private:
+
5433  static constexpr difference_type begin_value = 0;
+
5434  static constexpr difference_type end_value = begin_value + 1;
+
5435 
+
5437  difference_type m_it = std::numeric_limits<std::ptrdiff_t>::denorm_min();
+
5438  };
+
5439 
+
5447  struct internal_iterator
+
5448  {
+
5450  typename object_t::iterator object_iterator;
+
5452  typename array_t::iterator array_iterator;
+
5454  primitive_iterator_t primitive_iterator;
+
5455 
+
5457  internal_iterator()
+
5458  : object_iterator(), array_iterator(), primitive_iterator()
+
5459  {}
+
5460  };
+
5461 
+
5463  template<typename IteratorType>
+
5464  class iteration_proxy
+
5465  {
+
5466  private:
+
5468  class iteration_proxy_internal
+
5469  {
+
5470  private:
+
5472  IteratorType anchor;
+
5474  size_t array_index = 0;
+
5475 
+
5476  public:
+
5477  iteration_proxy_internal(IteratorType it)
+
5478  : anchor(it)
+
5479  {}
+
5480 
+
5482  iteration_proxy_internal& operator*()
+
5483  {
+
5484  return *this;
+
5485  }
+
5486 
+
5488  iteration_proxy_internal& operator++()
+
5489  {
+
5490  ++anchor;
+
5491  ++array_index;
+
5492 
+
5493  return *this;
+
5494  }
+
5495 
+
5497  bool operator!= (const iteration_proxy_internal& o)
5498  {
- -
5500  {
-
5501  m_it.object_iterator = other.m_it.object_iterator;
-
5502  break;
-
5503  }
-
5504 
- +
5499  return anchor != o.anchor;
+
5500  }
+
5501 
+
5503  typename basic_json::string_t key() const
+
5504  {
+
5505  switch (anchor.m_object->type())
5506  {
-
5507  m_it.array_iterator = other.m_it.array_iterator;
-
5508  break;
-
5509  }
-
5510 
-
5511  default:
-
5512  {
-
5513  m_it.primitive_iterator = other.m_it.primitive_iterator;
-
5514  break;
-
5515  }
-
5516  }
-
5517  }
+
5507  // use integer array index as key
+
5508  case value_t::array:
+
5509  {
+
5510  return std::to_string(array_index);
+
5511  }
+
5512 
+
5513  // use key from the object
+
5514  case value_t::object:
+
5515  {
+
5516  return anchor.key();
+
5517  }
5518 
-
5520  const_iterator(const const_iterator& other) noexcept
-
5521  : m_object(other.m_object), m_it(other.m_it)
-
5522  {}
-
5523 
- -
5526  std::is_nothrow_move_constructible<pointer>::value and
-
5527  std::is_nothrow_move_assignable<pointer>::value and
-
5528  std::is_nothrow_move_constructible<internal_iterator>::value and
-
5529  std::is_nothrow_move_assignable<internal_iterator>::value
-
5530  )
-
5531  {
-
5532  std::swap(m_object, other.m_object);
-
5533  std::swap(m_it, other.m_it);
-
5534  return *this;
-
5535  }
+
5519  // use an empty key for all primitive types
+
5520  default:
+
5521  {
+
5522  return "";
+
5523  }
+
5524  }
+
5525  }
+
5526 
+
5528  typename IteratorType::reference value() const
+
5529  {
+
5530  return anchor.value();
+
5531  }
+
5532  };
+
5533 
+
5535  typename IteratorType::reference container;
5536 
-
5537  private:
-
5539  void set_begin()
-
5540  {
-
5541  switch (m_object->m_type)
-
5542  {
- -
5544  {
-
5545  m_it.object_iterator = m_object->m_value.object->begin();
-
5546  break;
-
5547  }
+
5537  public:
+
5539  iteration_proxy(typename IteratorType::reference cont)
+
5540  : container(cont)
+
5541  {}
+
5542 
+
5544  iteration_proxy_internal begin()
+
5545  {
+
5546  return iteration_proxy_internal(container.begin());
+
5547  }
5548 
- -
5550  {
-
5551  m_it.array_iterator = m_object->m_value.array->begin();
-
5552  break;
-
5553  }
-
5554 
- -
5556  {
-
5557  // set to end so begin()==end() is true: null is empty
-
5558  m_it.primitive_iterator.set_end();
-
5559  break;
-
5560  }
-
5561 
-
5562  default:
-
5563  {
-
5564  m_it.primitive_iterator.set_begin();
-
5565  break;
-
5566  }
-
5567  }
-
5568  }
-
5569 
-
5571  void set_end()
-
5572  {
-
5573  switch (m_object->m_type)
-
5574  {
- -
5576  {
-
5577  m_it.object_iterator = m_object->m_value.object->end();
-
5578  break;
-
5579  }
-
5580 
- -
5582  {
-
5583  m_it.array_iterator = m_object->m_value.array->end();
-
5584  break;
-
5585  }
+
5550  iteration_proxy_internal end()
+
5551  {
+
5552  return iteration_proxy_internal(container.end());
+
5553  }
+
5554  };
+
5555 
+
5556  public:
+
5570  class const_iterator : public std::iterator<std::random_access_iterator_tag, const basic_json>
+
5571  {
+
5573  friend class basic_json;
+
5574 
+
5575  public:
+ + + + +
5585  using iterator_category = std::bidirectional_iterator_tag;
5586 
-
5587  default:
-
5588  {
-
5589  m_it.primitive_iterator.set_end();
-
5590  break;
-
5591  }
-
5592  }
-
5593  }
-
5594 
-
5595  public:
- -
5598  {
-
5599  switch (m_object->m_type)
-
5600  {
- +
5588  const_iterator() = default;
+
5589 
+
5591  const_iterator(pointer object) : m_object(object)
+
5592  {
+
5593  switch (m_object->m_type)
+
5594  {
+ +
5596  {
+
5597  m_it.object_iterator = typename object_t::iterator();
+
5598  break;
+
5599  }
+
5600 
+
5602  {
-
5603  return m_it.object_iterator->second;
-
5604  }
-
5605 
- -
5607  {
-
5608  return *m_it.array_iterator;
-
5609  }
-
5610 
- -
5612  {
-
5613  throw std::out_of_range("cannot get value");
-
5614  }
-
5615 
-
5616  default:
-
5617  {
-
5618  if (m_it.primitive_iterator.is_begin())
-
5619  {
-
5620  return *m_object;
-
5621  }
-
5622  else
-
5623  {
-
5624  throw std::out_of_range("cannot get value");
-
5625  }
-
5626  }
-
5627  }
-
5628  }
-
5629 
- -
5632  {
-
5633  switch (m_object->m_type)
-
5634  {
- -
5636  {
-
5637  return &(m_it.object_iterator->second);
-
5638  }
+
5603  m_it.array_iterator = typename array_t::iterator();
+
5604  break;
+
5605  }
+
5606 
+
5607  default:
+
5608  {
+
5609  m_it.primitive_iterator = primitive_iterator_t();
+
5610  break;
+
5611  }
+
5612  }
+
5613  }
+
5614 
+
5616  const_iterator(const iterator& other) : m_object(other.m_object)
+
5617  {
+
5618  switch (m_object->m_type)
+
5619  {
+ +
5621  {
+
5622  m_it.object_iterator = other.m_it.object_iterator;
+
5623  break;
+
5624  }
+
5625 
+ +
5627  {
+
5628  m_it.array_iterator = other.m_it.array_iterator;
+
5629  break;
+
5630  }
+
5631 
+
5632  default:
+
5633  {
+
5634  m_it.primitive_iterator = other.m_it.primitive_iterator;
+
5635  break;
+
5636  }
+
5637  }
+
5638  }
5639 
- -
5641  {
-
5642  return &*m_it.array_iterator;
-
5643  }
+
5641  const_iterator(const const_iterator& other) noexcept
+
5642  : m_object(other.m_object), m_it(other.m_it)
+
5643  {}
5644 
-
5645  default:
-
5646  {
-
5647  if (m_it.primitive_iterator.is_begin())
-
5648  {
-
5649  return m_object;
-
5650  }
-
5651  else
-
5652  {
-
5653  throw std::out_of_range("cannot get value");
-
5654  }
-
5655  }
-
5656  }
-
5657  }
-
5658 
- + +
5647  std::is_nothrow_move_constructible<pointer>::value and
+
5648  std::is_nothrow_move_assignable<pointer>::value and
+
5649  std::is_nothrow_move_constructible<internal_iterator>::value and
+
5650  std::is_nothrow_move_assignable<internal_iterator>::value
+
5651  )
+
5652  {
+
5653  std::swap(m_object, other.m_object);
+
5654  std::swap(m_it, other.m_it);
+
5655  return *this;
+
5656  }
+
5657 
+
5658  private:
+
5660  void set_begin()
5661  {
-
5662  auto result = *this;
-
5663  ++(*this);
-
5664  return result;
-
5665  }
-
5666 
- -
5669  {
-
5670  switch (m_object->m_type)
-
5671  {
- -
5673  {
-
5674  ++m_it.object_iterator;
-
5675  break;
-
5676  }
-
5677 
- -
5679  {
-
5680  ++m_it.array_iterator;
-
5681  break;
-
5682  }
-
5683 
-
5684  default:
-
5685  {
-
5686  ++m_it.primitive_iterator;
-
5687  break;
-
5688  }
-
5689  }
+
5662  switch (m_object->m_type)
+
5663  {
+ +
5665  {
+
5666  m_it.object_iterator = m_object->m_value.object->begin();
+
5667  break;
+
5668  }
+
5669 
+ +
5671  {
+
5672  m_it.array_iterator = m_object->m_value.array->begin();
+
5673  break;
+
5674  }
+
5675 
+ +
5677  {
+
5678  // set to end so begin()==end() is true: null is empty
+
5679  m_it.primitive_iterator.set_end();
+
5680  break;
+
5681  }
+
5682 
+
5683  default:
+
5684  {
+
5685  m_it.primitive_iterator.set_begin();
+
5686  break;
+
5687  }
+
5688  }
+
5689  }
5690 
-
5691  return *this;
-
5692  }
-
5693 
- -
5696  {
-
5697  auto result = *this;
-
5698  --(*this);
-
5699  return result;
-
5700  }
+
5692  void set_end()
+
5693  {
+
5694  switch (m_object->m_type)
+
5695  {
+ +
5697  {
+
5698  m_it.object_iterator = m_object->m_value.object->end();
+
5699  break;
+
5700  }
5701 
- -
5704  {
-
5705  switch (m_object->m_type)
-
5706  {
- -
5708  {
-
5709  --m_it.object_iterator;
-
5710  break;
-
5711  }
-
5712 
- -
5714  {
-
5715  --m_it.array_iterator;
-
5716  break;
-
5717  }
-
5718 
-
5719  default:
-
5720  {
-
5721  --m_it.primitive_iterator;
-
5722  break;
-
5723  }
-
5724  }
-
5725 
-
5726  return *this;
-
5727  }
-
5728 
-
5730  bool operator==(const const_iterator& other) const
-
5731  {
-
5732  // if objects are not the same, the comparison is undefined
-
5733  if (m_object != other.m_object)
-
5734  {
-
5735  throw std::domain_error("cannot compare iterators of different containers");
-
5736  }
-
5737 
-
5738  switch (m_object->m_type)
-
5739  {
- -
5741  {
-
5742  return (m_it.object_iterator == other.m_it.object_iterator);
-
5743  }
-
5744 
- -
5746  {
-
5747  return (m_it.array_iterator == other.m_it.array_iterator);
-
5748  }
-
5749 
-
5750  default:
-
5751  {
-
5752  return (m_it.primitive_iterator == other.m_it.primitive_iterator);
-
5753  }
-
5754  }
-
5755  }
-
5756 
-
5758  bool operator!=(const const_iterator& other) const
-
5759  {
-
5760  return not operator==(other);
-
5761  }
-
5762 
-
5764  bool operator<(const const_iterator& other) const
-
5765  {
-
5766  // if objects are not the same, the comparison is undefined
-
5767  if (m_object != other.m_object)
-
5768  {
-
5769  throw std::domain_error("cannot compare iterators of different containers");
-
5770  }
-
5771 
-
5772  switch (m_object->m_type)
-
5773  {
- -
5775  {
-
5776  throw std::domain_error("cannot use operator< for object iterators");
-
5777  }
-
5778 
- -
5780  {
-
5781  return (m_it.array_iterator < other.m_it.array_iterator);
-
5782  }
-
5783 
-
5784  default:
-
5785  {
-
5786  return (m_it.primitive_iterator < other.m_it.primitive_iterator);
-
5787  }
-
5788  }
-
5789  }
-
5790 
-
5792  bool operator<=(const const_iterator& other) const
-
5793  {
-
5794  return not other.operator < (*this);
-
5795  }
-
5796 
-
5798  bool operator>(const const_iterator& other) const
-
5799  {
-
5800  return not operator<=(other);
-
5801  }
-
5802 
-
5804  bool operator>=(const const_iterator& other) const
-
5805  {
-
5806  return not operator<(other);
-
5807  }
-
5808 
- -
5811  {
-
5812  switch (m_object->m_type)
-
5813  {
- -
5815  {
-
5816  throw std::domain_error("cannot use operator+= for object iterators");
-
5817  }
-
5818 
- -
5820  {
-
5821  m_it.array_iterator += i;
-
5822  break;
-
5823  }
-
5824 
-
5825  default:
-
5826  {
-
5827  m_it.primitive_iterator += i;
-
5828  break;
-
5829  }
-
5830  }
-
5831 
-
5832  return *this;
-
5833  }
-
5834 
- -
5837  {
-
5838  return operator+=(-i);
-
5839  }
-
5840 
- -
5843  {
-
5844  auto result = *this;
-
5845  result += i;
-
5846  return result;
-
5847  }
-
5848 
- -
5851  {
-
5852  auto result = *this;
-
5853  result -= i;
-
5854  return result;
-
5855  }
-
5856 
- -
5859  {
-
5860  switch (m_object->m_type)
-
5861  {
- -
5863  {
-
5864  throw std::domain_error("cannot use operator- for object iterators");
-
5865  }
-
5866 
- -
5868  {
-
5869  return m_it.array_iterator - other.m_it.array_iterator;
-
5870  }
-
5871 
-
5872  default:
-
5873  {
-
5874  return m_it.primitive_iterator - other.m_it.primitive_iterator;
-
5875  }
-
5876  }
-
5877  }
-
5878 
- -
5881  {
-
5882  switch (m_object->m_type)
-
5883  {
- -
5885  {
-
5886  throw std::domain_error("cannot use operator[] for object iterators");
-
5887  }
-
5888 
- -
5890  {
-
5891  return *(m_it.array_iterator + n);
-
5892  }
-
5893 
- -
5895  {
-
5896  throw std::out_of_range("cannot get value");
-
5897  }
-
5898 
-
5899  default:
-
5900  {
-
5901  if (m_it.primitive_iterator == -n)
-
5902  {
-
5903  return *m_object;
-
5904  }
-
5905  else
-
5906  {
-
5907  throw std::out_of_range("cannot get value");
-
5908  }
-
5909  }
-
5910  }
-
5911  }
-
5912 
-
5914  typename object_t::key_type key() const
-
5915  {
-
5916  if (m_object->is_object())
-
5917  {
-
5918  return m_it.object_iterator->first;
-
5919  }
-
5920  else
-
5921  {
-
5922  throw std::domain_error("cannot use key() for non-object iterators");
-
5923  }
-
5924  }
-
5925 
- -
5928  {
-
5929  return operator*();
-
5930  }
-
5931 
-
5932  private:
-
5934  pointer m_object = nullptr;
-
5936  internal_iterator m_it = internal_iterator();
-
5937  };
-
5938 
-
5951  class iterator : public const_iterator
-
5952  {
-
5953  public:
- -
5955  using pointer = typename basic_json::pointer;
- -
5957 
-
5959  iterator() = default;
-
5960 
-
5962  iterator(pointer object) noexcept : base_iterator(object)
-
5963  {}
-
5964 
-
5966  iterator(const iterator& other) noexcept
-
5967  : base_iterator(other)
-
5968  {}
+ +
5703  {
+
5704  m_it.array_iterator = m_object->m_value.array->end();
+
5705  break;
+
5706  }
+
5707 
+
5708  default:
+
5709  {
+
5710  m_it.primitive_iterator.set_end();
+
5711  break;
+
5712  }
+
5713  }
+
5714  }
+
5715 
+
5716  public:
+ +
5719  {
+
5720  switch (m_object->m_type)
+
5721  {
+ +
5723  {
+
5724  return m_it.object_iterator->second;
+
5725  }
+
5726 
+ +
5728  {
+
5729  return *m_it.array_iterator;
+
5730  }
+
5731 
+ +
5733  {
+
5734  throw std::out_of_range("cannot get value");
+
5735  }
+
5736 
+
5737  default:
+
5738  {
+
5739  if (m_it.primitive_iterator.is_begin())
+
5740  {
+
5741  return *m_object;
+
5742  }
+
5743  else
+
5744  {
+
5745  throw std::out_of_range("cannot get value");
+
5746  }
+
5747  }
+
5748  }
+
5749  }
+
5750 
+ +
5753  {
+
5754  switch (m_object->m_type)
+
5755  {
+ +
5757  {
+
5758  return &(m_it.object_iterator->second);
+
5759  }
+
5760 
+ +
5762  {
+
5763  return &*m_it.array_iterator;
+
5764  }
+
5765 
+
5766  default:
+
5767  {
+
5768  if (m_it.primitive_iterator.is_begin())
+
5769  {
+
5770  return m_object;
+
5771  }
+
5772  else
+
5773  {
+
5774  throw std::out_of_range("cannot get value");
+
5775  }
+
5776  }
+
5777  }
+
5778  }
+
5779 
+ +
5782  {
+
5783  auto result = *this;
+
5784  ++(*this);
+
5785  return result;
+
5786  }
+
5787 
+ +
5790  {
+
5791  switch (m_object->m_type)
+
5792  {
+ +
5794  {
+
5795  ++m_it.object_iterator;
+
5796  break;
+
5797  }
+
5798 
+ +
5800  {
+
5801  ++m_it.array_iterator;
+
5802  break;
+
5803  }
+
5804 
+
5805  default:
+
5806  {
+
5807  ++m_it.primitive_iterator;
+
5808  break;
+
5809  }
+
5810  }
+
5811 
+
5812  return *this;
+
5813  }
+
5814 
+ +
5817  {
+
5818  auto result = *this;
+
5819  --(*this);
+
5820  return result;
+
5821  }
+
5822 
+ +
5825  {
+
5826  switch (m_object->m_type)
+
5827  {
+ +
5829  {
+
5830  --m_it.object_iterator;
+
5831  break;
+
5832  }
+
5833 
+ +
5835  {
+
5836  --m_it.array_iterator;
+
5837  break;
+
5838  }
+
5839 
+
5840  default:
+
5841  {
+
5842  --m_it.primitive_iterator;
+
5843  break;
+
5844  }
+
5845  }
+
5846 
+
5847  return *this;
+
5848  }
+
5849 
+
5851  bool operator==(const const_iterator& other) const
+
5852  {
+
5853  // if objects are not the same, the comparison is undefined
+
5854  if (m_object != other.m_object)
+
5855  {
+
5856  throw std::domain_error("cannot compare iterators of different containers");
+
5857  }
+
5858 
+
5859  switch (m_object->m_type)
+
5860  {
+ +
5862  {
+
5863  return (m_it.object_iterator == other.m_it.object_iterator);
+
5864  }
+
5865 
+ +
5867  {
+
5868  return (m_it.array_iterator == other.m_it.array_iterator);
+
5869  }
+
5870 
+
5871  default:
+
5872  {
+
5873  return (m_it.primitive_iterator == other.m_it.primitive_iterator);
+
5874  }
+
5875  }
+
5876  }
+
5877 
+
5879  bool operator!=(const const_iterator& other) const
+
5880  {
+
5881  return not operator==(other);
+
5882  }
+
5883 
+
5885  bool operator<(const const_iterator& other) const
+
5886  {
+
5887  // if objects are not the same, the comparison is undefined
+
5888  if (m_object != other.m_object)
+
5889  {
+
5890  throw std::domain_error("cannot compare iterators of different containers");
+
5891  }
+
5892 
+
5893  switch (m_object->m_type)
+
5894  {
+ +
5896  {
+
5897  throw std::domain_error("cannot compare order of object iterators");
+
5898  }
+
5899 
+ +
5901  {
+
5902  return (m_it.array_iterator < other.m_it.array_iterator);
+
5903  }
+
5904 
+
5905  default:
+
5906  {
+
5907  return (m_it.primitive_iterator < other.m_it.primitive_iterator);
+
5908  }
+
5909  }
+
5910  }
+
5911 
+
5913  bool operator<=(const const_iterator& other) const
+
5914  {
+
5915  return not other.operator < (*this);
+
5916  }
+
5917 
+
5919  bool operator>(const const_iterator& other) const
+
5920  {
+
5921  return not operator<=(other);
+
5922  }
+
5923 
+
5925  bool operator>=(const const_iterator& other) const
+
5926  {
+
5927  return not operator<(other);
+
5928  }
+
5929 
+ +
5932  {
+
5933  switch (m_object->m_type)
+
5934  {
+ +
5936  {
+
5937  throw std::domain_error("cannot use offsets with object iterators");
+
5938  }
+
5939 
+ +
5941  {
+
5942  m_it.array_iterator += i;
+
5943  break;
+
5944  }
+
5945 
+
5946  default:
+
5947  {
+
5948  m_it.primitive_iterator += i;
+
5949  break;
+
5950  }
+
5951  }
+
5952 
+
5953  return *this;
+
5954  }
+
5955 
+ +
5958  {
+
5959  return operator+=(-i);
+
5960  }
+
5961 
+ +
5964  {
+
5965  auto result = *this;
+
5966  result += i;
+
5967  return result;
+
5968  }
5969 
-
5971  iterator& operator=(iterator other) noexcept(
-
5972  std::is_nothrow_move_constructible<pointer>::value and
-
5973  std::is_nothrow_move_assignable<pointer>::value and
-
5974  std::is_nothrow_move_constructible<internal_iterator>::value and
-
5975  std::is_nothrow_move_assignable<internal_iterator>::value
-
5976  )
-
5977  {
-
5978  base_iterator::operator=(other);
-
5979  return *this;
-
5980  }
-
5981 
- -
5984  {
-
5985  return const_cast<reference>(base_iterator::operator*());
-
5986  }
+ +
5972  {
+
5973  auto result = *this;
+
5974  result -= i;
+
5975  return result;
+
5976  }
+
5977 
+ +
5980  {
+
5981  switch (m_object->m_type)
+
5982  {
+ +
5984  {
+
5985  throw std::domain_error("cannot use offsets with object iterators");
+
5986  }
5987 
- -
5990  {
-
5991  return const_cast<pointer>(base_iterator::operator->());
-
5992  }
-
5993 
- -
5996  {
-
5997  iterator result = *this;
- -
5999  return result;
-
6000  }
-
6001 
- -
6004  {
- -
6006  return *this;
-
6007  }
-
6008 
- -
6011  {
-
6012  iterator result = *this;
- -
6014  return result;
-
6015  }
-
6016 
- -
6019  {
- -
6021  return *this;
-
6022  }
-
6023 
- -
6026  {
- -
6028  return *this;
-
6029  }
-
6030 
- -
6033  {
- -
6035  return *this;
-
6036  }
-
6037 
- -
6040  {
-
6041  auto result = *this;
-
6042  result += i;
-
6043  return result;
-
6044  }
-
6045 
- -
6048  {
-
6049  auto result = *this;
-
6050  result -= i;
-
6051  return result;
-
6052  }
-
6053 
-
6054  difference_type operator-(const iterator& other) const
-
6055  {
-
6056  return base_iterator::operator-(other);
-
6057  }
-
6058 
- -
6061  {
-
6062  return const_cast<reference>(base_iterator::operator[](n));
-
6063  }
-
6064 
- -
6067  {
-
6068  return const_cast<reference>(base_iterator::value());
-
6069  }
-
6070  };
-
6071 
-
6089  template<typename Base>
-
6090  class json_reverse_iterator : public std::reverse_iterator<Base>
-
6091  {
-
6092  public:
-
6094  using base_iterator = std::reverse_iterator<Base>;
-
6096  using reference = typename Base::reference;
-
6097 
-
6099  json_reverse_iterator(const typename base_iterator::iterator_type& it)
-
6100  : base_iterator(it) {}
-
6101 
- -
6104 
- -
6107  {
-
6108  return base_iterator::operator++(1);
-
6109  }
-
6110 
- -
6113  {
-
6114  base_iterator::operator++();
-
6115  return *this;
-
6116  }
-
6117 
- -
6120  {
-
6121  return base_iterator::operator--(1);
+ +
5989  {
+
5990  return m_it.array_iterator - other.m_it.array_iterator;
+
5991  }
+
5992 
+
5993  default:
+
5994  {
+
5995  return m_it.primitive_iterator - other.m_it.primitive_iterator;
+
5996  }
+
5997  }
+
5998  }
+
5999 
+ +
6002  {
+
6003  switch (m_object->m_type)
+
6004  {
+ +
6006  {
+
6007  throw std::domain_error("cannot use operator[] for object iterators");
+
6008  }
+
6009 
+ +
6011  {
+
6012  return *(m_it.array_iterator + n);
+
6013  }
+
6014 
+ +
6016  {
+
6017  throw std::out_of_range("cannot get value");
+
6018  }
+
6019 
+
6020  default:
+
6021  {
+
6022  if (m_it.primitive_iterator == -n)
+
6023  {
+
6024  return *m_object;
+
6025  }
+
6026  else
+
6027  {
+
6028  throw std::out_of_range("cannot get value");
+
6029  }
+
6030  }
+
6031  }
+
6032  }
+
6033 
+
6035  typename object_t::key_type key() const
+
6036  {
+
6037  if (m_object->is_object())
+
6038  {
+
6039  return m_it.object_iterator->first;
+
6040  }
+
6041  else
+
6042  {
+
6043  throw std::domain_error("cannot use key() for non-object iterators");
+
6044  }
+
6045  }
+
6046 
+ +
6049  {
+
6050  return operator*();
+
6051  }
+
6052 
+
6053  private:
+
6055  pointer m_object = nullptr;
+
6057  internal_iterator m_it = internal_iterator();
+
6058  };
+
6059 
+
6072  class iterator : public const_iterator
+
6073  {
+
6074  public:
+ +
6076  using pointer = typename basic_json::pointer;
+ +
6078 
+
6080  iterator() = default;
+
6081 
+
6083  iterator(pointer object) noexcept
+
6084  : base_iterator(object)
+
6085  {}
+
6086 
+
6088  iterator(const iterator& other) noexcept
+
6089  : base_iterator(other)
+
6090  {}
+
6091 
+
6093  iterator& operator=(iterator other) noexcept(
+
6094  std::is_nothrow_move_constructible<pointer>::value and
+
6095  std::is_nothrow_move_assignable<pointer>::value and
+
6096  std::is_nothrow_move_constructible<internal_iterator>::value and
+
6097  std::is_nothrow_move_assignable<internal_iterator>::value
+
6098  )
+
6099  {
+
6100  base_iterator::operator=(other);
+
6101  return *this;
+
6102  }
+
6103 
+ +
6106  {
+
6107  return const_cast<reference>(base_iterator::operator*());
+
6108  }
+
6109 
+ +
6112  {
+
6113  return const_cast<pointer>(base_iterator::operator->());
+
6114  }
+
6115 
+ +
6118  {
+
6119  iterator result = *this;
+ +
6121  return result;
6122  }
6123 
- +
6126  {
-
6127  base_iterator::operator--();
+
6128  return *this;
6129  }
6130 
- +
6133  {
-
6134  base_iterator::operator+=(i);
-
6135  return *this;
-
6136  }
-
6137 
- -
6140  {
-
6141  auto result = *this;
-
6142  result += i;
-
6143  return result;
+
6134  iterator result = *this;
+ +
6136  return result;
+
6137  }
+
6138 
+ +
6141  {
+ +
6143  return *this;
6144  }
6145 
- -
6148  {
-
6149  auto result = *this;
-
6150  result -= i;
-
6151  return result;
-
6152  }
-
6153 
- -
6156  {
-
6157  return this->base() - other.base();
+ +
6148  {
+ +
6150  return *this;
+
6151  }
+
6152 
+ +
6155  {
+ +
6157  return *this;
6158  }
6159 
- -
6162  {
-
6163  return *(this->operator+(n));
-
6164  }
-
6165 
-
6167  typename object_t::key_type key() const
-
6168  {
-
6169  auto it = --this->base();
-
6170  return it.key();
-
6171  }
-
6172 
- -
6175  {
-
6176  auto it = --this->base();
-
6177  return it.operator * ();
-
6178  }
-
6179  };
+ +
6162  {
+
6163  auto result = *this;
+
6164  result += i;
+
6165  return result;
+
6166  }
+
6167 
+ +
6170  {
+
6171  auto result = *this;
+
6172  result -= i;
+
6173  return result;
+
6174  }
+
6175 
+
6176  difference_type operator-(const iterator& other) const
+
6177  {
+
6178  return base_iterator::operator-(other);
+
6179  }
6180 
-
6181 
-
6182  private:
-
6184  template<typename IteratorType>
-
6185  class iteration_proxy
-
6186  {
-
6187  private:
-
6189  class iteration_proxy_internal
-
6190  {
-
6191  private:
-
6193  IteratorType anchor;
-
6195  size_t array_index = 0;
-
6196 
-
6197  public:
-
6198  iteration_proxy_internal(IteratorType it)
-
6199  : anchor(it)
-
6200  {}
-
6201 
-
6203  iteration_proxy_internal& operator*()
-
6204  {
-
6205  return *this;
-
6206  }
-
6207 
-
6209  iteration_proxy_internal& operator++()
-
6210  {
-
6211  ++anchor;
-
6212  ++array_index;
-
6213 
-
6214  return *this;
-
6215  }
-
6216 
-
6218  bool operator!= (const iteration_proxy_internal& o)
-
6219  {
-
6220  return anchor != o.anchor;
-
6221  }
-
6222 
-
6224  typename basic_json::string_t key() const
-
6225  {
-
6226  switch (anchor.m_object->type())
-
6227  {
-
6228  // use integer array index as key
-
6229  case value_t::array:
-
6230  {
-
6231  return std::to_string(array_index);
-
6232  }
-
6233 
-
6234  // use key from the object
-
6235  case value_t::object:
-
6236  {
-
6237  return anchor.key();
-
6238  }
-
6239 
-
6240  // use an empty key for all primitive types
-
6241  default:
-
6242  {
-
6243  return "";
-
6244  }
-
6245  }
-
6246  }
-
6247 
-
6249  typename IteratorType::reference value() const
-
6250  {
-
6251  return anchor.value();
-
6252  }
-
6253  };
-
6254 
-
6256  typename IteratorType::reference container;
-
6257 
-
6258  public:
-
6260  iteration_proxy(typename IteratorType::reference cont)
-
6261  : container(cont)
-
6262  {}
-
6263 
-
6265  iteration_proxy_internal begin()
-
6266  {
-
6267  return iteration_proxy_internal(container.begin());
-
6268  }
-
6269 
-
6271  iteration_proxy_internal end()
-
6272  {
-
6273  return iteration_proxy_internal(container.end());
-
6274  }
-
6275  };
-
6276 
-
6277 
-
6278  private:
-
6280  // lexer and parser //
-
6282 
-
6290  class lexer
-
6291  {
-
6292  public:
-
6294  enum class token_type
-
6295  {
-
6296  uninitialized,
-
6297  literal_true,
-
6298  literal_false,
-
6299  literal_null,
-
6300  value_string,
-
6301  value_number,
-
6302  begin_array,
-
6303  begin_object,
-
6304  end_array,
-
6305  end_object,
-
6306  name_separator,
-
6307  value_separator,
-
6308  parse_error,
-
6309  end_of_input
-
6310  };
-
6311 
-
6313  using lexer_char_t = unsigned char;
-
6314 
-
6316  explicit lexer(const string_t& s) noexcept
-
6317  : m_stream(nullptr), m_buffer(s)
-
6318  {
-
6319  m_content = reinterpret_cast<const lexer_char_t*>(s.c_str());
-
6320  m_start = m_cursor = m_content;
-
6321  m_limit = m_content + s.size();
-
6322  }
-
6323  explicit lexer(std::istream* s) noexcept
-
6324  : m_stream(s), m_buffer()
-
6325  {
-
6326  getline(*m_stream, m_buffer);
-
6327  m_content = reinterpret_cast<const lexer_char_t*>(m_buffer.c_str());
-
6328  m_start = m_cursor = m_content;
-
6329  m_limit = m_content + m_buffer.size();
-
6330  }
-
6331 
-
6333  lexer() = default;
-
6334 
-
6335  // switch of unwanted functions
-
6336  lexer(const lexer&) = delete;
-
6337  lexer operator=(const lexer&) = delete;
-
6338 
-
6350  static string_t to_unicode(const std::size_t codepoint1,
-
6351  const std::size_t codepoint2 = 0)
-
6352  {
-
6353  string_t result;
-
6354 
-
6355  // calculate the codepoint from the given code points
-
6356  std::size_t codepoint = codepoint1;
-
6357 
-
6358  // check if codepoint1 is a high surrogate
-
6359  if (codepoint1 >= 0xD800 and codepoint1 <= 0xDBFF)
-
6360  {
-
6361  // check if codepoint2 is a low surrogate
-
6362  if (codepoint2 >= 0xDC00 and codepoint2 <= 0xDFFF)
-
6363  {
-
6364  codepoint =
-
6365  // high surrogate occupies the most significant 22 bits
-
6366  (codepoint1 << 10)
-
6367  // low surrogate occupies the least significant 15 bits
-
6368  + codepoint2
-
6369  // there is still the 0xD800, 0xDC00 and 0x10000 noise
-
6370  // in the result so we have to substract with:
-
6371  // (0xD800 << 10) + DC00 - 0x10000 = 0x35FDC00
-
6372  - 0x35FDC00;
-
6373  }
-
6374  else
-
6375  {
-
6376  throw std::invalid_argument("missing or wrong low surrogate");
-
6377  }
-
6378  }
-
6379 
-
6380  if (codepoint < 0x80)
-
6381  {
-
6382  // 1-byte characters: 0xxxxxxx (ASCII)
-
6383  result.append(1, static_cast<typename string_t::value_type>(codepoint));
-
6384  }
-
6385  else if (codepoint <= 0x7ff)
-
6386  {
-
6387  // 2-byte characters: 110xxxxx 10xxxxxx
-
6388  result.append(1, static_cast<typename string_t::value_type>(0xC0 | ((codepoint >> 6) & 0x1F)));
-
6389  result.append(1, static_cast<typename string_t::value_type>(0x80 | (codepoint & 0x3F)));
-
6390  }
-
6391  else if (codepoint <= 0xffff)
-
6392  {
-
6393  // 3-byte characters: 1110xxxx 10xxxxxx 10xxxxxx
-
6394  result.append(1, static_cast<typename string_t::value_type>(0xE0 | ((codepoint >> 12) & 0x0F)));
-
6395  result.append(1, static_cast<typename string_t::value_type>(0x80 | ((codepoint >> 6) & 0x3F)));
-
6396  result.append(1, static_cast<typename string_t::value_type>(0x80 | (codepoint & 0x3F)));
-
6397  }
-
6398  else if (codepoint <= 0x10ffff)
-
6399  {
-
6400  // 4-byte characters: 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx
-
6401  result.append(1, static_cast<typename string_t::value_type>(0xF0 | ((codepoint >> 18) & 0x07)));
-
6402  result.append(1, static_cast<typename string_t::value_type>(0x80 | ((codepoint >> 12) & 0x3F)));
-
6403  result.append(1, static_cast<typename string_t::value_type>(0x80 | ((codepoint >> 6) & 0x3F)));
-
6404  result.append(1, static_cast<typename string_t::value_type>(0x80 | (codepoint & 0x3F)));
-
6405  }
-
6406  else
-
6407  {
-
6408  throw std::out_of_range("code points above 0x10FFFF are invalid");
-
6409  }
-
6410 
-
6411  return result;
-
6412  }
-
6413 
-
6415  static std::string token_type_name(token_type t)
-
6416  {
-
6417  switch (t)
-
6418  {
-
6419  case token_type::uninitialized:
-
6420  return "<uninitialized>";
-
6421  case token_type::literal_true:
-
6422  return "true literal";
-
6423  case token_type::literal_false:
-
6424  return "false literal";
-
6425  case token_type::literal_null:
-
6426  return "null literal";
-
6427  case token_type::value_string:
-
6428  return "string literal";
-
6429  case token_type::value_number:
-
6430  return "number literal";
-
6431  case token_type::begin_array:
-
6432  return "[";
-
6433  case token_type::begin_object:
-
6434  return "{";
-
6435  case token_type::end_array:
-
6436  return "]";
-
6437  case token_type::end_object:
-
6438  return "}";
-
6439  case token_type::name_separator:
-
6440  return ":";
-
6441  case token_type::value_separator:
-
6442  return ",";
-
6443  case token_type::parse_error:
-
6444  return "<parse error>";
-
6445  case token_type::end_of_input:
-
6446  return "<end of input>";
-
6447  default:
-
6448  {
-
6449  // catch non-enum values
-
6450  return "unknown token"; // LCOV_EXCL_LINE
-
6451  }
-
6452  }
-
6453  }
-
6454 
-
6465  token_type scan() noexcept
-
6466  {
-
6467  // pointer for backtracking information
-
6468  m_marker = nullptr;
-
6469 
-
6470  // remember the begin of the token
-
6471  m_start = m_cursor;
-
6472 
-
6473 
-
6474  {
-
6475  lexer_char_t yych;
-
6476  unsigned int yyaccept = 0;
-
6477  static const unsigned char yybm[] =
+ +
6183  {
+
6184  return const_cast<reference>(base_iterator::operator[](n));
+
6185  }
+
6186 
+ +
6189  {
+
6190  return const_cast<reference>(base_iterator::value());
+
6191  }
+
6192  };
+
6193 
+
6211  template<typename Base>
+
6212  class json_reverse_iterator : public std::reverse_iterator<Base>
+
6213  {
+
6214  public:
+
6216  using base_iterator = std::reverse_iterator<Base>;
+
6218  using reference = typename Base::reference;
+
6219 
+
6221  json_reverse_iterator(const typename base_iterator::iterator_type& it)
+
6222  : base_iterator(it)
+
6223  {}
+
6224 
+ +
6227  : base_iterator(it)
+
6228  {}
+
6229 
+ +
6232  {
+
6233  return base_iterator::operator++(1);
+
6234  }
+
6235 
+ +
6238  {
+
6239  base_iterator::operator++();
+
6240  return *this;
+
6241  }
+
6242 
+ +
6245  {
+
6246  return base_iterator::operator--(1);
+
6247  }
+
6248 
+ +
6251  {
+
6252  base_iterator::operator--();
+
6253  return *this;
+
6254  }
+
6255 
+ +
6258  {
+
6259  base_iterator::operator+=(i);
+
6260  return *this;
+
6261  }
+
6262 
+ +
6265  {
+
6266  auto result = *this;
+
6267  result += i;
+
6268  return result;
+
6269  }
+
6270 
+ +
6273  {
+
6274  auto result = *this;
+
6275  result -= i;
+
6276  return result;
+
6277  }
+
6278 
+ +
6281  {
+
6282  return this->base() - other.base();
+
6283  }
+
6284 
+ +
6287  {
+
6288  return *(this->operator+(n));
+
6289  }
+
6290 
+
6292  typename object_t::key_type key() const
+
6293  {
+
6294  auto it = --this->base();
+
6295  return it.key();
+
6296  }
+
6297 
+ +
6300  {
+
6301  auto it = --this->base();
+
6302  return it.operator * ();
+
6303  }
+
6304  };
+
6305 
+
6306 
+
6307  private:
+
6309  // lexer and parser //
+
6311 
+
6319  class lexer
+
6320  {
+
6321  public:
+
6323  enum class token_type
+
6324  {
+
6325  uninitialized,
+
6326  literal_true,
+
6327  literal_false,
+
6328  literal_null,
+
6329  value_string,
+
6330  value_number,
+
6331  begin_array,
+
6332  begin_object,
+
6333  end_array,
+
6334  end_object,
+
6335  name_separator,
+
6336  value_separator,
+
6337  parse_error,
+
6338  end_of_input
+
6339  };
+
6340 
+
6342  using lexer_char_t = unsigned char;
+
6343 
+
6345  explicit lexer(const string_t& s) noexcept
+
6346  : m_stream(nullptr), m_buffer(s)
+
6347  {
+
6348  m_content = reinterpret_cast<const lexer_char_t*>(s.c_str());
+
6349  m_start = m_cursor = m_content;
+
6350  m_limit = m_content + s.size();
+
6351  }
+
6352  explicit lexer(std::istream* s) noexcept
+
6353  : m_stream(s), m_buffer()
+
6354  {
+
6355  getline(*m_stream, m_buffer);
+
6356  m_content = reinterpret_cast<const lexer_char_t*>(m_buffer.c_str());
+
6357  m_start = m_cursor = m_content;
+
6358  m_limit = m_content + m_buffer.size();
+
6359  }
+
6360 
+
6362  lexer() = default;
+
6363 
+
6364  // switch of unwanted functions
+
6365  lexer(const lexer&) = delete;
+
6366  lexer operator=(const lexer&) = delete;
+
6367 
+
6380  static string_t to_unicode(const std::size_t codepoint1,
+
6381  const std::size_t codepoint2 = 0)
+
6382  {
+
6383  string_t result;
+
6384 
+
6385  // calculate the codepoint from the given code points
+
6386  std::size_t codepoint = codepoint1;
+
6387 
+
6388  // check if codepoint1 is a high surrogate
+
6389  if (codepoint1 >= 0xD800 and codepoint1 <= 0xDBFF)
+
6390  {
+
6391  // check if codepoint2 is a low surrogate
+
6392  if (codepoint2 >= 0xDC00 and codepoint2 <= 0xDFFF)
+
6393  {
+
6394  codepoint =
+
6395  // high surrogate occupies the most significant 22 bits
+
6396  (codepoint1 << 10)
+
6397  // low surrogate occupies the least significant 15 bits
+
6398  + codepoint2
+
6399  // there is still the 0xD800, 0xDC00 and 0x10000 noise
+
6400  // in the result so we have to substract with:
+
6401  // (0xD800 << 10) + DC00 - 0x10000 = 0x35FDC00
+
6402  - 0x35FDC00;
+
6403  }
+
6404  else
+
6405  {
+
6406  throw std::invalid_argument("missing or wrong low surrogate");
+
6407  }
+
6408  }
+
6409 
+
6410  if (codepoint < 0x80)
+
6411  {
+
6412  // 1-byte characters: 0xxxxxxx (ASCII)
+
6413  result.append(1, static_cast<typename string_t::value_type>(codepoint));
+
6414  }
+
6415  else if (codepoint <= 0x7ff)
+
6416  {
+
6417  // 2-byte characters: 110xxxxx 10xxxxxx
+
6418  result.append(1, static_cast<typename string_t::value_type>(0xC0 | ((codepoint >> 6) & 0x1F)));
+
6419  result.append(1, static_cast<typename string_t::value_type>(0x80 | (codepoint & 0x3F)));
+
6420  }
+
6421  else if (codepoint <= 0xffff)
+
6422  {
+
6423  // 3-byte characters: 1110xxxx 10xxxxxx 10xxxxxx
+
6424  result.append(1, static_cast<typename string_t::value_type>(0xE0 | ((codepoint >> 12) & 0x0F)));
+
6425  result.append(1, static_cast<typename string_t::value_type>(0x80 | ((codepoint >> 6) & 0x3F)));
+
6426  result.append(1, static_cast<typename string_t::value_type>(0x80 | (codepoint & 0x3F)));
+
6427  }
+
6428  else if (codepoint <= 0x10ffff)
+
6429  {
+
6430  // 4-byte characters: 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx
+
6431  result.append(1, static_cast<typename string_t::value_type>(0xF0 | ((codepoint >> 18) & 0x07)));
+
6432  result.append(1, static_cast<typename string_t::value_type>(0x80 | ((codepoint >> 12) & 0x3F)));
+
6433  result.append(1, static_cast<typename string_t::value_type>(0x80 | ((codepoint >> 6) & 0x3F)));
+
6434  result.append(1, static_cast<typename string_t::value_type>(0x80 | (codepoint & 0x3F)));
+
6435  }
+
6436  else
+
6437  {
+
6438  throw std::out_of_range("code points above 0x10FFFF are invalid");
+
6439  }
+
6440 
+
6441  return result;
+
6442  }
+
6443 
+
6445  static std::string token_type_name(token_type t)
+
6446  {
+
6447  switch (t)
+
6448  {
+
6449  case token_type::uninitialized:
+
6450  return "<uninitialized>";
+
6451  case token_type::literal_true:
+
6452  return "true literal";
+
6453  case token_type::literal_false:
+
6454  return "false literal";
+
6455  case token_type::literal_null:
+
6456  return "null literal";
+
6457  case token_type::value_string:
+
6458  return "string literal";
+
6459  case token_type::value_number:
+
6460  return "number literal";
+
6461  case token_type::begin_array:
+
6462  return "'['";
+
6463  case token_type::begin_object:
+
6464  return "'{'";
+
6465  case token_type::end_array:
+
6466  return "']'";
+
6467  case token_type::end_object:
+
6468  return "'}'";
+
6469  case token_type::name_separator:
+
6470  return "':'";
+
6471  case token_type::value_separator:
+
6472  return "','";
+
6473  case token_type::parse_error:
+
6474  return "<parse error>";
+
6475  case token_type::end_of_input:
+
6476  return "end of input";
+
6477  default:
6478  {
-
6479  0, 0, 0, 0, 0, 0, 0, 0,
-
6480  0, 32, 32, 0, 0, 32, 0, 0,
-
6481  64, 64, 64, 64, 64, 64, 64, 64,
-
6482  64, 64, 64, 64, 64, 64, 64, 64,
-
6483  96, 64, 0, 64, 64, 64, 64, 64,
-
6484  64, 64, 64, 64, 64, 64, 64, 64,
-
6485  192, 192, 192, 192, 192, 192, 192, 192,
-
6486  192, 192, 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  64, 64, 64, 64, 64, 64, 64, 64,
-
6490  64, 64, 64, 64, 0, 64, 64, 64,
-
6491  64, 64, 64, 64, 64, 64, 64, 64,
-
6492  64, 64, 64, 64, 64, 64, 64, 64,
-
6493  64, 64, 64, 64, 64, 64, 64, 64,
-
6494  64, 64, 64, 64, 64, 64, 64, 64,
-
6495  64, 64, 64, 64, 64, 64, 64, 64,
-
6496  64, 64, 64, 64, 64, 64, 64, 64,
-
6497  64, 64, 64, 64, 64, 64, 64, 64,
-
6498  64, 64, 64, 64, 64, 64, 64, 64,
-
6499  64, 64, 64, 64, 64, 64, 64, 64,
-
6500  64, 64, 64, 64, 64, 64, 64, 64,
-
6501  64, 64, 64, 64, 64, 64, 64, 64,
-
6502  64, 64, 64, 64, 64, 64, 64, 64,
-
6503  64, 64, 64, 64, 64, 64, 64, 64,
-
6504  64, 64, 64, 64, 64, 64, 64, 64,
-
6505  64, 64, 64, 64, 64, 64, 64, 64,
-
6506  64, 64, 64, 64, 64, 64, 64, 64,
-
6507  64, 64, 64, 64, 64, 64, 64, 64,
-
6508  64, 64, 64, 64, 64, 64, 64, 64,
-
6509  64, 64, 64, 64, 64, 64, 64, 64,
-
6510  64, 64, 64, 64, 64, 64, 64, 64,
-
6511  };
-
6512  if ((m_limit - m_cursor) < 5)
-
6513  {
-
6514  yyfill(); // LCOV_EXCL_LINE;
-
6515  }
-
6516  yych = *m_cursor;
-
6517  if (yych <= ':')
-
6518  {
-
6519  if (yych <= ' ')
-
6520  {
-
6521  if (yych <= '\n')
-
6522  {
-
6523  if (yych <= 0x00)
-
6524  {
-
6525  goto basic_json_parser_28;
-
6526  }
-
6527  if (yych <= 0x08)
-
6528  {
-
6529  goto basic_json_parser_30;
-
6530  }
-
6531  if (yych >= '\n')
-
6532  {
-
6533  goto basic_json_parser_4;
-
6534  }
-
6535  }
-
6536  else
-
6537  {
-
6538  if (yych == '\r')
-
6539  {
-
6540  goto basic_json_parser_2;
-
6541  }
-
6542  if (yych <= 0x1F)
-
6543  {
-
6544  goto basic_json_parser_30;
-
6545  }
-
6546  }
-
6547  }
-
6548  else
-
6549  {
-
6550  if (yych <= ',')
-
6551  {
-
6552  if (yych == '"')
-
6553  {
-
6554  goto basic_json_parser_27;
-
6555  }
-
6556  if (yych <= '+')
-
6557  {
-
6558  goto basic_json_parser_30;
-
6559  }
-
6560  goto basic_json_parser_16;
-
6561  }
-
6562  else
-
6563  {
-
6564  if (yych <= '/')
-
6565  {
-
6566  if (yych <= '-')
-
6567  {
-
6568  goto basic_json_parser_23;
-
6569  }
-
6570  goto basic_json_parser_30;
+
6479  // catch non-enum values
+
6480  return "unknown token"; // LCOV_EXCL_LINE
+
6481  }
+
6482  }
+
6483  }
+
6484 
+
6495  token_type scan() noexcept
+
6496  {
+
6497  // pointer for backtracking information
+
6498  m_marker = nullptr;
+
6499 
+
6500  // remember the begin of the token
+
6501  m_start = m_cursor;
+
6502 
+
6503 
+
6504  {
+
6505  lexer_char_t yych;
+
6506  unsigned int yyaccept = 0;
+
6507  static const unsigned char yybm[] =
+
6508  {
+
6509  0, 0, 0, 0, 0, 0, 0, 0,
+
6510  0, 32, 32, 0, 0, 32, 0, 0,
+
6511  64, 64, 64, 64, 64, 64, 64, 64,
+
6512  64, 64, 64, 64, 64, 64, 64, 64,
+
6513  96, 64, 0, 64, 64, 64, 64, 64,
+
6514  64, 64, 64, 64, 64, 64, 64, 64,
+
6515  192, 192, 192, 192, 192, 192, 192, 192,
+
6516  192, 192, 64, 64, 64, 64, 64, 64,
+
6517  64, 64, 64, 64, 64, 64, 64, 64,
+
6518  64, 64, 64, 64, 64, 64, 64, 64,
+
6519  64, 64, 64, 64, 64, 64, 64, 64,
+
6520  64, 64, 64, 64, 0, 64, 64, 64,
+
6521  64, 64, 64, 64, 64, 64, 64, 64,
+
6522  64, 64, 64, 64, 64, 64, 64, 64,
+
6523  64, 64, 64, 64, 64, 64, 64, 64,
+
6524  64, 64, 64, 64, 64, 64, 64, 64,
+
6525  64, 64, 64, 64, 64, 64, 64, 64,
+
6526  64, 64, 64, 64, 64, 64, 64, 64,
+
6527  64, 64, 64, 64, 64, 64, 64, 64,
+
6528  64, 64, 64, 64, 64, 64, 64, 64,
+
6529  64, 64, 64, 64, 64, 64, 64, 64,
+
6530  64, 64, 64, 64, 64, 64, 64, 64,
+
6531  64, 64, 64, 64, 64, 64, 64, 64,
+
6532  64, 64, 64, 64, 64, 64, 64, 64,
+
6533  64, 64, 64, 64, 64, 64, 64, 64,
+
6534  64, 64, 64, 64, 64, 64, 64, 64,
+
6535  64, 64, 64, 64, 64, 64, 64, 64,
+
6536  64, 64, 64, 64, 64, 64, 64, 64,
+
6537  64, 64, 64, 64, 64, 64, 64, 64,
+
6538  64, 64, 64, 64, 64, 64, 64, 64,
+
6539  64, 64, 64, 64, 64, 64, 64, 64,
+
6540  64, 64, 64, 64, 64, 64, 64, 64,
+
6541  };
+
6542  if ((m_limit - m_cursor) < 5)
+
6543  {
+
6544  yyfill(); // LCOV_EXCL_LINE;
+
6545  }
+
6546  yych = *m_cursor;
+
6547  if (yych <= ':')
+
6548  {
+
6549  if (yych <= ' ')
+
6550  {
+
6551  if (yych <= '\n')
+
6552  {
+
6553  if (yych <= 0x00)
+
6554  {
+
6555  goto basic_json_parser_28;
+
6556  }
+
6557  if (yych <= 0x08)
+
6558  {
+
6559  goto basic_json_parser_30;
+
6560  }
+
6561  if (yych >= '\n')
+
6562  {
+
6563  goto basic_json_parser_4;
+
6564  }
+
6565  }
+
6566  else
+
6567  {
+
6568  if (yych == '\r')
+
6569  {
+
6570  goto basic_json_parser_2;
6571  }
-
6572  else
+
6572  if (yych <= 0x1F)
6573  {
-
6574  if (yych <= '0')
-
6575  {
-
6576  goto basic_json_parser_24;
-
6577  }
-
6578  if (yych <= '9')
-
6579  {
-
6580  goto basic_json_parser_26;
-
6581  }
-
6582  goto basic_json_parser_18;
-
6583  }
-
6584  }
-
6585  }
-
6586  }
-
6587  else
-
6588  {
-
6589  if (yych <= 'n')
-
6590  {
-
6591  if (yych <= ']')
-
6592  {
-
6593  if (yych == '[')
-
6594  {
-
6595  goto basic_json_parser_8;
-
6596  }
-
6597  if (yych <= '\\')
-
6598  {
-
6599  goto basic_json_parser_30;
-
6600  }
-
6601  goto basic_json_parser_10;
-
6602  }
-
6603  else
-
6604  {
-
6605  if (yych == 'f')
-
6606  {
-
6607  goto basic_json_parser_22;
-
6608  }
-
6609  if (yych <= 'm')
-
6610  {
-
6611  goto basic_json_parser_30;
-
6612  }
-
6613  goto basic_json_parser_20;
+
6574  goto basic_json_parser_30;
+
6575  }
+
6576  }
+
6577  }
+
6578  else
+
6579  {
+
6580  if (yych <= ',')
+
6581  {
+
6582  if (yych == '"')
+
6583  {
+
6584  goto basic_json_parser_27;
+
6585  }
+
6586  if (yych <= '+')
+
6587  {
+
6588  goto basic_json_parser_30;
+
6589  }
+
6590  goto basic_json_parser_16;
+
6591  }
+
6592  else
+
6593  {
+
6594  if (yych <= '/')
+
6595  {
+
6596  if (yych <= '-')
+
6597  {
+
6598  goto basic_json_parser_23;
+
6599  }
+
6600  goto basic_json_parser_30;
+
6601  }
+
6602  else
+
6603  {
+
6604  if (yych <= '0')
+
6605  {
+
6606  goto basic_json_parser_24;
+
6607  }
+
6608  if (yych <= '9')
+
6609  {
+
6610  goto basic_json_parser_26;
+
6611  }
+
6612  goto basic_json_parser_18;
+
6613  }
6614  }
6615  }
-
6616  else
-
6617  {
-
6618  if (yych <= '{')
-
6619  {
-
6620  if (yych == 't')
-
6621  {
-
6622  goto basic_json_parser_21;
-
6623  }
-
6624  if (yych <= 'z')
-
6625  {
-
6626  goto basic_json_parser_30;
-
6627  }
-
6628  goto basic_json_parser_12;
-
6629  }
-
6630  else
-
6631  {
-
6632  if (yych <= '}')
-
6633  {
-
6634  if (yych <= '|')
-
6635  {
-
6636  goto basic_json_parser_30;
-
6637  }
-
6638  goto basic_json_parser_14;
-
6639  }
-
6640  else
-
6641  {
-
6642  if (yych == 0xEF)
-
6643  {
-
6644  goto basic_json_parser_6;
-
6645  }
-
6646  goto basic_json_parser_30;
-
6647  }
-
6648  }
-
6649  }
-
6650  }
-
6651 basic_json_parser_2:
-
6652  ++m_cursor;
-
6653  yych = *m_cursor;
-
6654  goto basic_json_parser_5;
-
6655 basic_json_parser_3:
-
6656  {
-
6657  return scan();
-
6658  }
-
6659 basic_json_parser_4:
-
6660  ++m_cursor;
-
6661  if (m_limit <= m_cursor)
-
6662  {
-
6663  yyfill(); // LCOV_EXCL_LINE;
-
6664  }
-
6665  yych = *m_cursor;
-
6666 basic_json_parser_5:
-
6667  if (yybm[0 + yych] & 32)
-
6668  {
-
6669  goto basic_json_parser_4;
-
6670  }
-
6671  goto basic_json_parser_3;
-
6672 basic_json_parser_6:
-
6673  yyaccept = 0;
-
6674  yych = *(m_marker = ++m_cursor);
-
6675  if (yych == 0xBB)
-
6676  {
-
6677  goto basic_json_parser_64;
-
6678  }
-
6679 basic_json_parser_7:
-
6680  {
-
6681  return token_type::parse_error;
-
6682  }
-
6683 basic_json_parser_8:
-
6684  ++m_cursor;
-
6685  {
-
6686  return token_type::begin_array;
-
6687  }
-
6688 basic_json_parser_10:
-
6689  ++m_cursor;
-
6690  {
-
6691  return token_type::end_array;
-
6692  }
-
6693 basic_json_parser_12:
-
6694  ++m_cursor;
-
6695  {
-
6696  return token_type::begin_object;
-
6697  }
-
6698 basic_json_parser_14:
-
6699  ++m_cursor;
-
6700  {
-
6701  return token_type::end_object;
-
6702  }
-
6703 basic_json_parser_16:
-
6704  ++m_cursor;
-
6705  {
-
6706  return token_type::value_separator;
-
6707  }
-
6708 basic_json_parser_18:
-
6709  ++m_cursor;
+
6616  }
+
6617  else
+
6618  {
+
6619  if (yych <= 'n')
+
6620  {
+
6621  if (yych <= ']')
+
6622  {
+
6623  if (yych == '[')
+
6624  {
+
6625  goto basic_json_parser_8;
+
6626  }
+
6627  if (yych <= '\\')
+
6628  {
+
6629  goto basic_json_parser_30;
+
6630  }
+
6631  goto basic_json_parser_10;
+
6632  }
+
6633  else
+
6634  {
+
6635  if (yych == 'f')
+
6636  {
+
6637  goto basic_json_parser_22;
+
6638  }
+
6639  if (yych <= 'm')
+
6640  {
+
6641  goto basic_json_parser_30;
+
6642  }
+
6643  goto basic_json_parser_20;
+
6644  }
+
6645  }
+
6646  else
+
6647  {
+
6648  if (yych <= '{')
+
6649  {
+
6650  if (yych == 't')
+
6651  {
+
6652  goto basic_json_parser_21;
+
6653  }
+
6654  if (yych <= 'z')
+
6655  {
+
6656  goto basic_json_parser_30;
+
6657  }
+
6658  goto basic_json_parser_12;
+
6659  }
+
6660  else
+
6661  {
+
6662  if (yych <= '}')
+
6663  {
+
6664  if (yych <= '|')
+
6665  {
+
6666  goto basic_json_parser_30;
+
6667  }
+
6668  goto basic_json_parser_14;
+
6669  }
+
6670  else
+
6671  {
+
6672  if (yych == 0xEF)
+
6673  {
+
6674  goto basic_json_parser_6;
+
6675  }
+
6676  goto basic_json_parser_30;
+
6677  }
+
6678  }
+
6679  }
+
6680  }
+
6681 basic_json_parser_2:
+
6682  ++m_cursor;
+
6683  yych = *m_cursor;
+
6684  goto basic_json_parser_5;
+
6685 basic_json_parser_3:
+
6686  {
+
6687  return scan();
+
6688  }
+
6689 basic_json_parser_4:
+
6690  ++m_cursor;
+
6691  if (m_limit <= m_cursor)
+
6692  {
+
6693  yyfill(); // LCOV_EXCL_LINE;
+
6694  }
+
6695  yych = *m_cursor;
+
6696 basic_json_parser_5:
+
6697  if (yybm[0 + yych] & 32)
+
6698  {
+
6699  goto basic_json_parser_4;
+
6700  }
+
6701  goto basic_json_parser_3;
+
6702 basic_json_parser_6:
+
6703  yyaccept = 0;
+
6704  yych = *(m_marker = ++m_cursor);
+
6705  if (yych == 0xBB)
+
6706  {
+
6707  goto basic_json_parser_64;
+
6708  }
+
6709 basic_json_parser_7:
6710  {
-
6711  return token_type::name_separator;
+
6711  return token_type::parse_error;
6712  }
-
6713 basic_json_parser_20:
-
6714  yyaccept = 0;
-
6715  yych = *(m_marker = ++m_cursor);
-
6716  if (yych == 'u')
-
6717  {
-
6718  goto basic_json_parser_60;
-
6719  }
-
6720  goto basic_json_parser_7;
-
6721 basic_json_parser_21:
-
6722  yyaccept = 0;
-
6723  yych = *(m_marker = ++m_cursor);
-
6724  if (yych == 'r')
+
6713 basic_json_parser_8:
+
6714  ++m_cursor;
+
6715  {
+
6716  return token_type::begin_array;
+
6717  }
+
6718 basic_json_parser_10:
+
6719  ++m_cursor;
+
6720  {
+
6721  return token_type::end_array;
+
6722  }
+
6723 basic_json_parser_12:
+
6724  ++m_cursor;
6725  {
-
6726  goto basic_json_parser_56;
+
6726  return token_type::begin_object;
6727  }
-
6728  goto basic_json_parser_7;
-
6729 basic_json_parser_22:
-
6730  yyaccept = 0;
-
6731  yych = *(m_marker = ++m_cursor);
-
6732  if (yych == 'a')
-
6733  {
-
6734  goto basic_json_parser_51;
-
6735  }
-
6736  goto basic_json_parser_7;
-
6737 basic_json_parser_23:
-
6738  yych = *++m_cursor;
-
6739  if (yych <= '/')
+
6728 basic_json_parser_14:
+
6729  ++m_cursor;
+
6730  {
+
6731  return token_type::end_object;
+
6732  }
+
6733 basic_json_parser_16:
+
6734  ++m_cursor;
+
6735  {
+
6736  return token_type::value_separator;
+
6737  }
+
6738 basic_json_parser_18:
+
6739  ++m_cursor;
6740  {
-
6741  goto basic_json_parser_7;
+
6741  return token_type::name_separator;
6742  }
-
6743  if (yych <= '0')
-
6744  {
-
6745  goto basic_json_parser_50;
-
6746  }
-
6747  if (yych <= '9')
-
6748  {
-
6749  goto basic_json_parser_41;
-
6750  }
-
6751  goto basic_json_parser_7;
-
6752 basic_json_parser_24:
-
6753  yyaccept = 1;
-
6754  yych = *(m_marker = ++m_cursor);
-
6755  if (yych <= 'D')
-
6756  {
-
6757  if (yych == '.')
-
6758  {
-
6759  goto basic_json_parser_43;
-
6760  }
-
6761  }
-
6762  else
+
6743 basic_json_parser_20:
+
6744  yyaccept = 0;
+
6745  yych = *(m_marker = ++m_cursor);
+
6746  if (yych == 'u')
+
6747  {
+
6748  goto basic_json_parser_60;
+
6749  }
+
6750  goto basic_json_parser_7;
+
6751 basic_json_parser_21:
+
6752  yyaccept = 0;
+
6753  yych = *(m_marker = ++m_cursor);
+
6754  if (yych == 'r')
+
6755  {
+
6756  goto basic_json_parser_56;
+
6757  }
+
6758  goto basic_json_parser_7;
+
6759 basic_json_parser_22:
+
6760  yyaccept = 0;
+
6761  yych = *(m_marker = ++m_cursor);
+
6762  if (yych == 'a')
6763  {
-
6764  if (yych <= 'E')
-
6765  {
-
6766  goto basic_json_parser_44;
-
6767  }
-
6768  if (yych == 'e')
-
6769  {
-
6770  goto basic_json_parser_44;
-
6771  }
+
6764  goto basic_json_parser_51;
+
6765  }
+
6766  goto basic_json_parser_7;
+
6767 basic_json_parser_23:
+
6768  yych = *++m_cursor;
+
6769  if (yych <= '/')
+
6770  {
+
6771  goto basic_json_parser_7;
6772  }
-
6773 basic_json_parser_25:
+
6773  if (yych <= '0')
6774  {
-
6775  return token_type::value_number;
+
6775  goto basic_json_parser_50;
6776  }
-
6777 basic_json_parser_26:
-
6778  yyaccept = 1;
-
6779  yych = *(m_marker = ++m_cursor);
-
6780  goto basic_json_parser_42;
-
6781 basic_json_parser_27:
-
6782  yyaccept = 0;
-
6783  yych = *(m_marker = ++m_cursor);
-
6784  if (yych <= 0x0F)
-
6785  {
-
6786  goto basic_json_parser_7;
-
6787  }
-
6788  goto basic_json_parser_32;
-
6789 basic_json_parser_28:
-
6790  ++m_cursor;
-
6791  {
-
6792  return token_type::end_of_input;
-
6793  }
-
6794 basic_json_parser_30:
-
6795  yych = *++m_cursor;
-
6796  goto basic_json_parser_7;
-
6797 basic_json_parser_31:
-
6798  ++m_cursor;
-
6799  if (m_limit <= m_cursor)
-
6800  {
-
6801  yyfill(); // LCOV_EXCL_LINE;
+
6777  if (yych <= '9')
+
6778  {
+
6779  goto basic_json_parser_41;
+
6780  }
+
6781  goto basic_json_parser_7;
+
6782 basic_json_parser_24:
+
6783  yyaccept = 1;
+
6784  yych = *(m_marker = ++m_cursor);
+
6785  if (yych <= 'D')
+
6786  {
+
6787  if (yych == '.')
+
6788  {
+
6789  goto basic_json_parser_43;
+
6790  }
+
6791  }
+
6792  else
+
6793  {
+
6794  if (yych <= 'E')
+
6795  {
+
6796  goto basic_json_parser_44;
+
6797  }
+
6798  if (yych == 'e')
+
6799  {
+
6800  goto basic_json_parser_44;
+
6801  }
6802  }
-
6803  yych = *m_cursor;
-
6804 basic_json_parser_32:
-
6805  if (yybm[0 + yych] & 64)
-
6806  {
-
6807  goto basic_json_parser_31;
-
6808  }
-
6809  if (yych <= 0x0F)
-
6810  {
-
6811  goto basic_json_parser_33;
-
6812  }
-
6813  if (yych <= '"')
-
6814  {
-
6815  goto basic_json_parser_35;
-
6816  }
-
6817  goto basic_json_parser_34;
-
6818 basic_json_parser_33:
-
6819  m_cursor = m_marker;
-
6820  if (yyaccept == 0)
+
6803 basic_json_parser_25:
+
6804  {
+
6805  return token_type::value_number;
+
6806  }
+
6807 basic_json_parser_26:
+
6808  yyaccept = 1;
+
6809  yych = *(m_marker = ++m_cursor);
+
6810  goto basic_json_parser_42;
+
6811 basic_json_parser_27:
+
6812  yyaccept = 0;
+
6813  yych = *(m_marker = ++m_cursor);
+
6814  if (yych <= 0x0F)
+
6815  {
+
6816  goto basic_json_parser_7;
+
6817  }
+
6818  goto basic_json_parser_32;
+
6819 basic_json_parser_28:
+
6820  ++m_cursor;
6821  {
-
6822  goto basic_json_parser_7;
+
6822  return token_type::end_of_input;
6823  }
-
6824  else
-
6825  {
-
6826  goto basic_json_parser_25;
-
6827  }
-
6828 basic_json_parser_34:
-
6829  ++m_cursor;
-
6830  if (m_limit <= m_cursor)
-
6831  {
-
6832  yyfill(); // LCOV_EXCL_LINE;
-
6833  }
-
6834  yych = *m_cursor;
-
6835  if (yych <= 'e')
+
6824 basic_json_parser_30:
+
6825  yych = *++m_cursor;
+
6826  goto basic_json_parser_7;
+
6827 basic_json_parser_31:
+
6828  ++m_cursor;
+
6829  if (m_limit <= m_cursor)
+
6830  {
+
6831  yyfill(); // LCOV_EXCL_LINE;
+
6832  }
+
6833  yych = *m_cursor;
+
6834 basic_json_parser_32:
+
6835  if (yybm[0 + yych] & 64)
6836  {
-
6837  if (yych <= '/')
-
6838  {
-
6839  if (yych == '"')
-
6840  {
-
6841  goto basic_json_parser_31;
-
6842  }
-
6843  if (yych <= '.')
-
6844  {
-
6845  goto basic_json_parser_33;
-
6846  }
-
6847  goto basic_json_parser_31;
-
6848  }
-
6849  else
-
6850  {
-
6851  if (yych <= '\\')
-
6852  {
-
6853  if (yych <= '[')
-
6854  {
-
6855  goto basic_json_parser_33;
-
6856  }
-
6857  goto basic_json_parser_31;
-
6858  }
-
6859  else
-
6860  {
-
6861  if (yych == 'b')
-
6862  {
-
6863  goto basic_json_parser_31;
-
6864  }
-
6865  goto basic_json_parser_33;
-
6866  }
-
6867  }
-
6868  }
-
6869  else
-
6870  {
-
6871  if (yych <= 'q')
-
6872  {
-
6873  if (yych <= 'f')
+
6837  goto basic_json_parser_31;
+
6838  }
+
6839  if (yych <= 0x0F)
+
6840  {
+
6841  goto basic_json_parser_33;
+
6842  }
+
6843  if (yych <= '"')
+
6844  {
+
6845  goto basic_json_parser_35;
+
6846  }
+
6847  goto basic_json_parser_34;
+
6848 basic_json_parser_33:
+
6849  m_cursor = m_marker;
+
6850  if (yyaccept == 0)
+
6851  {
+
6852  goto basic_json_parser_7;
+
6853  }
+
6854  else
+
6855  {
+
6856  goto basic_json_parser_25;
+
6857  }
+
6858 basic_json_parser_34:
+
6859  ++m_cursor;
+
6860  if (m_limit <= m_cursor)
+
6861  {
+
6862  yyfill(); // LCOV_EXCL_LINE;
+
6863  }
+
6864  yych = *m_cursor;
+
6865  if (yych <= 'e')
+
6866  {
+
6867  if (yych <= '/')
+
6868  {
+
6869  if (yych == '"')
+
6870  {
+
6871  goto basic_json_parser_31;
+
6872  }
+
6873  if (yych <= '.')
6874  {
-
6875  goto basic_json_parser_31;
+
6875  goto basic_json_parser_33;
6876  }
-
6877  if (yych == 'n')
-
6878  {
-
6879  goto basic_json_parser_31;
-
6880  }
-
6881  goto basic_json_parser_33;
-
6882  }
-
6883  else
-
6884  {
-
6885  if (yych <= 's')
-
6886  {
-
6887  if (yych <= 'r')
-
6888  {
-
6889  goto basic_json_parser_31;
-
6890  }
-
6891  goto basic_json_parser_33;
-
6892  }
-
6893  else
-
6894  {
-
6895  if (yych <= 't')
-
6896  {
-
6897  goto basic_json_parser_31;
-
6898  }
-
6899  if (yych <= 'u')
-
6900  {
-
6901  goto basic_json_parser_37;
-
6902  }
-
6903  goto basic_json_parser_33;
-
6904  }
-
6905  }
-
6906  }
-
6907 basic_json_parser_35:
-
6908  ++m_cursor;
-
6909  {
-
6910  return token_type::value_string;
-
6911  }
-
6912 basic_json_parser_37:
-
6913  ++m_cursor;
-
6914  if (m_limit <= m_cursor)
-
6915  {
-
6916  yyfill(); // LCOV_EXCL_LINE;
-
6917  }
-
6918  yych = *m_cursor;
-
6919  if (yych <= '@')
-
6920  {
-
6921  if (yych <= '/')
-
6922  {
-
6923  goto basic_json_parser_33;
-
6924  }
-
6925  if (yych >= ':')
-
6926  {
-
6927  goto basic_json_parser_33;
-
6928  }
-
6929  }
-
6930  else
-
6931  {
-
6932  if (yych <= 'F')
-
6933  {
-
6934  goto basic_json_parser_38;
+
6877  goto basic_json_parser_31;
+
6878  }
+
6879  else
+
6880  {
+
6881  if (yych <= '\\')
+
6882  {
+
6883  if (yych <= '[')
+
6884  {
+
6885  goto basic_json_parser_33;
+
6886  }
+
6887  goto basic_json_parser_31;
+
6888  }
+
6889  else
+
6890  {
+
6891  if (yych == 'b')
+
6892  {
+
6893  goto basic_json_parser_31;
+
6894  }
+
6895  goto basic_json_parser_33;
+
6896  }
+
6897  }
+
6898  }
+
6899  else
+
6900  {
+
6901  if (yych <= 'q')
+
6902  {
+
6903  if (yych <= 'f')
+
6904  {
+
6905  goto basic_json_parser_31;
+
6906  }
+
6907  if (yych == 'n')
+
6908  {
+
6909  goto basic_json_parser_31;
+
6910  }
+
6911  goto basic_json_parser_33;
+
6912  }
+
6913  else
+
6914  {
+
6915  if (yych <= 's')
+
6916  {
+
6917  if (yych <= 'r')
+
6918  {
+
6919  goto basic_json_parser_31;
+
6920  }
+
6921  goto basic_json_parser_33;
+
6922  }
+
6923  else
+
6924  {
+
6925  if (yych <= 't')
+
6926  {
+
6927  goto basic_json_parser_31;
+
6928  }
+
6929  if (yych <= 'u')
+
6930  {
+
6931  goto basic_json_parser_37;
+
6932  }
+
6933  goto basic_json_parser_33;
+
6934  }
6935  }
-
6936  if (yych <= '`')
-
6937  {
-
6938  goto basic_json_parser_33;
-
6939  }
-
6940  if (yych >= 'g')
-
6941  {
-
6942  goto basic_json_parser_33;
-
6943  }
-
6944  }
-
6945 basic_json_parser_38:
-
6946  ++m_cursor;
-
6947  if (m_limit <= m_cursor)
-
6948  {
-
6949  yyfill(); // LCOV_EXCL_LINE;
-
6950  }
-
6951  yych = *m_cursor;
-
6952  if (yych <= '@')
-
6953  {
-
6954  if (yych <= '/')
-
6955  {
-
6956  goto basic_json_parser_33;
-
6957  }
-
6958  if (yych >= ':')
-
6959  {
-
6960  goto basic_json_parser_33;
-
6961  }
-
6962  }
-
6963  else
-
6964  {
-
6965  if (yych <= 'F')
-
6966  {
-
6967  goto basic_json_parser_39;
-
6968  }
-
6969  if (yych <= '`')
-
6970  {
-
6971  goto basic_json_parser_33;
-
6972  }
-
6973  if (yych >= 'g')
-
6974  {
-
6975  goto basic_json_parser_33;
-
6976  }
-
6977  }
-
6978 basic_json_parser_39:
-
6979  ++m_cursor;
-
6980  if (m_limit <= m_cursor)
-
6981  {
-
6982  yyfill(); // LCOV_EXCL_LINE;
-
6983  }
-
6984  yych = *m_cursor;
-
6985  if (yych <= '@')
-
6986  {
-
6987  if (yych <= '/')
-
6988  {
-
6989  goto basic_json_parser_33;
-
6990  }
-
6991  if (yych >= ':')
-
6992  {
-
6993  goto basic_json_parser_33;
-
6994  }
-
6995  }
-
6996  else
-
6997  {
-
6998  if (yych <= 'F')
-
6999  {
-
7000  goto basic_json_parser_40;
-
7001  }
-
7002  if (yych <= '`')
-
7003  {
-
7004  goto basic_json_parser_33;
-
7005  }
-
7006  if (yych >= 'g')
-
7007  {
-
7008  goto basic_json_parser_33;
-
7009  }
-
7010  }
-
7011 basic_json_parser_40:
-
7012  ++m_cursor;
-
7013  if (m_limit <= m_cursor)
-
7014  {
-
7015  yyfill(); // LCOV_EXCL_LINE;
-
7016  }
-
7017  yych = *m_cursor;
-
7018  if (yych <= '@')
-
7019  {
-
7020  if (yych <= '/')
-
7021  {
-
7022  goto basic_json_parser_33;
-
7023  }
-
7024  if (yych <= '9')
-
7025  {
-
7026  goto basic_json_parser_31;
-
7027  }
-
7028  goto basic_json_parser_33;
-
7029  }
-
7030  else
-
7031  {
-
7032  if (yych <= 'F')
+
6936  }
+
6937 basic_json_parser_35:
+
6938  ++m_cursor;
+
6939  {
+
6940  return token_type::value_string;
+
6941  }
+
6942 basic_json_parser_37:
+
6943  ++m_cursor;
+
6944  if (m_limit <= m_cursor)
+
6945  {
+
6946  yyfill(); // LCOV_EXCL_LINE;
+
6947  }
+
6948  yych = *m_cursor;
+
6949  if (yych <= '@')
+
6950  {
+
6951  if (yych <= '/')
+
6952  {
+
6953  goto basic_json_parser_33;
+
6954  }
+
6955  if (yych >= ':')
+
6956  {
+
6957  goto basic_json_parser_33;
+
6958  }
+
6959  }
+
6960  else
+
6961  {
+
6962  if (yych <= 'F')
+
6963  {
+
6964  goto basic_json_parser_38;
+
6965  }
+
6966  if (yych <= '`')
+
6967  {
+
6968  goto basic_json_parser_33;
+
6969  }
+
6970  if (yych >= 'g')
+
6971  {
+
6972  goto basic_json_parser_33;
+
6973  }
+
6974  }
+
6975 basic_json_parser_38:
+
6976  ++m_cursor;
+
6977  if (m_limit <= m_cursor)
+
6978  {
+
6979  yyfill(); // LCOV_EXCL_LINE;
+
6980  }
+
6981  yych = *m_cursor;
+
6982  if (yych <= '@')
+
6983  {
+
6984  if (yych <= '/')
+
6985  {
+
6986  goto basic_json_parser_33;
+
6987  }
+
6988  if (yych >= ':')
+
6989  {
+
6990  goto basic_json_parser_33;
+
6991  }
+
6992  }
+
6993  else
+
6994  {
+
6995  if (yych <= 'F')
+
6996  {
+
6997  goto basic_json_parser_39;
+
6998  }
+
6999  if (yych <= '`')
+
7000  {
+
7001  goto basic_json_parser_33;
+
7002  }
+
7003  if (yych >= 'g')
+
7004  {
+
7005  goto basic_json_parser_33;
+
7006  }
+
7007  }
+
7008 basic_json_parser_39:
+
7009  ++m_cursor;
+
7010  if (m_limit <= m_cursor)
+
7011  {
+
7012  yyfill(); // LCOV_EXCL_LINE;
+
7013  }
+
7014  yych = *m_cursor;
+
7015  if (yych <= '@')
+
7016  {
+
7017  if (yych <= '/')
+
7018  {
+
7019  goto basic_json_parser_33;
+
7020  }
+
7021  if (yych >= ':')
+
7022  {
+
7023  goto basic_json_parser_33;
+
7024  }
+
7025  }
+
7026  else
+
7027  {
+
7028  if (yych <= 'F')
+
7029  {
+
7030  goto basic_json_parser_40;
+
7031  }
+
7032  if (yych <= '`')
7033  {
-
7034  goto basic_json_parser_31;
+
7034  goto basic_json_parser_33;
7035  }
-
7036  if (yych <= '`')
+
7036  if (yych >= 'g')
7037  {
7038  goto basic_json_parser_33;
7039  }
-
7040  if (yych <= 'f')
-
7041  {
-
7042  goto basic_json_parser_31;
-
7043  }
-
7044  goto basic_json_parser_33;
-
7045  }
-
7046 basic_json_parser_41:
-
7047  yyaccept = 1;
-
7048  m_marker = ++m_cursor;
-
7049  if ((m_limit - m_cursor) < 3)
-
7050  {
-
7051  yyfill(); // LCOV_EXCL_LINE;
-
7052  }
-
7053  yych = *m_cursor;
-
7054 basic_json_parser_42:
-
7055  if (yybm[0 + yych] & 128)
-
7056  {
-
7057  goto basic_json_parser_41;
-
7058  }
-
7059  if (yych <= 'D')
-
7060  {
-
7061  if (yych != '.')
-
7062  {
-
7063  goto basic_json_parser_25;
-
7064  }
-
7065  }
-
7066  else
-
7067  {
-
7068  if (yych <= 'E')
-
7069  {
-
7070  goto basic_json_parser_44;
-
7071  }
-
7072  if (yych == 'e')
-
7073  {
-
7074  goto basic_json_parser_44;
-
7075  }
-
7076  goto basic_json_parser_25;
-
7077  }
-
7078 basic_json_parser_43:
-
7079  yych = *++m_cursor;
-
7080  if (yych <= '/')
-
7081  {
-
7082  goto basic_json_parser_33;
-
7083  }
-
7084  if (yych <= '9')
-
7085  {
-
7086  goto basic_json_parser_48;
-
7087  }
-
7088  goto basic_json_parser_33;
-
7089 basic_json_parser_44:
-
7090  yych = *++m_cursor;
-
7091  if (yych <= ',')
-
7092  {
-
7093  if (yych != '+')
-
7094  {
-
7095  goto basic_json_parser_33;
-
7096  }
-
7097  }
-
7098  else
-
7099  {
-
7100  if (yych <= '-')
-
7101  {
-
7102  goto basic_json_parser_45;
-
7103  }
-
7104  if (yych <= '/')
-
7105  {
-
7106  goto basic_json_parser_33;
-
7107  }
-
7108  if (yych <= '9')
-
7109  {
-
7110  goto basic_json_parser_46;
-
7111  }
+
7040  }
+
7041 basic_json_parser_40:
+
7042  ++m_cursor;
+
7043  if (m_limit <= m_cursor)
+
7044  {
+
7045  yyfill(); // LCOV_EXCL_LINE;
+
7046  }
+
7047  yych = *m_cursor;
+
7048  if (yych <= '@')
+
7049  {
+
7050  if (yych <= '/')
+
7051  {
+
7052  goto basic_json_parser_33;
+
7053  }
+
7054  if (yych <= '9')
+
7055  {
+
7056  goto basic_json_parser_31;
+
7057  }
+
7058  goto basic_json_parser_33;
+
7059  }
+
7060  else
+
7061  {
+
7062  if (yych <= 'F')
+
7063  {
+
7064  goto basic_json_parser_31;
+
7065  }
+
7066  if (yych <= '`')
+
7067  {
+
7068  goto basic_json_parser_33;
+
7069  }
+
7070  if (yych <= 'f')
+
7071  {
+
7072  goto basic_json_parser_31;
+
7073  }
+
7074  goto basic_json_parser_33;
+
7075  }
+
7076 basic_json_parser_41:
+
7077  yyaccept = 1;
+
7078  m_marker = ++m_cursor;
+
7079  if ((m_limit - m_cursor) < 3)
+
7080  {
+
7081  yyfill(); // LCOV_EXCL_LINE;
+
7082  }
+
7083  yych = *m_cursor;
+
7084 basic_json_parser_42:
+
7085  if (yybm[0 + yych] & 128)
+
7086  {
+
7087  goto basic_json_parser_41;
+
7088  }
+
7089  if (yych <= 'D')
+
7090  {
+
7091  if (yych != '.')
+
7092  {
+
7093  goto basic_json_parser_25;
+
7094  }
+
7095  }
+
7096  else
+
7097  {
+
7098  if (yych <= 'E')
+
7099  {
+
7100  goto basic_json_parser_44;
+
7101  }
+
7102  if (yych == 'e')
+
7103  {
+
7104  goto basic_json_parser_44;
+
7105  }
+
7106  goto basic_json_parser_25;
+
7107  }
+
7108 basic_json_parser_43:
+
7109  yych = *++m_cursor;
+
7110  if (yych <= '/')
+
7111  {
7112  goto basic_json_parser_33;
7113  }
-
7114 basic_json_parser_45:
-
7115  yych = *++m_cursor;
-
7116  if (yych <= '/')
-
7117  {
-
7118  goto basic_json_parser_33;
-
7119  }
-
7120  if (yych >= ':')
-
7121  {
-
7122  goto basic_json_parser_33;
-
7123  }
-
7124 basic_json_parser_46:
-
7125  ++m_cursor;
-
7126  if (m_limit <= m_cursor)
-
7127  {
-
7128  yyfill(); // LCOV_EXCL_LINE;
-
7129  }
-
7130  yych = *m_cursor;
-
7131  if (yych <= '/')
-
7132  {
-
7133  goto basic_json_parser_25;
-
7134  }
-
7135  if (yych <= '9')
-
7136  {
-
7137  goto basic_json_parser_46;
-
7138  }
-
7139  goto basic_json_parser_25;
-
7140 basic_json_parser_48:
-
7141  yyaccept = 1;
-
7142  m_marker = ++m_cursor;
-
7143  if ((m_limit - m_cursor) < 3)
-
7144  {
-
7145  yyfill(); // LCOV_EXCL_LINE;
-
7146  }
-
7147  yych = *m_cursor;
-
7148  if (yych <= 'D')
-
7149  {
-
7150  if (yych <= '/')
-
7151  {
-
7152  goto basic_json_parser_25;
-
7153  }
-
7154  if (yych <= '9')
-
7155  {
-
7156  goto basic_json_parser_48;
-
7157  }
-
7158  goto basic_json_parser_25;
+
7114  if (yych <= '9')
+
7115  {
+
7116  goto basic_json_parser_48;
+
7117  }
+
7118  goto basic_json_parser_33;
+
7119 basic_json_parser_44:
+
7120  yych = *++m_cursor;
+
7121  if (yych <= ',')
+
7122  {
+
7123  if (yych != '+')
+
7124  {
+
7125  goto basic_json_parser_33;
+
7126  }
+
7127  }
+
7128  else
+
7129  {
+
7130  if (yych <= '-')
+
7131  {
+
7132  goto basic_json_parser_45;
+
7133  }
+
7134  if (yych <= '/')
+
7135  {
+
7136  goto basic_json_parser_33;
+
7137  }
+
7138  if (yych <= '9')
+
7139  {
+
7140  goto basic_json_parser_46;
+
7141  }
+
7142  goto basic_json_parser_33;
+
7143  }
+
7144 basic_json_parser_45:
+
7145  yych = *++m_cursor;
+
7146  if (yych <= '/')
+
7147  {
+
7148  goto basic_json_parser_33;
+
7149  }
+
7150  if (yych >= ':')
+
7151  {
+
7152  goto basic_json_parser_33;
+
7153  }
+
7154 basic_json_parser_46:
+
7155  ++m_cursor;
+
7156  if (m_limit <= m_cursor)
+
7157  {
+
7158  yyfill(); // LCOV_EXCL_LINE;
7159  }
-
7160  else
-
7161  {
-
7162  if (yych <= 'E')
-
7163  {
-
7164  goto basic_json_parser_44;
-
7165  }
-
7166  if (yych == 'e')
-
7167  {
-
7168  goto basic_json_parser_44;
-
7169  }
-
7170  goto basic_json_parser_25;
-
7171  }
-
7172 basic_json_parser_50:
-
7173  yyaccept = 1;
-
7174  yych = *(m_marker = ++m_cursor);
-
7175  if (yych <= 'D')
-
7176  {
-
7177  if (yych == '.')
-
7178  {
-
7179  goto basic_json_parser_43;
-
7180  }
-
7181  goto basic_json_parser_25;
-
7182  }
-
7183  else
-
7184  {
-
7185  if (yych <= 'E')
-
7186  {
-
7187  goto basic_json_parser_44;
-
7188  }
-
7189  if (yych == 'e')
-
7190  {
-
7191  goto basic_json_parser_44;
-
7192  }
-
7193  goto basic_json_parser_25;
-
7194  }
-
7195 basic_json_parser_51:
-
7196  yych = *++m_cursor;
-
7197  if (yych != 'l')
-
7198  {
-
7199  goto basic_json_parser_33;
-
7200  }
-
7201  yych = *++m_cursor;
-
7202  if (yych != 's')
-
7203  {
-
7204  goto basic_json_parser_33;
-
7205  }
-
7206  yych = *++m_cursor;
-
7207  if (yych != 'e')
-
7208  {
-
7209  goto basic_json_parser_33;
-
7210  }
-
7211  ++m_cursor;
-
7212  {
-
7213  return token_type::literal_false;
-
7214  }
-
7215 basic_json_parser_56:
-
7216  yych = *++m_cursor;
-
7217  if (yych != 'u')
-
7218  {
-
7219  goto basic_json_parser_33;
-
7220  }
-
7221  yych = *++m_cursor;
-
7222  if (yych != 'e')
-
7223  {
-
7224  goto basic_json_parser_33;
-
7225  }
-
7226  ++m_cursor;
-
7227  {
-
7228  return token_type::literal_true;
-
7229  }
-
7230 basic_json_parser_60:
+
7160  yych = *m_cursor;
+
7161  if (yych <= '/')
+
7162  {
+
7163  goto basic_json_parser_25;
+
7164  }
+
7165  if (yych <= '9')
+
7166  {
+
7167  goto basic_json_parser_46;
+
7168  }
+
7169  goto basic_json_parser_25;
+
7170 basic_json_parser_48:
+
7171  yyaccept = 1;
+
7172  m_marker = ++m_cursor;
+
7173  if ((m_limit - m_cursor) < 3)
+
7174  {
+
7175  yyfill(); // LCOV_EXCL_LINE;
+
7176  }
+
7177  yych = *m_cursor;
+
7178  if (yych <= 'D')
+
7179  {
+
7180  if (yych <= '/')
+
7181  {
+
7182  goto basic_json_parser_25;
+
7183  }
+
7184  if (yych <= '9')
+
7185  {
+
7186  goto basic_json_parser_48;
+
7187  }
+
7188  goto basic_json_parser_25;
+
7189  }
+
7190  else
+
7191  {
+
7192  if (yych <= 'E')
+
7193  {
+
7194  goto basic_json_parser_44;
+
7195  }
+
7196  if (yych == 'e')
+
7197  {
+
7198  goto basic_json_parser_44;
+
7199  }
+
7200  goto basic_json_parser_25;
+
7201  }
+
7202 basic_json_parser_50:
+
7203  yyaccept = 1;
+
7204  yych = *(m_marker = ++m_cursor);
+
7205  if (yych <= 'D')
+
7206  {
+
7207  if (yych == '.')
+
7208  {
+
7209  goto basic_json_parser_43;
+
7210  }
+
7211  goto basic_json_parser_25;
+
7212  }
+
7213  else
+
7214  {
+
7215  if (yych <= 'E')
+
7216  {
+
7217  goto basic_json_parser_44;
+
7218  }
+
7219  if (yych == 'e')
+
7220  {
+
7221  goto basic_json_parser_44;
+
7222  }
+
7223  goto basic_json_parser_25;
+
7224  }
+
7225 basic_json_parser_51:
+
7226  yych = *++m_cursor;
+
7227  if (yych != 'l')
+
7228  {
+
7229  goto basic_json_parser_33;
+
7230  }
7231  yych = *++m_cursor;
-
7232  if (yych != 'l')
+
7232  if (yych != 's')
7233  {
7234  goto basic_json_parser_33;
7235  }
7236  yych = *++m_cursor;
-
7237  if (yych != 'l')
+
7237  if (yych != 'e')
7238  {
7239  goto basic_json_parser_33;
7240  }
7241  ++m_cursor;
7242  {
-
7243  return token_type::literal_null;
+
7243  return token_type::literal_false;
7244  }
-
7245 basic_json_parser_64:
+
7245 basic_json_parser_56:
7246  yych = *++m_cursor;
-
7247  if (yych != 0xBF)
+
7247  if (yych != 'u')
7248  {
7249  goto basic_json_parser_33;
7250  }
-
7251  ++m_cursor;
-
7252  {
-
7253  return scan();
-
7254  }
-
7255  }
-
7256 
-
7257 
-
7258  }
-
7259 
-
7261  void yyfill() noexcept
-
7262  {
-
7263  if (not m_stream or not * m_stream)
-
7264  {
-
7265  return;
-
7266  }
-
7267 
-
7268  const ssize_t offset_start = m_start - m_content;
-
7269  const ssize_t offset_marker = m_marker - m_start;
-
7270  const ssize_t offset_cursor = m_cursor - m_start;
-
7271 
-
7272  m_buffer.erase(0, static_cast<size_t>(offset_start));
-
7273  std::string line;
-
7274  std::getline(*m_stream, line);
-
7275  m_buffer += "\n" + line; // add line with newline symbol
-
7276 
-
7277  m_content = reinterpret_cast<const lexer_char_t*>(m_buffer.c_str());
-
7278  m_start = m_content;
-
7279  m_marker = m_start + offset_marker;
-
7280  m_cursor = m_start + offset_cursor;
-
7281  m_limit = m_start + m_buffer.size() - 1;
-
7282  }
-
7283 
-
7285  string_t get_token() const noexcept
-
7286  {
-
7287  return string_t(reinterpret_cast<typename string_t::const_pointer>(m_start),
-
7288  static_cast<size_t>(m_cursor - m_start));
-
7289  }
-
7290 
-
7312  string_t get_string() const
-
7313  {
-
7314  string_t result;
-
7315  result.reserve(static_cast<size_t>(m_cursor - m_start - 2));
-
7316 
-
7317  // iterate the result between the quotes
-
7318  for (const lexer_char_t* i = m_start + 1; i < m_cursor - 1; ++i)
-
7319  {
-
7320  // process escaped characters
-
7321  if (*i == '\\')
-
7322  {
-
7323  // read next character
-
7324  ++i;
-
7325 
-
7326  switch (*i)
-
7327  {
-
7328  // the default escapes
-
7329  case 't':
-
7330  {
-
7331  result += "\t";
-
7332  break;
-
7333  }
-
7334  case 'b':
-
7335  {
-
7336  result += "\b";
-
7337  break;
-
7338  }
-
7339  case 'f':
-
7340  {
-
7341  result += "\f";
-
7342  break;
-
7343  }
-
7344  case 'n':
-
7345  {
-
7346  result += "\n";
-
7347  break;
-
7348  }
-
7349  case 'r':
-
7350  {
-
7351  result += "\r";
-
7352  break;
-
7353  }
-
7354  case '\\':
-
7355  {
-
7356  result += "\\";
-
7357  break;
-
7358  }
-
7359  case '/':
+
7251  yych = *++m_cursor;
+
7252  if (yych != 'e')
+
7253  {
+
7254  goto basic_json_parser_33;
+
7255  }
+
7256  ++m_cursor;
+
7257  {
+
7258  return token_type::literal_true;
+
7259  }
+
7260 basic_json_parser_60:
+
7261  yych = *++m_cursor;
+
7262  if (yych != 'l')
+
7263  {
+
7264  goto basic_json_parser_33;
+
7265  }
+
7266  yych = *++m_cursor;
+
7267  if (yych != 'l')
+
7268  {
+
7269  goto basic_json_parser_33;
+
7270  }
+
7271  ++m_cursor;
+
7272  {
+
7273  return token_type::literal_null;
+
7274  }
+
7275 basic_json_parser_64:
+
7276  yych = *++m_cursor;
+
7277  if (yych != 0xBF)
+
7278  {
+
7279  goto basic_json_parser_33;
+
7280  }
+
7281  ++m_cursor;
+
7282  {
+
7283  return scan();
+
7284  }
+
7285  }
+
7286 
+
7287 
+
7288  }
+
7289 
+
7291  void yyfill() noexcept
+
7292  {
+
7293  if (not m_stream or not * m_stream)
+
7294  {
+
7295  return;
+
7296  }
+
7297 
+
7298  const ssize_t offset_start = m_start - m_content;
+
7299  const ssize_t offset_marker = m_marker - m_start;
+
7300  const ssize_t offset_cursor = m_cursor - m_start;
+
7301 
+
7302  m_buffer.erase(0, static_cast<size_t>(offset_start));
+
7303  std::string line;
+
7304  std::getline(*m_stream, line);
+
7305  m_buffer += "\n" + line; // add line with newline symbol
+
7306 
+
7307  m_content = reinterpret_cast<const lexer_char_t*>(m_buffer.c_str());
+
7308  m_start = m_content;
+
7309  m_marker = m_start + offset_marker;
+
7310  m_cursor = m_start + offset_cursor;
+
7311  m_limit = m_start + m_buffer.size() - 1;
+
7312  }
+
7313 
+
7315  string_t get_token() const noexcept
+
7316  {
+
7317  return string_t(reinterpret_cast<typename string_t::const_pointer>(m_start),
+
7318  static_cast<size_t>(m_cursor - m_start));
+
7319  }
+
7320 
+
7342  string_t get_string() const
+
7343  {
+
7344  string_t result;
+
7345  result.reserve(static_cast<size_t>(m_cursor - m_start - 2));
+
7346 
+
7347  // iterate the result between the quotes
+
7348  for (const lexer_char_t* i = m_start + 1; i < m_cursor - 1; ++i)
+
7349  {
+
7350  // process escaped characters
+
7351  if (*i == '\\')
+
7352  {
+
7353  // read next character
+
7354  ++i;
+
7355 
+
7356  switch (*i)
+
7357  {
+
7358  // the default escapes
+
7359  case 't':
7360  {
-
7361  result += "/";
+
7361  result += "\t";
7362  break;
7363  }
-
7364  case '"':
+
7364  case 'b':
7365  {
-
7366  result += "\"";
+
7366  result += "\b";
7367  break;
7368  }
-
7369 
-
7370  // unicode
-
7371  case 'u':
-
7372  {
-
7373  // get code xxxx from uxxxx
-
7374  auto codepoint = std::strtoul(std::string(reinterpret_cast<typename string_t::const_pointer>(i + 1),
-
7375  4).c_str(), nullptr, 16);
-
7376 
-
7377  // check if codepoint is a high surrogate
-
7378  if (codepoint >= 0xD800 and codepoint <= 0xDBFF)
-
7379  {
-
7380  // make sure there is a subsequent unicode
-
7381  if ((i + 6 >= m_limit) or * (i + 5) != '\\' or * (i + 6) != 'u')
-
7382  {
-
7383  throw std::invalid_argument("missing low surrogate");
-
7384  }
-
7385 
-
7386  // get code yyyy from uxxxx\uyyyy
-
7387  auto codepoint2 = std::strtoul(std::string(reinterpret_cast<typename string_t::const_pointer>
-
7388  (i + 7), 4).c_str(), nullptr, 16);
-
7389  result += to_unicode(codepoint, codepoint2);
-
7390  // skip the next 10 characters (xxxx\uyyyy)
-
7391  i += 10;
-
7392  }
-
7393  else
-
7394  {
-
7395  // add unicode character(s)
-
7396  result += to_unicode(codepoint);
-
7397  // skip the next four characters (xxxx)
-
7398  i += 4;
-
7399  }
-
7400  break;
-
7401  }
-
7402  }
-
7403  }
-
7404  else
-
7405  {
-
7406  // all other characters are just copied to the end of the
-
7407  // string
-
7408  result.append(1, static_cast<typename string_t::value_type>(*i));
-
7409  }
-
7410  }
-
7411 
-
7412  return result;
-
7413  }
-
7414 
-
7432  long double get_number() const
-
7433  {
-
7434  // conversion
-
7435  typename string_t::value_type* endptr;
-
7436  const auto float_val = std::strtold(reinterpret_cast<typename string_t::const_pointer>(m_start),
-
7437  &endptr);
-
7438 
-
7439  // return float_val if the whole number was translated and NAN
-
7440  // otherwise
-
7441  return (reinterpret_cast<lexer_char_t*>(endptr) == m_cursor) ? float_val : NAN;
-
7442  }
-
7443 
-
7444  private:
-
7446  std::istream* m_stream;
-
7448  string_t m_buffer;
-
7450  const lexer_char_t* m_content = nullptr;
-
7452  const lexer_char_t* m_start = nullptr;
-
7454  const lexer_char_t* m_marker = nullptr;
-
7456  const lexer_char_t* m_cursor = nullptr;
-
7458  const lexer_char_t* m_limit = nullptr;
-
7459  };
-
7460 
-
7466  class parser
-
7467  {
-
7468  public:
-
7470  parser(const string_t& s, parser_callback_t cb = nullptr)
-
7471  : callback(cb), m_lexer(s)
-
7472  {
-
7473  // read first token
-
7474  get_token();
-
7475  }
-
7476 
-
7478  parser(std::istream& _is, parser_callback_t cb = nullptr)
-
7479  : callback(cb), m_lexer(&_is)
-
7480  {
-
7481  // read first token
-
7482  get_token();
-
7483  }
-
7484 
-
7486  basic_json parse()
-
7487  {
-
7488  basic_json result = parse_internal(true);
-
7489 
-
7490  expect(lexer::token_type::end_of_input);
-
7491 
-
7492  // return parser result and replace it with null in case the
-
7493  // top-level value was discarded by the callback function
-
7494  return result.is_discarded() ? basic_json() : result;
-
7495  }
-
7496 
-
7497  private:
-
7499  basic_json parse_internal(bool keep)
-
7500  {
-
7501  auto result = basic_json(value_t::discarded);
-
7502 
-
7503  switch (last_token)
-
7504  {
-
7505  case lexer::token_type::begin_object:
-
7506  {
-
7507  if (keep and (not callback or (keep = callback(depth++, parse_event_t::object_start, result))))
-
7508  {
-
7509  // explicitly set result to object to cope with {}
-
7510  result.m_type = value_t::object;
-
7511  result.m_value = json_value(value_t::object);
-
7512  }
-
7513 
-
7514  // read next token
-
7515  get_token();
-
7516 
-
7517  // closing } -> we are done
-
7518  if (last_token == lexer::token_type::end_object)
-
7519  {
-
7520  get_token();
-
7521  if (keep and callback and not callback(--depth, parse_event_t::object_end, result))
-
7522  {
-
7523  result = basic_json(value_t::discarded);
-
7524  }
-
7525  return result;
-
7526  }
-
7527 
-
7528  // no comma is expected here
-
7529  unexpect(lexer::token_type::value_separator);
-
7530 
-
7531  // otherwise: parse key-value pairs
-
7532  do
-
7533  {
-
7534  // ugly, but could be fixed with loop reorganization
-
7535  if (last_token == lexer::token_type::value_separator)
-
7536  {
-
7537  get_token();
-
7538  }
-
7539 
-
7540  // store key
-
7541  expect(lexer::token_type::value_string);
-
7542  const auto key = m_lexer.get_string();
+
7369  case 'f':
+
7370  {
+
7371  result += "\f";
+
7372  break;
+
7373  }
+
7374  case 'n':
+
7375  {
+
7376  result += "\n";
+
7377  break;
+
7378  }
+
7379  case 'r':
+
7380  {
+
7381  result += "\r";
+
7382  break;
+
7383  }
+
7384  case '\\':
+
7385  {
+
7386  result += "\\";
+
7387  break;
+
7388  }
+
7389  case '/':
+
7390  {
+
7391  result += "/";
+
7392  break;
+
7393  }
+
7394  case '"':
+
7395  {
+
7396  result += "\"";
+
7397  break;
+
7398  }
+
7399 
+
7400  // unicode
+
7401  case 'u':
+
7402  {
+
7403  // get code xxxx from uxxxx
+
7404  auto codepoint = std::strtoul(std::string(reinterpret_cast<typename string_t::const_pointer>(i + 1),
+
7405  4).c_str(), nullptr, 16);
+
7406 
+
7407  // check if codepoint is a high surrogate
+
7408  if (codepoint >= 0xD800 and codepoint <= 0xDBFF)
+
7409  {
+
7410  // make sure there is a subsequent unicode
+
7411  if ((i + 6 >= m_limit) or * (i + 5) != '\\' or * (i + 6) != 'u')
+
7412  {
+
7413  throw std::invalid_argument("missing low surrogate");
+
7414  }
+
7415 
+
7416  // get code yyyy from uxxxx\uyyyy
+
7417  auto codepoint2 = std::strtoul(std::string(reinterpret_cast<typename string_t::const_pointer>
+
7418  (i + 7), 4).c_str(), nullptr, 16);
+
7419  result += to_unicode(codepoint, codepoint2);
+
7420  // skip the next 10 characters (xxxx\uyyyy)
+
7421  i += 10;
+
7422  }
+
7423  else
+
7424  {
+
7425  // add unicode character(s)
+
7426  result += to_unicode(codepoint);
+
7427  // skip the next four characters (xxxx)
+
7428  i += 4;
+
7429  }
+
7430  break;
+
7431  }
+
7432  }
+
7433  }
+
7434  else
+
7435  {
+
7436  // all other characters are just copied to the end of the
+
7437  // string
+
7438  result.append(1, static_cast<typename string_t::value_type>(*i));
+
7439  }
+
7440  }
+
7441 
+
7442  return result;
+
7443  }
+
7444 
+
7462  long double get_number() const
+
7463  {
+
7464  // conversion
+
7465  typename string_t::value_type* endptr;
+
7466  const auto float_val = std::strtold(reinterpret_cast<typename string_t::const_pointer>(m_start),
+
7467  &endptr);
+
7468 
+
7469  // return float_val if the whole number was translated and NAN
+
7470  // otherwise
+
7471  return (reinterpret_cast<lexer_char_t*>(endptr) == m_cursor) ? float_val : NAN;
+
7472  }
+
7473 
+
7474  private:
+
7476  std::istream* m_stream;
+
7478  string_t m_buffer;
+
7480  const lexer_char_t* m_content = nullptr;
+
7482  const lexer_char_t* m_start = nullptr;
+
7484  const lexer_char_t* m_marker = nullptr;
+
7486  const lexer_char_t* m_cursor = nullptr;
+
7488  const lexer_char_t* m_limit = nullptr;
+
7489  };
+
7490 
+
7496  class parser
+
7497  {
+
7498  public:
+
7500  parser(const string_t& s, parser_callback_t cb = nullptr)
+
7501  : callback(cb), m_lexer(s)
+
7502  {
+
7503  // read first token
+
7504  get_token();
+
7505  }
+
7506 
+
7508  parser(std::istream& _is, parser_callback_t cb = nullptr)
+
7509  : callback(cb), m_lexer(&_is)
+
7510  {
+
7511  // read first token
+
7512  get_token();
+
7513  }
+
7514 
+
7516  basic_json parse()
+
7517  {
+
7518  basic_json result = parse_internal(true);
+
7519 
+
7520  expect(lexer::token_type::end_of_input);
+
7521 
+
7522  // return parser result and replace it with null in case the
+
7523  // top-level value was discarded by the callback function
+
7524  return result.is_discarded() ? basic_json() : result;
+
7525  }
+
7526 
+
7527  private:
+
7529  basic_json parse_internal(bool keep)
+
7530  {
+
7531  auto result = basic_json(value_t::discarded);
+
7532 
+
7533  switch (last_token)
+
7534  {
+
7535  case lexer::token_type::begin_object:
+
7536  {
+
7537  if (keep and (not callback or (keep = callback(depth++, parse_event_t::object_start, result))))
+
7538  {
+
7539  // explicitly set result to object to cope with {}
+
7540  result.m_type = value_t::object;
+
7541  result.m_value = json_value(value_t::object);
+
7542  }
7543 
-
7544  bool keep_tag = false;
-
7545  if (keep)
-
7546  {
-
7547  if (callback)
-
7548  {
-
7549  basic_json k(key);
-
7550  keep_tag = callback(depth, parse_event_t::key, k);
-
7551  }
-
7552  else
-
7553  {
-
7554  keep_tag = true;
-
7555  }
-
7556  }
+
7544  // read next token
+
7545  get_token();
+
7546 
+
7547  // closing } -> we are done
+
7548  if (last_token == lexer::token_type::end_object)
+
7549  {
+
7550  get_token();
+
7551  if (keep and callback and not callback(--depth, parse_event_t::object_end, result))
+
7552  {
+
7553  result = basic_json(value_t::discarded);
+
7554  }
+
7555  return result;
+
7556  }
7557 
-
7558  // parse separator (:)
-
7559  get_token();
-
7560  expect(lexer::token_type::name_separator);
-
7561 
-
7562  // parse and add value
-
7563  get_token();
-
7564  auto value = parse_internal(keep);
-
7565  if (keep and keep_tag and not value.is_discarded())
+
7558  // no comma is expected here
+
7559  unexpect(lexer::token_type::value_separator);
+
7560 
+
7561  // otherwise: parse key-value pairs
+
7562  do
+
7563  {
+
7564  // ugly, but could be fixed with loop reorganization
+
7565  if (last_token == lexer::token_type::value_separator)
7566  {
-
7567  result[key] = std::move(value);
+
7567  get_token();
7568  }
-
7569  }
-
7570  while (last_token == lexer::token_type::value_separator);
-
7571 
-
7572  // closing }
-
7573  expect(lexer::token_type::end_object);
-
7574  get_token();
-
7575  if (keep and callback and not callback(--depth, parse_event_t::object_end, result))
-
7576  {
-
7577  result = basic_json(value_t::discarded);
-
7578  }
-
7579 
-
7580  return result;
-
7581  }
-
7582 
-
7583  case lexer::token_type::begin_array:
-
7584  {
-
7585  if (keep and (not callback or (keep = callback(depth++, parse_event_t::array_start, result))))
-
7586  {
-
7587  // explicitly set result to object to cope with []
-
7588  result.m_type = value_t::array;
-
7589  result.m_value = json_value(value_t::array);
-
7590  }
+
7569 
+
7570  // store key
+
7571  expect(lexer::token_type::value_string);
+
7572  const auto key = m_lexer.get_string();
+
7573 
+
7574  bool keep_tag = false;
+
7575  if (keep)
+
7576  {
+
7577  if (callback)
+
7578  {
+
7579  basic_json k(key);
+
7580  keep_tag = callback(depth, parse_event_t::key, k);
+
7581  }
+
7582  else
+
7583  {
+
7584  keep_tag = true;
+
7585  }
+
7586  }
+
7587 
+
7588  // parse separator (:)
+
7589  get_token();
+
7590  expect(lexer::token_type::name_separator);
7591 
-
7592  // read next token
-
7593  get_token();
-
7594 
-
7595  // closing ] -> we are done
-
7596  if (last_token == lexer::token_type::end_array)
-
7597  {
-
7598  get_token();
-
7599  if (callback and not callback(--depth, parse_event_t::array_end, result))
-
7600  {
-
7601  result = basic_json(value_t::discarded);
-
7602  }
-
7603  return result;
-
7604  }
-
7605 
-
7606  // no comma is expected here
-
7607  unexpect(lexer::token_type::value_separator);
-
7608 
-
7609  // otherwise: parse values
-
7610  do
-
7611  {
-
7612  // ugly, but could be fixed with loop reorganization
-
7613  if (last_token == lexer::token_type::value_separator)
-
7614  {
-
7615  get_token();
-
7616  }
-
7617 
-
7618  // parse value
-
7619  auto value = parse_internal(keep);
-
7620  if (keep and not value.is_discarded())
-
7621  {
-
7622  result.push_back(std::move(value));
-
7623  }
-
7624  }
-
7625  while (last_token == lexer::token_type::value_separator);
-
7626 
-
7627  // closing ]
-
7628  expect(lexer::token_type::end_array);
-
7629  get_token();
-
7630  if (keep and callback and not callback(--depth, parse_event_t::array_end, result))
-
7631  {
-
7632  result = basic_json(value_t::discarded);
-
7633  }
-
7634 
-
7635  return result;
-
7636  }
-
7637 
-
7638  case lexer::token_type::literal_null:
-
7639  {
-
7640  get_token();
-
7641  result.m_type = value_t::null;
-
7642  break;
-
7643  }
-
7644 
-
7645  case lexer::token_type::value_string:
-
7646  {
-
7647  const auto s = m_lexer.get_string();
-
7648  get_token();
-
7649  result = basic_json(s);
-
7650  break;
-
7651  }
-
7652 
-
7653  case lexer::token_type::literal_true:
-
7654  {
-
7655  get_token();
-
7656  result.m_type = value_t::boolean;
-
7657  result.m_value = true;
-
7658  break;
-
7659  }
-
7660 
-
7661  case lexer::token_type::literal_false:
-
7662  {
-
7663  get_token();
-
7664  result.m_type = value_t::boolean;
-
7665  result.m_value = false;
-
7666  break;
-
7667  }
-
7668 
-
7669  case lexer::token_type::value_number:
-
7670  {
-
7671  auto float_val = m_lexer.get_number();
-
7672 
-
7673  // NAN is returned if token could not be translated
-
7674  // completely
-
7675  if (std::isnan(float_val))
-
7676  {
-
7677  throw std::invalid_argument(std::string("parse error - ") +
-
7678  m_lexer.get_token() + " is not a number");
-
7679  }
-
7680 
-
7681  get_token();
+
7592  // parse and add value
+
7593  get_token();
+
7594  auto value = parse_internal(keep);
+
7595  if (keep and keep_tag and not value.is_discarded())
+
7596  {
+
7597  result[key] = std::move(value);
+
7598  }
+
7599  }
+
7600  while (last_token == lexer::token_type::value_separator);
+
7601 
+
7602  // closing }
+
7603  expect(lexer::token_type::end_object);
+
7604  get_token();
+
7605  if (keep and callback and not callback(--depth, parse_event_t::object_end, result))
+
7606  {
+
7607  result = basic_json(value_t::discarded);
+
7608  }
+
7609 
+
7610  return result;
+
7611  }
+
7612 
+
7613  case lexer::token_type::begin_array:
+
7614  {
+
7615  if (keep and (not callback or (keep = callback(depth++, parse_event_t::array_start, result))))
+
7616  {
+
7617  // explicitly set result to object to cope with []
+
7618  result.m_type = value_t::array;
+
7619  result.m_value = json_value(value_t::array);
+
7620  }
+
7621 
+
7622  // read next token
+
7623  get_token();
+
7624 
+
7625  // closing ] -> we are done
+
7626  if (last_token == lexer::token_type::end_array)
+
7627  {
+
7628  get_token();
+
7629  if (callback and not callback(--depth, parse_event_t::array_end, result))
+
7630  {
+
7631  result = basic_json(value_t::discarded);
+
7632  }
+
7633  return result;
+
7634  }
+
7635 
+
7636  // no comma is expected here
+
7637  unexpect(lexer::token_type::value_separator);
+
7638 
+
7639  // otherwise: parse values
+
7640  do
+
7641  {
+
7642  // ugly, but could be fixed with loop reorganization
+
7643  if (last_token == lexer::token_type::value_separator)
+
7644  {
+
7645  get_token();
+
7646  }
+
7647 
+
7648  // parse value
+
7649  auto value = parse_internal(keep);
+
7650  if (keep and not value.is_discarded())
+
7651  {
+
7652  result.push_back(std::move(value));
+
7653  }
+
7654  }
+
7655  while (last_token == lexer::token_type::value_separator);
+
7656 
+
7657  // closing ]
+
7658  expect(lexer::token_type::end_array);
+
7659  get_token();
+
7660  if (keep and callback and not callback(--depth, parse_event_t::array_end, result))
+
7661  {
+
7662  result = basic_json(value_t::discarded);
+
7663  }
+
7664 
+
7665  return result;
+
7666  }
+
7667 
+
7668  case lexer::token_type::literal_null:
+
7669  {
+
7670  get_token();
+
7671  result.m_type = value_t::null;
+
7672  break;
+
7673  }
+
7674 
+
7675  case lexer::token_type::value_string:
+
7676  {
+
7677  const auto s = m_lexer.get_string();
+
7678  get_token();
+
7679  result = basic_json(s);
+
7680  break;
+
7681  }
7682 
-
7683  // check if conversion loses precision
-
7684  const auto int_val = static_cast<number_integer_t>(float_val);
-
7685  if (approx(float_val, static_cast<long double>(int_val)))
-
7686  {
-
7687  // we would not lose precision -> return int
-
7688  result.m_type = value_t::number_integer;
-
7689  result.m_value = int_val;
-
7690  }
-
7691  else
-
7692  {
-
7693  // we would lose precision -> return float
-
7694  result.m_type = value_t::number_float;
-
7695  result.m_value = static_cast<number_float_t>(float_val);
-
7696  }
-
7697  break;
-
7698  }
-
7699 
-
7700  default:
-
7701  {
-
7702  // the last token was unexpected
-
7703  unexpect(last_token);
-
7704  }
-
7705  }
-
7706 
-
7707  if (keep and callback and not callback(depth, parse_event_t::value, result))
-
7708  {
-
7709  result = basic_json(value_t::discarded);
-
7710  }
-
7711  return result;
-
7712  }
-
7713 
-
7715  typename lexer::token_type get_token()
-
7716  {
-
7717  last_token = m_lexer.scan();
-
7718  return last_token;
-
7719  }
-
7720 
-
7721  void expect(typename lexer::token_type t) const
-
7722  {
-
7723  if (t != last_token)
-
7724  {
-
7725  std::string error_msg = "parse error - unexpected \'";
-
7726  error_msg += m_lexer.get_token();
-
7727  error_msg += "\' (" + lexer::token_type_name(last_token);
-
7728  error_msg += "); expected " + lexer::token_type_name(t);
-
7729  throw std::invalid_argument(error_msg);
-
7730  }
-
7731  }
-
7732 
-
7733  void unexpect(typename lexer::token_type t) const
-
7734  {
-
7735  if (t == last_token)
-
7736  {
-
7737  std::string error_msg = "parse error - unexpected \'";
-
7738  error_msg += m_lexer.get_token();
-
7739  error_msg += "\' (";
-
7740  error_msg += lexer::token_type_name(last_token) + ")";
-
7741  throw std::invalid_argument(error_msg);
-
7742  }
-
7743  }
-
7744 
-
7745  private:
-
7747  int depth = 0;
-
7749  parser_callback_t callback;
-
7751  typename lexer::token_type last_token = lexer::token_type::uninitialized;
-
7753  lexer m_lexer;
-
7754  };
-
7755 };
-
7756 
-
7757 
-
7759 // presets //
-
7761 
- -
7771 }
-
7772 
+
7683  case lexer::token_type::literal_true:
+
7684  {
+
7685  get_token();
+
7686  result.m_type = value_t::boolean;
+
7687  result.m_value = true;
+
7688  break;
+
7689  }
+
7690 
+
7691  case lexer::token_type::literal_false:
+
7692  {
+
7693  get_token();
+
7694  result.m_type = value_t::boolean;
+
7695  result.m_value = false;
+
7696  break;
+
7697  }
+
7698 
+
7699  case lexer::token_type::value_number:
+
7700  {
+
7701  auto float_val = m_lexer.get_number();
+
7702 
+
7703  // NAN is returned if token could not be translated
+
7704  // completely
+
7705  if (std::isnan(float_val))
+
7706  {
+
7707  throw std::invalid_argument(std::string("parse error - ") +
+
7708  m_lexer.get_token() + " is not a number");
+
7709  }
+
7710 
+
7711  get_token();
+
7712 
+
7713  // check if conversion loses precision
+
7714  const auto int_val = static_cast<number_integer_t>(float_val);
+
7715  if (approx(float_val, static_cast<long double>(int_val)))
+
7716  {
+
7717  // we would not lose precision -> return int
+
7718  result.m_type = value_t::number_integer;
+
7719  result.m_value = int_val;
+
7720  }
+
7721  else
+
7722  {
+
7723  // we would lose precision -> return float
+
7724  result.m_type = value_t::number_float;
+
7725  result.m_value = static_cast<number_float_t>(float_val);
+
7726  }
+
7727  break;
+
7728  }
+
7729 
+
7730  default:
+
7731  {
+
7732  // the last token was unexpected
+
7733  unexpect(last_token);
+
7734  }
+
7735  }
+
7736 
+
7737  if (keep and callback and not callback(depth, parse_event_t::value, result))
+
7738  {
+
7739  result = basic_json(value_t::discarded);
+
7740  }
+
7741  return result;
+
7742  }
+
7743 
+
7745  typename lexer::token_type get_token()
+
7746  {
+
7747  last_token = m_lexer.scan();
+
7748  return last_token;
+
7749  }
+
7750 
+
7751  void expect(typename lexer::token_type t) const
+
7752  {
+
7753  if (t != last_token)
+
7754  {
+
7755  std::string error_msg = "parse error - unexpected ";
+
7756  error_msg += (last_token == lexer::token_type::parse_error ? ("'" + m_lexer.get_token() + "'") :
+
7757  lexer::token_type_name(last_token));
+
7758  error_msg += "; expected " + lexer::token_type_name(t);
+
7759  throw std::invalid_argument(error_msg);
+
7760  }
+
7761  }
+
7762 
+
7763  void unexpect(typename lexer::token_type t) const
+
7764  {
+
7765  if (t == last_token)
+
7766  {
+
7767  std::string error_msg = "parse error - unexpected ";
+
7768  error_msg += (last_token == lexer::token_type::parse_error ? ("'" + m_lexer.get_token() + "'") :
+
7769  lexer::token_type_name(last_token));
+
7770  throw std::invalid_argument(error_msg);
+
7771  }
+
7772  }
7773 
-
7775 // nonmember functions //
-
7777 
-
7778 // specialization of std::swap, and std::hash
-
7779 namespace std
-
7780 {
-
7786 template <>
-
7787 inline void swap(nlohmann::json& j1,
-
7788  nlohmann::json& j2) noexcept(
-
7789  is_nothrow_move_constructible<nlohmann::json>::value and
-
7790  is_nothrow_move_assignable<nlohmann::json>::value
-
7791  )
-
7792 {
-
7793  j1.swap(j2);
-
7794 }
-
7795 
-
7797 template <>
-
7798 struct hash<nlohmann::json>
-
7799 {
-
7805  std::size_t operator()(const nlohmann::json& j) const
-
7806  {
-
7807  // a naive hashing via the string representation
-
7808  const auto& h = hash<nlohmann::json::string_t>();
-
7809  return h(j.dump());
-
7810  }
-
7811 };
-
7812 }
-
7813 
-
7826 inline nlohmann::json operator "" _json(const char* s, std::size_t)
-
7827 {
-
7828  return nlohmann::json::parse(reinterpret_cast<nlohmann::json::string_t::value_type*>
-
7829  (const_cast<char*>(s)));
-
7830 }
-
7831 
-
7832 #endif
+
7774  private:
+
7776  int depth = 0;
+
7778  parser_callback_t callback;
+
7780  typename lexer::token_type last_token = lexer::token_type::uninitialized;
+
7782  lexer m_lexer;
+
7783  };
+
7784 };
+
7785 
+
7786 
+
7788 // presets //
+
7790 
+ +
7800 }
+
7801 
+
7802 
+
7804 // nonmember functions //
+
7806 
+
7807 // specialization of std::swap, and std::hash
+
7808 namespace std
+
7809 {
+
7815 template <>
+
7816 inline void swap(nlohmann::json& j1,
+
7817  nlohmann::json& j2) noexcept(
+
7818  is_nothrow_move_constructible<nlohmann::json>::value and
+
7819  is_nothrow_move_assignable<nlohmann::json>::value
+
7820  )
+
7821 {
+
7822  j1.swap(j2);
+
7823 }
+
7824 
+
7826 template <>
+
7827 struct hash<nlohmann::json>
+
7828 {
+
7834  std::size_t operator()(const nlohmann::json& j) const
+
7835  {
+
7836  // a naive hashing via the string representation
+
7837  const auto& h = hash<nlohmann::json::string_t>();
+
7838  return h(j.dump());
+
7839  }
+
7840 };
+
7841 }
+
7842 
+
7855 inline nlohmann::json operator "" _json(const char* s, std::size_t)
+
7856 {
+
7857  return nlohmann::json::parse(reinterpret_cast<nlohmann::json::string_t::value_type*>
+
7858  (const_cast<char*>(s)));
+
7859 }
+
7860 
+
7861 #endif
json_reverse_iterator< typename basic_json::iterator > reverse_iterator
a reverse iterator for a basic_json container
Definition: json.hpp:239
-
bool operator!=(const const_iterator &other) const
comparison: not equal
Definition: json.hpp:5758
-
iterator insert(const_iterator pos, basic_json &&val)
inserts element
Definition: json.hpp:4234
-
iterator operator++(int)
post-increment (it++)
Definition: json.hpp:5995
-
friend bool operator<=(const_reference lhs, const_reference rhs) noexcept
comparison: less than or equal
Definition: json.hpp:4783
+
bool operator!=(const const_iterator &other) const
comparison: not equal
Definition: json.hpp:5879
+
iterator insert(const_iterator pos, basic_json &&val)
inserts element
Definition: json.hpp:4256
+
iterator operator++(int)
post-increment (it++)
Definition: json.hpp:6117
+
friend bool operator<=(const_reference lhs, const_reference rhs) noexcept
comparison: less than or equal
Definition: json.hpp:4810
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:6147
-
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: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:5460
-
static iteration_proxy< iterator > iterator_wrapper(reference cont)
wrapper to access iterator member functions in range-based for
Definition: json.hpp:3783
-
const_iterator & operator--()
pre-decrement (–it)
Definition: json.hpp:5703
-
friend std::istream & operator>>(std::istream &i, basic_json &j)
deserialize from stream
Definition: json.hpp:4996
-
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:5525
-
typename basic_json::value_type value_type
the type of the values when the iterator is dereferenced
Definition: json.hpp:5456
-
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:4309
-
iterator insert(const_iterator pos, size_type cnt, const basic_json &val)
inserts elements
Definition: json.hpp:4261
-
json_reverse_iterator operator--(int)
post-decrement (it–)
Definition: json.hpp:6119
+
json_reverse_iterator operator-(difference_type i) const
subtract from iterator
Definition: json.hpp:6272
+
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:1507
+
const_reference operator[](size_type idx) const
access specified array element
Definition: json.hpp:2847
+
reference operator[](const T(&key)[n])
access specified object element
Definition: json.hpp:2977
+
typename basic_json::const_pointer pointer
defines a pointer to the type iterated over (value_type)
Definition: json.hpp:5581
+
static iteration_proxy< iterator > iterator_wrapper(reference cont)
wrapper to access iterator member functions in range-based for
Definition: json.hpp:3803
+
const_iterator & operator--()
pre-decrement (–it)
Definition: json.hpp:5824
+
friend std::istream & operator>>(std::istream &i, basic_json &j)
deserialize from stream
Definition: json.hpp:5023
+
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:5646
+
typename basic_json::value_type value_type
the type of the values when the iterator is dereferenced
Definition: json.hpp:5577
+
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:1771
+
iterator insert(const_iterator pos, const_iterator first, const_iterator last)
inserts elements
Definition: json.hpp:4335
+
iterator insert(const_iterator pos, size_type cnt, const basic_json &val)
inserts elements
Definition: json.hpp:4284
+
json_reverse_iterator operator--(int)
post-decrement (it–)
Definition: json.hpp:6244
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:4159
+
void push_back(const typename object_t::value_type &val)
add an object to an object
Definition: json.hpp:4180
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:6003
-
friend bool operator!=(const_reference lhs, const_reference rhs) noexcept
comparison: not equal
Definition: json.hpp:4661
+
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:1467
+
iterator & operator++()
pre-increment (++it)
Definition: json.hpp:6125
+
friend bool operator!=(const_reference lhs, const_reference rhs) noexcept
comparison: not equal
Definition: json.hpp:4688
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:5668
-
difference_type operator-(const json_reverse_iterator &other) const
return difference
Definition: json.hpp:6155
-
basic_json<> json
default JSON class
Definition: json.hpp:7770
-
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:3499
-
std::reverse_iterator< Base > base_iterator
shortcut to the reverse iterator adaptor
Definition: json.hpp:6094
-
json_reverse_iterator(const typename base_iterator::iterator_type &it)
create reverse iterator from iterator
Definition: json.hpp:6099
+
const_iterator & operator++()
pre-increment (++it)
Definition: json.hpp:5789
+
difference_type operator-(const json_reverse_iterator &other) const
return difference
Definition: json.hpp:6280
+
basic_json<> json
default JSON class
Definition: json.hpp:7799
+
reference front()
access the first element
Definition: json.hpp:3143
+
bool is_array() const noexcept
return whether value is an array
Definition: json.hpp:2084
+
const_iterator find(typename object_t::key_type key) const
find an element in a JSON object
Definition: json.hpp:3516
+
std::reverse_iterator< Base > base_iterator
shortcut to the reverse iterator adaptor
Definition: json.hpp:6216
+
json_reverse_iterator(const typename base_iterator::iterator_type &it)
create reverse iterator from iterator
Definition: json.hpp:6221
a class to store JSON values
Definition: json.hpp:187
-
json_reverse_iterator & operator--()
pre-decrement (–it)
Definition: json.hpp:6125
+
json_reverse_iterator & operator--()
pre-decrement (–it)
Definition: json.hpp:6250
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:4640
-
void push_back(basic_json &&val)
add an object to an array
Definition: json.hpp:4075
-
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:6025
-
const PointerType get_ptr() const noexcept
get a pointer value (implicit)
Definition: json.hpp:2539
+
friend bool operator==(std::nullptr_t, const_reference v) noexcept
comparison: equal
Definition: json.hpp:4667
+
void push_back(basic_json &&val)
add an object to an array
Definition: json.hpp:4096
+
const_iterator cbegin() const
returns a const iterator to the first element
Definition: json.hpp:3614
+
bool is_string() const noexcept
return whether value is a string
Definition: json.hpp:2103
+
iterator & operator+=(difference_type i)
add to iterator
Definition: json.hpp:6147
+
const PointerType get_ptr() const noexcept
get a pointer value (implicit)
Definition: json.hpp:2542
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:5954
-
reference operator+=(basic_json &&val)
add an object to an array
Definition: json.hpp:4100
-
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:5951
-
iterator & operator-=(difference_type i)
subtract from iterator
Definition: json.hpp:6032
-
static basic_json parse(std::istream &&i, parser_callback_t cb=nullptr)
deserialize from stream
Definition: json.hpp:4958
-
reference operator[](const typename object_t::key_type &key)
access specified object element
Definition: json.hpp:2881
+
const_iterator base_iterator
Definition: json.hpp:6075
+
reference operator+=(basic_json &&val)
add an object to an array
Definition: json.hpp:4121
+
basic_json(size_type cnt, const basic_json &val)
construct an array with count copies of given value
Definition: json.hpp:1531
+
a mutable random access iterator for the basic_json class
Definition: json.hpp:6072
+
iterator & operator-=(difference_type i)
subtract from iterator
Definition: json.hpp:6154
+
static basic_json parse(std::istream &&i, parser_callback_t cb=nullptr)
deserialize from stream
Definition: json.hpp:4985
+
reference operator[](const typename object_t::key_type &key)
access specified object element
Definition: json.hpp:2887
STL namespace.
-
difference_type operator-(const iterator &other) const
Definition: json.hpp:6054
-
reference value() const
return the value of an iterator
Definition: json.hpp:5927
-
static iteration_proxy< const_iterator > iterator_wrapper(const_reference cont)
wrapper to access iterator member functions in range-based for
Definition: json.hpp:3791
-
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:5520
-
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:5914
-
iterator end()
returns an iterator to one past the last element
Definition: json.hpp:3622
+
difference_type operator-(const iterator &other) const
Definition: json.hpp:6176
+
reference value() const
return the value of an iterator
Definition: json.hpp:6048
+
static iteration_proxy< const_iterator > iterator_wrapper(const_reference cont)
wrapper to access iterator member functions in range-based for
Definition: json.hpp:3811
+
const_iterator end() const
returns a const iterator to one past the last element
Definition: json.hpp:3649
+
const_iterator(const const_iterator &other) noexcept
copy constructor
Definition: json.hpp:5641
+
reference at(const typename object_t::key_type &key)
access specified object element with bounds checking
Definition: json.hpp:2710
+
object_t::key_type key() const
return the key of an object iterator
Definition: json.hpp:6035
+
iterator end()
returns an iterator to one past the last element
Definition: json.hpp:3639
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:5983
-
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:5850
-
bool is_discarded() const noexcept
return whether value is discarded
Definition: json.hpp:2124
+
reference operator*()
return a reference to the value pointed to by the iterator
Definition: json.hpp:6105
+
reverse_iterator rend()
returns an iterator to the reverse-end
Definition: json.hpp:3728
+
bool is_object() const noexcept
return whether value is an object
Definition: json.hpp:2065
+
const_iterator operator-(difference_type i)
subtract from iterator
Definition: json.hpp:5971
+
bool is_discarded() const noexcept
return whether value is discarded
Definition: json.hpp:2127
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:5462
-
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: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:4133
+
typename basic_json::const_reference reference
defines a reference to the type iterated over (value_type)
Definition: json.hpp:5583
+
const_reverse_iterator rend() const
returns a const reverse iterator to one before the first
Definition: json.hpp:3736
+
size_type erase(const typename object_t::key_type &key)
remove element from a JSON object given a key
Definition: json.hpp:3428
+
bool is_boolean() const noexcept
return whether value is a boolean
Definition: json.hpp:1976
+
iterator begin()
returns an iterator to the first element
Definition: json.hpp:3580
+
const_reference at(const typename object_t::key_type &key) const
access specified object element with bounds checking
Definition: json.hpp:2757
+
reference operator+=(const basic_json &val)
add an object to an array
Definition: json.hpp:4154
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:6039
+
bool is_number_integer() const noexcept
return whether value is an integer number
Definition: json.hpp:2023
+
iterator operator+(difference_type i)
add to iterator
Definition: json.hpp:6161
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:3483
+
iterator find(typename object_t::key_type key)
find an element in a JSON object
Definition: json.hpp:3500
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:4827
-
iterator & operator--()
pre-decrement (–it)
Definition: json.hpp:6018
-
friend bool operator<(const_reference lhs, const_reference rhs) noexcept
comparison: less than
Definition: json.hpp:4722
-
pointer operator->() const
dereference the iterator
Definition: json.hpp:5631
+
friend bool operator>=(const_reference lhs, const_reference rhs) noexcept
comparison: greater than or equal
Definition: json.hpp:4854
+
iterator & operator--()
pre-decrement (–it)
Definition: json.hpp:6140
+
friend bool operator<(const_reference lhs, const_reference rhs) noexcept
comparison: less than
Definition: json.hpp:4749
+
pointer operator->() const
dereference the iterator
Definition: json.hpp:5752
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: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:6096
-
size_type size() const noexcept
returns the number of elements
Definition: json.hpp:3892
+
const_reference operator[](const typename object_t::key_type &key) const
read-only access specified object element
Definition: json.hpp:2934
+
const_iterator cend() const
returns a const iterator to one past the last element
Definition: json.hpp:3673
+
typename Base::reference reference
the reference type for the pointed-to element
Definition: json.hpp:6218
+
size_type size() const noexcept
returns the number of elements
Definition: json.hpp:3912
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:2617
+
reference at(size_type idx)
access specified array element with bounds checking
Definition: json.hpp:2620
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:6103
-
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:4882
-
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:6167
-
bool is_structured() const noexcept
return whether type is structured
Definition: json.hpp:1935
+
json_reverse_iterator(const base_iterator &it)
create reverse iterator from base class
Definition: json.hpp:6226
+
value_t type() const noexcept
return the type of the JSON value (explicit)
Definition: json.hpp:1897
+
friend std::ostream & operator>>(const basic_json &j, std::ostream &o)
serialize to stream
Definition: json.hpp:4909
+
ValueType value(const typename object_t::key_type &key, ValueType default_value) const
access specified object element with default value
Definition: json.hpp:3092
+
object_t::key_type key() const
return the key of an object iterator
Definition: json.hpp:6292
+
bool is_structured() const noexcept
return whether type is structured
Definition: json.hpp:1938
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:5458
-
void swap(array_t &other)
exchanges the values
Definition: json.hpp:4430
-
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:4182
+
typename basic_json::difference_type difference_type
a type to represent differences between iterators
Definition: json.hpp:5579
+
void swap(array_t &other)
exchanges the values
Definition: json.hpp:4457
+
reverse_iterator rbegin()
returns an iterator to the reverse-beginning
Definition: json.hpp:3697
+
reference operator+=(const typename object_t::value_type &val)
add an object to an object
Definition: json.hpp:4203
-
reference operator[](difference_type n) const
access to successor
Definition: json.hpp:6060
+
reference operator[](difference_type n) const
access to successor
Definition: json.hpp:6182
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: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:5842
+
const_reverse_iterator rbegin() const
returns a const reverse iterator to the last element
Definition: json.hpp:3705
+
~basic_json()
destructor
Definition: json.hpp:1797
+
basic_json(const basic_json &other)
copy constructor
Definition: json.hpp:1675
+
const_iterator operator+(difference_type i)
add to iterator
Definition: json.hpp:5963
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:4494
-
reference value() const
return the value of an iterator
Definition: json.hpp:6066
-
const_iterator operator--(int)
post-decrement (it–)
Definition: json.hpp:5695
-
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:4009
-
pointer operator->()
dereference the iterator
Definition: json.hpp:5989
+
bool is_null() const noexcept
return whether value is null
Definition: json.hpp:1957
+
void swap(string_t &other)
exchanges the values
Definition: json.hpp:4521
+
reference value() const
return the value of an iterator
Definition: json.hpp:6188
+
const_iterator operator--(int)
post-decrement (it–)
Definition: json.hpp:5816
+
void erase(const size_type idx)
remove element from a JSON array given an index
Definition: json.hpp:3465
+
void clear() noexcept
clears the contents
Definition: json.hpp:4029
+
pointer operator->()
dereference the iterator
Definition: json.hpp:6111
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:3141
-
bool operator>=(const const_iterator &other) const
comparison: greater than or equal
Definition: json.hpp:5804
-
iterator insert(const_iterator pos, std::initializer_list< basic_json > ilist)
inserts elements
Definition: json.hpp:4363
+
const_reference front() const
access the first element
Definition: json.hpp:3151
+
bool operator>=(const const_iterator &other) const
comparison: greater than or equal
Definition: json.hpp:5925
+
iterator insert(const_iterator pos, std::initializer_list< basic_json > ilist)
inserts elements
Definition: json.hpp:4390
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:5810
-
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:5858
-
friend bool operator==(const_reference lhs, const_reference rhs) noexcept
comparison: equal
Definition: json.hpp:4573
-
bool is_number() const noexcept
return whether value is a number
Definition: json.hpp:1997
+
const_iterator & operator+=(difference_type i)
add to iterator
Definition: json.hpp:5931
+
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:1377
+
difference_type operator-(const const_iterator &other) const
return difference
Definition: json.hpp:5979
+
friend bool operator==(const_reference lhs, const_reference rhs) noexcept
comparison: equal
Definition: json.hpp:4600
+
bool is_number() const noexcept
return whether value is a number
Definition: json.hpp:2000
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:3765
+
const_reverse_iterator crend() const
returns a const reverse iterator to one before the first
Definition: json.hpp:3782
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:3835
-
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:4400
+
bool empty() const noexcept
checks whether the container is empty
Definition: json.hpp:3855
+
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:3118
+
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:4427
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:3742
-
reference value() const
return the value of an iterator
Definition: json.hpp:6174
+
const_reverse_iterator crbegin() const
returns a const reverse iterator to the last element
Definition: json.hpp:3759
+
reference value() const
return the value of an iterator
Definition: json.hpp:6299
-
const_iterator(pointer object)
constructor for a given JSON instance
Definition: json.hpp:5470
-
friend bool operator<(const value_t lhs, const value_t rhs)
comparison operator for JSON types
Definition: json.hpp:4527
-
iterator(pointer object) noexcept
constructor for a given JSON instance
Definition: json.hpp:5962
-
bool operator<(const const_iterator &other) const
comparison: smaller
Definition: json.hpp:5764
-
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:4684
-
const_iterator & operator-=(difference_type i)
subtract from iterator
Definition: json.hpp:5836
+
const_iterator(pointer object)
constructor for a given JSON instance
Definition: json.hpp:5591
+
friend bool operator<(const value_t lhs, const value_t rhs)
comparison operator for JSON types
Definition: json.hpp:4554
+
iterator(pointer object) noexcept
constructor for a given JSON instance
Definition: json.hpp:6083
+
bool operator<(const const_iterator &other) const
comparison: smaller
Definition: json.hpp:5885
+
string_t dump(const int indent=-1) const
serialization
Definition: json.hpp:1866
+
friend bool operator!=(const_reference v, std::nullptr_t) noexcept
comparison: not equal
Definition: json.hpp:4711
+
const_iterator & operator-=(difference_type i)
subtract from iterator
Definition: json.hpp:5957
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:4921
-
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:6106
-
PointerType get_ptr() noexcept
get a pointer value (implicit)
Definition: json.hpp:2524
+
static basic_json parse(const string_t &s, parser_callback_t cb=nullptr)
deserialize from string
Definition: json.hpp:4948
+
InteratorType erase(InteratorType first, InteratorType last)
remove elements given an iterator range
Definition: json.hpp:3347
+
json_reverse_iterator operator++(int)
post-increment (it++)
Definition: json.hpp:6231
+
PointerType get_ptr() noexcept
get a pointer value (implicit)
Definition: json.hpp:2527
-
const_iterator(const iterator &other)
copy constructor given a nonconst iterator
Definition: json.hpp:5495
-
friend bool operator!=(std::nullptr_t, const_reference v) noexcept
comparison: not equal
Definition: json.hpp:4693
-
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:5792
+
const_iterator(const iterator &other)
copy constructor given a nonconst iterator
Definition: json.hpp:5616
+
friend bool operator!=(std::nullptr_t, const_reference v) noexcept
comparison: not equal
Definition: json.hpp:4720
+
InteratorType erase(InteratorType pos)
remove element given an iterator
Definition: json.hpp:3244
+
bool operator<=(const const_iterator &other) const
comparison: less than or equal
Definition: json.hpp:5913
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:3167
-
bool is_number_float() const noexcept
return whether value is a floating-point number
Definition: json.hpp:2043
+
reference back()
access the last element
Definition: json.hpp:3177
+
bool is_number_float() const noexcept
return whether value is a floating-point number
Definition: json.hpp:2046
the parser read { and started to process a JSON object
-
const_iterator operator++(int)
post-increment (it++)
Definition: json.hpp:5660
+
const_iterator operator++(int)
post-increment (it++)
Definition: json.hpp:5781
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:5966
-
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:4950
-
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:3952
-
void push_back(const basic_json &val)
add an object to an array
Definition: json.hpp:4110
-
bool operator==(const const_iterator &other) const
comparison: equal
Definition: json.hpp:5730
-
json_reverse_iterator & operator++()
pre-increment (++it)
Definition: json.hpp:6112
-
bool operator>(const const_iterator &other) const
comparison: greater than
Definition: json.hpp:5798
-
friend bool operator>(const_reference lhs, const_reference rhs) noexcept
comparison: greater than
Definition: json.hpp:4805
-
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: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:6132
-
a const random access iterator for the basic_json class
Definition: json.hpp:5449
+
iterator(const iterator &other) noexcept
copy constructor
Definition: json.hpp:6088
+
const_reference back() const
access the last element
Definition: json.hpp:3187
+
basic_json(InputIT first, InputIT last)
construct a JSON container given an iterator range
Definition: json.hpp:1577
+
static basic_json parse(std::istream &i, parser_callback_t cb=nullptr)
deserialize from stream
Definition: json.hpp:4977
+
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:3546
+
size_type max_size() const noexcept
returns the maximum possible number of elements
Definition: json.hpp:3972
+
void push_back(const basic_json &val)
add an object to an array
Definition: json.hpp:4131
+
bool operator==(const const_iterator &other) const
comparison: equal
Definition: json.hpp:5851
+
json_reverse_iterator & operator++()
pre-increment (++it)
Definition: json.hpp:6237
+
bool operator>(const const_iterator &other) const
comparison: greater than
Definition: json.hpp:5919
+
friend bool operator>(const_reference lhs, const_reference rhs) noexcept
comparison: greater than
Definition: json.hpp:4832
+
basic_json(basic_json &&other) noexcept
move constructor
Definition: json.hpp:1741
+
const_reference operator[](const T(&key)[n]) const
read-only access specified object element
Definition: json.hpp:3027
+
const_iterator begin() const
returns a const iterator to the first element
Definition: json.hpp:3590
+
const_reference at(size_type idx) const
access specified array element with bounds checking
Definition: json.hpp:2663
+
json_reverse_iterator & operator+=(difference_type i)
add to iterator
Definition: json.hpp:6257
+
a const random access iterator for the basic_json class
Definition: json.hpp:5570
a template for a reverse iterator class
Definition: json.hpp:232
-
void swap(object_t &other)
exchanges the values
Definition: json.hpp:4462
-
std::bidirectional_iterator_tag iterator_category
the category of the iterator
Definition: json.hpp:5464
-
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:4208
-
friend bool operator==(const_reference v, std::nullptr_t) noexcept
comparison: equal
Definition: json.hpp:4631
+
void swap(object_t &other)
exchanges the values
Definition: json.hpp:4489
+
std::bidirectional_iterator_tag iterator_category
the category of the iterator
Definition: json.hpp:5585
+
bool is_primitive() const noexcept
return whether type is primitive
Definition: json.hpp:1918
+
iterator insert(const_iterator pos, const basic_json &val)
inserts element
Definition: json.hpp:4230
+
friend bool operator==(const_reference v, std::nullptr_t) noexcept
comparison: equal
Definition: json.hpp:4658
-
reference operator[](difference_type n) const
access to successor
Definition: json.hpp:6161
+
reference operator[](difference_type n) const
access to successor
Definition: json.hpp:6286
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:5880
-
reference operator*() const
return a reference to the value pointed to by the iterator
Definition: json.hpp:5597
+
reference operator[](difference_type n) const
access to successor
Definition: json.hpp:6001
+
reference operator*() const
return a reference to the value pointed to by the iterator
Definition: json.hpp:5718
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:4986
+
friend std::istream & operator<<(basic_json &j, std::istream &i)
deserialize from stream
Definition: json.hpp:5013
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:7805
-
friend std::ostream & operator<<(std::ostream &o, const basic_json &j)
serialize to stream
Definition: json.hpp:4864
-
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:5971
+
std::size_t operator()(const nlohmann::json &j) const
return a hash value for a JSON object
Definition: json.hpp:7834
+
friend std::ostream & operator<<(std::ostream &o, const basic_json &j)
serialize to stream
Definition: json.hpp:4891
+
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:6093
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:2799
-
iterator operator--(int)
post-decrement (it–)
Definition: json.hpp:6010
-
json_reverse_iterator operator+(difference_type i) const
add to iterator
Definition: json.hpp:6139
+
reference operator[](size_type idx)
access specified array element
Definition: json.hpp:2803
+
iterator operator--(int)
post-decrement (it–)
Definition: json.hpp:6132
+
json_reverse_iterator operator+(difference_type i) const
add to iterator
Definition: json.hpp:6264
parse_event_t
JSON callback events.
Definition: json.hpp:754
-
iterator operator-(difference_type i)
subtract from iterator
Definition: json.hpp:6047
+
iterator operator-(difference_type i)
subtract from iterator
Definition: json.hpp:6169
diff --git a/namespacemembers.html b/namespacemembers.html index 0d9910e6c..2e1db8a75 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 09aa7473d..d8f772f33 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 9eda0b7a9..8faa12473 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 ba1312ba3..075ef9423 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 cea4e1079..14ad6706a 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 7770 of file json.hpp.

+

Definition at line 7799 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 0c8a339c4..757720803 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 308b2d54d..9466beb7e 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 7798 of file json.hpp.

+

Definition at line 7827 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 88aa33adf..62c0d5dd7 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 7805 of file json.hpp.

+

Definition at line 7834 of file json.hpp.

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