Lines Matching defs:value

32 /// @brief JSON Pointer defines a string syntax for identifying a specific value within a JSON document
131 friend json_pointer operator/(const json_pointer& lhs, string_t token) // NOLINT(performance-unnecessary-value-param)
266 @brief create and return a reference to the pointed to value
271 @throw type_error.313 if value cannot be unflattened
278 // in case no reference tokens exist, return a reference to the JSON value
279 // j which will be overwritten by a primitive value
315 token _and_ the current value is primitive. In this case, we have
317 single value; that is, with an empty list of reference tokens.
327 JSON_THROW(detail::type_error::create(313, "invalid value to unflatten", &j));
335 @brief return a reference to the pointed to value
337 @note This version does not throw if a value is not present, but tries to
339 with pointer `"/this/that"` on a null value is equivalent to calling
340 `operator[]("this").operator[]("that")` on that value, effectively
341 changing the null value to an object.
343 @param[in] ptr a JSON value
345 @return reference to the JSON value pointed to by the JSON pointer
369 // change value to array for numbers or "-" or to object otherwise
467 @brief return a const reference to the pointed to value
469 @param[in] ptr a JSON value
471 @return const reference to the JSON value pointed to by the JSON
653 // no reference token left means we found a primitive value
728 @param[in] reference_string the reference string to the current value
729 @param[in] value the value to consider
736 const BasicJsonType& value,
739 switch (value.type())
743 if (value.m_value.array->empty())
751 for (std::size_t i = 0; i < value.m_value.array->size(); ++i)
754 value.m_value.array->operator[](i), result);
762 if (value.m_value.object->empty())
770 for (const auto& element : *value.m_value.object)
788 // add primitive value with its reference string
789 result[reference_string] = value;
796 @param[in] value flattened JSON
801 @throw type_error.314 if value is not an object
803 @throw type_error.313 if value cannot be unflattened
807 unflatten(const BasicJsonType& value)
809 if (JSON_HEDLEY_UNLIKELY(!value.is_object()))
811 JSON_THROW(detail::type_error::create(314, "only objects can be unflattened", &value));
817 for (const auto& element : *value.m_value.object)
824 // assign value to reference pointed to by JSON pointer; Note that if
825 // the JSON pointer is "" (i.e., points to the whole value), function
827 // will then create a primitive value.