TerraForge3D  2.3.1
3D Terrain And Landscape Generator

◆ is_discarded()

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>>
constexpr bool nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::is_discarded ( ) const
inlineconstexprnoexcept

return whether value is discarded

This function returns true if and only if the JSON value was discarded during parsing with a callback function (see parser_callback_t).

Note
This function will always be false for JSON values after parsing. That is, discarded values can only occur during parsing, but will be removed when inside a structured value or replaced by null in other cases.
Returns
true if type is discarded, false otherwise.

@complexity Constant.

@exceptionsafety No-throw guarantee: this member function never throws exceptions.

@liveexample{The following code exemplifies is_discarded() for all JSON types.,is_discarded}

Since
version 1.0.0

Definition at line 20503 of file json.hpp.

20504 {
20505 return m_type == value_t::discarded;
20506 }
@ discarded
discarded by the parser callback function