@@ -262,6 +262,7 @@ json.exception.out_of_range.403 | key 'foo' not found | The provided key was not
...
@@ -262,6 +262,7 @@ json.exception.out_of_range.403 | key 'foo' not found | The provided key was not
json.exception.out_of_range.404 | unresolved reference token 'foo' | A reference token in a JSON Pointer could not be resolved.
json.exception.out_of_range.404 | unresolved reference token 'foo' | A reference token in a JSON Pointer could not be resolved.
json.exception.out_of_range.405 | JSON pointer has no parent | The JSON Patch operations 'remove' and 'add' can not be applied to the root element of the JSON value.
json.exception.out_of_range.405 | JSON pointer has no parent | The JSON Patch operations 'remove' and 'add' can not be applied to the root element of the JSON value.
json.exception.out_of_range.406 | number overflow parsing '10E1000' | A parsed number could not be stored as without changing it to NaN or INF.
json.exception.out_of_range.406 | number overflow parsing '10E1000' | A parsed number could not be stored as without changing it to NaN or INF.
json.exception.out_of_range.407 | number overflow serializing '9223372036854775808' | UBJSON only supports integers numbers up to 9223372036854775807. |
@liveexample{The following code shows how an `out_of_range` exception can be
@liveexample{The following code shows how an `out_of_range` exception can be
@@ -712,6 +712,7 @@ json.exception.out_of_range.403 | key 'foo' not found | The provided key was not
...
@@ -712,6 +712,7 @@ json.exception.out_of_range.403 | key 'foo' not found | The provided key was not
json.exception.out_of_range.404 | unresolved reference token 'foo' | A reference token in a JSON Pointer could not be resolved.
json.exception.out_of_range.404 | unresolved reference token 'foo' | A reference token in a JSON Pointer could not be resolved.
json.exception.out_of_range.405 | JSON pointer has no parent | The JSON Patch operations 'remove' and 'add' can not be applied to the root element of the JSON value.
json.exception.out_of_range.405 | JSON pointer has no parent | The JSON Patch operations 'remove' and 'add' can not be applied to the root element of the JSON value.
json.exception.out_of_range.406 | number overflow parsing '10E1000' | A parsed number could not be stored as without changing it to NaN or INF.
json.exception.out_of_range.406 | number overflow parsing '10E1000' | A parsed number could not be stored as without changing it to NaN or INF.
json.exception.out_of_range.407 | number overflow serializing '9223372036854775808' | UBJSON only supports integers numbers up to 9223372036854775807. |
@liveexample{The following code shows how an `out_of_range` exception can be
@liveexample{The following code shows how an `out_of_range` exception can be
caught.,out_of_range}
caught.,out_of_range}
...
@@ -4865,6 +4866,27 @@ class binary_reader
...
@@ -4865,6 +4866,27 @@ class binary_reader
returnres;
returnres;
}
}
/*!
@brief create a JSON value from UBJSON input
@param[in] strict whether to expect the input to be consumed completed
@return JSON value created from UBJSON input
@throw parse_error.110 if input ended unexpectedly or the end of file was
not reached when @a strict was set to true
@throw parse_error.112 if unsupported byte was read
*/
BasicJsonTypeparse_ubjson(constboolstrict)
{
constautores=parse_ubjson_internal();
if(strict)
{
get_ignore_noop();
check_eof(true);
}
returnres;
}
/*!
/*!
@brief determine system byte order
@brief determine system byte order
...
@@ -5526,6 +5548,16 @@ class binary_reader
...
@@ -5526,6 +5548,16 @@ class binary_reader
}
}
}
}
/*!
@param[in] get_char whether a new character should be retrieved from the
CHECK_THROWS_WITH(json::from_ubjson(v),"[json.exception.parse_error.113] parse error at 2: byte after 'C' must be in range 0x00..0x7F; last byte: 0x82");
CHECK_THROWS_WITH(json::from_ubjson(v),"[json.exception.parse_error.112] parse error at 4: expected '#' after UBJSON type information; last byte: 0x02");