Asterisk - The Open Source Telephony Project  21.4.1
Macros | Enumerations | Functions | Variables
func_json.c File Reference

JSON parsing function. More...

#include "asterisk.h"
#include "asterisk/module.h"
#include "asterisk/channel.h"
#include "asterisk/pbx.h"
#include "asterisk/utils.h"
#include "asterisk/test.h"
#include "asterisk/app.h"
#include "asterisk/conversions.h"

Go to the source code of this file.

Macros

#define MAX_JSON_STACK   32
 

Enumerations

enum  json_option_flags { OPT_COUNT = (1 << 0) }
 

Functions

static void __init_result_buf (void)
 
 AST_MODULE_INFO_STANDARD_EXTENDED (ASTERISK_GPL_KEY,"JSON decoding function")
 
static int json_decode_read (struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t len)
 
static int load_module (void)
 
static int parse_node (char **key, char *currentkey, char *nestchar, int count, struct ast_json *json, char *buf, size_t len, int *depth)
 
static int unload_module (void)
 

Variables

static struct ast_custom_function json_decode_function
 
static const struct ast_app_option json_options [128] = { [ 'c' ] = { .flag = OPT_COUNT }, }
 
static struct ast_threadstorage result_buf = { .once = PTHREAD_ONCE_INIT , .key_init = __init_result_buf , .custom_init = NULL , }
 

Detailed Description

JSON parsing function.

Author
Naveen Albert aster.nosp@m.isk@.nosp@m.phrea.nosp@m.knet.nosp@m..org

Definition in file func_json.c.

Variable Documentation

struct ast_custom_function json_decode_function
static
Initial value:
= {
.name = "JSON_DECODE",
.read = json_decode_read,
}

Definition at line 298 of file func_json.c.