PipeWire: spa/utils/json-core.h File Reference

PipeWire 1.6.8

Loading...
Searching...
No Matches
json-core.h File Reference
SPA » Utilities » JSON

spa/utils/json-core.h More...

Go to the source code of this file.

## Data Structures
struct | spa_json

## Macros
#define | SPA_API_JSON static inline
#define | SPA_JSON_ERROR_FLAG 0x100
#define | SPA_JSON_INIT(data, size)
#define | SPA_JSON_INIT_RELAX(type, data, size)
#define | SPA_JSON_ENTER(iter)
#define | SPA_JSON_SAVE(iter)
#define | SPA_JSON_START(iter, p)
#define | _SPA_ERROR(reason)
#define | __PUT(c)

## Functions
SPA_API_JSON void | spa_json_init (struct spa_json *iter, const char *data, size_t size)
SPA_API_JSON void | spa_json_init_relax (struct spa_json *iter, char type, const char *data, size_t size)
SPA_API_JSON void | spa_json_enter (struct spa_json *iter, struct spa_json *sub)
SPA_API_JSON void | spa_json_save (struct spa_json *iter, struct spa_json *save)
SPA_API_JSON void | spa_json_start (struct spa_json *iter, struct spa_json *sub, const char *pos)
SPA_API_JSON int | spa_json_next (struct spa_json *iter, const char **value)
| Get the next token.
SPA_API_JSON bool | spa_json_get_error (struct spa_json *iter, const char *start, struct spa_error_location *loc)
| Return if there was a parse error, and its possible location.
SPA_API_JSON int | spa_json_is_container (const char *val, int len)
SPA_API_JSON int | spa_json_is_object (const char *val, int len)
SPA_API_JSON bool | spa_json_is_array (const char *val, int len)
SPA_API_JSON bool | spa_json_is_null (const char *val, int len)
SPA_API_JSON int | spa_json_parse_float (const char *val, int len, float *result)
SPA_API_JSON bool | spa_json_is_float (const char *val, int len)
SPA_API_JSON char * | spa_json_format_float (char *str, int size, float val)
SPA_API_JSON int | spa_json_parse_int (const char *val, int len, int *result)
SPA_API_JSON bool | spa_json_is_int (const char *val, int len)
SPA_API_JSON bool | spa_json_is_true (const char *val, int len)
SPA_API_JSON bool | spa_json_is_false (const char *val, int len)
SPA_API_JSON bool | spa_json_is_bool (const char *val, int len)
SPA_API_JSON int | spa_json_parse_bool (const char *val, int len, bool *result)
SPA_API_JSON bool | spa_json_is_string (const char *val, int len)
SPA_API_JSON int | spa_json_parse_hex (const char *p, int num, uint32_t *res)
SPA_API_JSON int | spa_json_parse_stringn (const char *val, int len, char *result, int maxlen)
SPA_API_JSON int | spa_json_parse_string (const char *val, int len, char *result)
SPA_API_JSON int | spa_json_encode_string (char *str, int size, const char *val)

## Detailed Description

spa/utils/json-core.h

## Macro Definition Documentation

## ◆ SPA_API_JSON

#define SPA_API_JSON static inline

## ◆ _SPA_ERROR

#define _SPA_ERROR | ( |  | reason | ) |

Value:
{ err = __ERROR_ ## reason; goto error; }

## ◆ __PUT

#define __PUT | ( |  | c | ) |

Value:
{ if (len < size) *str++ = c; len++; }