cJSON.h File Reference
#include <stddef.h>
Include dependency graph for cJSON.h:

Go to the source code of this file.

Classes

struct  cJSON
 
struct  cJSON_Hooks
 

Macros

#define CJSON_CDECL
 
#define CJSON_STDCALL
 
#define CJSON_PUBLIC(type)   type
 
#define CJSON_VERSION_MAJOR   1
 
#define CJSON_VERSION_MINOR   7
 
#define CJSON_VERSION_PATCH   10
 
#define cJSON_Invalid   (0)
 
#define cJSON_False   (1 << 0)
 
#define cJSON_True   (1 << 1)
 
#define cJSON_NULL   (1 << 2)
 
#define cJSON_Number   (1 << 3)
 
#define cJSON_String   (1 << 4)
 
#define cJSON_Array   (1 << 5)
 
#define cJSON_Object   (1 << 6)
 
#define cJSON_Raw   (1 << 7) /* raw json */
 
#define cJSON_IsReference   256
 
#define cJSON_StringIsConst   512
 
#define CJSON_NESTING_LIMIT   1000
 
#define cJSON_SetIntValue(object, number)   ((object) ? (object)->valueint = (object)->valuedouble = (number) : (number))
 
#define cJSON_SetNumberValue(object, number)   ((object != NULL) ? cJSON_SetNumberHelper(object, (double)number) : (number))
 
#define cJSON_ArrayForEach(element, array)   for(element = (array != NULL) ? (array)->child : NULL; element != NULL; element = element->next)
 

Typedefs

typedef struct cJSON cJSON
 
typedef struct cJSON_Hooks cJSON_Hooks
 
typedef int cJSON_bool
 

Functions

 CJSON_PUBLIC (const char *) cJSON_Version(void)
 
 CJSON_PUBLIC (void) cJSON_InitHooks(cJSON_Hooks *hooks)
 
 CJSON_PUBLIC (cJSON *) cJSON_Parse(const char *value)
 
 CJSON_PUBLIC (char *) cJSON_Print(const cJSON *item)
 
 CJSON_PUBLIC (cJSON_bool) cJSON_PrintPreallocated(cJSON *item
 
 CJSON_PUBLIC (double) cJSON_SetNumberHelper(cJSON *object
 
 CJSON_PUBLIC (void *) cJSON_malloc(size_t size)
 

Variables

const char ** return_parse_end
 
const char cJSON_bool require_null_terminated
 
int prebuffer
 
int cJSON_bool fmt
 
char * buffer
 
char const int length
 
char const int const cJSON_bool format
 
int index
 
const char *const string
 
int count
 
cJSONitem
 
int which
 
int cJSONnewitem
 
cJSON *const cJSONreplacement
 
cJSON_bool recurse
 
const cJSON *const b
 
const cJSON *const const cJSON_bool case_sensitive
 
const char *const name
 
const char *const const cJSON_bool boolean
 
const char *const const double number
 
const char *const const char *const raw
 

Macro Definition Documentation

◆ cJSON_Array

#define cJSON_Array   (1 << 5)

◆ cJSON_ArrayForEach

#define cJSON_ArrayForEach (   element,
  array 
)    for(element = (array != NULL) ? (array)->child : NULL; element != NULL; element = element->next)

◆ CJSON_CDECL

#define CJSON_CDECL

◆ cJSON_False

#define cJSON_False   (1 << 0)

◆ cJSON_Invalid

#define cJSON_Invalid   (0)

◆ cJSON_IsReference

#define cJSON_IsReference   256

◆ CJSON_NESTING_LIMIT

#define CJSON_NESTING_LIMIT   1000

◆ cJSON_NULL

#define cJSON_NULL   (1 << 2)

◆ cJSON_Number

#define cJSON_Number   (1 << 3)

◆ cJSON_Object

#define cJSON_Object   (1 << 6)

◆ CJSON_PUBLIC

#define CJSON_PUBLIC (   type)    type

◆ cJSON_Raw

#define cJSON_Raw   (1 << 7) /* raw json */

◆ cJSON_SetIntValue

#define cJSON_SetIntValue (   object,
  number 
)    ((object) ? (object)->valueint = (object)->valuedouble = (number) : (number))

◆ cJSON_SetNumberValue

#define cJSON_SetNumberValue (   object,
  number 
)    ((object != NULL) ? cJSON_SetNumberHelper(object, (double)number) : (number))

◆ CJSON_STDCALL

#define CJSON_STDCALL

◆ cJSON_String

#define cJSON_String   (1 << 4)

◆ cJSON_StringIsConst

#define cJSON_StringIsConst   512

◆ cJSON_True

#define cJSON_True   (1 << 1)

◆ CJSON_VERSION_MAJOR

#define CJSON_VERSION_MAJOR   1

◆ CJSON_VERSION_MINOR

#define CJSON_VERSION_MINOR   7

◆ CJSON_VERSION_PATCH

#define CJSON_VERSION_PATCH   10

Typedef Documentation

◆ cJSON

typedef struct cJSON cJSON

◆ cJSON_bool

typedef int cJSON_bool

◆ cJSON_Hooks

