TerraForge3D  2.3.1
3D Terrain And Landscape Generator

◆ operator>> [2/2]

template<template< typename U, typename V, typename... Args > class ObjectType = std::map, template< typename U, typename... Args > class ArrayType = std::vector, class StringType = std::string, class BooleanType = bool, class NumberIntegerType = std::int64_t, class NumberUnsignedType = std::uint64_t, class NumberFloatType = double, template< typename U > class AllocatorType = std::allocator, template< typename T, typename SFINAE=void > class JSONSerializer = adl_serializer, class BinaryType = std::vector<std::uint8_t>>
std::istream & operator>> ( std::istream &  i,
basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType > &  j 
)
friend

deserialize from stream

Deserializes an input stream to a JSON value.

Parameters
[in,out]iinput stream to read a serialized JSON value from
[in,out]jJSON value to write the deserialized input to
Exceptions
parse_error.101in case of an unexpected token
parse_error.102if to_unicode fails or surrogate error
parse_error.103if to_unicode fails

@complexity Linear in the length of the input. The parser is a predictive LL(1) parser.

Note
A UTF-8 byte order mark is silently ignored.

@liveexample{The example below shows how a JSON value is constructed by reading a serialization from a stream.,operator_deserialize}

See also
parse(std::istream&, const parser_callback_t) for a variant with a parser callback function to filter values while parsing
Since
version 1.0.0

Definition at line 24839 of file json.hpp.

24840 {
24841 parser(detail::input_adapter(i)).parse(false, j);
24842 return i;
24843 }