|
1 | 1 | // JsonhCpp (JSON for Humans) |
2 | | -// Version: 4.5 |
| 2 | +// Version: 4.6 |
3 | 3 | // Link: https://github.com/jsonh-org/JsonhCpp |
4 | 4 | // License: MIT |
5 | 5 |
|
@@ -29090,18 +29090,68 @@ inline void swap(nlohmann::NLOHMANN_BASIC_JSON_TPL& j1, nlohmann::NLOHMANN_BASIC |
29090 | 29090 |
|
29091 | 29091 | namespace jsonh_cpp { |
29092 | 29092 |
|
29093 | | -enum struct json_token_type { |
| 29093 | +/// <summary> |
| 29094 | +/// The types of tokens that make up a JSON document. |
| 29095 | +/// </summary> |
| 29096 | +enum struct json_token_type : char { |
| 29097 | + /// <summary> |
| 29098 | + /// Indicates that there is no value (not to be confused with <see cref="null"/>). |
| 29099 | + /// </summary> |
29094 | 29100 | none = 0, |
| 29101 | + /// <summary> |
| 29102 | + /// The start of an object.<br/> |
| 29103 | + /// Example: <c>{</c> |
| 29104 | + /// </summary> |
29095 | 29105 | start_object = 1, |
| 29106 | + /// <summary> |
| 29107 | + /// The end of an object.<br/> |
| 29108 | + /// Example: <c>}</c> |
| 29109 | + /// </summary> |
29096 | 29110 | end_object = 2, |
| 29111 | + /// <summary> |
| 29112 | + /// The start of an array.<br/> |
| 29113 | + /// Example: <c>[</c> |
| 29114 | + /// </summary> |
29097 | 29115 | start_array = 3, |
| 29116 | + /// <summary> |
| 29117 | + /// The end of an array.<br/> |
| 29118 | + /// Example: <c>]</c> |
| 29119 | + /// </summary> |
29098 | 29120 | end_array = 4, |
| 29121 | + /// <summary> |
| 29122 | + /// A property name in an object.<br/> |
| 29123 | + /// Example: <c>"key":</c> |
| 29124 | + /// </summary> |
29099 | 29125 | property_name = 5, |
| 29126 | + /// <summary> |
| 29127 | + /// A comment.<br/> |
| 29128 | + /// Example: <c>// comment</c> |
| 29129 | + /// </summary> |
29100 | 29130 | comment = 6, |
| 29131 | + /// <summary> |
| 29132 | + /// A string.<br/> |
| 29133 | + /// Example: <c>"value"</c> |
| 29134 | + /// </summary> |
29101 | 29135 | string = 7, |
| 29136 | + /// <summary> |
| 29137 | + /// A number.<br/> |
| 29138 | + /// Example: <c>10</c> |
| 29139 | + /// </summary> |
29102 | 29140 | number = 8, |
| 29141 | + /// <summary> |
| 29142 | + /// A true boolean.<br/> |
| 29143 | + /// Example: <c>true</c> |
| 29144 | + /// </summary> |
29103 | 29145 | true_bool = 9, |
| 29146 | + /// <summary> |
| 29147 | + /// A false boolean.<br/> |
| 29148 | + /// Example: <c>false</c> |
| 29149 | + /// </summary> |
29104 | 29150 | false_bool = 10, |
| 29151 | + /// <summary> |
| 29152 | + /// A null value.<br/> |
| 29153 | + /// Example: <c>null</c> |
| 29154 | + /// </summary> |
29105 | 29155 | null = 11, |
29106 | 29156 | }; |
29107 | 29157 |
|
@@ -29140,12 +29190,39 @@ struct jsonh_token { |
29140 | 29190 | /*** Start of inlined file: jsonh_reader_options.hpp ***/ |
29141 | 29191 | #pragma once |
29142 | 29192 |
|
| 29193 | + |
| 29194 | +/*** Start of inlined file: jsonh_version.hpp ***/ |
| 29195 | +#pragma once |
| 29196 | + |
29143 | 29197 | namespace jsonh_cpp { |
29144 | 29198 |
|
29145 | 29199 | /// <summary> |
29146 | | -/// Options for a jsonh_reader. |
| 29200 | +/// The major versions of the JSONH specification. |
| 29201 | +/// </summary> |
| 29202 | +enum struct jsonh_version { |
| 29203 | + /// <summary> |
| 29204 | + /// Indicates that the latest version should be used (currently <see cref="v1"/>). |
| 29205 | + /// </summary> |
| 29206 | + latest = 0, |
| 29207 | + /// <summary> |
| 29208 | + /// Version 1 of the specification, released 2025/03/19. |
| 29209 | + /// </summary> |
| 29210 | + v1 = 1, |
| 29211 | +}; |
| 29212 | + |
| 29213 | +} |
| 29214 | +/*** End of inlined file: jsonh_version.hpp ***/ |
| 29215 | + |
| 29216 | +namespace jsonh_cpp { |
| 29217 | + |
| 29218 | +/// <summary> |
| 29219 | +/// Options for a <see cref="jsonh_reader"/>. |
29147 | 29220 | /// </summary> |
29148 | 29221 | struct jsonh_reader_options { |
| 29222 | + /// <summary> |
| 29223 | + /// Specifies the major version of the JSONH specification to use. |
| 29224 | + /// </summary> |
| 29225 | + jsonh_version version = jsonh_version::latest; |
29149 | 29226 | /// <summary> |
29150 | 29227 | /// Enables/disables parsing unclosed inputs. |
29151 | 29228 | /// <code> |
|
0 commit comments