diff --git a/Tokens.xml b/Tokens.xml index b64c33004..0fa28543a 100644 --- a/Tokens.xml +++ b/Tokens.xml @@ -56,30 +56,6 @@ returns the allocator associated with the container json.hpp - - - iterator_wrapper - cpp - clm - nlohmann::basic_json - - classnlohmann_1_1basic__json_a317b01b0fba3ac458561f1634759ea3b.html - a317b01b0fba3ac458561f1634759ea3b - wrapper to access iterator member functions in range-based for - json.hpp - - - - iterator_wrapper - cpp - clm - nlohmann::basic_json - - classnlohmann_1_1basic__json_a8e4e11999b4e7faa8f31f21164ebd65a.html - a8e4e11999b4e7faa8f31f21164ebd65a - wrapper to access iterator member functions in range-based for - json.hpp - value_type @@ -1072,6 +1048,30 @@ returns the number of occurrences of a key in a JSON object json.hpp + + + iterator_wrapper + cpp + clm + nlohmann::basic_json + + classnlohmann_1_1basic__json_a317b01b0fba3ac458561f1634759ea3b.html + a317b01b0fba3ac458561f1634759ea3b + wrapper to access iterator member functions in range-based for + json.hpp + + + + iterator_wrapper + cpp + clm + nlohmann::basic_json + + classnlohmann_1_1basic__json_a8e4e11999b4e7faa8f31f21164ebd65a.html + a8e4e11999b4e7faa8f31f21164ebd65a + wrapper to access iterator member functions in range-based for + json.hpp + begin diff --git a/annotated.html b/annotated.html index 476d0deaf..9a7bf91ee 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 fa9e9a02e..6ee7563b9 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 788072399..e71068d65 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 b439c8c79..48b6ee814 100644 --- a/classnlohmann_1_1basic__json.html +++ b/classnlohmann_1_1basic__json.html @@ -151,12 +151,6 @@ Static Public Member Functions static allocator_type get_allocator ()  returns the allocator associated with the container More...
  -static iteration_proxy< iteratoriterator_wrapper (reference cont) - wrapper to access iterator member functions in range-based for More...
-  -static iteration_proxy< const_iteratoriterator_wrapper (const_reference cont) - wrapper to access iterator member functions in range-based for More...
-  @@ -448,6 +442,12 @@ element access

container types

+ + + + + + @@ -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 e1ec683f0..afc11a187 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');

iterators

static iteration_proxy< iteratoriterator_wrapper (reference cont)
 wrapper to access iterator member functions in range-based for More...
 
static iteration_proxy< const_iteratoriterator_wrapper (const_reference cont)
 wrapper to access iterator member functions in range-based for More...
 
iterator begin ()
 returns an iterator to the first element More...
 
diff --git a/classnlohmann_1_1basic__json_1_1const__iterator.html b/classnlohmann_1_1basic__json_1_1const__iterator.html index 86d544883..f9f7b36fc 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 5423 of file json.hpp.

+

Definition at line 5449 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 a1f43a87b..26a125451 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 5669 of file json.hpp.

+

Definition at line 5695 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 849aae182..bfb186bdc 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 5772 of file json.hpp.

+

Definition at line 5798 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 a477e1a4d..cc9e950d7 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 5854 of file json.hpp.

+

Definition at line 5880 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 5144e7b69..6a8c49c0a 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 5499 of file json.hpp.

+

Definition at line 5525 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 568402c53..84c2f2594 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 5605 of file json.hpp.

+

Definition at line 5631 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 e4e3c5752..ba48bb52f 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 5704 of file json.hpp.

+

Definition at line 5730 of file json.hpp.

@@ -153,7 +153,7 @@ template<template< typename U, typename V, typename...Args > class Obje diff --git a/classnlohmann_1_1basic__json_1_1const__iterator_a4632d8307fc315f21e2ecc9ba5aa6346.html b/classnlohmann_1_1basic__json_1_1const__iterator_a4632d8307fc315f21e2ecc9ba5aa6346.html index 373d4e6b3..a93b9a649 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 5571 of file json.hpp.

+

Definition at line 5597 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 11b370a5e..447273f03 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 5434 of file json.hpp.

+

Definition at line 5460 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 cff074fc3..4ff9c3570 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 5469 of file json.hpp.

+

Definition at line 5495 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 3b0b188d7..be6323a21 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 5824 of file json.hpp.

+

Definition at line 5850 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 7008d65cb..67e1fdb54 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 5430 of file json.hpp.

+

Definition at line 5456 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 e50cd5951..1cc293eb5 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 5778 of file json.hpp.

+

Definition at line 5804 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 aad3450fb..e66012340 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 5444 of file json.hpp.

+

Definition at line 5470 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 2c420f05a..bc6d490ed 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 c783d401e..f77b8154d 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 5888 of file json.hpp.

+

Definition at line 5914 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 f063d2ae2..2925ea744 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 5784 of file json.hpp.

+

Definition at line 5810 of file json.hpp.

@@ -153,7 +153,7 @@ template<template< typename U, typename V, typename...Args > class Obje diff --git a/classnlohmann_1_1basic__json_1_1const__iterator_ab7dacd8e3ee9b3756bfcdb87dd55a515.html b/classnlohmann_1_1basic__json_1_1const__iterator_ab7dacd8e3ee9b3756bfcdb87dd55a515.html index 06aae094e..37291c33c 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 5901 of file json.hpp.

+

Definition at line 5927 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 3eb98c214..4f758b012 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 5732 of file json.hpp.

+

Definition at line 5758 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 0e4469c8f..82a893125 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 5677 of file json.hpp.

+

Definition at line 5703 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 efac5a727..3d4fd0174 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 5642 of file json.hpp.

+

Definition at line 5668 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 882984ff6..6ed752e9c 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 5432 of file json.hpp.

+

Definition at line 5458 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 122f92f03..587a1c882 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 5816 of file json.hpp.

+

Definition at line 5842 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 9cb246427..d98e7b3ed 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 5738 of file json.hpp.

+

Definition at line 5764 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 b1090fc5e..0e0d8004b 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 5426 of file json.hpp.

+

Definition at line 5452 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 869d4668f..0c4d9fdbc 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 5436 of file json.hpp.

+

Definition at line 5462 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 44a7397a1..baf064218 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 5832 of file json.hpp.

+

Definition at line 5858 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 97251253e..29d37a4e8 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 5634 of file json.hpp.

+

Definition at line 5660 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 0d2a7a100..b84306cfc 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 5438 of file json.hpp.

+

Definition at line 5464 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 aafa0f8ac..4a640df5c 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 5766 of file json.hpp.

+

Definition at line 5792 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 ddc6f2557..259d666cf 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 5810 of file json.hpp.

+

Definition at line 5836 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 7c58b9404..cdd21f692 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 5494 of file json.hpp.

+

Definition at line 5520 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 40437d7cd..88145f2ec 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 91364bd96..657482357 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 5925 of file json.hpp.

+

Definition at line 5951 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 5de72cb76..0bd592e37 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 5977 of file json.hpp.

+

Definition at line 6003 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 b7ca1822e..03f42f944 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 6006 of file json.hpp.

+

Definition at line 6032 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 71e38e7f3..7f3966b18 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 6021 of file json.hpp.

+

Definition at line 6047 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 c82fe82da..8c38d203b 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 6034 of file json.hpp.

+

Definition at line 6060 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 1c5362c7b..0d07257ce 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 5963 of file json.hpp.

+

Definition at line 5989 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 00238776d..4b4126e2f 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 5992 of file json.hpp.

+

Definition at line 6018 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 9b7b1a45a..6dbb05ca7 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 6028 of file json.hpp.

+

Definition at line 6054 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 9f90d474d..d45d49ec5 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 5957 of file json.hpp.

+

Definition at line 5983 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 fdc96bcd4..c18469bbb 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 5984 of file json.hpp.

+

Definition at line 6010 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 4eeb8989d..fc4b0b58c 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 66e5a52bf..3cb9051e3 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 5945 of file json.hpp.

+

Definition at line 5971 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 edd959b72..7ca0f9f58 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 5999 of file json.hpp.

+

Definition at line 6025 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 967d9b994..fcd409c6e 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 5940 of file json.hpp.

+

Definition at line 5966 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 696269e26..a5a2f4e60 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 5969 of file json.hpp.

+

Definition at line 5995 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 148817f5e..b2b792d35 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 5930 of file json.hpp.

+

Definition at line 5956 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 5b756a6e8..5b15a2ff4 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 5936 of file json.hpp.

+

Definition at line 5962 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 360f4c965..986b0608c 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 6013 of file json.hpp.

+

Definition at line 6039 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 16bcef8e3..d905ea96c 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 5928 of file json.hpp.

+

Definition at line 5954 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 dd3ebe3a0..8016b976f 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 6040 of file json.hpp.

+

Definition at line 6066 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 c88983064..d94d80bf8 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 5929 of file json.hpp.

+

Definition at line 5955 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 b5706936a..9d48541af 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 53642153d..fca0dcaaa 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 21eb63adb..18a5a6e2f 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 6121 of file json.hpp.

+

Definition at line 6147 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 88f8222cb..c2f794d8c 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 6073 of file json.hpp.

+

Definition at line 6099 of file json.hpp.

@@ -139,7 +139,7 @@ template<typename Base > diff --git a/classnlohmann_1_1basic__json_1_1json__reverse__iterator_a15e9cf4c5a43238e82ab69c4a295c491.html b/classnlohmann_1_1basic__json_1_1json__reverse__iterator_a15e9cf4c5a43238e82ab69c4a295c491.html index c2bcb7498..d732542c0 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 6086 of file json.hpp.

+

Definition at line 6112 of file json.hpp.

@@ -138,7 +138,7 @@ template<typename Base > diff --git a/classnlohmann_1_1basic__json_1_1json__reverse__iterator_a1c84e6d1f047ab4105fa665f455158a7.html b/classnlohmann_1_1basic__json_1_1json__reverse__iterator_a1c84e6d1f047ab4105fa665f455158a7.html index 42a9593d4..acbcc5fee 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 6113 of file json.hpp.

+

Definition at line 6139 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 8488aecbe..d0f1cd150 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 6106 of file json.hpp.

+

Definition at line 6132 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 ba153f150..0031d2150 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 6070 of file json.hpp.

+

Definition at line 6096 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 6d54388ca..c0656f8b6 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 6148 of file json.hpp.

+

Definition at line 6174 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 057fecd02..e58836ec0 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 6093 of file json.hpp.

+

Definition at line 6119 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 6952ba197..89eccb644 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 6077 of file json.hpp.

+

Definition at line 6103 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 5f216a6ee..49489437b 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 6080 of file json.hpp.

+

Definition at line 6106 of file json.hpp.

@@ -139,7 +139,7 @@ template<typename Base > diff --git a/classnlohmann_1_1basic__json_1_1json__reverse__iterator_ab6245ab29d8481ef2a2351c02cc31d4d.html b/classnlohmann_1_1basic__json_1_1json__reverse__iterator_ab6245ab29d8481ef2a2351c02cc31d4d.html index 7f53890c2..fedefd8f2 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 6068 of file json.hpp.

+

Definition at line 6094 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 1a1934b67..ea142b3b3 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 6129 of file json.hpp.

+

Definition at line 6155 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 aa0e3adb6..3e8198641 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 6099 of file json.hpp.

+

Definition at line 6125 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 e55d2e1f6..fad688986 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 6135 of file json.hpp.

+

Definition at line 6161 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 ef9672ee1..89bd1297a 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 6141 of file json.hpp.

+

Definition at line 6167 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 d8e488556..b76791149 100644 --- a/classnlohmann_1_1basic__json_a01a2643289b69cd71d9b3f3fc209b748.html +++ b/classnlohmann_1_1basic__json_a01a2643289b69cd71d9b3f3fc209b748.html @@ -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 03d3c3117..b936ddd0d 100644 --- a/classnlohmann_1_1basic__json_a0703ae5cbd2daac5e6c0ae01d3a1b114.html +++ b/classnlohmann_1_1basic__json_a0703ae5cbd2daac5e6c0ae01d3a1b114.html @@ -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:4049
+
void push_back(basic_json &&val)
add an object to an array
Definition: json.hpp:4075
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 4156 of file json.hpp.

+

Definition at line 4182 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 3db101862..daa383d9e 100644 --- a/classnlohmann_1_1basic__json_a07c9c38a1f01675759e05d5d34627343.html +++ b/classnlohmann_1_1basic__json_a07c9c38a1f01675759e05d5d34627343.html @@ -296,13 +296,13 @@ template<template< typename U, typename V, typename...Args > class Obje
a class to store JSON values
Definition: json.hpp:187
iterator begin()
returns an iterator to the first element
Definition: json.hpp:3563
namespace for Niels Lohmann
Definition: json.hpp:78
-
iterator insert(const_iterator pos, const basic_json &val)
inserts element
Definition: json.hpp:4182
+
iterator insert(const_iterator pos, const basic_json &val)
inserts element
Definition: json.hpp:4208
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 4234 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 aa2b2850c..f585b8b15 100644 --- a/classnlohmann_1_1basic__json_a088460b5d95f384a4f2ec9e52f4f66ba.html +++ b/classnlohmann_1_1basic__json_a088460b5d95f384a4f2ec9e52f4f66ba.html @@ -300,7 +300,7 @@ true diff --git a/classnlohmann_1_1basic__json_a0afa4512f03406db0d0432657e9c7361.html b/classnlohmann_1_1basic__json_a0afa4512f03406db0d0432657e9c7361.html index 0cc81b32b..3ab79bb3c 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 29b528b1c..07060e53d 100644 --- a/classnlohmann_1_1basic__json_a114095c452ca2f4ba976548df3da68be.html +++ b/classnlohmann_1_1basic__json_a114095c452ca2f4ba976548df3da68be.html @@ -300,7 +300,7 @@ false diff --git a/classnlohmann_1_1basic__json_a11c3dd843c21c58daa651e84046a82af.html b/classnlohmann_1_1basic__json_a11c3dd843c21c58daa651e84046a82af.html index 2bd4fc8bd..32f3fd230 100644 --- a/classnlohmann_1_1basic__json_a11c3dd843c21c58daa651e84046a82af.html +++ b/classnlohmann_1_1basic__json_a11c3dd843c21c58daa651e84046a82af.html @@ -300,7 +300,7 @@ false diff --git a/classnlohmann_1_1basic__json_a122640e7e2db1814fc7bbb3c122ec76e.html b/classnlohmann_1_1basic__json_a122640e7e2db1814fc7bbb3c122ec76e.html index 1d612344a..19102d809 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 4547 of file json.hpp.

+

Definition at line 4573 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 a51a4743a..f931ebb78 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 2c9bc05a5..ea72110e1 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 9121212cb..29271bd93 100644 --- a/classnlohmann_1_1basic__json_a16a275d0201e9aedc87c933c764b8869.html +++ b/classnlohmann_1_1basic__json_a16a275d0201e9aedc87c933c764b8869.html @@ -314,7 +314,7 @@ out of range diff --git a/classnlohmann_1_1basic__json_a1dc0c521042807e216d11110d2f002ff.html b/classnlohmann_1_1basic__json_a1dc0c521042807e216d11110d2f002ff.html index a442700f6..5890dea1a 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 82e57c9ea..01103d0a8 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 75766c4d9..f62c5dae1 100644 --- a/classnlohmann_1_1basic__json_a234f03dce002783748ca401a42bc6472.html +++ b/classnlohmann_1_1basic__json_a234f03dce002783748ca401a42bc6472.html @@ -302,7 +302,7 @@ true diff --git a/classnlohmann_1_1basic__json_a266c4dd24d11a86e4831523af5d9df4d.html b/classnlohmann_1_1basic__json_a266c4dd24d11a86e4831523af5d9df4d.html index 579549e91..95521ebc7 100644 --- a/classnlohmann_1_1basic__json_a266c4dd24d11a86e4831523af5d9df4d.html +++ b/classnlohmann_1_1basic__json_a266c4dd24d11a86e4831523af5d9df4d.html @@ -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 40a79bd46..54e830b9d 100644 --- a/classnlohmann_1_1basic__json_a26b7e4876af25eae5800ce43f93aaef2.html +++ b/classnlohmann_1_1basic__json_a26b7e4876af25eae5800ce43f93aaef2.html @@ -341,7 +341,7 @@ Unlike diff --git a/classnlohmann_1_1basic__json_a2adfc8d24bea3908398cbf325b5dc1d7.html b/classnlohmann_1_1basic__json_a2adfc8d24bea3908398cbf325b5dc1d7.html index 90395ecef..3b186c8e1 100644 --- a/classnlohmann_1_1basic__json_a2adfc8d24bea3908398cbf325b5dc1d7.html +++ b/classnlohmann_1_1basic__json_a2adfc8d24bea3908398cbf325b5dc1d7.html @@ -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 050ffdd8d..71aa32d98 100644 --- a/classnlohmann_1_1basic__json_a2f07bcf7e75c34396476dd1790f26ce8.html +++ b/classnlohmann_1_1basic__json_a2f07bcf7e75c34396476dd1790f26ce8.html @@ -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:4049
+
void push_back(basic_json &&val)
add an object to an array
Definition: json.hpp:4075
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 4133 of file json.hpp.

+

Definition at line 4159 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 df9213449..492c8ba78 100644 --- a/classnlohmann_1_1basic__json_a3173944e7b1809a333def4078a0b92a3.html +++ b/classnlohmann_1_1basic__json_a3173944e7b1809a333def4078a0b92a3.html @@ -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:4049
+
void push_back(basic_json &&val)
add an object to an array
Definition: json.hpp:4075
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 4074 of file json.hpp.

+

Definition at line 4100 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 745b9ddb6..fb606e887 100644 --- a/classnlohmann_1_1basic__json_a317b01b0fba3ac458561f1634759ea3b.html +++ b/classnlohmann_1_1basic__json_a317b01b0fba3ac458561f1634759ea3b.html @@ -252,7 +252,7 @@ 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.

-

Definition at line 6260 of file json.hpp.

+

Definition at line 3783 of file json.hpp.

@@ -262,7 +262,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 76d7657a4..49cff6268 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:3809
+
bool empty() const noexcept
checks whether the container is empty
Definition: json.hpp:3835
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 3809 of file json.hpp.

+

Definition at line 3835 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 e49706e40..aa20c3bad 100644 --- a/classnlohmann_1_1basic__json_a33f1632cfdbf460b4913f4e8a43dd9e4.html +++ b/classnlohmann_1_1basic__json_a33f1632cfdbf460b4913f4e8a43dd9e4.html @@ -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 8b8eada36..4d7b86529 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 4856 of file json.hpp.

+

