|
WINPR_API int | WINPR_JSON_version (char *buffer, size_t len) |
| Get the library version string. More...
|
|
WINPR_API void | WINPR_JSON_Delete (WINPR_JSON *item) |
| Delete a WinPR JSON wrapper object. More...
|
|
WINPR_API WINPR_JSON * | WINPR_JSON_Parse (const char *value) |
| Parse a '\0' terminated JSON string. More...
|
|
WINPR_API WINPR_JSON * | WINPR_JSON_ParseWithLength (const char *value, size_t buffer_length) |
| Parse a JSON string. More...
|
|
WINPR_API size_t | WINPR_JSON_GetArraySize (const WINPR_JSON *array) |
| Get the number of arrayitems from an array. More...
|
|
WINPR_API WINPR_JSON * | WINPR_JSON_GetArrayItem (const WINPR_JSON *array, size_t index) |
| Return a pointer to an item in the array. More...
|
|
WINPR_API WINPR_JSON * | WINPR_JSON_GetObjectItem (const WINPR_JSON *object, const char *string) |
| Return a pointer to an JSON object item. More...
|
|
WINPR_API WINPR_JSON * | WINPR_JSON_GetObjectItemCaseSensitive (const WINPR_JSON *object, const char *string) |
| Same as WINPR_JSON_GetObjectItem but with case insensitive matching. More...
|
|
WINPR_API BOOL | WINPR_JSON_HasObjectItem (const WINPR_JSON *object, const char *string) |
| Check if JSON has an object matching the name. More...
|
|
WINPR_API const char * | WINPR_JSON_GetErrorPtr (void) |
| Return an error string. More...
|
|
WINPR_API const char * | WINPR_JSON_GetStringValue (WINPR_JSON *item) |
| Return the String value of a JSON item. More...
|
|
WINPR_API double | WINPR_JSON_GetNumberValue (const WINPR_JSON *item) |
| Return the Number value of a JSON item. More...
|
|
WINPR_API BOOL | WINPR_JSON_IsInvalid (const WINPR_JSON *item) |
| Check if JSON item is valid. More...
|
|
WINPR_API BOOL | WINPR_JSON_IsFalse (const WINPR_JSON *item) |
| Check if JSON item is BOOL value False. More...
|
|
WINPR_API BOOL | WINPR_JSON_IsTrue (const WINPR_JSON *item) |
| Check if JSON item is BOOL value True. More...
|
|
WINPR_API BOOL | WINPR_JSON_IsBool (const WINPR_JSON *item) |
| Check if JSON item is of type BOOL. More...
|
|
WINPR_API BOOL | WINPR_JSON_IsNull (const WINPR_JSON *item) |
| Check if JSON item is Null. More...
|
|
WINPR_API BOOL | WINPR_JSON_IsNumber (const WINPR_JSON *item) |
| Check if JSON item is of type Number. More...
|
|
WINPR_API BOOL | WINPR_JSON_IsString (const WINPR_JSON *item) |
| Check if JSON item is of type String. More...
|
|
WINPR_API BOOL | WINPR_JSON_IsArray (const WINPR_JSON *item) |
| Check if JSON item is of type Array. More...
|
|
WINPR_API BOOL | WINPR_JSON_IsObject (const WINPR_JSON *item) |
| Check if JSON item is of type Object. More...
|
|
WINPR_API WINPR_JSON * | WINPR_JSON_CreateNull (void) |
| WINPR_JSON_CreateNull. More...
|
|
WINPR_API WINPR_JSON * | WINPR_JSON_CreateTrue (void) |
| WINPR_JSON_CreateTrue. More...
|
|
WINPR_API WINPR_JSON * | WINPR_JSON_CreateFalse (void) |
| WINPR_JSON_CreateFalse. More...
|
|
WINPR_API WINPR_JSON * | WINPR_JSON_CreateBool (BOOL boolean) |
| WINPR_JSON_CreateBool. More...
|
|
WINPR_API WINPR_JSON * | WINPR_JSON_CreateNumber (double num) |
| WINPR_JSON_CreateNumber. More...
|
|
WINPR_API WINPR_JSON * | WINPR_JSON_CreateString (const char *string) |
| WINPR_JSON_CreateString. More...
|
|
WINPR_API WINPR_JSON * | WINPR_JSON_CreateArray (void) |
| WINPR_JSON_CreateArray. More...
|
|
WINPR_API WINPR_JSON * | WINPR_JSON_CreateObject (void) |
| WINPR_JSON_CreateObject. More...
|
|
WINPR_API WINPR_JSON * | WINPR_JSON_AddNullToObject (WINPR_JSON *object, const char *name) |
| WINPR_JSON_AddNullToObject. More...
|
|
WINPR_API WINPR_JSON * | WINPR_JSON_AddTrueToObject (WINPR_JSON *object, const char *name) |
| WINPR_JSON_AddTrueToObject. More...
|
|
WINPR_API WINPR_JSON * | WINPR_JSON_AddFalseToObject (WINPR_JSON *object, const char *name) |
| WINPR_JSON_AddFalseToObject. More...
|
|
WINPR_API WINPR_JSON * | WINPR_JSON_AddBoolToObject (WINPR_JSON *object, const char *name, BOOL boolean) |
| WINPR_JSON_AddBoolToObject. More...
|
|
WINPR_API WINPR_JSON * | WINPR_JSON_AddNumberToObject (WINPR_JSON *object, const char *name, double number) |
| WINPR_JSON_AddNumberToObject. More...
|
|
WINPR_API WINPR_JSON * | WINPR_JSON_AddStringToObject (WINPR_JSON *object, const char *name, const char *string) |
| WINPR_JSON_AddStringToObject. More...
|
|
WINPR_API WINPR_JSON * | WINPR_JSON_AddObjectToObject (WINPR_JSON *object, const char *name) |
| WINPR_JSON_AddObjectToObject. More...
|
|
WINPR_API WINPR_JSON * | WINPR_JSON_AddArrayToObject (WINPR_JSON *object, const char *name) |
| WINPR_JSON_AddArrayToObject. More...
|
|
WINPR_API BOOL | WINPR_JSON_AddItemToArray (WINPR_JSON *array, WINPR_JSON *item) |
| Add an item to an existing array. More...
|
|
WINPR_API char * | WINPR_JSON_Print (WINPR_JSON *item) |
| Serialize a JSON instance to string for minimal size without formatting see WINPR_JSON_PrintUnformatted. More...
|
|
WINPR_API char * | WINPR_JSON_PrintUnformatted (WINPR_JSON *item) |
| Serialize a JSON instance to string without formatting for human readable formatted output see WINPR_JSON_Print. More...
|
|
Wrapper around cJSON or JSONC libraries.
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
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.
WINPR_API int WINPR_JSON_version |
( |
char * |
buffer, |
|
|
size_t |
len |
|
) |
| |
Get the library version string.
- Parameters
-
buffer | a string buffer to hold the version string |
len | the length of the buffer |
- Returns
- length of the version string in bytes or negative for error
- Since
- version 3.6.0
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.
Definition at line 102 of file json.c.
104 #if defined(WITH_JSONC)
105 return _snprintf(buffer, len,
"json-c %s", json_c_version());
106 #elif defined(WITH_CJSON)
107 return _snprintf(buffer, len,
"cJSON %s", cJSON_Version());
109 return _snprintf(buffer, len,
"JSON support not available");