FreeRDP
json.c File Reference
#include <math.h>
#include <errno.h>
#include <winpr/json.h>
#include <winpr/assert.h>

Functions

int WINPR_JSON_version (char *buffer, size_t len)
 
WINPR_JSONWINPR_JSON_Parse (const char *value)
 
WINPR_JSONWINPR_JSON_ParseWithLength (const char *value, size_t buffer_length)
 
void WINPR_JSON_Delete (WINPR_JSON *item)
 
WINPR_JSONWINPR_JSON_GetArrayItem (const WINPR_JSON *array, size_t index)
 
size_t WINPR_JSON_GetArraySize (const WINPR_JSON *array)
 
WINPR_JSONWINPR_JSON_GetObjectItem (const WINPR_JSON *const object, const char *const string)
 
WINPR_JSONWINPR_JSON_GetObjectItemCaseSensitive (const WINPR_JSON *const object, const char *const string)
 
BOOL WINPR_JSON_HasObjectItem (const WINPR_JSON *object, const char *string)
 
const char * WINPR_JSON_GetErrorPtr (void)
 
const char * WINPR_JSON_GetStringValue (WINPR_JSON *item)
 
double WINPR_JSON_GetNumberValue (const WINPR_JSON *const item)
 
BOOL WINPR_JSON_IsInvalid (const WINPR_JSON *const item)
 
BOOL WINPR_JSON_IsFalse (const WINPR_JSON *const item)
 
BOOL WINPR_JSON_IsTrue (const WINPR_JSON *const item)
 
BOOL WINPR_JSON_IsBool (const WINPR_JSON *const item)
 
BOOL WINPR_JSON_IsNull (const WINPR_JSON *const item)
 
BOOL WINPR_JSON_IsNumber (const WINPR_JSON *const item)
 
BOOL WINPR_JSON_IsString (const WINPR_JSON *const item)
 
BOOL WINPR_JSON_IsArray (const WINPR_JSON *const item)
 
BOOL WINPR_JSON_IsObject (const WINPR_JSON *const item)
 
WINPR_JSONWINPR_JSON_CreateNull (void)
 
WINPR_JSONWINPR_JSON_CreateTrue (void)
 
WINPR_JSONWINPR_JSON_CreateFalse (void)
 
WINPR_JSONWINPR_JSON_CreateBool (BOOL boolean)
 
WINPR_JSONWINPR_JSON_CreateNumber (double num)
 
WINPR_JSONWINPR_JSON_CreateString (const char *string)
 
WINPR_JSONWINPR_JSON_CreateArray (void)
 
WINPR_JSONWINPR_JSON_CreateObject (void)
 
WINPR_JSONWINPR_JSON_AddNullToObject (WINPR_JSON *const object, const char *const name)
 
WINPR_JSONWINPR_JSON_AddTrueToObject (WINPR_JSON *const object, const char *const name)
 
WINPR_JSONWINPR_JSON_AddFalseToObject (WINPR_JSON *const object, const char *const name)
 
WINPR_JSONWINPR_JSON_AddBoolToObject (WINPR_JSON *const object, const char *const name, BOOL boolean)
 
WINPR_JSONWINPR_JSON_AddNumberToObject (WINPR_JSON *const object, const char *const name, double number)
 
WINPR_JSONWINPR_JSON_AddStringToObject (WINPR_JSON *const object, const char *const name, const char *const string)
 
WINPR_JSONWINPR_JSON_AddObjectToObject (WINPR_JSON *const object, const char *const name)
 
BOOL WINPR_JSON_AddItemToArray (WINPR_JSON *array, WINPR_JSON *item)
 
WINPR_JSONWINPR_JSON_AddArrayToObject (WINPR_JSON *const object, const char *const name)
 
char * WINPR_JSON_Print (WINPR_JSON *item)
 
char * WINPR_JSON_PrintUnformatted (WINPR_JSON *item)
 

Function Documentation

◆ WINPR_JSON_AddArrayToObject()

WINPR_JSON* WINPR_JSON_AddArrayToObject ( WINPR_JSON *const  object,
const char *const  name 
)

◆ WINPR_JSON_AddBoolToObject()

WINPR_JSON* WINPR_JSON_AddBoolToObject ( WINPR_JSON *const  object,
const char *const  name,
BOOL  boolean 
)

◆ WINPR_JSON_AddFalseToObject()

WINPR_JSON* WINPR_JSON_AddFalseToObject ( WINPR_JSON *const  object,
const char *const  name 
)

◆ WINPR_JSON_AddItemToArray()

BOOL WINPR_JSON_AddItemToArray ( WINPR_JSON array,
WINPR_JSON item 
)

◆ WINPR_JSON_AddNullToObject()

WINPR_JSON* WINPR_JSON_AddNullToObject ( WINPR_JSON *const  object,
const char *const  name 
)

◆ WINPR_JSON_AddNumberToObject()

WINPR_JSON* WINPR_JSON_AddNumberToObject ( WINPR_JSON *const  object,
const char *const  name,
double  number 
)

◆ WINPR_JSON_AddObjectToObject()

WINPR_JSON* WINPR_JSON_AddObjectToObject ( WINPR_JSON *const  object,
const char *const  name 
)

◆ WINPR_JSON_AddStringToObject()