Definition at line 4882 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 38b2d7bce..52934fb51 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 95c36859f..63de5c8cf 100644 --- a/classnlohmann_1_1basic__json_a42f9133f978dde4cce5851b2c2434a0c.html +++ b/classnlohmann_1_1basic__json_a42f9133f978dde4cce5851b2c2434a0c.html @@ -307,7 +307,7 @@ true diff --git a/classnlohmann_1_1basic__json_a4361aa791f3980abb239e4155a3450cb.html b/classnlohmann_1_1basic__json_a4361aa791f3980abb239e4155a3450cb.html index f73bbfd25..9482e7fb8 100644 --- a/classnlohmann_1_1basic__json_a4361aa791f3980abb239e4155a3450cb.html +++ b/classnlohmann_1_1basic__json_a4361aa791f3980abb239e4155a3450cb.html @@ -279,7 +279,7 @@ Illustration from cppreference.com
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
namespace for Niels Lohmann
Definition: json.hpp:78
-
a const random access iterator for the basic_json class
Definition: json.hpp:5423
+
a const random access iterator for the basic_json class
Definition: json.hpp:5449
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
@@ -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 0f54691b1..7ec2eb5fa 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 d8b6973f5..478954a71 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 af3443a33..1c5f7c60c 100644 --- a/classnlohmann_1_1basic__json_a4943b7f16ddc4e0df33c0cae7ef14471.html +++ b/classnlohmann_1_1basic__json_a4943b7f16ddc4e0df33c0cae7ef14471.html @@ -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 c4028a2b3..8b406e3a6 100644 --- a/classnlohmann_1_1basic__json_a4ad3f27ecece8f644e8dca69a97eb67f.html +++ b/classnlohmann_1_1basic__json_a4ad3f27ecece8f644e8dca69a97eb67f.html @@ -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 ac40a8dc7..62d596e70 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:4374
+
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
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 4436 of file json.hpp.

+

Definition at line 4462 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 7fd7b79ba..10e06c277 100644 --- a/classnlohmann_1_1basic__json_a4d688b5ff534d3ab4e284b3191061529.html +++ b/classnlohmann_1_1basic__json_a4d688b5ff534d3ab4e284b3191061529.html @@ -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 a36051399..de048ae85 100644 --- a/classnlohmann_1_1basic__json_a5114ed5eb394a2805da0bd1acba95ae2.html +++ b/classnlohmann_1_1basic__json_a5114ed5eb394a2805da0bd1acba95ae2.html @@ -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:4049
+
void push_back(basic_json &&val)
add an object to an array
Definition: json.hpp:4075
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 4084 of file json.hpp.

+

Definition at line 4110 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 d669cd5b5..00cebc5f0 100644 --- a/classnlohmann_1_1basic__json_a53a2abfdd4f72c7df5aba1155bf03e48.html +++ b/classnlohmann_1_1basic__json_a53a2abfdd4f72c7df5aba1155bf03e48.html @@ -301,7 +301,7 @@ false diff --git a/classnlohmann_1_1basic__json_a57703688bee6b9736ab3a430d8d246f2.html b/classnlohmann_1_1basic__json_a57703688bee6b9736ab3a430d8d246f2.html index 389d08d4b..30b8929f2 100644 --- a/classnlohmann_1_1basic__json_a57703688bee6b9736ab3a430d8d246f2.html +++ b/classnlohmann_1_1basic__json_a57703688bee6b9736ab3a430d8d246f2.html @@ -308,7 +308,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 cfc6b764e..6cae0f377 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:4374
+
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
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 4468 of file json.hpp.

+

Definition at line 4494 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 44a0d5621..7a614ee14 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 b3ea354bc..18aacb8bc 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 4757 of file json.hpp.

+

Definition at line 4783 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 822a2adcc..6800fb6d0 100644 --- a/classnlohmann_1_1basic__json_a5d428360d75a52f6af74751d1cc912c6.html +++ b/classnlohmann_1_1basic__json_a5d428360d75a52f6af74751d1cc912c6.html @@ -316,7 +316,7 @@ true diff --git a/classnlohmann_1_1basic__json_a5e34c5435e557d0bf666bd7311211405.html b/classnlohmann_1_1basic__json_a5e34c5435e557d0bf666bd7311211405.html index 816a3a23f..ecbaa39a5 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 4838 of file json.hpp.

+

Definition at line 4864 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 7f63e8ff5..3c4a1ff07 100644 --- a/classnlohmann_1_1basic__json_a5f0aad50ed7e8aec3128fe018c18b3fe.html +++ b/classnlohmann_1_1basic__json_a5f0aad50ed7e8aec3128fe018c18b3fe.html @@ -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 137d3f98b..66dd4eed8 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 824a134b8..7564f9b27 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 4960 of file json.hpp.

+

Definition at line 4986 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 a30a37faa..84c96bb6e 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 301a5cca8..96459b191 100644 --- a/classnlohmann_1_1basic__json_a652414dd930cb3af3b6f454cc535a23e.html +++ b/classnlohmann_1_1basic__json_a652414dd930cb3af3b6f454cc535a23e.html @@ -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 34b15860b..24e91545d 100644 --- a/classnlohmann_1_1basic__json_a656939a3dc9a6047e4afacd9e11b83a6.html +++ b/classnlohmann_1_1basic__json_a656939a3dc9a6047e4afacd9e11b83a6.html @@ -302,7 +302,7 @@ true diff --git a/classnlohmann_1_1basic__json_a66f936cfbd252f85bd3dc2598e37a64b.html b/classnlohmann_1_1basic__json_a66f936cfbd252f85bd3dc2598e37a64b.html index 065d292dc..e18a57503 100644 --- a/classnlohmann_1_1basic__json_a66f936cfbd252f85bd3dc2598e37a64b.html +++ b/classnlohmann_1_1basic__json_a66f936cfbd252f85bd3dc2598e37a64b.html @@ -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:4049
+
void push_back(basic_json &&val)
add an object to an array
Definition: json.hpp:4075
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 4049 of file json.hpp.

+

Definition at line 4075 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 6d0775372..ddd5d5456 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 a5149af8f..5faef940b 100644 --- a/classnlohmann_1_1basic__json_a696ced74d8edc0b63a000a72907ab109.html +++ b/classnlohmann_1_1basic__json_a696ced74d8edc0b63a000a72907ab109.html @@ -303,7 +303,7 @@ false diff --git a/classnlohmann_1_1basic__json_a6a7f45095675ac6fd1d018a0e41874be.html b/classnlohmann_1_1basic__json_a6a7f45095675ac6fd1d018a0e41874be.html index a6aaf26ef..e925b9728 100644 --- a/classnlohmann_1_1basic__json_a6a7f45095675ac6fd1d018a0e41874be.html +++ b/classnlohmann_1_1basic__json_a6a7f45095675ac6fd1d018a0e41874be.html @@ -332,7 +332,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 29415e93f..437446a64 100644 --- a/classnlohmann_1_1basic__json_a6b7428e8c1169497f47b81667001cbfb.html +++ b/classnlohmann_1_1basic__json_a6b7428e8c1169497f47b81667001cbfb.html @@ -303,13 +303,13 @@ template<template< typename U, typename V, typename...Args > class Obje
a class to store JSON values
Definition: json.hpp:187
iterator begin()
returns an iterator to the first element
Definition: json.hpp:3563
namespace for Niels Lohmann
Definition: json.hpp:78
-
iterator insert(const_iterator pos, const basic_json &val)
inserts element
Definition: json.hpp:4182
+
iterator insert(const_iterator pos, const basic_json &val)
inserts element
Definition: json.hpp:4208
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 4235 of file json.hpp.

+

Definition at line 4261 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 735ab23ef..58067e0c9 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 15fa15fa7..1bf582866 100644 --- a/classnlohmann_1_1basic__json_a6dff6a02a2be250b8f8dc2f47be65544.html +++ b/classnlohmann_1_1basic__json_a6dff6a02a2be250b8f8dc2f47be65544.html @@ -302,7 +302,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 dc9773219..daace6ef5 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 4635 of file json.hpp.

+

Definition at line 4661 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 f6015994e..14956292e 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 81c6bc2d6..d75c774d8 100644 --- a/classnlohmann_1_1basic__json_a72442ccbb378b4464a24a2da1e784041.html +++ b/classnlohmann_1_1basic__json_a72442ccbb378b4464a24a2da1e784041.html @@ -339,7 +339,7 @@ Unlike diff --git a/classnlohmann_1_1basic__json_a72ba20783ecb3eec98bd6a3b870d565c.html b/classnlohmann_1_1basic__json_a72ba20783ecb3eec98bd6a3b870d565c.html index 077e5a1e3..72ec1bed5 100644 --- a/classnlohmann_1_1basic__json_a72ba20783ecb3eec98bd6a3b870d565c.html +++ b/classnlohmann_1_1basic__json_a72ba20783ecb3eec98bd6a3b870d565c.html @@ -282,7 +282,7 @@ Illustration from cppreference.com
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
namespace for Niels Lohmann
Definition: json.hpp:78
-
a const random access iterator for the basic_json class
Definition: json.hpp:5423
+
a const random access iterator for the basic_json class
Definition: json.hpp:5449
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
@@ -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 2d18fd245..d2c619f0e 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 044724d7c..3c6ebd910 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 4801 of file json.hpp.

+

Definition at line 4827 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 7c12f5568..2b050b423 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:7766
+
basic_json<> json
default JSON class
Definition: json.hpp:7770
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:3983
+
void clear() noexcept
clears the contents
Definition: json.hpp:4009
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:4895
+
static basic_json parse(const string_t &s, parser_callback_t cb=nullptr)
deserialize from string
Definition: json.hpp:4921
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 4924 of file json.hpp.

+

Definition at line 4950 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 f357b4d3b..58386ccd7 100644 --- a/classnlohmann_1_1basic__json_a75a1754e0d39f33095d3102a8bdb9881.html +++ b/classnlohmann_1_1basic__json_a75a1754e0d39f33095d3102a8bdb9881.html @@ -341,7 +341,7 @@ null diff --git a/classnlohmann_1_1basic__json_a76cfc5062bf6223396ab82c753cd4634.html b/classnlohmann_1_1basic__json_a76cfc5062bf6223396ab82c753cd4634.html index 6ac13ecae..04b324675 100644 --- a/classnlohmann_1_1basic__json_a76cfc5062bf6223396ab82c753cd4634.html +++ b/classnlohmann_1_1basic__json_a76cfc5062bf6223396ab82c753cd4634.html @@ -303,7 +303,7 @@ true diff --git a/classnlohmann_1_1basic__json_a7c08f966200af98db0313a3b517ce0a9.html b/classnlohmann_1_1basic__json_a7c08f966200af98db0313a3b517ce0a9.html index ceedd73c3..3097ac8bc 100644 --- a/classnlohmann_1_1basic__json_a7c08f966200af98db0313a3b517ce0a9.html +++ b/classnlohmann_1_1basic__json_a7c08f966200af98db0313a3b517ce0a9.html @@ -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 9202859da..f9128dabc 100644 --- a/classnlohmann_1_1basic__json_a7c19a5c3be6cc755377ee41eade78baf.html +++ b/classnlohmann_1_1basic__json_a7c19a5c3be6cc755377ee41eade78baf.html @@ -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 800c7544e..500ccf089 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 b856367c5..475ef3d01 100644 --- a/classnlohmann_1_1basic__json_a7d1b990f2c12fecb57db1504fdadd0bb.html +++ b/classnlohmann_1_1basic__json_a7d1b990f2c12fecb57db1504fdadd0bb.html @@ -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 bdd528c9b..ae74997c4 100644 --- a/classnlohmann_1_1basic__json_a7dab69b10b98e7bc694339720e37fb2b.html +++ b/classnlohmann_1_1basic__json_a7dab69b10b98e7bc694339720e37fb2b.html @@ -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 3488de2b7..a1c3bf3f7 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 4667 of file json.hpp.

+

Definition at line 4693 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 7f76fd905..64da93fb5 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 58de7bd66..b4e130d68 100644 --- a/classnlohmann_1_1basic__json_a83cbbfbf5d3ecbad6de8ece0be6b36c4.html +++ b/classnlohmann_1_1basic__json_a83cbbfbf5d3ecbad6de8ece0be6b36c4.html @@ -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 bc2f7f5c3..8194d30f1 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 4779 of file json.hpp.

+

Definition at line 4805 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 d7c2138c7..d916b2939 100644 --- a/classnlohmann_1_1basic__json_a8b526709d395142b68d21abfbfff17c3.html +++ b/classnlohmann_1_1basic__json_a8b526709d395142b68d21abfbfff17c3.html @@ -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 14d448e74..8f0ef688a 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:3983
+
void clear() noexcept
clears the contents
Definition: json.hpp:4009
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 3983 of file json.hpp.

+

Definition at line 4009 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 d13e71f6c..d79605e16 100644 --- a/classnlohmann_1_1basic__json_a8e34088252a3ee6b2377f3a1f26dd1ba.html +++ b/classnlohmann_1_1basic__json_a8e34088252a3ee6b2377f3a1f26dd1ba.html @@ -300,7 +300,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 6b3784e6e..74bc85557 100644 --- a/classnlohmann_1_1basic__json_a8e4e11999b4e7faa8f31f21164ebd65a.html +++ b/classnlohmann_1_1basic__json_a8e4e11999b4e7faa8f31f21164ebd65a.html @@ -252,7 +252,7 @@ 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.

-

Definition at line 6268 of file json.hpp.

+

Definition at line 3791 of file json.hpp.

@@ -262,7 +262,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 5b01ebcf8..8ada152fb 100644 --- a/classnlohmann_1_1basic__json_a8fa74698f4061e18ec664009f3af1ddf.html +++ b/classnlohmann_1_1basic__json_a8fa74698f4061e18ec664009f3af1ddf.html @@ -309,13 +309,13 @@ template<template< typename U, typename V, typename...Args > class Obje
iterator end()
returns an iterator to one past the last element
Definition: json.hpp:3622
iterator begin()
returns an iterator to the first element
Definition: json.hpp:3563
namespace for Niels Lohmann
Definition: json.hpp:78
-
iterator insert(const_iterator pos, const basic_json &val)
inserts element
Definition: json.hpp:4182
+
iterator insert(const_iterator pos, const basic_json &val)
inserts element
Definition: json.hpp:4208
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 4283 of file json.hpp.

+

Definition at line 4309 of file json.hpp.

@@ -325,7 +325,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 98551cb7b..948eac007 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 74f131f50..b08a65416 100644 --- a/classnlohmann_1_1basic__json_a960962c683909619d1d2fbbe856c022e.html +++ b/classnlohmann_1_1basic__json_a960962c683909619d1d2fbbe856c022e.html @@ -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:4049
+
void push_back(basic_json &&val)
add an object to an array
Definition: json.hpp:4075
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 4107 of file json.hpp.

+

Definition at line 4133 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 346115ff1..dc0b6ea74 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 4605 of file json.hpp.

+

Definition at line 4631 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 c2b113c0c..499d954a3 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 4614 of file json.hpp.

+

Definition at line 4640 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 96c736e5b..8b5bb8304 100644 --- a/classnlohmann_1_1basic__json_a9993148cb0473365e52998c7315f9ada.html +++ b/classnlohmann_1_1basic__json_a9993148cb0473365e52998c7315f9ada.html @@ -303,7 +303,7 @@ false diff --git a/classnlohmann_1_1basic__json_a9a73d1b71c9e913aa2888d8b40c72ee9.html b/classnlohmann_1_1basic__json_a9a73d1b71c9e913aa2888d8b40c72ee9.html index 3f8b086ad..e60450797 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:7766
+
basic_json<> json
default JSON class
Definition: json.hpp:7770
a class to store JSON values
Definition: json.hpp:187
namespace for Niels Lohmann
Definition: json.hpp:78
Output (play with this example online):
[]
@@ -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 3b2eb5c19..bba533b37 100644
--- a/classnlohmann_1_1basic__json_a9c26c5d0f4a519c7236149b9aeb3ef9e.html
+++ b/classnlohmann_1_1basic__json_a9c26c5d0f4a519c7236149b9aeb3ef9e.html
@@ -303,7 +303,7 @@ false
 
 
 
diff --git a/classnlohmann_1_1basic__json_a9daafb4c15ed5a008cb825bbd8c29d87.html b/classnlohmann_1_1basic__json_a9daafb4c15ed5a008cb825bbd8c29d87.html
index 0b79488b5..3a8bfaadd 100644
--- a/classnlohmann_1_1basic__json_a9daafb4c15ed5a008cb825bbd8c29d87.html
+++ b/classnlohmann_1_1basic__json_a9daafb4c15ed5a008cb825bbd8c29d87.html
@@ -303,7 +303,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 763d05a89..09564d8c5 100644
--- a/classnlohmann_1_1basic__json_a9f17a0690155e3a5603246ccec81499e.html
+++ b/classnlohmann_1_1basic__json_a9f17a0690155e3a5603246ccec81499e.html
@@ -300,7 +300,7 @@ true
 
 
 
diff --git a/classnlohmann_1_1basic__json_aa0422e861b4cbd7cdcaad7a11a1304a9.html b/classnlohmann_1_1basic__json_aa0422e861b4cbd7cdcaad7a11a1304a9.html
index 6b1f3b972..9f1b2f2a9 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:7766
+
basic_json<> json
default JSON class
Definition: json.hpp:7770
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:3983
+
void clear() noexcept
clears the contents
Definition: json.hpp:4009
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:4895
+
static basic_json parse(const string_t &s, parser_callback_t cb=nullptr)
deserialize from string
Definition: json.hpp:4921
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 4932 of file json.hpp.

+

Definition at line 4958 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 e50a7b28f..bd865824f 100644 --- a/classnlohmann_1_1basic__json_aa1f3b3f1dca79392d6727b81f9668c6c.html +++ b/classnlohmann_1_1basic__json_aa1f3b3f1dca79392d6727b81f9668c6c.html @@ -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 fddb9243e..d47c08260 100644 --- a/classnlohmann_1_1basic__json_aa5413178b8041f7ac685dec4b040dd2c.html +++ b/classnlohmann_1_1basic__json_aa5413178b8041f7ac685dec4b040dd2c.html @@ -282,7 +282,7 @@ Illustration from cppreference.com
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
namespace for Niels Lohmann
Definition: json.hpp:78
-
a const random access iterator for the basic_json class
Definition: json.hpp:5423
+
a const random access iterator for the basic_json class
Definition: json.hpp:5449
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
@@ -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 ce1ec3f03..2038f902d 100644 --- a/classnlohmann_1_1basic__json_aa6a24b176f9599a21d662cc5f8e1ca76.html +++ b/classnlohmann_1_1basic__json_aa6a24b176f9599a21d662cc5f8e1ca76.html @@ -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 4e2a9483c..41537ce2d 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 9de03d20c..efe941657 100644 --- a/classnlohmann_1_1basic__json_aa71e977d31f470689883ac60d16ea4ac.html +++ b/classnlohmann_1_1basic__json_aa71e977d31f470689883ac60d16ea4ac.html @@ -287,13 +287,13 @@ template<template< typename U, typename V, typename...Args > class Obje
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
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:4374
+
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
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 4404 of file json.hpp.

+

Definition at line 4430 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 fb70ddf21..6e84a8206 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 c16f530a9..7fde947cd 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 4501 of file json.hpp.

+

Definition at line 4527 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 d62f3018c..a270e3e53 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 4696 of file json.hpp.

+

Definition at line 4722 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 6962316eb..fc2f43896 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 99012ef69..80fcddf82 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 4970 of file json.hpp.

+

Definition at line 4996 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 41449b9f2..15cdb50fa 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 9181b977e..45f1b940c 100644 --- a/classnlohmann_1_1basic__json_ab14e3503305622fb5ab01a7f490916e8.html +++ b/classnlohmann_1_1basic__json_ab14e3503305622fb5ab01a7f490916e8.html @@ -296,13 +296,13 @@ template<template< typename U, typename V, typename...Args > class Obje
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
namespace for Niels Lohmann
Definition: json.hpp:78
-
iterator insert(const_iterator pos, const basic_json &val)
inserts element
Definition: json.hpp:4182
+
iterator insert(const_iterator pos, const basic_json &val)
inserts element
Definition: json.hpp:4208
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 4337 of file json.hpp.

+

