For the complete documentation index, see llms.txt. This page is also available as Markdown.

JSON Service

Plugin API reference: JSON Service. Generated from the MariaDB server headers by doxygen and moxygen.

Plugin API / Services for Plugins / Plugin Services

Exports JSON parsing methods for plugins to use.

Functions of the service: json_type - returns the type of the JSON argument, and the parsed value if it's scalar (not object or array)

json_get_array_item - expects JSON array as an argument, and returns the type of the element at index n_item. Returns JSV_NOTHING type if the array is shorter than n_item and the actual length of the array in value_len. If successful, then value up till value[value_len] contains the array element at the desired index (n_item).

json_get_object_key - expects JSON object as an argument, searches for a key in the object, return it's type and stores its value in value. JSV_NOTHING if no such key found, the number of keys in v_len.

json_get_object_nkey - expects JSON object as an argument. finds n_key's key in the object, returns it's name, type and value. JSV_NOTHING if object has less keys than n_key.

Classes

Name
Description

Macros


json_type

Defined in service_json.h:93


json_get_array_item

Defined in service_json.h:94


json_get_object_key

Defined in service_json.h:95


json_get_object_nkey

Defined in service_json.h:96


json_escape_string

Defined in service_json.h:97


json_unescape_json

Defined in service_json.h:98

Enumerations

Name
Description

json_types

Defined in service_json.h:59

Value
Description

JSV_BAD_JSON

JSV_NOTHING

JSV_OBJECT

JSV_ARRAY

JSV_STRING

JSV_NUMBER

JSV_TRUE

JSV_FALSE

JSV_NULL

Variables

Return
Name
Description

json_service

Type: struct json_service_st *

Defined in service_json.h:89

Class Definitions

json_service_st

Defined in service_json.h:72

Public Attributes


json_type

Defined in service_json.h:1


json_get_array_item

Defined in service_json.h:1


json_get_object_key

Defined in service_json.h:1


json_get_object_nkey

Defined in service_json.h:1


json_escape_string

Defined in service_json.h:85


json_unescape_json

Defined in service_json.h:87

This page is licensed: GPLv2

spinner

Last updated

Was this helpful?