typedef struct cJSON_Hooks cJSON_Hooks

Function Documentation

◆ CJSON_PUBLIC() [1/7]

CJSON_PUBLIC ( char *  ) const

◆ CJSON_PUBLIC() [2/7]

CJSON_PUBLIC ( cJSON ) const

◆ CJSON_PUBLIC() [3/7]

CJSON_PUBLIC ( cJSON_bool  )

◆ CJSON_PUBLIC() [4/7]

CJSON_PUBLIC ( const char *  )

◆ CJSON_PUBLIC() [5/7]

CJSON_PUBLIC ( double  )

◆ CJSON_PUBLIC() [6/7]

CJSON_PUBLIC ( void *  )

◆ CJSON_PUBLIC() [7/7]

CJSON_PUBLIC ( void  )

Variable Documentation

◆ b

◆ boolean

const char* const const cJSON_bool boolean

◆ buffer

char* buffer

Referenced by exprtk::rtl::io::file::write< T >::operator()(), exprtk::rtl::io::file::read< T >::operator()(), NRLib::ParseIBMFloatBE(), NRLib::NRLibPrivate::ParseIBMFloatLE(), NRLib::NRLibPrivate::ParseIEEEDoubleBE(), NRLib::NRLibPrivate::ParseIEEEDoubleLE(), NRLib::ParseIEEEFloatBE(), NRLib::NRLibPrivate::ParseIEEEFloatLE(), NRLib::ParseInt16BE(), NRLib::ParseInt32BE(), NRLib::ParseUInt16BE(), NRLib::NRLibPrivate::ParseUInt16LE(), NRLib::ParseUInt32BE(), NRLib::NRLibPrivate::ParseUInt32LE(), Opm::data::currentGroupConstraints::read(), Opm::data::Group::read(), Opm::data::Rates::read(), Opm::data::Connection::read(), Opm::data::SegmentPressures::read(), Opm::data::Segment::read(), Opm::data::CurrentControl::read(), Opm::data::Well::read(), Opm::data::WellRates::read(), NRLib::ReadAsciiArrayFastRestOfFile(), NRLib::ReadBinaryDoubleArray(), NRLib::ReadBinaryFloatArray(), NRLib::ReadBinaryIbmFloatArray(), NRLib::ReadBinaryIntArray(), NRLib::ReadBinaryShortArray(), Opm::Serializer::get< std::string >(), Opm::data::currentGroupConstraints::write(), Opm::data::Group::write(), Opm::data::Rates::write(), Opm::data::Connection::write(), Opm::data::SegmentPressures::write(), Opm::data::Segment::write(), Opm::data::CurrentControl::write(), Opm::data::Well::write(), Opm::data::WellRates::write(), NRLib::WriteBinaryDoubleArray(), NRLib::WriteBinaryFloatArray(), NRLib::WriteBinaryIbmFloatArray(), NRLib::WriteBinaryIntArray(), NRLib::WriteBinaryShortArray(), NRLib::NRLibPrivate::WriteIBMFloatBE(), NRLib::NRLibPrivate::WriteIBMFloatLE(), NRLib::NRLibPrivate::WriteIEEEDoubleBE(), NRLib::NRLibPrivate::WriteIEEEDoubleLE(), NRLib::NRLibPrivate::WriteIEEEFloatBE(), NRLib::NRLibPrivate::WriteIEEEFloatLE(), NRLib::NRLibPrivate::WriteUInt16BE(), NRLib::NRLibPrivate::WriteUInt16LE(), NRLib::NRLibPrivate::WriteUInt32BE(), and NRLib::NRLibPrivate::WriteUInt32LE().

◆ case_sensitive

const cJSON* const const cJSON_bool case_sensitive

◆ count

◆ fmt

◆ format

◆ index

int index

Referenced by Opm::SparseVector< T >::addElement(), Opm::EclipseIOUtil::addToStripedData(), Opm::cmp::array_equal(), Opm::DynamicState< T >::at(), NRLib::BlockWell(), exprtk::details::expression_node< T >::branch(), exprtk::details::binary_node< T >::branch(), exprtk::details::binary_ext_node< T, Operation >::branch(), exprtk::details::construct_branch_pair(), Opm::SparseVector< T >::element(), Opm::OrderedMap< K, T >::erase(), exprtk::lexer::helper::sequence_validator::error(), exprtk::lexer::helper::sequence_validator_3tokens::error(), Opm::EclipseIOUtil::extractFromStripedData(), Opm::OrderedMap< K, T >::get(), exprtk::parser< T >::get_error(), Opm::Serializer::get_map(), exprtk::expression< T >::get_symbol_table(), Opm::Serializer::get_vector(), NRLib::Grid2D< A >::GetIJ(), NRLib::Grid< A >::GetIJK(), NRLib::Grid4D< A >::GetIJKL(), NRLib::Grid5D< A >::GetIJKLM(), Opm::RawRecord::getItem(), Opm::DeckView::getKeyword(), Opm::EclIO::ERst::getRestartData(), NRLib::RegularSurface< A >::GetXY(), NRLib::RegularSurfaceRotated< A >::GetXY(), Opm::OrderedMap< K, T >::iget(), Opm::DynamicVector< T >::iget(), Opm::OrderedMap< K, T >::insert(), Opm::DynamicState< T >::is_new_data(), Opm::DynamicVector< T >::iset(), NRLib::Grid< A >::operator()(), NRLib::Grid2D< A >::operator()(), NRLib::Grid4D< A >::operator()(), NRLib::Grid5D< A >::operator()(), NRLib::RegularSurfaceRotated< A >::operator()(), exprtk::lexer::generator::operator[](), exprtk::type_store< T >::parameter_list::operator[](), exprtk::results_context< T >::operator[](), exprtk::details::vector_holder< Type >::operator[](), exprtk::vector_view< T >::operator[](), Opm::DynamicVector< T >::operator[](), ecl::TimeIndex::operator[](), exprtk::details::rebasevector_elem_node< T >::rebasevector_elem_node(), exprtk::details::numeric::details::roundn_impl(), Opm::SparseVector< T >::SparseVector(), Opm::DynamicState< T >::update(), Opm::FieldProps::FieldData< T >::update(), Opm::DynamicState< T >::update_elm(), Opm::DynamicState< T >::update_equal(), exprtk::details::vector_elem_node< T >::vector_elem_node(), and vector_util_index().