Definition at line 4363 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 2e63f7836..15b656215 100644 --- a/classnlohmann_1_1basic__json_ab2162bc76e10d8736cab9b2039956054.html +++ b/classnlohmann_1_1basic__json_ab2162bc76e10d8736cab9b2039956054.html @@ -279,7 +279,7 @@ 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:5925
+
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
namespace for Niels Lohmann
Definition: json.hpp:78
Output (play with this example online):
5
@@ -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 175b26e41..7d20a25e5 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 ef2a80d52..bb6b18ef8 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 ae53c3703..d38b94acd 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:3866
+
size_type size() const noexcept
returns the number of elements
Definition: json.hpp:3892
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 3866 of file json.hpp.

+

Definition at line 3892 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 fff80ac2b..f990b49c3 100644 --- a/classnlohmann_1_1basic__json_ab9da2afc6f77295f25252725fde142a6.html +++ b/classnlohmann_1_1basic__json_ab9da2afc6f77295f25252725fde142a6.html @@ -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 56298e6b1..fe345928a 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:3926
+
size_type max_size() const noexcept
returns the maximum possible number of elements
Definition: json.hpp:3952
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 3926 of file json.hpp.

+

Definition at line 3952 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 5ee64a6f6..42fe74bb7 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 15c5a9c57..5b7c9831f 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 66df444ce..c6a3abc7a 100644 --- a/classnlohmann_1_1basic__json_ac8163abe518595f19dbee68db1caaaf7.html +++ b/classnlohmann_1_1basic__json_ac8163abe518595f19dbee68db1caaaf7.html @@ -300,7 +300,7 @@ false diff --git a/classnlohmann_1_1basic__json_ac82abedf356d252e0589850c3d8b35ba.html b/classnlohmann_1_1basic__json_ac82abedf356d252e0589850c3d8b35ba.html index 24b6f97a2..6289d7545 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 b060e9470..d34bfe635 100644 --- a/classnlohmann_1_1basic__json_ac943391891fcde0a71a15ce990e0f7f4.html +++ b/classnlohmann_1_1basic__json_ac943391891fcde0a71a15ce990e0f7f4.html @@ -302,7 +302,7 @@ true diff --git a/classnlohmann_1_1basic__json_acd08f9179c8c1e9f2cd7575a724ce27e.html b/classnlohmann_1_1basic__json_acd08f9179c8c1e9f2cd7575a724ce27e.html index 119fd463e..737c6a243 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 3fcbedfe9..de16d51be 100644 --- a/classnlohmann_1_1basic__json_acdf4445333649ec94198f09a62144884.html +++ b/classnlohmann_1_1basic__json_acdf4445333649ec94198f09a62144884.html @@ -276,7 +276,7 @@ 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:5925
+
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
namespace for Niels Lohmann
Definition: json.hpp:78
Output (play with this example online):
1
@@ -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 3555a704b..74c5c98b3 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 7574a5b71..f0a1b7159 100644
--- a/classnlohmann_1_1basic__json_ad1f617d29e8923dd40c89153f792b1bc.html
+++ b/classnlohmann_1_1basic__json_ad1f617d29e8923dd40c89153f792b1bc.html
@@ -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 ae61d6461..f1e482eae 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 090d605d6..70ee04161 100644
--- a/classnlohmann_1_1basic__json_ad497cbc4f80c8d79662ee6e19bf145dd.html
+++ b/classnlohmann_1_1basic__json_ad497cbc4f80c8d79662ee6e19bf145dd.html
@@ -353,7 +353,7 @@ null
 
 
 
diff --git a/classnlohmann_1_1basic__json_ad6734c2b91b1b77aa2b43b65c3619c05.html b/classnlohmann_1_1basic__json_ad6734c2b91b1b77aa2b43b65c3619c05.html
index 5a93e51e5..16ba823ba 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 4cb01e24b..95ae9ff35 100644
--- a/classnlohmann_1_1basic__json_ad8e0c5d04f016d1b3ac7369e5c73bedf.html
+++ b/classnlohmann_1_1basic__json_ad8e0c5d04f016d1b3ac7369e5c73bedf.html
@@ -279,7 +279,7 @@ Illustration from cppreference.com
 
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
namespace for Niels Lohmann
Definition: json.hpp:78
-
a const random access iterator for the basic_json class
Definition: json.hpp:5423
+
a const random access iterator for the basic_json class
Definition: json.hpp:5449
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
@@ -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 baab1817f..39c2c4e11 100644 --- a/classnlohmann_1_1basic__json_ada8e01109a60088e4db2a670d4903b54.html +++ b/classnlohmann_1_1basic__json_ada8e01109a60088e4db2a670d4903b54.html @@ -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 2575516dd..7eedebd0a 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 0251b3a95..07b9a102e 100644 --- a/classnlohmann_1_1basic__json_ade7bd6e0fe221fec9d3fa9b430f5ce76.html +++ b/classnlohmann_1_1basic__json_ade7bd6e0fe221fec9d3fa9b430f5ce76.html @@ -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 7d8f4ec3b..9d6b744de 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 41def241e..2f293792e 100644 --- a/classnlohmann_1_1basic__json_adf5dea6fa9d7075ff89ca0796ab47a7e.html +++ b/classnlohmann_1_1basic__json_adf5dea6fa9d7075ff89ca0796ab47a7e.html @@ -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 59a0460aa..28d9cf90c 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 4658 of file json.hpp.

+

Definition at line 4684 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 83501389b..f7ae4f5c4 100644 --- a/classnlohmann_1_1basic__json_ae50f22a1c646b8627e88f1313cceffd4.html +++ b/classnlohmann_1_1basic__json_ae50f22a1c646b8627e88f1313cceffd4.html @@ -303,7 +303,7 @@ true diff --git a/classnlohmann_1_1basic__json_ae874cfc1746b560c53a03bcf5b7bbeed.html b/classnlohmann_1_1basic__json_ae874cfc1746b560c53a03bcf5b7bbeed.html index 9a0e8234a..6c8a216b9 100644 --- a/classnlohmann_1_1basic__json_ae874cfc1746b560c53a03bcf5b7bbeed.html +++ b/classnlohmann_1_1basic__json_ae874cfc1746b560c53a03bcf5b7bbeed.html @@ -300,7 +300,7 @@ false diff --git a/classnlohmann_1_1basic__json_ae928414b2805cf6ef56b4e4f8d235416.html b/classnlohmann_1_1basic__json_ae928414b2805cf6ef56b4e4f8d235416.html index f11ad4aed..289a102ce 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 797d7cbb5..ff92688e2 100644 --- a/classnlohmann_1_1basic__json_ae960d2d6bc7b94fe39cc5e9f106edfa9.html +++ b/classnlohmann_1_1basic__json_ae960d2d6bc7b94fe39cc5e9f106edfa9.html @@ -294,7 +294,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 d9365459c..c91d1a43a 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 4d2f5b5bb..8593fac92 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:4374
+
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
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 4374 of file json.hpp.

+

Definition at line 4400 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 567c516f2..668bd1c7b 100644 --- a/classnlohmann_1_1basic__json_af0ebd1757acb971a6504b4acabf88584.html +++ b/classnlohmann_1_1basic__json_af0ebd1757acb971a6504b4acabf88584.html @@ -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 618e00966..cade23b2b 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 4b698c6b1..c8782a70b 100644 --- a/classnlohmann_1_1basic__json_af1e3f9e079136abca2530c8191c56292.html +++ b/classnlohmann_1_1basic__json_af1e3f9e079136abca2530c8191c56292.html @@ -319,7 +319,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:7766
+
basic_json<> json
default JSON class
Definition: json.hpp:7770
a class to store JSON values
Definition: json.hpp:187
namespace for Niels Lohmann
Definition: json.hpp:78
Output (play with this example online):
{}
@@ -343,7 +343,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 693bb20a0..2fcb3bb23 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:7766
+
basic_json<> json
default JSON class
Definition: json.hpp:7770
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:4895
+
static basic_json parse(const string_t &s, parser_callback_t cb=nullptr)
deserialize from string
Definition: json.hpp:4921
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 4895 of file json.hpp.

+

Definition at line 4921 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 42e3ce0d4..9d91f63c7 100644 --- a/classnlohmann_1_1basic__json_af661bc209bf22097e2f76607a11b56bf.html +++ b/classnlohmann_1_1basic__json_af661bc209bf22097e2f76607a11b56bf.html @@ -300,7 +300,7 @@ false diff --git a/classnlohmann_1_1basic__json_af6b6050ccd906dddf7c9f47fe3ad62a5.html b/classnlohmann_1_1basic__json_af6b6050ccd906dddf7c9f47fe3ad62a5.html index c743d3dd4..127b16a5c 100644 --- a/classnlohmann_1_1basic__json_af6b6050ccd906dddf7c9f47fe3ad62a5.html +++ b/classnlohmann_1_1basic__json_af6b6050ccd906dddf7c9f47fe3ad62a5.html @@ -306,7 +306,7 @@ out of range diff --git a/classnlohmann_1_1basic__json_af709c079de0ac3507143ea2c60699bd0.html b/classnlohmann_1_1basic__json_af709c079de0ac3507143ea2c60699bd0.html index b3b996207..8adf4c80a 100644 --- a/classnlohmann_1_1basic__json_af709c079de0ac3507143ea2c60699bd0.html +++ b/classnlohmann_1_1basic__json_af709c079de0ac3507143ea2c60699bd0.html @@ -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 a629e879b..7fe9b769a 100644 --- a/classnlohmann_1_1basic__json_af74581d177dafc38df5a126ccd358999.html +++ b/classnlohmann_1_1basic__json_af74581d177dafc38df5a126ccd358999.html @@ -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 a8b72778e..4b23cbfcc 100644 --- a/classnlohmann_1_1basic__json_af7d0adc984d04fc70c3d29fcd63e096a.html +++ b/classnlohmann_1_1basic__json_af7d0adc984d04fc70c3d29fcd63e096a.html @@ -296,13 +296,13 @@ template<template< typename U, typename V, typename...Args > class Obje
a class to store JSON values
Definition: json.hpp:187
iterator begin()
returns an iterator to the first element
Definition: json.hpp:3563
namespace for Niels Lohmann
Definition: json.hpp:78
-
iterator insert(const_iterator pos, const basic_json &val)
inserts element
Definition: json.hpp:4182
+
iterator insert(const_iterator pos, const basic_json &val)
inserts element
Definition: json.hpp:4208
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 4182 of file json.hpp.

+

