30 RCSIDH(json_h,
"$Id: 3c83655354ec790888dffe385d4bf1299887be8a $")
35 # if defined(HAVE_JSONMC_JSON_H)
38 DIAG_OFF(documentation-deprecated-sync)
39 # include <json-c/json.h>
40 DIAG_ON(documentation-deprecated-sync)
43 # elif defined(HAVE_JSON_JSON_H)
44 # include <json/json.h>
46 # error "Need json-c headers"
48 # include <freeradius-devel/server/base.h>
#define DIAG_UNKNOWN_PRAGMAS
Defines a CONF_PAIR to C data type mapping.
Node in a jpath selector sequence.
bool value_is_always_array
Use JSON array for multiple attribute values.
json_object * json_object_from_value_box(fr_value_box_t const *data)
Convert boxed value_box to a JSON object.
json_mode_type_t output_mode
Determine the format of JSON document to generate.
char * fr_jpath_asprint(TALLOC_CTX *ctx, fr_jpath_node_t const *head)
Print a node list to a string for debugging.
size_t fr_json_format_table_len
json_mode_type_t
List of possible JSON format output modes.
@ JSON_MODE_ARRAY_OF_NAMES
@ JSON_MODE_OBJECT_SIMPLE
@ JSON_MODE_ARRAY_OF_VALUES
bool include_type
Include attribute type where possible.
fr_json_format_attr_t attr
Formatting options for attribute names.
fr_json_format_value_t value
Formatting options for attribute values.
fr_slen_t fr_json_str_from_value(fr_sbuff_t *out, fr_value_box_t *vb, bool include_quotes)
Print a value box as its equivalent JSON format without going via a struct json_object (in most cases...
char const * output_mode_str
For conf_parser_t only.
conf_parser_t const fr_json_format_config[]
int fr_jpath_evaluate_leaf(TALLOC_CTX *ctx, fr_value_box_list_t *out, fr_type_t dst_type, fr_dict_attr_t const *dst_enumv, json_object *root, fr_jpath_node_t const *jpath)
Evaluate a parsed jpath expression against a json-c tree.
ssize_t fr_jpath_escape_func(UNUSED request_t *request, char *out, size_t outlen, char const *in, UNUSED void *arg)
Escapes special chars.
char const * prefix
Prefix to add to all attribute names.
void fr_json_version_print(void)
Print JSON-C version.
fr_table_num_sorted_t const fr_json_format_table[]
int fr_json_object_to_value_box(TALLOC_CTX *ctx, fr_value_box_t *out, json_object *object, fr_dict_attr_t const *enumv, bool tainted)
Convert json object to fr_value_box_t.
bool enum_as_int
Output enums as value, not their string representation.
bool always_string
Output all data types as strings.
bool fr_json_format_verify(fr_json_format_t const *format, bool verbose)
Verify that the options in fr_json_format_t are valid.
ssize_t fr_jpath_parse(TALLOC_CTX *ctx, fr_jpath_node_t **head, char const *in, size_t inlen)
Parse a jpath string.
char * fr_json_afrom_pair_list(TALLOC_CTX *ctx, fr_pair_list_t *vps, fr_json_format_t const *format)
Returns a JSON string of a list of value pairs.
An element in a lexicographically sorted array of name to num mappings.
static size_t char fr_sbuff_t size_t inlen
int format(printf, 5, 0))
static size_t char ** out