◆ item

◆ length

◆ name

◆ newitem

const char cJSON * newitem

◆ number

double number

◆ prebuffer

int prebuffer

◆ raw

const char* const const char* const raw

◆ recurse

cJSON_bool recurse

◆ replacement

cJSON* const cJSON* replacement

◆ require_null_terminated

const char cJSON_bool require_null_terminated

◆ return_parse_end

const char** return_parse_end

◆ string

const char *const const char *const string

Referenced by Opm::__attribute__(), exprtk::symbol_table< T >::type_store< Type, RawType >::add(), NRLib::BlockWell(), exprtk::compute(), Catch::StringMaker< char[SZ]>::convert(), Opm::ParameterMapItemTrait< ParameterGroup >::convert(), Catch::StringMaker< signed char[SZ]>::convert(), Catch::StringMaker< unsigned char[SZ]>::convert(), exprtk::symbol_table< T >::create_stringvar(), exprtk::information::data(), ERT::EclKW< T >::data(), Catch::Matchers::Impl::MatchAllOf< ArgT >::describe(), Catch::Matchers::Impl::MatchAnyOf< ArgT >::describe(), exprtk::symbol_table< T >::type_store< Type, RawType >::entity_name(), exprtk::parser< T >::error(), Opm::SimpleMessageFormatter::format(), Opm::ParameterGroup::getDefault(), Opm::EclIO::EclFile::getImpl(), GTEST_DISABLE_MSC_WARNINGS_PUSH_(), exprtk::details::T0oT1oT2process< T >::mode0::id(), exprtk::details::T0oT1oT2process< T >::mode1::id(), exprtk::details::T0oT1oT20T3process< T >::mode0::id(), exprtk::details::T0oT1oT20T3process< T >::mode1::id(), exprtk::details::T0oT1oT20T3process< T >::mode2::id(), exprtk::details::T0oT1oT20T3process< T >::mode3::id(), exprtk::details::T0oT1oT20T3process< T >::mode4::id(), example::identifyResultSet(), Opm::ltrim_copy(), Opm::MonotCubicInterpolator::MonotCubicInterpolator(), exprtk::rtl::io::file::open< T >::operator()(), Opm::ParameterRequirementAnd< Requirement1, Requirement2 >::operator()(), exprtk::details::build_string::operator<<(), NRLib::ParseAsciiArrayFast(), exprtk::pgo_primer(), testing::internal::UniversalTersePrinter< const char * >::Print(), testing::internal2::TypeWithoutFormatter< T, kProtobuf >::PrintValue(), exprtk::parser< T >::process_lexer_errors(), Opm::data::Group::read(), Opm::data::WellRates::read(), NRLib::ReadAsciiArrayFast(), NRLib::ReadAsciiArrayFastRestOfFile(), NRLib::ReadBinaryIbmFloatArray(), NRLib::ReadIrapClassicAsciiSurf(), NRLib::ReadMulticolumnAsciiSurf(), NRLib::ReadNext(), NRLib::ReadNext< std::string >(), NRLib::ReadSgriSurf(), NRLib::ReadStormBinarySurf(), testing::internal::ParameterizedTestSuiteInfo< TestSuite >::RegisterTests(), exprtk::lexer::generator::remaining(), exprtk::details::param_to_str< State >::result(), exprtk::details::param_to_str< 0 >::result(), Opm::rtrim_copy(), Opm::Serializer::get< std::string >(), Opm::split_string(), exprtk::symbol_table< T >::stringvar_ref(), exprtk::lexer::generator::substr(), Opm::string_view::substr(), exprtk::to_str(), exprtk::parser_error::to_str(), exprtk::details::to_str(), Opm::ParameterGroup::to_string(), exprtk::symbol_table< T >::type_store< Type, RawType >::type_ref(), Opm::data::Group::write(), and Opm::data::WellRates::write().

◆ which

int which