Definition at line 4208 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 c3c0dd4fd..3030ebe31 100644 --- a/classnlohmann_1_1basic__json_afc4223b5ad03b1b76e925374a8fff98e.html +++ b/classnlohmann_1_1basic__json_afc4223b5ad03b1b76e925374a8fff98e.html @@ -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 1477d1196..7f332ae84 100644 --- a/dir_68267d1309a1af8e8297ef4c3efbcdba.html +++ b/dir_68267d1309a1af8e8297ef4c3efbcdba.html @@ -92,7 +92,7 @@ Files diff --git a/functions.html b/functions.html index 9e929a520..f699f7ef2 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 9db1f66a3..82a35f58f 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 fab7cec69..4a7718075 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 31513c2f7..208be9c2a 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 49df2200e..303049f03 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 935a8209d..03a5f2b29 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 f5255c1c0..9dea14d1d 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 7b2fab16d..cd55547b2 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 5663fff5c..ecedb3ecb 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 1898134f9..4a43f9c16 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 10b703583..8daf2fb9e 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 f0e41935f..592fa382c 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 6e5e5d21d..6389b9d72 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 f64d6f499..100b62ca4 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 16a406781..2c74f12b8 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 2a8531889..defa0e19b 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 8f1683333..c44076659 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 c073a3527..0bcdae5bc 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 c607c4cc0..71d34dd24 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 49b4b4412..06376ce29 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 0cd3ba601..7faeb00b4 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 f4a9426ff..561a321b6 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 091346e61..27a975f25 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 44580cf6b..6a0574568 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 2f2c2e6ad..c8d59fd82 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 f2da57a4a..3e14b4c4a 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 bf62318ee..82ed55682 100644 --- a/json_8hpp_source.html +++ b/json_8hpp_source.html @@ -1601,1852 +1601,1852 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
3767  return const_reverse_iterator(cbegin());
3768  }
3769 
-
3771 
-
3772 
-
3774  // capacity //
-
3776 
-
3779 
-
3809  bool empty() const noexcept
-
3810  {
-
3811  switch (m_type)
-
3812  {
-
3813  case value_t::null:
-
3814  {
-
3815  // null values are empty
-
3816  return true;
-
3817  }
-
3818 
-
3819  case value_t::array:
-
3820  {
-
3821  return m_value.array->empty();
-
3822  }
-
3823 
-
3824  case value_t::object:
-
3825  {
-
3826  return m_value.object->empty();
-
3827  }
-
3828 
-
3829  default:
-
3830  {
-
3831  // all other types are nonempty
-
3832  return false;
-
3833  }
-
3834  }
-
3835  }
-
3836 
-
3866  size_type size() const noexcept
-
3867  {
-
3868  switch (m_type)
-
3869  {
-
3870  case value_t::null:
-
3871  {
-
3872  // null values are empty
-
3873  return 0;
-
3874  }
-
3875 
-
3876  case value_t::array:
-
3877  {
-
3878  return m_value.array->size();
-
3879  }
-
3880 
-
3881  case value_t::object:
-
3882  {
-
3883  return m_value.object->size();
-
3884  }
-
3885 
-
3886  default:
-
3887  {
-
3888  // all other types have size 1
-
3889  return 1;
-
3890  }
-
3891  }
-
3892  }
-
3893 
-
3926  size_type max_size() const noexcept
-
3927  {
-
3928  switch (m_type)
-
3929  {
-
3930  case value_t::array:
-
3931  {
-
3932  return m_value.array->max_size();
-
3933  }
-
3934 
-
3935  case value_t::object:
-
3936  {
-
3937  return m_value.object->max_size();
-
3938  }
-
3939 
-
3940  default:
-
3941  {
-
3942  // all other types have max_size() == size()
-
3943  return size();
-
3944  }
-
3945  }
-
3946  }
-
3947 
-
3949 
-
3950 
-
3952  // modifiers //
-
3954 
-
3957 
-
3983  void clear() noexcept
-
3984  {
-
3985  switch (m_type)
-
3986  {
- -
3988  {
-
3989  m_value.number_integer = 0;
-
3990  break;
-
3991  }
-
3992 
-
3993  case value_t::number_float:
-
3994  {
-
3995  m_value.number_float = 0.0;
-
3996  break;
-
3997  }
-
3998 
-
3999  case value_t::boolean:
-
4000  {
-
4001  m_value.boolean = false;
-
4002  break;
-
4003  }
-
4004 
-
4005  case value_t::string:
-
4006  {
-
4007  m_value.string->clear();
-
4008  break;
-
4009  }
-
4010 
-
4011  case value_t::array:
-
4012  {
-
4013  m_value.array->clear();
-
4014  break;
-
4015  }
-
4016 
-
4017  case value_t::object:
-
4018  {
-
4019  m_value.object->clear();
-
4020  break;
-
4021  }
-
4022 
-
4023  default:
-
4024  {
-
4025  break;
-
4026  }
-
4027  }
-
4028  }
-
4029 
-
4049  void push_back(basic_json&& val)
-
4050  {
-
4051  // push_back only works for null objects or arrays
-
4052  if (not(is_null() or is_array()))
-
4053  {
-
4054  throw std::domain_error("cannot use push_back() with " + type_name());
-
4055  }
-
4056 
-
4057  // transform null object into an array
-
4058  if (is_null())
-
4059  {
-
4060  m_type = value_t::array;
-
4061  m_value = value_t::array;
-
4062  }
-
4063 
-
4064  // add element to array (move semantics)
-
4065  m_value.array->push_back(std::move(val));
-
4066  // invalidate object
-
4067  val.m_type = value_t::null;
-
4068  }
-
4069 
-
4074  reference operator+=(basic_json&& val)
-
4075  {
-
4076  push_back(std::move(val));
-
4077  return *this;
-
4078  }
-
4079 
-
4084  void push_back(const basic_json& val)
-
4085  {
-
4086  // push_back only works for null objects or arrays
-
4087  if (not(is_null() or is_array()))
-
4088  {
-
4089  throw std::domain_error("cannot use push_back() with " + type_name());
-
4090  }
-
4091 
-
4092  // transform null object into an array
-
4093  if (is_null())
-
4094  {
-
4095  m_type = value_t::array;
-
4096  m_value = value_t::array;
-
4097  }
-
4098 
-
4099  // add element to array
-
4100  m_value.array->push_back(val);
-
4101  }
-
4102 
-
4107  reference operator+=(const basic_json& val)
-
4108  {
-
4109  push_back(val);
-
4110  return *this;
-
4111  }
-
4112 
-
4133  void push_back(const typename object_t::value_type& val)
+
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 only works for null objects or objects
-
4136  if (not(is_null() or is_object()))
-
4137  {
-
4138  throw std::domain_error("cannot use push_back() with " + type_name());
-
4139  }
-
4140 
-
4141  // transform null object into an object
-
4142  if (is_null())
-
4143  {
-
4144  m_type = value_t::object;
-
4145  m_value = value_t::object;
-
4146  }
-
4147 
-
4148  // add element to array
-
4149  m_value.object->insert(val);
-
4150  }
-
4151 
-
4156  reference operator+=(const typename object_t::value_type& val)
-
4157  {
-
4158  push_back(val);
-
4159  return operator[](val.first);
-
4160  }
-
4161 
-
4182  iterator insert(const_iterator pos, const basic_json& val)
+
4135  push_back(val);
+
4136  return *this;
+
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  // insert only works for arrays
-
4185  if (is_array())
-
4186  {
-
4187  // check if iterator pos fits to this JSON value
-
4188  if (pos.m_object != this)
-
4189  {
-
4190  throw std::domain_error("iterator does not fit current value");
-
4191  }
-
4192 
-
4193  // insert to array and return iterator
-
4194  iterator result(this);
-
4195  result.m_it.array_iterator = m_value.array->insert(pos.m_it.array_iterator, val);
-
4196  return result;
-
4197  }
-
4198  else
-
4199  {
-
4200  throw std::domain_error("cannot use insert() with " + type_name());
-
4201  }
-
4202  }
-
4203 
-
4208  iterator insert(const_iterator pos, basic_json&& val)
+
4184  push_back(val);
+
4185  return operator[](val.first);
+
4186  }
+
4187 
+
4208  iterator insert(const_iterator pos, const basic_json& val)
4209  {
-
4210  return insert(pos, val);
-
4211  }
-
4212 
-
4235  iterator insert(const_iterator pos, size_type cnt, const basic_json& val)
-
4236  {
-
4237  // insert only works for arrays
-
4238  if (is_array())
-
4239  {
-
4240  // check if iterator pos fits to this JSON value
-
4241  if (pos.m_object != this)
-
4242  {
-
4243  throw std::domain_error("iterator does not fit current value");
-
4244  }
-
4245 
-
4246  // insert to array and return iterator
-
4247  iterator result(this);
-
4248  result.m_it.array_iterator = m_value.array->insert(pos.m_it.array_iterator, cnt, val);
-
4249  return result;
-
4250  }
-
4251  else
-
4252  {
-
4253  throw std::domain_error("cannot use insert() with " + type_name());
-
4254  }
-
4255  }
-
4256 
- -
4284  {
-
4285  // insert only works for arrays
-
4286  if (not is_array())
-
4287  {
-
4288  throw std::domain_error("cannot use insert() with " + type_name());
-
4289  }
-
4290 
-
4291  // check if iterator pos fits to this JSON value
-
4292  if (pos.m_object != this)
-
4293  {
-
4294  throw std::domain_error("iterator does not fit current value");
-
4295  }
-
4296 
-
4297  if (first.m_object != last.m_object)
-
4298  {
-
4299  throw std::domain_error("iterators do not fit");
-
4300  }
-
4301 
-
4302  if (first.m_object == this or last.m_object == this)
-
4303  {
-
4304  throw std::domain_error("passed iterators may not belong to container");
-
4305  }
-
4306 
-
4307  // insert to array and return iterator
-
4308  iterator result(this);
-
4309  result.m_it.array_iterator = m_value.array->insert(
-
4310  pos.m_it.array_iterator,
-
4311  first.m_it.array_iterator,
-
4312  last.m_it.array_iterator);
-
4313  return result;
-
4314  }
-
4315 
-
4337  iterator insert(const_iterator pos, std::initializer_list<basic_json> ilist)
-
4338  {
-
4339  // insert only works for arrays
-
4340  if (not is_array())
-
4341  {
-
4342  throw std::domain_error("cannot use insert() with " + type_name());
-
4343  }
-
4344 
-
4345  // check if iterator pos fits to this JSON value
-
4346  if (pos.m_object != this)
-
4347  {
-
4348  throw std::domain_error("iterator does not fit current value");
-
4349  }
-
4350 
-
4351  // insert to array and return iterator
-
4352  iterator result(this);
-
4353  result.m_it.array_iterator = m_value.array->insert(pos.m_it.array_iterator, ilist);
-
4354  return result;
-
4355  }
-
4356 
-
4374  void swap(reference other) noexcept (
-
4375  std::is_nothrow_move_constructible<value_t>::value and
-
4376  std::is_nothrow_move_assignable<value_t>::value and
-
4377  std::is_nothrow_move_constructible<json_value>::value and
-
4378  std::is_nothrow_move_assignable<json_value>::value
-
4379  )
-
4380  {
-
4381  std::swap(m_type, other.m_type);
-
4382  std::swap(m_value, other.m_value);
-
4383  }
-
4384 
-
4404  void swap(array_t& other)
-
4405  {
-
4406  // swap only works for arrays
-
4407  if (is_array())
-
4408  {
-
4409  std::swap(*(m_value.array), other);
-
4410  }
-
4411  else
-
4412  {
-
4413  throw std::domain_error("cannot use swap() with " + type_name());
-
4414  }
-
4415  }
-
4416 
-
4436  void swap(object_t& other)
-
4437  {
-
4438  // swap only works for objects
-
4439  if (is_object())
-
4440  {
-
4441  std::swap(*(m_value.object), other);
-
4442  }
-
4443  else
-
4444  {
-
4445  throw std::domain_error("cannot use swap() with " + type_name());
-
4446  }
-
4447  }
-
4448 
-
4468  void swap(string_t& other)
-
4469  {
-
4470  // swap only works for strings
-
4471  if (is_string())
-
4472  {
-
4473  std::swap(*(m_value.string), other);
-
4474  }
-
4475  else
-
4476  {
-
4477  throw std::domain_error("cannot use swap() with " + type_name());
-
4478  }
-
4479  }
-
4480 
-
4482 
-
4483 
-
4485  // lexicographical comparison operators //
-
4487 
-
4490 
-
4491  private:
-
4501  friend bool operator<(const value_t lhs, const value_t rhs)
-
4502  {
-
4503  static constexpr std::array<uint8_t, 7> order = {{
-
4504  0, // null
-
4505  3, // object
-
4506  4, // array
-
4507  5, // string
-
4508  1, // boolean
-
4509  2, // integer
-
4510  2 // float
-
4511  }
-
4512  };
-
4513 
-
4514  // discarded values are not comparable
-
4515  if (lhs == value_t::discarded or rhs == value_t::discarded)
-
4516  {
-
4517  return false;
-
4518  }
-
4519 
-
4520  return order[static_cast<std::size_t>(lhs)] < order[static_cast<std::size_t>(rhs)];
-
4521  }
-
4522 
-
4523  public:
-
4547  friend bool operator==(const_reference lhs, const_reference rhs) noexcept
-
4548  {
-
4549  const auto lhs_type = lhs.type();
-
4550  const auto rhs_type = rhs.type();
-
4551 
-
4552  if (lhs_type == rhs_type)
-
4553  {
-
4554  switch (lhs_type)
-
4555  {
-
4556  case value_t::array:
-
4557  return *lhs.m_value.array == *rhs.m_value.array;
-
4558  case value_t::object:
-
4559  return *lhs.m_value.object == *rhs.m_value.object;
-
4560  case value_t::null:
-
4561  return true;
-
4562  case value_t::string:
-
4563  return *lhs.m_value.string == *rhs.m_value.string;
-
4564  case value_t::boolean:
-
4565  return lhs.m_value.boolean == rhs.m_value.boolean;
- -
4567  return lhs.m_value.number_integer == rhs.m_value.number_integer;
-
4568  case value_t::number_float:
-
4569  return approx(lhs.m_value.number_float, rhs.m_value.number_float);
-
4570  default:
-
4571  return false;
-
4572  }
-
4573  }
-
4574  else if (lhs_type == value_t::number_integer and rhs_type == value_t::number_float)
-
4575  {
-
4576  return approx(static_cast<number_float_t>(lhs.m_value.number_integer),
-
4577  rhs.m_value.number_float);
-
4578  }
-
4579  else if (lhs_type == value_t::number_float and rhs_type == value_t::number_integer)
-
4580  {
-
4581  return approx(lhs.m_value.number_float,
-
4582  static_cast<number_float_t>(rhs.m_value.number_integer));
-
4583  }
-
4584  return false;
-
4585  }
-
4586 
-
4605  friend bool operator==(const_reference v, std::nullptr_t) noexcept
-
4606  {
-
4607  return v.is_null();
-
4608  }
-
4609 
-
4614  friend bool operator==(std::nullptr_t, const_reference v) noexcept
-
4615  {
-
4616  return v.is_null();
-
4617  }
-
4618 
-
4635  friend bool operator!=(const_reference lhs, const_reference rhs) noexcept
-
4636  {
-
4637  return not (lhs == rhs);
-
4638  }
-
4639 
-
4658  friend bool operator!=(const_reference v, std::nullptr_t) noexcept
-
4659  {
-
4660  return not v.is_null();
-
4661  }
-
4662 
-
4667  friend bool operator!=(std::nullptr_t, const_reference v) noexcept
-
4668  {
-
4669  return not v.is_null();
-
4670  }
-
4671 
-
4696  friend bool operator<(const_reference lhs, const_reference rhs) noexcept
-
4697  {
-
4698  const auto lhs_type = lhs.type();
-
4699  const auto rhs_type = rhs.type();
-
4700 
-
4701  if (lhs_type == rhs_type)
-
4702  {
-
4703  switch (lhs_type)
-
4704  {
-
4705  case value_t::array:
-
4706  return *lhs.m_value.array < *rhs.m_value.array;
-
4707  case value_t::object:
-
4708  return *lhs.m_value.object < *rhs.m_value.object;
-
4709  case value_t::null:
-
4710  return false;
-
4711  case value_t::string:
-
4712  return *lhs.m_value.string < *rhs.m_value.string;
-
4713  case value_t::boolean:
-
4714  return lhs.m_value.boolean < rhs.m_value.boolean;
- -
4716  return lhs.m_value.number_integer < rhs.m_value.number_integer;
-
4717  case value_t::number_float:
-
4718  return lhs.m_value.number_float < rhs.m_value.number_float;
-
4719  default:
-
4720  return false;
-
4721  }
-
4722  }
-
4723  else if (lhs_type == value_t::number_integer and rhs_type == value_t::number_float)
-
4724  {
-
4725  return static_cast<number_float_t>(lhs.m_value.number_integer) <
-
4726  rhs.m_value.number_float;
-
4727  }
-
4728  else if (lhs_type == value_t::number_float and rhs_type == value_t::number_integer)
-
4729  {
-
4730  return lhs.m_value.number_float <
-
4731  static_cast<number_float_t>(rhs.m_value.number_integer);
-
4732  }
-
4733 
-
4734  // We only reach this line if we cannot compare values. In that case,
-
4735  // we compare types. Note we have to call the operator explicitly,
-
4736  // because MSVC has problems otherwise.
-
4737  return operator<(lhs_type, rhs_type);
-
4738  }
-
4739 
-
4757  friend bool operator<=(const_reference lhs, const_reference rhs) noexcept
-
4758  {
-
4759  return not (rhs < lhs);
-
4760  }
-
4761 
-
4779  friend bool operator>(const_reference lhs, const_reference rhs) noexcept
-
4780  {
-
4781  return not (lhs <= rhs);
-
4782  }
-
4783 
-
4801  friend bool operator>=(const_reference lhs, const_reference rhs) noexcept
-
4802  {
-
4803  return not (lhs < rhs);
-
4804  }
-
4805 
-
4807 
-
4808 
-
4810  // serialization //
-
4812 
-
4815 
-
4838  friend std::ostream& operator<<(std::ostream& o, const basic_json& j)
-
4839  {
-
4840  // read width member and use it as indentation parameter if nonzero
-
4841  const bool pretty_print = (o.width() > 0);
-
4842  const auto indentation = (pretty_print ? o.width() : 0);
-
4843 
-
4844  // reset width to 0 for subsequent calls to this stream
-
4845  o.width(0);
-
4846 
-
4847  // do the actual serialization
-
4848  j.dump(o, pretty_print, static_cast<unsigned int>(indentation));
-
4849  return o;
-
4850  }
-
4851 
-
4856  friend std::ostream& operator>>(const basic_json& j, std::ostream& o)
-
4857  {
-
4858  return o << j;
-
4859  }
-
4860 
-
4862 
-
4863 
-
4865  // deserialization //
-
4867 
-
4870 
-
4895  static basic_json parse(const string_t& s, parser_callback_t cb = nullptr)
-
4896  {
-
4897  return parser(s, cb).parse();
-
4898  }
-
4899 
-
4924  static basic_json parse(std::istream& i, parser_callback_t cb = nullptr)
-
4925  {
-
4926  return parser(i, cb).parse();
-
4927  }
-
4928 
-
4932  static basic_json parse(std::istream&& i, parser_callback_t cb = nullptr)
-
4933  {
-
4934  return parser(i, cb).parse();
-
4935  }
-
4936 
-
4960  friend std::istream& operator<<(basic_json& j, std::istream& i)
-
4961  {
-
4962  j = parser(i).parse();
-
4963  return i;
-
4964  }
-
4965 
-
4970  friend std::istream& operator>>(std::istream& i, basic_json& j)
-
4971  {
-
4972  j = parser(i).parse();
-
4973  return i;
-
4974  }
-
4975 
-
4977 
-
4978 
-
4979  private:
-
4981  // convenience functions //
-
4983 
-
4985  string_t type_name() const
-
4986  {
-
4987  switch (m_type)
-
4988  {
-
4989  case value_t::null:
-
4990  return "null";
-
4991  case value_t::object:
-
4992  return "object";
-
4993  case value_t::array:
-
4994  return "array";
-
4995  case value_t::string:
-
4996  return "string";
-
4997  case value_t::boolean:
-
4998  return "boolean";
-
4999  case value_t::discarded:
-
5000  return "discarded";
-
5001  default:
-
5002  return "number";
-
5003  }
-
5004  }
-
5005 
-
5014  static std::size_t extra_space(const string_t& s) noexcept
-
5015  {
-
5016  std::size_t result = 0;
-
5017 
-
5018  for (const auto& c : s)
-
5019  {
-
5020  switch (c)
-
5021  {
-
5022  case '"':
-
5023  case '\\':
-
5024  case '\b':
-
5025  case '\f':
-
5026  case '\n':
-
5027  case '\r':
-
5028  case '\t':
-
5029  {
-
5030  // from c (1 byte) to \x (2 bytes)
-
5031  result += 1;
-
5032  break;
-
5033  }
-
5034 
-
5035  default:
-
5036  {
-
5037  if (c >= 0x00 and c <= 0x1f)
-
5038  {
-
5039  // from c (1 byte) to \uxxxx (6 bytes)
-
5040  result += 5;
-
5041  }
-
5042  break;
-
5043  }
-
5044  }
-
5045  }
-
5046 
-
5047  return result;
-
5048  }
-
5049 
-
5063  static string_t escape_string(const string_t& s) noexcept
-
5064  {
-
5065  const auto space = extra_space(s);
-
5066  if (space == 0)
-
5067  {
-
5068  return s;
-
5069  }
-
5070 
-
5071  // create a result string of necessary size
-
5072  string_t result(s.size() + space, '\\');
-
5073  std::size_t pos = 0;
-
5074 
-
5075  for (const auto& c : s)
-
5076  {
-
5077  switch (c)
-
5078  {
-
5079  // quotation mark (0x22)
-
5080  case '"':
-
5081  {
-
5082  result[pos + 1] = '"';
-
5083  pos += 2;
-
5084  break;
-
5085  }
-
5086 
-
5087  // reverse solidus (0x5c)
-
5088  case '\\':
-
5089  {
-
5090  // nothing to change
-
5091  pos += 2;
-
5092  break;
-
5093  }
-
5094 
-
5095  // backspace (0x08)
-
5096  case '\b':
-
5097  {
-
5098  result[pos + 1] = 'b';
-
5099  pos += 2;
-
5100  break;
-
5101  }
-
5102 
-
5103  // formfeed (0x0c)
-
5104  case '\f':
-
5105  {
-
5106  result[pos + 1] = 'f';
-
5107  pos += 2;
-
5108  break;
-
5109  }
-
5110 
-
5111  // newline (0x0a)
-
5112  case '\n':
-
5113  {
-
5114  result[pos + 1] = 'n';
-
5115  pos += 2;
-
5116  break;
-
5117  }
-
5118 
-
5119  // carriage return (0x0d)
-
5120  case '\r':
-
5121  {
-
5122  result[pos + 1] = 'r';
-
5123  pos += 2;
-
5124  break;
-
5125  }
-
5126 
-
5127  // horizontal tab (0x09)
-
5128  case '\t':
-
5129  {
-
5130  result[pos + 1] = 't';
-
5131  pos += 2;
-
5132  break;
-
5133  }
-
5134 
-
5135  default:
-
5136  {
-
5137  if (c >= 0x00 and c <= 0x1f)
-
5138  {
-
5139  // convert a number 0..15 to its hex representation (0..f)
-
5140  auto hexify = [](const char v) -> char
-
5141  {
-
5142  return (v < 10) ? ('0' + v) : ('a' + v - 10);
-
5143  };
+
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)
+
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)
+
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 
+
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  }
+
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  // print character c as \uxxxx
-
5146  for (const char m :
-
5147  { 'u', '0', '0', hexify(c >> 4), hexify(c & 0x0f)
-
5148  })
-
5149  {
-
5150  result[++pos] = m;
-
5151  }
+
5145  // carriage return (0x0d)
+
5146  case '\r':
+
5147  {
+
5148  result[pos + 1] = 'r';
+
5149  pos += 2;
+
5150  break;
+
5151  }
5152 
-
5153  ++pos;
-
5154  }
-
5155  else
-
5156  {
-
5157  // all other characters are added as-is
-
5158  result[pos++] = c;
-
5159  }
-
5160  break;
-
5161  }
-
5162  }
-
5163  }
-
5164 
-
5165  return result;
-
5166  }
-
5167 
-
5185  void dump(std::ostream& o,
-
5186  const bool pretty_print,
-
5187  const unsigned int indent_step,
-
5188  const unsigned int current_indent = 0) const
-
5189  {
-
5190  // variable to hold indentation for recursive calls
-
5191  unsigned int new_indent = current_indent;
-
5192 
-
5193  switch (m_type)
-
5194  {
-
5195  case value_t::object:
-
5196  {
-
5197  if (m_value.object->empty())
-
5198  {
-
5199  o << "{}";
-
5200  return;
-
5201  }
-
5202 
-
5203  o << "{";
-
5204 
-
5205  // increase indentation
-
5206  if (pretty_print)
-
5207  {
-
5208  new_indent += indent_step;
-
5209  o << "\n";
-
5210  }
-
5211 
-
5212  for (auto i = m_value.object->cbegin(); i != m_value.object->cend(); ++i)
-
5213  {
-
5214  if (i != m_value.object->cbegin())
-
5215  {
-
5216  o << (pretty_print ? ",\n" : ",");
-
5217  }
-
5218  o << string_t(new_indent, ' ') << "\""
-
5219  << escape_string(i->first) << "\":"
-
5220  << (pretty_print ? " " : "");
-
5221  i->second.dump(o, pretty_print, indent_step, new_indent);
-
5222  }
-
5223 
-
5224  // decrease indentation
-
5225  if (pretty_print)
-
5226  {
-
5227  new_indent -= indent_step;
-
5228  o << "\n";
-
5229  }
+
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  o << string_t(new_indent, ' ') + "}";
-
5232  return;
-
5233  }
-
5234 
-
5235  case value_t::array:
-
5236  {
-
5237  if (m_value.array->empty())
-
5238  {
-
5239  o << "[]";
-
5240  return;
-
5241  }
-
5242 
-
5243  o << "[";
-
5244 
-
5245  // increase indentation
-
5246  if (pretty_print)
-
5247  {
-
5248  new_indent += indent_step;
-
5249  o << "\n";
-
5250  }
-
5251 
-
5252  for (auto i = m_value.array->cbegin(); i != m_value.array->cend(); ++i)
-
5253  {
-
5254  if (i != m_value.array->cbegin())
-
5255  {
-
5256  o << (pretty_print ? ",\n" : ",");
-
5257  }
-
5258  o << string_t(new_indent, ' ');
-
5259  i->dump(o, pretty_print, indent_step, new_indent);
-
5260  }
-
5261 
-
5262  // decrease indentation
-
5263  if (pretty_print)
+
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  new_indent -= indent_step;
-
5266  o << "\n";
+
5265  o << "[]";
+
5266  return;
5267  }
5268 
-
5269  o << string_t(new_indent, ' ') << "]";
-
5270  return;
-
5271  }
-
5272 
-
5273  case value_t::string:
-
5274  {
-
5275  o << string_t("\"") << escape_string(*m_value.string) << "\"";
-
5276  return;
-
5277  }
-
5278 
-
5279  case value_t::boolean:
-
5280  {
-
5281  o << (m_value.boolean ? "true" : "false");
-
5282  return;
-
5283  }
-
5284 
- -
5286  {
-
5287  o << m_value.number_integer;
-
5288  return;
-
5289  }
-
5290 
-
5291  case value_t::number_float:
-
5292  {
-
5293  // 15 digits of precision allows round-trip IEEE 754
-
5294  // string->double->string; to be safe, we read this value from
-
5295  // std::numeric_limits<number_float_t>::digits10
-
5296  o << std::setprecision(std::numeric_limits<number_float_t>::digits10) << m_value.number_float;
-
5297  return;
-
5298  }
-
5299 
-
5300  case value_t::discarded:
-
5301  {
-
5302  o << "<discarded>";
-
5303  return;
-
5304  }
-
5305 
-
5306  case value_t::null:
-
5307  {
-
5308  o << "null";
-
5309  return;
-
5310  }
-
5311  }
-
5312  }
-
5313 
-
5314  private:
-
5316  // member variables //
-
5318 
-
5320  value_t m_type = value_t::null;
-
5321 
-
5323  json_value m_value = {};
-
5324 
+
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)
+
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  }
+
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  }
+
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;
+
5323  return;
+
5324  }
5325 
-
5326  private:
-
5328  // iterators //
-
5330 
-
5340  class primitive_iterator_t
-
5341  {
-
5342  public:
-
5344  void set_begin()
-
5345  {
-
5346  m_it = begin_value;
-
5347  }
-
5348 
-
5350  void set_end()
-
5351  {
-
5352  m_it = end_value;
-
5353  }
-
5354 
-
5356  bool is_begin() const
-
5357  {
-
5358  return (m_it == begin_value);
-
5359  }
-
5360 
-
5362  bool is_end() const
-
5363  {
-
5364  return (m_it == end_value);
-
5365  }
-
5366 
-
5368  operator difference_type& ()
-
5369  {
-
5370  return m_it;
-
5371  }
-
5372 
-
5374  operator difference_type () const
-
5375  {
-
5376  return m_it;
-
5377  }
-
5378 
-
5379  private:
-
5380  static constexpr difference_type begin_value = 0;
-
5381  static constexpr difference_type end_value = begin_value + 1;
-
5382 
-
5384  difference_type m_it = std::numeric_limits<std::ptrdiff_t>::denorm_min();
-
5385  };
+
5326  case value_t::discarded:
+
5327  {
+
5328  o << "<discarded>";
+
5329  return;
+
5330  }
+
5331 
+
5332  case value_t::null:
+
5333  {
+
5334  o << "null";
+
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  }
+
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 
-
5394  struct internal_iterator
-
5395  {
-
5397  typename object_t::iterator object_iterator;
-
5399  typename array_t::iterator array_iterator;
-
5401  primitive_iterator_t primitive_iterator;
-
5402 
-
5404  internal_iterator()
-
5405  : object_iterator(), array_iterator(), primitive_iterator()
-
5406  {}
-
5407  };
+
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 
-
5409  public:
-
5423  class const_iterator : public std::iterator<std::random_access_iterator_tag, const basic_json>
-
5424  {
-
5426  friend class basic_json;
-
5427 
-
5428  public:
- - - - -
5438  using iterator_category = std::bidirectional_iterator_tag;
-
5439 
-
5441  const_iterator() = default;
-
5442 
-
5444  const_iterator(pointer object) : m_object(object)
-
5445  {
-
5446  switch (m_object->m_type)
-
5447  {
- -
5449  {
-
5450  m_it.object_iterator = typename object_t::iterator();
-
5451  break;
-
5452  }
+
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 
- -
5455  {
-
5456  m_it.array_iterator = typename array_t::iterator();
-
5457  break;
-
5458  }
-
5459 
-
5460  default:
-
5461  {
-
5462  m_it.primitive_iterator = primitive_iterator_t();
-
5463  break;
-
5464  }
-
5465  }
-
5466  }
-
5467 
-
5469  const_iterator(const iterator& other) : m_object(other.m_object)
-
5470  {
-
5471  switch (m_object->m_type)
-
5472  {
- -
5474  {
-
5475  m_it.object_iterator = other.m_it.object_iterator;
-
5476  break;
-
5477  }
-
5478 
- -
5480  {
-
5481  m_it.array_iterator = other.m_it.array_iterator;
-
5482  break;
-
5483  }
-
5484 
-
5485  default:
-
5486  {
-
5487  m_it.primitive_iterator = other.m_it.primitive_iterator;
-
5488  break;
-
5489  }
-
5490  }
-
5491  }
-
5492 
-
5494  const_iterator(const const_iterator& other) noexcept
-
5495  : m_object(other.m_object), m_it(other.m_it)
-
5496  {}
-
5497 
- -
5500  std::is_nothrow_move_constructible<pointer>::value and
-
5501  std::is_nothrow_move_assignable<pointer>::value and
-
5502  std::is_nothrow_move_constructible<internal_iterator>::value and
-
5503  std::is_nothrow_move_assignable<internal_iterator>::value
-
5504  )
-
5505  {
-
5506  std::swap(m_object, other.m_object);
-
5507  std::swap(m_it, other.m_it);
-
5508  return *this;
-
5509  }
+
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)
+
5498  {
+ +
5500  {
+
5501  m_it.object_iterator = other.m_it.object_iterator;
+
5502  break;
+
5503  }
+
5504 
+ +
5506  {
+
5507  m_it.array_iterator = other.m_it.array_iterator;
+
5508  break;
+
5509  }
5510 
-
5511  private:
-
5513  void set_begin()
-
5514  {
-
5515  switch (m_object->m_type)
-
5516  {
- -
5518  {
-
5519  m_it.object_iterator = m_object->m_value.object->begin();
-
5520  break;
-
5521  }
-
5522 
- -
5524  {
-
5525  m_it.array_iterator = m_object->m_value.array->begin();
-
5526  break;
-
5527  }
-
5528 
- -
5530  {
-
5531  // set to end so begin()==end() is true: null is empty
-
5532  m_it.primitive_iterator.set_end();
-
5533  break;
-
5534  }
-
5535 
-
5536  default:
-
5537  {
-
5538  m_it.primitive_iterator.set_begin();
-
5539  break;
-
5540  }
-
5541  }
-
5542  }
-
5543 
-
5545  void set_end()
-
5546  {
-
5547  switch (m_object->m_type)
-
5548  {
- +
5511  default:
+
5512  {
+
5513  m_it.primitive_iterator = other.m_it.primitive_iterator;
+
5514  break;
+
5515  }
+
5516  }
+
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  }
+
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  }
+
5548 
+
5550  {
-
5551  m_it.object_iterator = m_object->m_value.object->end();
+
5551  m_it.array_iterator = m_object->m_value.array->begin();
5552  break;
5553  }
5554 
- +
5556  {
-
5557  m_it.array_iterator = m_object->m_value.array->end();
-
5558  break;
-
5559  }
-
5560 
-
5561  default:
-
5562  {
-
5563  m_it.primitive_iterator.set_end();
-
5564  break;
-
5565  }
-
5566  }
-
5567  }
-
5568 
-
5569  public:
- -
5572  {
+
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  return m_it.object_iterator->second;
-
5578  }
-
5579 
- -
5581  {
-
5582  return *m_it.array_iterator;
-
5583  }
-
5584 
- -
5586  {
-
5587  throw std::out_of_range("cannot get value");
-
5588  }
-
5589 
-
5590  default:
-
5591  {
-
5592  if (m_it.primitive_iterator.is_begin())
-
5593  {
-
5594  return *m_object;
-
5595  }
-
5596  else
-
5597  {
-
5598  throw std::out_of_range("cannot get value");
-
5599  }
-
5600  }
-
5601  }
-
5602  }
-
5603 
- -
5606  {
-
5607  switch (m_object->m_type)
-
5608  {
- -
5610  {
-
5611  return &(m_it.object_iterator->second);
-
5612  }
-
5613 
- -
5615  {
-
5616  return &*m_it.array_iterator;
-
5617  }
-
5618 
-
5619  default:
-
5620  {
-
5621  if (m_it.primitive_iterator.is_begin())
-
5622  {
-
5623  return m_object;
-
5624  }
-
5625  else
-
5626  {
-
5627  throw std::out_of_range("cannot get value");
-
5628  }
-
5629  }
-
5630  }
-
5631  }
-
5632 
- -
5635  {
-
5636  auto result = *this;
-
5637  ++(*this);
-
5638  return result;
-
5639  }
-
5640 
- -
5643  {
-
5644  switch (m_object->m_type)
-
5645  {
- -
5647  {
-
5648  ++m_it.object_iterator;
-
5649  break;
-
5650  }
-
5651 
- -
5653  {
-
5654  ++m_it.array_iterator;
-
5655  break;
-
5656  }
-
5657 
-
5658  default:
-
5659  {
-
5660  ++m_it.primitive_iterator;
-
5661  break;
-
5662  }
-
5663  }
-
5664 
-
5665  return *this;
-
5666  }
-
5667 
- -
5670  {
-
5671  auto result = *this;
-
5672  --(*this);
-
5673  return result;
-
5674  }
-
5675 
- -
5678  {
-
5679  switch (m_object->m_type)
-
5680  {
- -
5682  {
-
5683  --m_it.object_iterator;
-
5684  break;
-
5685  }
-
5686 
- -
5688  {
-
5689  --m_it.array_iterator;
-
5690  break;
-
5691  }
-
5692 
-
5693  default:
-
5694  {
-
5695  --m_it.primitive_iterator;
-
5696  break;
-
5697  }
-
5698  }
-
5699 
-
5700  return *this;
-
5701  }
-
5702 
-
5704  bool operator==(const const_iterator& other) const
-
5705  {
-
5706  // if objects are not the same, the comparison is undefined
-
5707  if (m_object != other.m_object)
-
5708  {
-
5709  throw std::domain_error("cannot compare iterators of different containers");
-
5710  }
-
5711 
-
5712  switch (m_object->m_type)
-
5713  {
- -
5715  {
-
5716  return (m_it.object_iterator == other.m_it.object_iterator);
+
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  }
+
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  {
+ +
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  }
+
5639 
+ +
5641  {
+
5642  return &*m_it.array_iterator;
+
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 
+ +
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  }
+
5690 
+
5691  return *this;
+
5692  }
+
5693 
+ +
5696  {
+
5697  auto result = *this;
+
5698  --(*this);
+
5699  return result;
+
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  return (m_it.array_iterator == other.m_it.array_iterator);
-
5722  }
-
5723 
-
5724  default:
-
5725  {
-
5726  return (m_it.primitive_iterator == other.m_it.primitive_iterator);
-
5727  }
-
5728  }
-
5729  }
-
5730 
-
5732  bool operator!=(const const_iterator& other) const
-
5733  {
-
5734  return not operator==(other);
-
5735  }
-
5736 
-
5738  bool operator<(const const_iterator& other) const
-
5739  {
-
5740  // if objects are not the same, the comparison is undefined
-
5741  if (m_object != other.m_object)
-
5742  {
-
5743  throw std::domain_error("cannot compare iterators of different containers");
-
5744  }
-
5745 
-
5746  switch (m_object->m_type)
-
5747  {
- -
5749  {
-
5750  throw std::domain_error("cannot use operator< for object iterators");
-
5751  }
-
5752 
- -
5754  {
-
5755  return (m_it.array_iterator < other.m_it.array_iterator);
-
5756  }
-
5757 
-
5758  default:
-
5759  {
-
5760  return (m_it.primitive_iterator < other.m_it.primitive_iterator);
-
5761  }
-
5762  }
-
5763  }
-
5764 
-
5766  bool operator<=(const const_iterator& other) const
-
5767  {
-
5768  return not other.operator < (*this);
-
5769  }
-
5770 
-
5772  bool operator>(const const_iterator& other) const
-
5773  {
-
5774  return not operator<=(other);
-
5775  }
-
5776 
-
5778  bool operator>=(const const_iterator& other) const
-
5779  {
-
5780  return not operator<(other);
-
5781  }
-
5782 
- -
5785  {
-
5786  switch (m_object->m_type)
-
5787  {
- -
5789  {
-
5790  throw std::domain_error("cannot use operator+= for object iterators");
-
5791  }
-
5792 
- -
5794  {
-
5795  m_it.array_iterator += i;
-
5796  break;
-
5797  }
-
5798 
-
5799  default:
-
5800  {
-
5801  m_it.primitive_iterator += i;
-
5802  break;
-
5803  }
-
5804  }
-
5805 
-
5806  return *this;
+
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  return operator+=(-i);
-
5813  }
-
5814 
- -
5817  {
-
5818  auto result = *this;
-
5819  result += i;
-
5820  return result;
-
5821  }
-
5822 
- -
5825  {
-
5826  auto result = *this;
-
5827  result -= i;
-
5828  return result;
-
5829  }
-
5830 
- -
5833  {
-
5834  switch (m_object->m_type)
-
5835  {
- -
5837  {
-
5838  throw std::domain_error("cannot use operator- for object iterators");
-
5839  }
+
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 
- -
5842  {
-
5843  return m_it.array_iterator - other.m_it.array_iterator;
-
5844  }
-
5845 
-
5846  default:
-
5847  {
-
5848  return m_it.primitive_iterator - other.m_it.primitive_iterator;
-
5849  }
-
5850  }
-
5851  }
-
5852 
- -
5855  {
-
5856  switch (m_object->m_type)
-
5857  {
- -
5859  {
-
5860  throw std::domain_error("cannot use operator[] for object iterators");
-
5861  }
-
5862 
- -
5864  {
-
5865  return *(m_it.array_iterator + n);
-
5866  }
-
5867 
- -
5869  {
-
5870  throw std::out_of_range("cannot get value");
-
5871  }
-
5872 
-
5873  default:
-
5874  {
-
5875  if (m_it.primitive_iterator == -n)
-
5876  {
-
5877  return *m_object;
-
5878  }
-
5879  else
-
5880  {
-
5881  throw std::out_of_range("cannot get value");
-
5882  }
-
5883  }
-
5884  }
-
5885  }
-
5886 
-
5888  typename object_t::key_type key() const
-
5889  {
-
5890  if (m_object->is_object())
-
5891  {
-
5892  return m_it.object_iterator->first;
-
5893  }
-
5894  else
-
5895  {
-
5896  throw std::domain_error("cannot use key() for non-object iterators");
-
5897  }
-
5898  }
-
5899 
- -
5902  {
-
5903  return operator*();
-
5904  }
-
5905 
-
5906  private:
-
5908  pointer m_object = nullptr;
-
5910  internal_iterator m_it = internal_iterator();
-
5911  };
+ +
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 
-
5925  class iterator : public const_iterator
-
5926  {
-
5927  public:
- -
5929  using pointer = typename basic_json::pointer;
- +
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 
-
5933  iterator() = default;
-
5934 
-
5936  iterator(pointer object) noexcept : base_iterator(object)
-
5937  {}
+
5932  private:
+
5934  pointer m_object = nullptr;
+
5936  internal_iterator m_it = internal_iterator();
+
5937  };
5938 
-
5940  iterator(const iterator& other) noexcept
-
5941  : base_iterator(other)
-
5942  {}
-
5943 
-
5945  iterator& operator=(iterator other) noexcept(
-
5946  std::is_nothrow_move_constructible<pointer>::value and
-
5947  std::is_nothrow_move_assignable<pointer>::value and
-
5948  std::is_nothrow_move_constructible<internal_iterator>::value and
-
5949  std::is_nothrow_move_assignable<internal_iterator>::value
-
5950  )
-
5951  {
-
5952  base_iterator::operator=(other);
-
5953  return *this;
-
5954  }
-
5955 
- -
5958  {
-
5959  return const_cast<reference>(base_iterator::operator*());
-
5960  }
-
5961 
- -
5964  {
-
5965  return const_cast<pointer>(base_iterator::operator->());
-
5966  }
-
5967 
- -
5970  {
-
5971  iterator result = *this;
- -
5973  return result;
-
5974  }
-
5975 
- -
5978  {
- -
5980  return *this;
-
5981  }
-
5982 
- -
5985  {
-
5986  iterator result = *this;
- -
5988  return result;
-
5989  }
-
5990 
- -
5993  {
- -
5995  return *this;
-
5996  }
-
5997 
- -
6000  {
- -
6002  return *this;
-
6003  }
-
6004 
- -
6007  {
- -
6009  return *this;
-
6010  }
-
6011 
- -
6014  {
-
6015  auto result = *this;
-
6016  result += i;
-
6017  return result;
-
6018  }
-
6019 
- -
6022  {
-
6023  auto result = *this;
-
6024  result -= i;
-
6025  return result;
-
6026  }
-
6027 
-
6028  difference_type operator-(const iterator& other) const
-
6029  {
-
6030  return base_iterator::operator-(other);
-
6031  }
-
6032 
- -
6035  {
-
6036  return const_cast<reference>(base_iterator::operator[](n));
-
6037  }
-
6038 
- -
6041  {
-
6042  return const_cast<reference>(base_iterator::value());
-
6043  }
-
6044  };
+
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  {}
+
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  }
+
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 
-
6063  template<typename Base>
-
6064  class json_reverse_iterator : public std::reverse_iterator<Base>
-
6065  {
-
6066  public:
-
6068  using base_iterator = std::reverse_iterator<Base>;
-
6070  using reference = typename Base::reference;
+ +
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 
-
6073  json_reverse_iterator(const typename base_iterator::iterator_type& it)
-
6074  : base_iterator(it) {}
-
6075 
- -
6078 
- -
6081  {
-
6082  return base_iterator::operator++(1);
-
6083  }
-
6084 
- -
6087  {
-
6088  base_iterator::operator++();
-
6089  return *this;
-
6090  }
-
6091 
- -
6094  {
-
6095  return base_iterator::operator--(1);
-
6096  }
+
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 
- -
6100  {
-
6101  base_iterator::operator--();
-
6102  return *this;
-
6103  }
+
6099  json_reverse_iterator(const typename base_iterator::iterator_type& it)
+
6100  : base_iterator(it) {}
+
6101 
+
6104 
- +
6107  {
-
6108  base_iterator::operator+=(i);
-
6109  return *this;
-
6110  }
-
6111 
- -
6114  {
-
6115  auto result = *this;
-
6116  result += i;
-
6117  return result;
-
6118  }
-
6119 
- -
6122  {
-
6123  auto result = *this;
-
6124  result -= i;
-
6125  return result;
-
6126  }
-
6127 
- -
6130  {
-
6131  return this->base() - other.base();
-
6132  }
-
6133 
- -
6136  {
-
6137  return *(this->operator+(n));
-
6138  }
-
6139 
-
6141  typename object_t::key_type key() const
-
6142  {
-
6143  auto it = --this->base();
-
6144  return it.key();
-
6145  }
-
6146 
- -
6149  {
-
6150  auto it = --this->base();
-
6151  return it.operator * ();
+
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);
+
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;
+
6144  }
+
6145 
+ +
6148  {
+
6149  auto result = *this;
+
6150  result -= i;
+
6151  return result;
6152  }
-
6153  };
-
6154 
-
6155 
-
6156  private:
-
6158  template<typename IteratorType>
-
6159  class iteration_proxy
-
6160  {
-
6161  private:
-
6163  class iteration_proxy_internal
-
6164  {
-
6165  private:
-
6167  IteratorType anchor;
-
6169  size_t array_index = 0;
-
6170 
-
6171  public:
-
6172  iteration_proxy_internal(IteratorType it)
-
6173  : anchor(it)
-
6174  {}
-
6175 
-
6177  iteration_proxy_internal& operator*()
-
6178  {
-
6179  return *this;
-
6180  }
+
6153 
+ +
6156  {
+
6157  return this->base() - other.base();
+
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  };
+
6180 
6181 
-
6183  iteration_proxy_internal& operator++()
-
6184  {
-
6185  ++anchor;
-
6186  ++array_index;
-
6187 
-
6188  return *this;
-
6189  }
-
6190 
-
6192  bool operator!= (const iteration_proxy_internal& o)
-
6193  {
-
6194  return anchor != o.anchor;
-
6195  }
+
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 
-
6198  typename basic_json::string_t key() const
-
6199  {
-
6200  switch (anchor.m_object->type())
-
6201  {
-
6202  // use integer array index as key
-
6203  case value_t::array:
-
6204  {
-
6205  return std::to_string(array_index);
-
6206  }
+
6197  public:
+
6198  iteration_proxy_internal(IteratorType it)
+
6199  : anchor(it)
+
6200  {}
+
6201 
+
6203  iteration_proxy_internal& operator*()
+
6204  {
+
6205  return *this;
+
6206  }
6207 
-
6208  // use key from the object
-
6209  case value_t::object:
-
6210  {
-
6211  return anchor.key();
-
6212  }
+
6209  iteration_proxy_internal& operator++()
+
6210  {
+
6211  ++anchor;
+
6212  ++array_index;
6213 
-
6214  // use an empty key for all primitive types
-
6215  default:
-
6216  {
-
6217  return "";
-
6218  }
-
6219  }
-
6220  }
-
6221 
-
6223  typename IteratorType::reference value() const
-
6224  {
-
6225  return anchor.value();
-
6226  }
-
6227  };
-
6228 
-
6230  typename IteratorType::reference container;
-
6231 
-
6232  public:
-
6234  iteration_proxy(typename IteratorType::reference cont)
-
6235  : container(cont)
-
6236  {}
-
6237 
-
6239  iteration_proxy_internal begin()
-
6240  {
-
6241  return iteration_proxy_internal(container.begin());
-
6242  }
-
6243 
-
6245  iteration_proxy_internal end()
-
6246  {
-
6247  return iteration_proxy_internal(container.end());
-
6248  }
-
6249  };
-
6250 
-
6251  public:
-
6260  static iteration_proxy<iterator> iterator_wrapper(reference cont)
-
6261  {
-
6262  return iteration_proxy<iterator>(cont);
-
6263  }
-
6264 
-
6268  static iteration_proxy<const_iterator> iterator_wrapper(const_reference cont)
-
6269  {
-
6270  return iteration_proxy<const_iterator>(cont);
-
6271  }
-
6272 
-
6273 
-
6274  private:
-
6276  // lexer and parser //
-
6278 
-
6286  class lexer
-
6287  {
-
6288  public:
-
6290  enum class token_type
-
6291  {
-
6292  uninitialized,
-
6293  literal_true,
-
6294  literal_false,
-
6295  literal_null,
-
6296  value_string,
-
6297  value_number,
-
6298  begin_array,
-
6299  begin_object,
-
6300  end_array,
-
6301  end_object,
-
6302  name_separator,
-
6303  value_separator,
-
6304  parse_error,
-
6305  end_of_input
-
6306  };
-
6307 
-
6309  using lexer_char_t = unsigned char;
-
6310 
-
6312  explicit lexer(const string_t& s) noexcept
-
6313  : m_stream(nullptr), m_buffer(s)
-
6314  {
-
6315  m_content = reinterpret_cast<const lexer_char_t*>(s.c_str());
-
6316  m_start = m_cursor = m_content;
-
6317  m_limit = m_content + s.size();
-
6318  }
-
6319  explicit lexer(std::istream* s) noexcept
-
6320  : m_stream(s), m_buffer()
-
6321  {
-
6322  getline(*m_stream, m_buffer);
-
6323  m_content = reinterpret_cast<const lexer_char_t*>(m_buffer.c_str());
-
6324  m_start = m_cursor = m_content;
-
6325  m_limit = m_content + m_buffer.size();
-
6326  }
-
6327 
-
6329  lexer() = default;
-
6330 
-
6331  // switch of unwanted functions
-
6332  lexer(const lexer&) = delete;
-
6333  lexer operator=(const lexer&) = delete;
+
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 
-
6346  static string_t to_unicode(const std::size_t codepoint1,
-
6347  const std::size_t codepoint2 = 0)
-
6348  {
-
6349  string_t result;
-
6350 
-
6351  // calculate the codepoint from the given code points
-
6352  std::size_t codepoint = codepoint1;
-
6353 
-
6354  // check if codepoint1 is a high surrogate
-
6355  if (codepoint1 >= 0xD800 and codepoint1 <= 0xDBFF)
-
6356  {
-
6357  // check if codepoint2 is a low surrogate
-
6358  if (codepoint2 >= 0xDC00 and codepoint2 <= 0xDFFF)
-
6359  {
-
6360  codepoint =
-
6361  // high surrogate occupies the most significant 22 bits
-
6362  (codepoint1 << 10)
-
6363  // low surrogate occupies the least significant 15 bits
-
6364  + codepoint2
-
6365  // there is still the 0xD800, 0xDC00 and 0x10000 noise
-
6366  // in the result so we have to substract with:
-
6367  // (0xD800 << 10) + DC00 - 0x10000 = 0x35FDC00
-
6368  - 0x35FDC00;
-
6369  }
-
6370  else
-
6371  {
-
6372  throw std::invalid_argument("missing or wrong low surrogate");
+
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  }
-
6375 
-
6376  if (codepoint < 0x80)
-
6377  {
-
6378  // 1-byte characters: 0xxxxxxx (ASCII)
-
6379  result.append(1, static_cast<typename string_t::value_type>(codepoint));
-
6380  }
-
6381  else if (codepoint <= 0x7ff)
-
6382  {
-
6383  // 2-byte characters: 110xxxxx 10xxxxxx
-
6384  result.append(1, static_cast<typename string_t::value_type>(0xC0 | ((codepoint >> 6) & 0x1F)));
-
6385  result.append(1, static_cast<typename string_t::value_type>(0x80 | (codepoint & 0x3F)));
-
6386  }
-
6387  else if (codepoint <= 0xffff)
-
6388  {
-
6389  // 3-byte characters: 1110xxxx 10xxxxxx 10xxxxxx
-
6390  result.append(1, static_cast<typename string_t::value_type>(0xE0 | ((codepoint >> 12) & 0x0F)));
-
6391  result.append(1, static_cast<typename string_t::value_type>(0x80 | ((codepoint >> 6) & 0x3F)));
-
6392  result.append(1, static_cast<typename string_t::value_type>(0x80 | (codepoint & 0x3F)));
-
6393  }
-
6394  else if (codepoint <= 0x10ffff)
-
6395  {
-
6396  // 4-byte characters: 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx
-
6397  result.append(1, static_cast<typename string_t::value_type>(0xF0 | ((codepoint >> 18) & 0x07)));
-
6398  result.append(1, static_cast<typename string_t::value_type>(0x80 | ((codepoint >> 12) & 0x3F)));
-
6399  result.append(1, static_cast<typename string_t::value_type>(0x80 | ((codepoint >> 6) & 0x3F)));
-
6400  result.append(1, static_cast<typename string_t::value_type>(0x80 | (codepoint & 0x3F)));
-
6401  }
-
6402  else
-
6403  {
-
6404  throw std::out_of_range("code points above 0x10FFFF are invalid");
+
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 
-
6407  return result;
-
6408  }
-
6409 
-
6411  static std::string token_type_name(token_type t)
-
6412  {
-
6413  switch (t)
-
6414  {
-
6415  case token_type::uninitialized:
-
6416  return "<uninitialized>";
-
6417  case token_type::literal_true:
-
6418  return "true literal";
-
6419  case token_type::literal_false:
-
6420  return "false literal";
-
6421  case token_type::literal_null:
-
6422  return "null literal";
-
6423  case token_type::value_string:
-
6424  return "string literal";
-
6425  case token_type::value_number:
-
6426  return "number literal";
-
6427  case token_type::begin_array:
-
6428  return "[";
-
6429  case token_type::begin_object:
-
6430  return "{";
-
6431  case token_type::end_array:
-
6432  return "]";
-
6433  case token_type::end_object:
-
6434  return "}";
-
6435  case token_type::name_separator:
-
6436  return ":";
-
6437  case token_type::value_separator:
-
6438  return ",";
-
6439  case token_type::parse_error:
-
6440  return "<parse error>";
-
6441  case token_type::end_of_input:
-
6442  return "<end of input>";
-
6443  default:
-
6444  {
-
6445  // catch non-enum values
-
6446  return "unknown token"; // LCOV_EXCL_LINE
-
6447  }
-
6448  }
-
6449  }
-
6450 
-
6461  token_type scan() noexcept
-
6462  {
-
6463  // pointer for backtracking information
-
6464  m_marker = nullptr;
-
6465 
-
6466  // remember the begin of the token
-
6467  m_start = m_cursor;
-
6468 
+
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  {
-
6471  lexer_char_t yych;
-
6472  unsigned int yyaccept = 0;
-
6473  static const unsigned char yybm[] =
-
6474  {
-
6475  0, 0, 0, 0, 0, 0, 0, 0,
-
6476  0, 32, 32, 0, 0, 32, 0, 0,
-
6477  64, 64, 64, 64, 64, 64, 64, 64,
-
6478  64, 64, 64, 64, 64, 64, 64, 64,
-
6479  96, 64, 0, 64, 64, 64, 64, 64,
-
6480  64, 64, 64, 64, 64, 64, 64, 64,
-
6481  192, 192, 192, 192, 192, 192, 192, 192,
-
6482  192, 192, 64, 64, 64, 64, 64, 64,
-
6483  64, 64, 64, 64, 64, 64, 64, 64,
+
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[] =
+
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  64, 64, 64, 64, 64, 64, 64, 64,
-
6486  64, 64, 64, 64, 0, 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, 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,
@@ -3463,1453 +3463,1457 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
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  };
-
6508  if ((m_limit - m_cursor) < 5)
-
6509  {
-
6510  yyfill(); // LCOV_EXCL_LINE;
-
6511  }
-
6512  yych = *m_cursor;
-
6513  if (yych <= ':')
-
6514  {
-
6515  if (yych <= ' ')
-
6516  {
-
6517  if (yych <= '\n')
-
6518  {
-
6519  if (yych <= 0x00)
-
6520  {
-
6521  goto basic_json_parser_28;
-
6522  }
-
6523  if (yych <= 0x08)
+
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_30;
+
6525  goto basic_json_parser_28;
6526  }
-
6527  if (yych >= '\n')
+
6527  if (yych <= 0x08)
6528  {
-
6529  goto basic_json_parser_4;
+
6529  goto basic_json_parser_30;
6530  }
-
6531  }
-
6532  else
-
6533  {
-
6534  if (yych == '\r')
-
6535  {
-
6536  goto basic_json_parser_2;
-
6537  }
-
6538  if (yych <= 0x1F)
+
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_30;
+
6540  goto basic_json_parser_2;
6541  }
-
6542  }
-
6543  }
-
6544  else
-
6545  {
-
6546  if (yych <= ',')
-
6547  {
-
6548  if (yych == '"')
-
6549  {
-
6550  goto basic_json_parser_27;
-
6551  }
-
6552  if (yych <= '+')
+
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_30;
+
6554  goto basic_json_parser_27;
6555  }
-
6556  goto basic_json_parser_16;
-
6557  }
-
6558  else
-
6559  {
-
6560  if (yych <= '/')
-
6561  {
-
6562  if (yych <= '-')
-
6563  {
-
6564  goto basic_json_parser_23;
-
6565  }
-
6566  goto basic_json_parser_30;
-
6567  }
-
6568  else
-
6569  {
-
6570  if (yych <= '0')
-
6571  {
-
6572  goto basic_json_parser_24;
-
6573  }
-
6574  if (yych <= '9')
+
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;
+
6571  }
+
6572  else
+
6573  {
+
6574  if (yych <= '0')
6575  {
-
6576  goto basic_json_parser_26;
+
6576  goto basic_json_parser_24;
6577  }
-
6578  goto basic_json_parser_18;
-
6579  }
-
6580  }
-
6581  }
-
6582  }
-
6583  else
-
6584  {
-
6585  if (yych <= 'n')
-
6586  {
-
6587  if (yych <= ']')
-
6588  {
-
6589  if (yych == '[')
-
6590  {
-
6591  goto basic_json_parser_8;
-
6592  }
-
6593  if (yych <= '\\')
+
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_30;
+
6595  goto basic_json_parser_8;
6596  }
-
6597  goto basic_json_parser_10;
-
6598  }
-
6599  else
-
6600  {
-
6601  if (yych == 'f')
-
6602  {
-
6603  goto basic_json_parser_22;
-
6604  }
-
6605  if (yych <= 'm')
+
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_30;
+
6607  goto basic_json_parser_22;
6608  }
-
6609  goto basic_json_parser_20;
-
6610  }
-
6611  }
-
6612  else
-
6613  {
-
6614  if (yych <= '{')
-
6615  {
-
6616  if (yych == 't')
-
6617  {
-
6618  goto basic_json_parser_21;
-
6619  }
-
6620  if (yych <= 'z')
+
6609  if (yych <= 'm')
+
6610  {
+
6611  goto basic_json_parser_30;
+
6612  }
+
6613  goto basic_json_parser_20;
+
6614  }
+
6615  }
+
6616  else
+
6617  {
+
6618  if (yych <= '{')
+
6619  {
+
6620  if (yych == 't')
6621  {
-
6622  goto basic_json_parser_30;
+
6622  goto basic_json_parser_21;
6623  }
-
6624  goto basic_json_parser_12;
-
6625  }
-
6626  else
-
6627  {
-
6628  if (yych <= '}')
-
6629  {
-
6630  if (yych <= '|')
-
6631  {
-
6632  goto basic_json_parser_30;
-
6633  }
-
6634  goto basic_json_parser_14;
-
6635  }
-
6636  else
-
6637  {
-
6638  if (yych == 0xEF)
-
6639  {
-
6640  goto basic_json_parser_6;
-
6641  }
-
6642  goto basic_json_parser_30;
-
6643  }
-
6644  }
-
6645  }
-
6646  }
-
6647 basic_json_parser_2:
-
6648  ++m_cursor;
-
6649  yych = *m_cursor;
-
6650  goto basic_json_parser_5;
-
6651 basic_json_parser_3:
-
6652  {
-
6653  return scan();
-
6654  }
-
6655 basic_json_parser_4:
-
6656  ++m_cursor;
-
6657  if (m_limit <= m_cursor)
-
6658  {
-
6659  yyfill(); // LCOV_EXCL_LINE;
-
6660  }
-
6661  yych = *m_cursor;
-
6662 basic_json_parser_5:
-
6663  if (yybm[0 + yych] & 32)
-
6664  {
-
6665  goto basic_json_parser_4;
-
6666  }
-
6667  goto basic_json_parser_3;
-
6668 basic_json_parser_6:
-
6669  yyaccept = 0;
-
6670  yych = *(m_marker = ++m_cursor);
-
6671  if (yych == 0xBB)
-
6672  {
-
6673  goto basic_json_parser_64;
-
6674  }
-
6675 basic_json_parser_7:
+
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  return token_type::parse_error;
+
6677  goto basic_json_parser_64;
6678  }
-
6679 basic_json_parser_8:
-
6680  ++m_cursor;
-
6681  {
-
6682  return token_type::begin_array;
-
6683  }
-
6684 basic_json_parser_10:
-
6685  ++m_cursor;
-
6686  {
-
6687  return token_type::end_array;
-
6688  }
-
6689 basic_json_parser_12:
-
6690  ++m_cursor;
-
6691  {
-
6692  return token_type::begin_object;
-
6693  }
-
6694 basic_json_parser_14:
-
6695  ++m_cursor;
-
6696  {
-
6697  return token_type::end_object;
-
6698  }
-
6699 basic_json_parser_16:
-
6700  ++m_cursor;
-
6701  {
-
6702  return token_type::value_separator;
-
6703  }
-
6704 basic_json_parser_18:
-
6705  ++m_cursor;
-
6706  {
-
6707  return token_type::name_separator;
-
6708  }
-
6709 basic_json_parser_20:
-
6710  yyaccept = 0;
-
6711  yych = *(m_marker = ++m_cursor);
-
6712  if (yych == 'u')
-
6713  {
-
6714  goto basic_json_parser_60;
-
6715  }
-
6716  goto basic_json_parser_7;
-
6717 basic_json_parser_21:
-
6718  yyaccept = 0;
-
6719  yych = *(m_marker = ++m_cursor);
-
6720  if (yych == 'r')
-
6721  {
-
6722  goto basic_json_parser_56;
-
6723  }
-
6724  goto basic_json_parser_7;
-
6725 basic_json_parser_22:
-
6726  yyaccept = 0;
-
6727  yych = *(m_marker = ++m_cursor);
-
6728  if (yych == 'a')
-
6729  {
-
6730  goto basic_json_parser_51;
-
6731  }
-
6732  goto basic_json_parser_7;
-
6733 basic_json_parser_23:
-
6734  yych = *++m_cursor;
-
6735  if (yych <= '/')
-
6736  {
-
6737  goto basic_json_parser_7;
-
6738  }
-
6739  if (yych <= '0')
+
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;
+
6710  {
+
6711  return token_type::name_separator;
+
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')
+
6725  {
+
6726  goto basic_json_parser_56;
+
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 <= '/')
6740  {
-
6741  goto basic_json_parser_50;
+
6741  goto basic_json_parser_7;
6742  }
-
6743  if (yych <= '9')
+
6743  if (yych <= '0')
6744  {
-
6745  goto basic_json_parser_41;
+
6745  goto basic_json_parser_50;
6746  }
-
6747  goto basic_json_parser_7;
-
6748 basic_json_parser_24:
-
6749  yyaccept = 1;
-
6750  yych = *(m_marker = ++m_cursor);
-
6751  if (yych <= 'D')
-
6752  {
-
6753  if (yych == '.')
-
6754  {
-
6755  goto basic_json_parser_43;
-
6756  }
-
6757  }
-
6758  else
-
6759  {
-
6760  if (yych <= 'E')
-
6761  {
-
6762  goto basic_json_parser_44;
-
6763  }
-
6764  if (yych == 'e')
+
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
+
6763  {
+
6764  if (yych <= 'E')
6765  {
6766  goto basic_json_parser_44;
6767  }
-
6768  }
-
6769 basic_json_parser_25:
-
6770  {
-
6771  return token_type::value_number;
+
6768  if (yych == 'e')
+
6769  {
+
6770  goto basic_json_parser_44;
+
6771  }
6772  }
-
6773 basic_json_parser_26:
-
6774  yyaccept = 1;
-
6775  yych = *(m_marker = ++m_cursor);
-
6776  goto basic_json_parser_42;
-
6777 basic_json_parser_27:
-
6778  yyaccept = 0;
+
6773 basic_json_parser_25:
+
6774  {
+
6775  return token_type::value_number;
+
6776  }
+
6777 basic_json_parser_26:
+
6778  yyaccept = 1;
6779  yych = *(m_marker = ++m_cursor);
-
6780  if (yych <= 0x0F)
-
6781  {
-
6782  goto basic_json_parser_7;
-
6783  }
-
6784  goto basic_json_parser_32;
-
6785 basic_json_parser_28:
-
6786  ++m_cursor;
-
6787  {
-
6788  return token_type::end_of_input;
-
6789  }
-
6790 basic_json_parser_30:
-
6791  yych = *++m_cursor;
-
6792  goto basic_json_parser_7;
-
6793 basic_json_parser_31:
-
6794  ++m_cursor;
-
6795  if (m_limit <= m_cursor)
-
6796  {
-
6797  yyfill(); // LCOV_EXCL_LINE;
-
6798  }
-
6799  yych = *m_cursor;
-
6800 basic_json_parser_32:
-
6801  if (yybm[0 + yych] & 64)
-
6802  {
-
6803  goto basic_json_parser_31;
-
6804  }
-
6805  if (yych <= 0x0F)
+
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;
+
6802  }
+
6803  yych = *m_cursor;
+
6804 basic_json_parser_32:
+
6805  if (yybm[0 + yych] & 64)
6806  {
-
6807  goto basic_json_parser_33;
+
6807  goto basic_json_parser_31;
6808  }
-
6809  if (yych <= '"')
+
6809  if (yych <= 0x0F)
6810  {
-
6811  goto basic_json_parser_35;
+
6811  goto basic_json_parser_33;
6812  }
-
6813  goto basic_json_parser_34;
-
6814 basic_json_parser_33:
-
6815  m_cursor = m_marker;
-
6816  if (yyaccept == 0)
-
6817  {
-
6818  goto basic_json_parser_7;
-
6819  }
-
6820  else
+
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)
6821  {
-
6822  goto basic_json_parser_25;
+
6822  goto basic_json_parser_7;
6823  }
-
6824 basic_json_parser_34:
-
6825  ++m_cursor;
-
6826  if (m_limit <= m_cursor)
-
6827  {
-
6828  yyfill(); // LCOV_EXCL_LINE;
-
6829  }
-
6830  yych = *m_cursor;
-
6831  if (yych <= 'e')
-
6832  {
-
6833  if (yych <= '/')
-
6834  {
-
6835  if (yych == '"')
-
6836  {
-
6837  goto basic_json_parser_31;
-
6838  }
-
6839  if (yych <= '.')
+
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')
+
6836  {
+
6837  if (yych <= '/')
+
6838  {
+
6839  if (yych == '"')
6840  {
-
6841  goto basic_json_parser_33;
+
6841  goto basic_json_parser_31;
6842  }
-
6843  goto basic_json_parser_31;
-
6844  }
-
6845  else
-
6846  {
-
6847  if (yych <= '\\')
-
6848  {
-
6849  if (yych <= '[')
-
6850  {
-
6851  goto basic_json_parser_33;
-
6852  }
-
6853  goto basic_json_parser_31;
-
6854  }
-
6855  else
-
6856  {
-
6857  if (yych == 'b')
-
6858  {
-
6859  goto basic_json_parser_31;
-
6860  }
-
6861  goto basic_json_parser_33;
-
6862  }
-
6863  }
-
6864  }
-
6865  else
-
6866  {
-
6867  if (yych <= 'q')
-
6868  {
-
6869  if (yych <= 'f')
-
6870  {
-
6871  goto basic_json_parser_31;
-
6872  }
-
6873  if (yych == 'n')
+
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')
6874  {
6875  goto basic_json_parser_31;
6876  }
-
6877  goto basic_json_parser_33;
-
6878  }
-
6879  else
-
6880  {
-
6881  if (yych <= 's')
-
6882  {
-
6883  if (yych <= 'r')
-
6884  {
-
6885  goto basic_json_parser_31;
-
6886  }
-
6887  goto basic_json_parser_33;
-
6888  }
-
6889  else
-
6890  {
-
6891  if (yych <= 't')
-
6892  {
-
6893  goto basic_json_parser_31;
-
6894  }
-
6895  if (yych <= 'u')
+
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_37;
+
6897  goto basic_json_parser_31;
6898  }
-
6899  goto basic_json_parser_33;
-
6900  }
-
6901  }
-
6902  }
-
6903 basic_json_parser_35:
-
6904  ++m_cursor;
-
6905  {
-
6906  return token_type::value_string;
-
6907  }
-
6908 basic_json_parser_37:
-
6909  ++m_cursor;
-
6910  if (m_limit <= m_cursor)
-
6911  {
-
6912  yyfill(); // LCOV_EXCL_LINE;
-
6913  }
-
6914  yych = *m_cursor;
-
6915  if (yych <= '@')
-
6916  {
-
6917  if (yych <= '/')
-
6918  {
-
6919  goto basic_json_parser_33;
-
6920  }
-
6921  if (yych >= ':')
+
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  }
-
6926  else
-
6927  {
-
6928  if (yych <= 'F')
-
6929  {
-
6930  goto basic_json_parser_38;
-
6931  }
-
6932  if (yych <= '`')
+
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_33;
+
6934  goto basic_json_parser_38;
6935  }
-
6936  if (yych >= 'g')
+
6936  if (yych <= '`')
6937  {
6938  goto basic_json_parser_33;
6939  }
-
6940  }
-
6941 basic_json_parser_38:
-
6942  ++m_cursor;
-
6943  if (m_limit <= m_cursor)
-
6944  {
-
6945  yyfill(); // LCOV_EXCL_LINE;
-
6946  }
-
6947  yych = *m_cursor;
-
6948  if (yych <= '@')
-
6949  {
-
6950  if (yych <= '/')
-
6951  {
-
6952  goto basic_json_parser_33;
-
6953  }
-
6954  if (yych >= ':')
+
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  }
-
6959  else
-
6960  {
-
6961  if (yych <= 'F')
-
6962  {
-
6963  goto basic_json_parser_39;
-
6964  }
-
6965  if (yych <= '`')
+
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_33;
+
6967  goto basic_json_parser_39;
6968  }
-
6969  if (yych >= 'g')
+
6969  if (yych <= '`')
6970  {
6971  goto basic_json_parser_33;
6972  }
-
6973  }
-
6974 basic_json_parser_39:
-
6975  ++m_cursor;
-
6976  if (m_limit <= m_cursor)
-
6977  {
-
6978  yyfill(); // LCOV_EXCL_LINE;
-
6979  }
-
6980  yych = *m_cursor;
-
6981  if (yych <= '@')
-
6982  {
-
6983  if (yych <= '/')
-
6984  {
-
6985  goto basic_json_parser_33;
-
6986  }
-
6987  if (yych >= ':')
+
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  }
-
6992  else
-
6993  {
-
6994  if (yych <= 'F')
-
6995  {
-
6996  goto basic_json_parser_40;
-
6997  }
-
6998  if (yych <= '`')
+
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_33;
+
7000  goto basic_json_parser_40;
7001  }
-
7002  if (yych >= 'g')
+
7002  if (yych <= '`')
7003  {
7004  goto basic_json_parser_33;
7005  }
-
7006  }
-
7007 basic_json_parser_40:
-
7008  ++m_cursor;
-
7009  if (m_limit <= m_cursor)
-
7010  {
-
7011  yyfill(); // LCOV_EXCL_LINE;
-
7012  }
-
7013  yych = *m_cursor;
-
7014  if (yych <= '@')
-
7015  {
-
7016  if (yych <= '/')
-
7017  {
-
7018  goto basic_json_parser_33;
-
7019  }
-
7020  if (yych <= '9')
+
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_31;
+
7022  goto basic_json_parser_33;
7023  }
-
7024  goto basic_json_parser_33;
-
7025  }
-
7026  else
-
7027  {
-
7028  if (yych <= 'F')
-
7029  {
-
7030  goto basic_json_parser_31;
-
7031  }
-
7032  if (yych <= '`')
+
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')
7033  {
-
7034  goto basic_json_parser_33;
+
7034  goto basic_json_parser_31;
7035  }
-
7036  if (yych <= 'f')
+
7036  if (yych <= '`')
7037  {
-
7038  goto basic_json_parser_31;
+
7038  goto basic_json_parser_33;
7039  }
-
7040  goto basic_json_parser_33;
-
7041  }
-
7042 basic_json_parser_41:
-
7043  yyaccept = 1;
-
7044  m_marker = ++m_cursor;
-
7045  if ((m_limit - m_cursor) < 3)
-
7046  {
-
7047  yyfill(); // LCOV_EXCL_LINE;
-
7048  }
-
7049  yych = *m_cursor;
-
7050 basic_json_parser_42:
-
7051  if (yybm[0 + yych] & 128)
-
7052  {
-
7053  goto basic_json_parser_41;
-
7054  }
-
7055  if (yych <= 'D')
+
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  if (yych != '.')
-
7058  {
-
7059  goto basic_json_parser_25;
-
7060  }
-
7061  }
-
7062  else
-
7063  {
-
7064  if (yych <= 'E')
-
7065  {
-
7066  goto basic_json_parser_44;
-
7067  }
-
7068  if (yych == 'e')
+
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  goto basic_json_parser_25;
-
7073  }
-
7074 basic_json_parser_43:
-
7075  yych = *++m_cursor;
-
7076  if (yych <= '/')
-
7077  {
-
7078  goto basic_json_parser_33;
-
7079  }
-
7080  if (yych <= '9')
+
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_48;
+
7082  goto basic_json_parser_33;
7083  }
-
7084  goto basic_json_parser_33;
-
7085 basic_json_parser_44:
-
7086  yych = *++m_cursor;
-
7087  if (yych <= ',')
-
7088  {
-
7089  if (yych != '+')
-
7090  {
-
7091  goto basic_json_parser_33;
-
7092  }
-
7093  }
-
7094  else
-
7095  {
-
7096  if (yych <= '-')
-
7097  {
-
7098  goto basic_json_parser_45;
-
7099  }
-
7100  if (yych <= '/')
+
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_33;
+
7102  goto basic_json_parser_45;
7103  }
-
7104  if (yych <= '9')
+
7104  if (yych <= '/')
7105  {
-
7106  goto basic_json_parser_46;
+
7106  goto basic_json_parser_33;
7107  }
-
7108  goto basic_json_parser_33;
-
7109  }
-
7110 basic_json_parser_45:
-
7111  yych = *++m_cursor;
-
7112  if (yych <= '/')
-
7113  {
-
7114  goto basic_json_parser_33;
-
7115  }
-
7116  if (yych >= ':')
+
7108  if (yych <= '9')
+
7109  {
+
7110  goto basic_json_parser_46;
+
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 basic_json_parser_46:
-
7121  ++m_cursor;
-
7122  if (m_limit <= m_cursor)
-
7123  {
-
7124  yyfill(); // LCOV_EXCL_LINE;
-
7125  }
-
7126  yych = *m_cursor;
-
7127  if (yych <= '/')
-
7128  {
-
7129  goto basic_json_parser_25;
-
7130  }
-
7131  if (yych <= '9')
+
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_46;
+
7133  goto basic_json_parser_25;
7134  }
-
7135  goto basic_json_parser_25;
-
7136 basic_json_parser_48:
-
7137  yyaccept = 1;
-
7138  m_marker = ++m_cursor;
-
7139  if ((m_limit - m_cursor) < 3)
-
7140  {
-
7141  yyfill(); // LCOV_EXCL_LINE;
-
7142  }
-
7143  yych = *m_cursor;
-
7144  if (yych <= 'D')
-
7145  {
-
7146  if (yych <= '/')
-
7147  {
-
7148  goto basic_json_parser_25;
-
7149  }
-
7150  if (yych <= '9')
+
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_48;
+
7152  goto basic_json_parser_25;
7153  }
-
7154  goto basic_json_parser_25;
-
7155  }
-
7156  else
-
7157  {
-
7158  if (yych <= 'E')
-
7159  {
-
7160  goto basic_json_parser_44;
-
7161  }
-
7162  if (yych == 'e')
+
7154  if (yych <= '9')
+
7155  {
+
7156  goto basic_json_parser_48;
+
7157  }
+
7158  goto basic_json_parser_25;
+
7159  }
+
7160  else
+
7161  {
+
7162  if (yych <= 'E')
7163  {
7164  goto basic_json_parser_44;
7165  }
-
7166  goto basic_json_parser_25;
-
7167  }
-
7168 basic_json_parser_50:
-
7169  yyaccept = 1;
-
7170  yych = *(m_marker = ++m_cursor);
-
7171  if (yych <= 'D')
-
7172  {
-
7173  if (yych == '.')
-
7174  {
-
7175  goto basic_json_parser_43;
-
7176  }
-
7177  goto basic_json_parser_25;
-
7178  }
-
7179  else
-
7180  {
-
7181  if (yych <= 'E')
-
7182  {
-
7183  goto basic_json_parser_44;
-
7184  }
-
7185  if (yych == 'e')
+
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  goto basic_json_parser_25;
-
7190  }
-
7191 basic_json_parser_51:
-
7192  yych = *++m_cursor;
-
7193  if (yych != 'l')
-
7194  {
-
7195  goto basic_json_parser_33;
-
7196  }
-
7197  yych = *++m_cursor;
-
7198  if (yych != 's')
-
7199  {
-
7200  goto basic_json_parser_33;
-
7201  }
-
7202  yych = *++m_cursor;
-
7203  if (yych != 'e')
-
7204  {
-
7205  goto basic_json_parser_33;
-
7206  }
-
7207  ++m_cursor;
+
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  return token_type::literal_false;
+
7209  goto basic_json_parser_33;
7210  }
-
7211 basic_json_parser_56:
-
7212  yych = *++m_cursor;
-
7213  if (yych != 'u')
-
7214  {
-
7215  goto basic_json_parser_33;
-
7216  }
-
7217  yych = *++m_cursor;
-
7218  if (yych != 'e')
-
7219  {
-
7220  goto basic_json_parser_33;
-
7221  }
-
7222  ++m_cursor;
+
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  return token_type::literal_true;
+
7224  goto basic_json_parser_33;
7225  }
-
7226 basic_json_parser_60:
-
7227  yych = *++m_cursor;
-
7228  if (yych != 'l')
-
7229  {
-
7230  goto basic_json_parser_33;
-
7231  }
-
7232  yych = *++m_cursor;
-
7233  if (yych != 'l')
-
7234  {
-
7235  goto basic_json_parser_33;
-
7236  }
-
7237  ++m_cursor;
+
7226  ++m_cursor;
+
7227  {
+
7228  return token_type::literal_true;
+
7229  }
+
7230 basic_json_parser_60:
+
7231  yych = *++m_cursor;
+
7232  if (yych != 'l')
+
7233  {
+
7234  goto basic_json_parser_33;
+
7235  }
+
7236  yych = *++m_cursor;
+
7237  if (yych != 'l')
7238  {
-
7239  return token_type::literal_null;
+
7239  goto basic_json_parser_33;
7240  }
-
7241 basic_json_parser_64:
-
7242  yych = *++m_cursor;
-
7243  if (yych != 0xBF)
-
7244  {
-
7245  goto basic_json_parser_33;
-
7246  }
-
7247  ++m_cursor;
+
7241  ++m_cursor;
+
7242  {
+
7243  return token_type::literal_null;
+
7244  }
+
7245 basic_json_parser_64:
+
7246  yych = *++m_cursor;
+
7247  if (yych != 0xBF)
7248  {
-
7249  return scan();
+
7249  goto basic_json_parser_33;
7250  }
-
7251  }
-
7252 
-
7253 
-
7254  }
-
7255 
-
7257  void yyfill() noexcept
-
7258  {
-
7259  if (not m_stream or not * m_stream)
-
7260  {
-
7261  return;
-
7262  }
-
7263 
-
7264  const ssize_t offset_start = m_start - m_content;
-
7265  const ssize_t offset_marker = m_marker - m_start;
-
7266  const ssize_t offset_cursor = m_cursor - m_start;
+
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  m_buffer.erase(0, static_cast<size_t>(offset_start));
-
7269  std::string line;
-
7270  std::getline(*m_stream, line);
-
7271  m_buffer += "\n" + line; // add line with newline symbol
-
7272 
-
7273  m_content = reinterpret_cast<const lexer_char_t*>(m_buffer.c_str());
-
7274  m_start = m_content;
-
7275  m_marker = m_start + offset_marker;
-
7276  m_cursor = m_start + offset_cursor;
-
7277  m_limit = m_start + m_buffer.size() - 1;
-
7278  }
-
7279 
-
7281  string_t get_token() const noexcept
-
7282  {
-
7283  return string_t(reinterpret_cast<typename string_t::const_pointer>(m_start),
-
7284  static_cast<size_t>(m_cursor - m_start));
-
7285  }
-
7286 
-
7308  string_t get_string() const
-
7309  {
-
7310  string_t result;
-
7311  result.reserve(static_cast<size_t>(m_cursor - m_start - 2));
-
7312 
-
7313  // iterate the result between the quotes
-
7314  for (const lexer_char_t* i = m_start + 1; i < m_cursor - 1; ++i)
-
7315  {
-
7316  // process escaped characters
-
7317  if (*i == '\\')
-
7318  {
-
7319  // read next character
-
7320  ++i;
-
7321 
-
7322  switch (*i)
-
7323  {
-
7324  // the default escapes
-
7325  case 't':
-
7326  {
-
7327  result += "\t";
-
7328  break;
-
7329  }
-
7330  case 'b':
-
7331  {
-
7332  result += "\b";
-
7333  break;
-
7334  }
-
7335  case 'f':
-
7336  {
-
7337  result += "\f";
-
7338  break;
-
7339  }
-
7340  case 'n':
-
7341  {
-
7342  result += "\n";
-
7343  break;
-
7344  }
-
7345  case 'r':
-
7346  {
-
7347  result += "\r";
-
7348  break;
-
7349  }
-
7350  case '\\':
-
7351  {
-
7352  result += "\\";
-
7353  break;
-
7354  }
-
7355  case '/':
-
7356  {
-
7357  result += "/";
-
7358  break;
-
7359  }
-
7360  case '"':
-
7361  {
-
7362  result += "\"";
-
7363  break;
-
7364  }
-
7365 
-
7366  // unicode
-
7367  case 'u':
-
7368  {
-
7369  // get code xxxx from uxxxx
-
7370  auto codepoint = std::strtoul(std::string(reinterpret_cast<typename string_t::const_pointer>(i + 1),
-
7371  4).c_str(), nullptr, 16);
-
7372 
-
7373  // check if codepoint is a high surrogate
-
7374  if (codepoint >= 0xD800 and codepoint <= 0xDBFF)
-
7375  {
-
7376  // make sure there is a subsequent unicode
-
7377  if ((i + 6 >= m_limit) or * (i + 5) != '\\' or * (i + 6) != 'u')
-
7378  {
-
7379  throw std::invalid_argument("missing low surrogate");
-
7380  }
-
7381 
-
7382  // get code yyyy from uxxxx\uyyyy
-
7383  auto codepoint2 = std::strtoul(std::string(reinterpret_cast<typename string_t::const_pointer>
-
7384  (i + 7), 4).c_str(), nullptr, 16);
-
7385  result += to_unicode(codepoint, codepoint2);
-
7386  // skip the next 10 characters (xxxx\uyyyy)
-
7387  i += 10;
-
7388  }
-
7389  else
-
7390  {
-
7391  // add unicode character(s)
-
7392  result += to_unicode(codepoint);
-
7393  // skip the next four characters (xxxx)
-
7394  i += 4;
-
7395  }
-
7396  break;
-
7397  }
-
7398  }
-
7399  }
-
7400  else
-
7401  {
-
7402  // all other characters are just copied to the end of the
-
7403  // string
-
7404  result.append(1, static_cast<typename string_t::value_type>(*i));
-
7405  }
-
7406  }
-
7407 
-
7408  return result;
-
7409  }
-
7410 
-
7428  long double get_number() const
-
7429  {
-
7430  // conversion
-
7431  typename string_t::value_type* endptr;
-
7432  const auto float_val = std::strtold(reinterpret_cast<typename string_t::const_pointer>(m_start),
-
7433  &endptr);
-
7434 
-
7435  // return float_val if the whole number was translated and NAN
-
7436  // otherwise
-
7437  return (reinterpret_cast<lexer_char_t*>(endptr) == m_cursor) ? float_val : NAN;
-
7438  }
-
7439 
-
7440  private:
-
7442  std::istream* m_stream;
-
7444  string_t m_buffer;
-
7446  const lexer_char_t* m_content = nullptr;
-
7448  const lexer_char_t* m_start = nullptr;
-
7450  const lexer_char_t* m_marker = nullptr;
-
7452  const lexer_char_t* m_cursor = nullptr;
-
7454  const lexer_char_t* m_limit = nullptr;
-
7455  };
-
7456 
-
7462  class parser
-
7463  {
-
7464  public:
-
7466  parser(const string_t& s, parser_callback_t cb = nullptr)
-
7467  : callback(cb), m_lexer(s)
-
7468  {
-
7469  // read first token
-
7470  get_token();
-
7471  }
-
7472 
-
7474  parser(std::istream& _is, parser_callback_t cb = nullptr)
-
7475  : callback(cb), m_lexer(&_is)
-
7476  {
-
7477  // read first token
-
7478  get_token();
-
7479  }
-
7480 
-
7482  basic_json parse()
-
7483  {
-
7484  basic_json result = parse_internal(true);
-
7485 
-
7486  expect(lexer::token_type::end_of_input);
-
7487 
-
7488  // return parser result and replace it with null in case the
-
7489  // top-level value was discarded by the callback function
-
7490  return result.is_discarded() ? basic_json() : result;
-
7491  }
-
7492 
-
7493  private:
-
7495  basic_json parse_internal(bool keep)
-
7496  {
-
7497  auto result = basic_json(value_t::discarded);
-
7498 
-
7499  switch (last_token)
-
7500  {
-
7501  case lexer::token_type::begin_object:
-
7502  {
-
7503  if (keep and (not callback or (keep = callback(depth++, parse_event_t::object_start, result))))
-
7504  {
-
7505  // explicitly set result to object to cope with {}
-
7506  result.m_type = value_t::object;
-
7507  result.m_value = json_value(value_t::object);
-
7508  }
-
7509 
-
7510  // read next token
-
7511  get_token();
-
7512 
-
7513  // closing } -> we are done
-
7514  if (last_token == lexer::token_type::end_object)
-
7515  {
-
7516  get_token();
-
7517  if (keep and callback and not callback(--depth, parse_event_t::object_end, result))
-
7518  {
-
7519  result = basic_json(value_t::discarded);
-
7520  }
-
7521  return result;
-
7522  }
-
7523 
-
7524  // no comma is expected here
-
7525  unexpect(lexer::token_type::value_separator);
-
7526 
-
7527  // otherwise: parse key-value pairs
-
7528  do
-
7529  {
-
7530  // ugly, but could be fixed with loop reorganization
-
7531  if (last_token == lexer::token_type::value_separator)
-
7532  {
-
7533  get_token();
-
7534  }
-
7535 
-
7536  // store key
-
7537  expect(lexer::token_type::value_string);
-
7538  const auto key = m_lexer.get_string();
+
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 '/':
+
7360  {
+
7361  result += "/";
+
7362  break;
+
7363  }
+
7364  case '"':
+
7365  {
+
7366  result += "\"";
+
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  bool keep_tag = false;
-
7541  if (keep)
-
7542  {
-
7543  if (callback)
-
7544  {
-
7545  basic_json k(key);
-
7546  keep_tag = callback(depth, parse_event_t::key, k);
-
7547  }
-
7548  else
-
7549  {
-
7550  keep_tag = true;
+
7540  // store key
+
7541  expect(lexer::token_type::value_string);
+
7542  const auto key = m_lexer.get_string();
+
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  }
-
7553 
-
7554  // parse separator (:)
-
7555  get_token();
-
7556  expect(lexer::token_type::name_separator);
+
7552  else
+
7553  {
+
7554  keep_tag = true;
+
7555  }
+
7556  }
7557 
-
7558  // parse and add value
+
7558  // parse separator (:)
7559  get_token();
-
7560  auto value = parse_internal(keep);
-
7561  if (keep and keep_tag and not value.is_discarded())
-
7562  {
-
7563  result[key] = std::move(value);
-
7564  }
-
7565  }
-
7566  while (last_token == lexer::token_type::value_separator);
-
7567 
-
7568  // closing }
-
7569  expect(lexer::token_type::end_object);
-
7570  get_token();
-
7571  if (keep and callback and not callback(--depth, parse_event_t::object_end, result))
-
7572  {
-
7573  result = basic_json(value_t::discarded);
-
7574  }
-
7575 
-
7576  return result;
-
7577  }
-
7578 
-
7579  case lexer::token_type::begin_array:
-
7580  {
-
7581  if (keep and (not callback or (keep = callback(depth++, parse_event_t::array_start, result))))
-
7582  {
-
7583  // explicitly set result to object to cope with []
-
7584  result.m_type = value_t::array;
-
7585  result.m_value = json_value(value_t::array);
-
7586  }
-
7587 
-
7588  // read next token
-
7589  get_token();
-
7590 
-
7591  // closing ] -> we are done
-
7592  if (last_token == lexer::token_type::end_array)
-
7593  {
-
7594  get_token();
-
7595  if (callback and not callback(--depth, parse_event_t::array_end, result))
-
7596  {
-
7597  result = basic_json(value_t::discarded);
-
7598  }
-
7599  return result;
-
7600  }
-
7601 
-
7602  // no comma is expected here
-
7603  unexpect(lexer::token_type::value_separator);
-
7604 
-
7605  // otherwise: parse values
-
7606  do
-
7607  {
-
7608  // ugly, but could be fixed with loop reorganization
-
7609  if (last_token == lexer::token_type::value_separator)
-
7610  {
-
7611  get_token();
-
7612  }
-
7613 
-
7614  // parse value
-
7615  auto value = parse_internal(keep);
-
7616  if (keep and not value.is_discarded())
-
7617  {
-
7618  result.push_back(std::move(value));
-
7619  }
-
7620  }
-
7621  while (last_token == lexer::token_type::value_separator);
-
7622 
-
7623  // closing ]
-
7624  expect(lexer::token_type::end_array);
-
7625  get_token();
-
7626  if (keep and callback and not callback(--depth, parse_event_t::array_end, result))
-
7627  {
-
7628  result = basic_json(value_t::discarded);
-
7629  }
-
7630 
-
7631  return result;
-
7632  }
-
7633 
-
7634  case lexer::token_type::literal_null:
-
7635  {
-
7636  get_token();
-
7637  result.m_type = value_t::null;
-
7638  break;
-
7639  }
-
7640 
-
7641  case lexer::token_type::value_string:
-
7642  {
-
7643  const auto s = m_lexer.get_string();
-
7644  get_token();
-
7645  result = basic_json(s);
-
7646  break;
-
7647  }
-
7648 
-
7649  case lexer::token_type::literal_true:
-
7650  {
-
7651  get_token();
-
7652  result.m_type = value_t::boolean;
-
7653  result.m_value = true;
-
7654  break;
-
7655  }
-
7656 
-
7657  case lexer::token_type::literal_false:
-
7658  {
-
7659  get_token();
-
7660  result.m_type = value_t::boolean;
-
7661  result.m_value = false;
-
7662  break;
-
7663  }
-
7664 
-
7665  case lexer::token_type::value_number:
-
7666  {
-
7667  auto float_val = m_lexer.get_number();
+
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())
+
7566  {
+
7567  result[key] = std::move(value);
+
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  }
+
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  // NAN is returned if token could not be translated
-
7670  // completely
-
7671  if (std::isnan(float_val))
-
7672  {
-
7673  throw std::invalid_argument(std::string("parse error - ") +
-
7674  m_lexer.get_token() + " is not a number");
-
7675  }
-
7676 
-
7677  get_token();
-
7678 
-
7679  // check if conversion loses precision
-
7680  const auto int_val = static_cast<number_integer_t>(float_val);
-
7681  if (approx(float_val, static_cast<long double>(int_val)))
-
7682  {
-
7683  // we would not lose precision -> return int
-
7684  result.m_type = value_t::number_integer;
-
7685  result.m_value = int_val;
-
7686  }
-
7687  else
-
7688  {
-
7689  // we would lose precision -> return float
-
7690  result.m_type = value_t::number_float;
-
7691  result.m_value = static_cast<number_float_t>(float_val);
-
7692  }
-
7693  break;
-
7694  }
-
7695 
-
7696  default:
-
7697  {
-
7698  // the last token was unexpected
-
7699  unexpect(last_token);
-
7700  }
-
7701  }
-
7702 
-
7703  if (keep and callback and not callback(depth, parse_event_t::value, result))
-
7704  {
-
7705  result = basic_json(value_t::discarded);
-
7706  }
-
7707  return result;
-
7708  }
-
7709 
-
7711  typename lexer::token_type get_token()
-
7712  {
-
7713  last_token = m_lexer.scan();
-
7714  return last_token;
-
7715  }
-
7716 
-
7717  void expect(typename lexer::token_type t) const
-
7718  {
-
7719  if (t != last_token)
-
7720  {
-
7721  std::string error_msg = "parse error - unexpected \'";
-
7722  error_msg += m_lexer.get_token();
-
7723  error_msg += "\' (" + lexer::token_type_name(last_token);
-
7724  error_msg += "); expected " + lexer::token_type_name(t);
-
7725  throw std::invalid_argument(error_msg);
-
7726  }
-
7727  }
-
7728 
-
7729  void unexpect(typename lexer::token_type t) const
-
7730  {
-
7731  if (t == last_token)
-
7732  {
-
7733  std::string error_msg = "parse error - unexpected \'";
-
7734  error_msg += m_lexer.get_token();
-
7735  error_msg += "\' (";
-
7736  error_msg += lexer::token_type_name(last_token) + ")";
-
7737  throw std::invalid_argument(error_msg);
-
7738  }
-
7739  }
-
7740 
-
7741  private:
-
7743  int depth = 0;
-
7745  parser_callback_t callback;
-
7747  typename lexer::token_type last_token = lexer::token_type::uninitialized;
-
7749  lexer m_lexer;
-
7750  };
-
7751 };
-
7752 
-
7753 
-
7755 // presets //
-
7757 
- -
7767 }
-
7768 
-
7769 
-
7771 // nonmember functions //
-
7773 
-
7774 // specialization of std::swap, and std::hash
-
7775 namespace std
-
7776 {
-
7782 template <>
-
7783 inline void swap(nlohmann::json& j1,
-
7784  nlohmann::json& j2) noexcept(
-
7785  is_nothrow_move_constructible<nlohmann::json>::value and
-
7786  is_nothrow_move_assignable<nlohmann::json>::value
-
7787  )
-
7788 {
-
7789  j1.swap(j2);
-
7790 }
-
7791 
-
7793 template <>
-
7794 struct hash<nlohmann::json>
-
7795 {
-
7801  std::size_t operator()(const nlohmann::json& j) const
-
7802  {
-
7803  // a naive hashing via the string representation
-
7804  const auto& h = hash<nlohmann::json::string_t>();
-
7805  return h(j.dump());
-
7806  }
-
7807 };
-
7808 }
-
7809 
-
7822 inline nlohmann::json operator "" _json(const char* s, std::size_t)
-
7823 {
-
7824  return nlohmann::json::parse(reinterpret_cast<nlohmann::json::string_t::value_type*>
-
7825  (const_cast<char*>(s)));
-
7826 }
-
7827 
-
7828 #endif
+
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();
+
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 
+
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
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:5732
-
iterator insert(const_iterator pos, basic_json &&val)
inserts element
Definition: json.hpp:4208
-
iterator operator++(int)
post-increment (it++)
Definition: json.hpp:5969
-
friend bool operator<=(const_reference lhs, const_reference rhs) noexcept
comparison: less than or equal
Definition: json.hpp:4757
+
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
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:6121
+
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:5434
-
static iteration_proxy< iterator > iterator_wrapper(reference cont)
wrapper to access iterator member functions in range-based for
Definition: json.hpp:6260
-
const_iterator & operator--()
pre-decrement (–it)
Definition: json.hpp:5677
-
friend std::istream & operator>>(std::istream &i, basic_json &j)
deserialize from stream
Definition: json.hpp:4970
-
const_iterator & operator=(const_iterator other) noexcept( std::is_nothrow_move_constructible< pointer >::value and std::is_nothrow_move_assignable< pointer >::value and std::is_nothrow_move_constructible< internal_iterator >::value and std::is_nothrow_move_assignable< internal_iterator >::value )
copy assignment
Definition: json.hpp:5499
-
typename basic_json::value_type value_type
the type of the values when the iterator is dereferenced
Definition: json.hpp:5430
+
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:4283
-
iterator insert(const_iterator pos, size_type cnt, const basic_json &val)
inserts elements
Definition: json.hpp:4235
-
json_reverse_iterator operator--(int)
post-decrement (it–)
Definition: json.hpp:6093
+
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
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:4133
+
void push_back(const typename object_t::value_type &val)
add an object to an object
Definition: json.hpp:4159
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:5977
-
friend bool operator!=(const_reference lhs, const_reference rhs) noexcept
comparison: not equal
Definition: json.hpp:4635
+
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
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:5642
-
difference_type operator-(const json_reverse_iterator &other) const
return difference
Definition: json.hpp:6129
-
basic_json<> json
default JSON class
Definition: json.hpp:7766
+
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:6068
-
json_reverse_iterator(const typename base_iterator::iterator_type &it)
create reverse iterator from iterator
Definition: json.hpp:6073
+
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
a class to store JSON values
Definition: json.hpp:187
-
json_reverse_iterator & operator--()
pre-decrement (–it)
Definition: json.hpp:6099
+
json_reverse_iterator & operator--()
pre-decrement (–it)
Definition: json.hpp:6125
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:4614
-
void push_back(basic_json &&val)
add an object to an array
Definition: json.hpp:4049
+
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:5999
+
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
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:5928
-
reference operator+=(basic_json &&val)
add an object to an array
Definition: json.hpp:4074
+
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:5925
-
iterator & operator-=(difference_type i)
subtract from iterator
Definition: json.hpp:6006
-
static basic_json parse(std::istream &&i, parser_callback_t cb=nullptr)
deserialize from stream
Definition: json.hpp:4932
+
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
STL namespace.
-
difference_type operator-(const iterator &other) const
Definition: json.hpp:6028
-
reference value() const
return the value of an iterator
Definition: json.hpp:5901
-
static iteration_proxy< const_iterator > iterator_wrapper(const_reference cont)
wrapper to access iterator member functions in range-based for
Definition: json.hpp:6268
+
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:5494
+
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:5888
+
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
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:5957
+
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:5824
+
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
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:5436
+
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:4107
+
reference operator+=(const basic_json &val)
add an object to an array
Definition: json.hpp:4133
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:6013
+
iterator operator+(difference_type i)
add to iterator
Definition: json.hpp:6039
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
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:4801
-
iterator & operator--()
pre-decrement (–it)
Definition: json.hpp:5992
-
friend bool operator<(const_reference lhs, const_reference rhs) noexcept
comparison: less than
Definition: json.hpp:4696
-
pointer operator->() const
dereference the iterator
Definition: json.hpp:5605
+
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
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:6070
-
size_type size() const noexcept
returns the number of elements
Definition: json.hpp:3866
+
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
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
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:6077
+
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:4856
+
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:6141
+
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
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:5432
-
void swap(array_t &other)
exchanges the values
Definition: json.hpp:4404
+
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:4156
+
reference operator+=(const typename object_t::value_type &val)
add an object to an object
Definition: json.hpp:4182
-
reference operator[](difference_type n) const
access to successor
Definition: json.hpp:6034
+
reference operator[](difference_type n) const
access to successor
Definition: json.hpp:6060
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:5816
+
const_iterator operator+(difference_type i)
add to iterator
Definition: json.hpp:5842
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:4468
-
reference value() const
return the value of an iterator
Definition: json.hpp:6040
-
const_iterator operator--(int)
post-decrement (it–)
Definition: json.hpp:5669
+
void 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:3983
-
pointer operator->()
dereference the iterator
Definition: json.hpp:5963
+
void clear() noexcept
clears the contents
Definition: json.hpp:4009
+
pointer operator->()
dereference the iterator
Definition: json.hpp:5989
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:5778
-
iterator insert(const_iterator pos, std::initializer_list< basic_json > ilist)
inserts elements
Definition: json.hpp:4337
+
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
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:5784
+
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:5832
-
friend bool operator==(const_reference lhs, const_reference rhs) noexcept
comparison: equal
Definition: json.hpp:4547
+
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
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
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:3809
+
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:4374
+
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
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:6148
+
reference value() const
return the value of an iterator
Definition: json.hpp:6174
-
const_iterator(pointer object)
constructor for a given JSON instance
Definition: json.hpp:5444
-
friend bool operator<(const value_t lhs, const value_t rhs)
comparison operator for JSON types
Definition: json.hpp:4501
-
iterator(pointer object) noexcept
constructor for a given JSON instance
Definition: json.hpp:5936
-
bool operator<(const const_iterator &other) const
comparison: smaller
Definition: json.hpp:5738
+
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:4658
-
const_iterator & operator-=(difference_type i)
subtract from iterator
Definition: json.hpp:5810
+
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
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:4895
+
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:6080
+
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
-
const_iterator(const iterator &other)
copy constructor given a nonconst iterator
Definition: json.hpp:5469
-
friend bool operator!=(std::nullptr_t, const_reference v) noexcept
comparison: not equal
Definition: json.hpp:4667
+
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:5766
+
bool operator<=(const const_iterator &other) const
comparison: less than or equal
Definition: json.hpp:5792
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
the parser read { and started to process a JSON object
-
const_iterator operator++(int)
post-increment (it++)
Definition: json.hpp:5634
+
const_iterator operator++(int)
post-increment (it++)
Definition: json.hpp:5660
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:5940
+
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:4924
+
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:3926
-
void push_back(const basic_json &val)
add an object to an array
Definition: json.hpp:4084
-
bool operator==(const const_iterator &other) const
comparison: equal
Definition: json.hpp:5704
-
json_reverse_iterator & operator++()
pre-increment (++it)
Definition: json.hpp:6086
-
bool operator>(const const_iterator &other) const
comparison: greater than
Definition: json.hpp:5772
-
friend bool operator>(const_reference lhs, const_reference rhs) noexcept
comparison: greater than
Definition: json.hpp:4779
+
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:6106
-
a const random access iterator for the basic_json class
Definition: json.hpp:5423
+
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
a template for a reverse iterator class
Definition: json.hpp:232
-
void swap(object_t &other)
exchanges the values
Definition: json.hpp:4436
-
std::bidirectional_iterator_tag iterator_category
the category of the iterator
Definition: json.hpp:5438
+
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:4182
-
friend bool operator==(const_reference v, std::nullptr_t) noexcept
comparison: equal
Definition: json.hpp:4605
+
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
-
reference operator[](difference_type n) const
access to successor
Definition: json.hpp:6135
+
reference operator[](difference_type n) const
access to successor
Definition: json.hpp:6161
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:5854
-
reference operator*() const
return a reference to the value pointed to by the iterator
Definition: json.hpp:5571
+
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
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:4960
+
friend std::istream & operator<<(basic_json &j, std::istream &i)
deserialize from stream
Definition: json.hpp:4986
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:7801
-
friend std::ostream & operator<<(std::ostream &o, const basic_json &j)
serialize to stream
Definition: json.hpp:4838
-
iterator & operator=(iterator other) noexcept( std::is_nothrow_move_constructible< pointer >::value and std::is_nothrow_move_assignable< pointer >::value and std::is_nothrow_move_constructible< internal_iterator >::value and std::is_nothrow_move_assignable< internal_iterator >::value )
copy assignment
Definition: json.hpp:5945
+
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
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:5984
-
json_reverse_iterator operator+(difference_type i) const
add to iterator
Definition: json.hpp:6113
+
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
parse_event_t
JSON callback events.
Definition: json.hpp:754
-
iterator operator-(difference_type i)
subtract from iterator
Definition: json.hpp:6021
+
iterator operator-(difference_type i)
subtract from iterator
Definition: json.hpp:6047
diff --git a/namespacemembers.html b/namespacemembers.html index 693223563..0d9910e6c 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 f68731af3..09aa7473d 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 cc1139c2d..9eda0b7a9 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 13253af98..ba1312ba3 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 1039183ee..cea4e1079 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 7766 of file json.hpp.

+

Definition at line 7770 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 74678d98f..0c8a339c4 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 95422c9cd..308b2d54d 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 7794 of file json.hpp.

+

Definition at line 7798 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 17a15e5ba..88aa33adf 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 7801 of file json.hpp.

+

Definition at line 7805 of file json.hpp.

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