WINPR_JSON* WINPR_JSON_AddStringToObject ( WINPR_JSON *const  object,
const char *const  name,
const char *const  string 
)

◆ WINPR_JSON_AddTrueToObject()

WINPR_JSON* WINPR_JSON_AddTrueToObject ( WINPR_JSON *const  object,
const char *const  name 
)

◆ WINPR_JSON_CreateArray()

WINPR_JSON* WINPR_JSON_CreateArray ( void  )

◆ WINPR_JSON_CreateBool()

WINPR_JSON* WINPR_JSON_CreateBool ( BOOL  boolean)

◆ WINPR_JSON_CreateFalse()

WINPR_JSON* WINPR_JSON_CreateFalse ( void  )

◆ WINPR_JSON_CreateNull()

WINPR_JSON* WINPR_JSON_CreateNull ( void  )

◆ WINPR_JSON_CreateNumber()

WINPR_JSON* WINPR_JSON_CreateNumber ( double  num)

◆ WINPR_JSON_CreateObject()

WINPR_JSON* WINPR_JSON_CreateObject ( void  )
Here is the caller graph for this function:

◆ WINPR_JSON_CreateString()

WINPR_JSON* WINPR_JSON_CreateString ( const char *  string)

◆ WINPR_JSON_CreateTrue()

WINPR_JSON* WINPR_JSON_CreateTrue ( void  )

◆ WINPR_JSON_Delete()

void WINPR_JSON_Delete ( WINPR_JSON item)
Here is the caller graph for this function:

◆ WINPR_JSON_GetArrayItem()

WINPR_JSON* WINPR_JSON_GetArrayItem ( const WINPR_JSON array,
size_t  index 
)
Here is the caller graph for this function:

◆ WINPR_JSON_GetArraySize()

size_t WINPR_JSON_GetArraySize ( const WINPR_JSON array)
Here is the caller graph for this function:

◆ WINPR_JSON_GetErrorPtr()

const char* WINPR_JSON_GetErrorPtr ( void  )

◆ WINPR_JSON_GetNumberValue()

double WINPR_JSON_GetNumberValue ( const WINPR_JSON *const  item)
Here is the caller graph for this function:

◆ WINPR_JSON_GetObjectItem()

WINPR_JSON* WINPR_JSON_GetObjectItem ( const WINPR_JSON *const  object,
const char *const  string 
)
Here is the caller graph for this function:

◆ WINPR_JSON_GetObjectItemCaseSensitive()

WINPR_JSON* WINPR_JSON_GetObjectItemCaseSensitive ( const WINPR_JSON *const  object,
const char *const  string 
)

◆ WINPR_JSON_GetStringValue()

const char* WINPR_JSON_GetStringValue ( WINPR_JSON item)

◆ WINPR_JSON_HasObjectItem()

BOOL WINPR_JSON_HasObjectItem ( const WINPR_JSON object,
const char *  string 
)

◆ WINPR_JSON_IsArray()

BOOL WINPR_JSON_IsArray ( const WINPR_JSON *const  item)
Here is the caller graph for this function:

◆ WINPR_JSON_IsBool()

BOOL WINPR_JSON_IsBool ( const WINPR_JSON *const  item)
Here is the caller graph for this function:

◆ WINPR_JSON_IsFalse()

BOOL WINPR_JSON_IsFalse ( const WINPR_JSON *const  item)

◆ WINPR_JSON_IsInvalid()

BOOL WINPR_JSON_IsInvalid ( const WINPR_JSON *const  item)
Here is the call graph for this function:

◆ WINPR_JSON_IsNull()

BOOL WINPR_JSON_IsNull ( const WINPR_JSON *const  item)
Here is the caller graph for this function:

◆ WINPR_JSON_IsNumber()

BOOL WINPR_JSON_IsNumber ( const WINPR_JSON *const  item)
Here is the caller graph for this function:

◆ WINPR_JSON_IsObject()

BOOL WINPR_JSON_IsObject ( const WINPR_JSON *const  item)
Here is the caller graph for this function:

◆ WINPR_JSON_IsString()

BOOL WINPR_JSON_IsString ( const WINPR_JSON *const  item)
Here is the caller graph for this function:

◆ WINPR_JSON_IsTrue()

BOOL WINPR_JSON_IsTrue ( const WINPR_JSON *const  item)
Here is the caller graph for this function:

◆ WINPR_JSON_Parse()

WINPR_JSON* WINPR_JSON_Parse ( const char *  value)
Here is the call graph for this function:

◆ WINPR_JSON_ParseWithLength()

WINPR_JSON* WINPR_JSON_ParseWithLength ( const char *  value,
size_t  buffer_length 
)
Here is the call graph for this function:

◆ WINPR_JSON_Print()

char* WINPR_JSON_Print ( WINPR_JSON item)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ WINPR_JSON_PrintUnformatted()

char* WINPR_JSON_PrintUnformatted ( WINPR_JSON item)
Here is the call graph for this function:

◆ WINPR_JSON_version()

int WINPR_JSON_version ( char *  buffer,
size_t  len 
)

FreeRDP: A Remote Desktop Protocol Implementation JSON parser wrapper

Copyright 2024 Armin Novak anova.nosp@m.k@th.nosp@m.incas.nosp@m.t.co.nosp@m.m Copyright 2024 Thincast Technologies GmbH

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.