36 #if defined (__cplusplus) 48 #if defined (__cplusplus) 75 JSON_DOC_STORE &result,
bool allow_wildcards =
true);
77 JSON_DOC_STORE &result,
bool allow_wildcards =
true);
111 std::vector<JSON_PATH> &paths,
const std::vector<std::string> &patterns,
bool find_all);
173 template <
typename Fn,
typename... Args>
175 db_json_convert_string_and_call (
const char *json_raw,
size_t json_raw_length, Fn &&func, Args &&... args)
186 error_code = func (doc, std::forward<Args> (args)...);
bool db_json_doc_has_numeric_type(const JSON_DOC *doc)
void db_json_delete_json_iterator(JSON_ITERATOR *&json_itr)
bool db_json_are_validators_equal(JSON_VALIDATOR *val1, JSON_VALIDATOR *val2)
unsigned int db_json_get_length(const JSON_DOC *document)
double db_json_get_double_from_document(const JSON_DOC *doc)
int db_json_merge_patch_func(const JSON_DOC *source, JSON_DOC *&dest)
void db_make_json_from_doc_store_and_release(DB_VALUE &value, JSON_DOC_STORE &doc_store)
int db_json_replace_func(const JSON_DOC *value, JSON_DOC &doc, const char *raw_path)
const JSON_DOC * db_json_iterator_get_document(JSON_ITERATOR &json_itr)
JSON_ITERATOR * db_json_create_iterator(const DB_JSON_TYPE &type)
int db_json_normalize_path_string(const char *pointer_path, std::string &output)
char * db_json_get_json_body_from_document(const JSON_DOC &doc)
bool db_json_iterator_has_next(JSON_ITERATOR &json_itr)
bool db_json_iterator_is_empty(const JSON_ITERATOR &json_itr)
JSON_DOC * db_json_get_copy_of_doc(const JSON_DOC *doc)
void db_json_set_double_to_doc(JSON_DOC *doc, double d)
bool db_json_is_valid(const char *json_str)
bool db_json_doc_is_uncomparable(const JSON_DOC *doc)
int db_json_extract_document_from_path(const JSON_DOC *document, const std::string &path, JSON_DOC_STORE &result, bool allow_wildcards)
void db_json_pretty_func(const JSON_DOC &doc, char *&result_str)
int db_json_remove_func(JSON_DOC &doc, const char *raw_path)
int db_value_to_json_path(const DB_VALUE &path_value, FUNC_TYPE fcode, std::string &path_str)
int db_json_value_is_contained_in_doc(const JSON_DOC *doc, const JSON_DOC *value, bool &result)
void db_json_set_string_to_doc(JSON_DOC *doc, const char *str, unsigned len)
JSON_DOC * db_json_make_json_array()
static void db_json_add_element_to_array(JSON_DOC *doc, const JSON_VALUE *value)
int db_json_get_all_paths_func(const JSON_DOC &doc, JSON_DOC *&result_json)
std::size_t db_json_serialize_length(const JSON_DOC &doc)
void db_json_iterator_next(JSON_ITERATOR &json_itr)
JSON_VALIDATOR * db_json_copy_validator(JSON_VALIDATOR *validator)
JSON_DOC * db_json_make_json_object()
const char * db_json_get_schema_raw_from_validator(JSON_VALIDATOR *val)
int db_json_array_insert_func(const JSON_DOC *value, JSON_DOC &doc, const char *raw_path)
int db_json_get_json_from_str(const char *json_raw, JSON_DOC *&doc, size_t json_raw_length)
const char * db_json_get_type_as_str(const JSON_DOC *document)
int db_json_get_int_from_document(const JSON_DOC *doc)
std::int64_t db_json_get_bigint_from_document(const JSON_DOC *doc)
void db_json_delete_doc(JSON_DOC *&doc)
void db_json_set_iterator(JSON_ITERATOR *&json_itr, const JSON_DOC &new_doc)
int db_json_merge_preserve_func(const JSON_DOC *source, JSON_DOC *&dest)
void db_json_set_bigint_to_doc(JSON_DOC *doc, std::int64_t i)
char * db_json_copy_string_from_document(const JSON_DOC *doc)
int db_json_serialize(const JSON_DOC &doc, or_buf &buffer)
int db_json_search_func(const JSON_DOC &doc, const DB_VALUE *pattern, const DB_VALUE *esc_char, std::vector< JSON_PATH > &paths, const std::vector< std::string > &patterns, bool find_all)
DB_JSON_TYPE db_json_get_type(const JSON_DOC *doc)
int db_json_path_unquote_object_keys_external(std::string &sql_path)
int db_json_deserialize(OR_BUF *buf, JSON_DOC *&doc)
int db_json_array_append_func(const JSON_DOC *value, JSON_DOC &doc, const char *raw_path)
int db_json_validate_json(const char *json_body)
int db_json_unquote(const JSON_DOC &doc, char *&result_str)
void db_json_reset_iterator(JSON_ITERATOR *&json_itr)
void db_json_set_int_to_doc(JSON_DOC *doc, int i)
int db_json_keys_func(const JSON_DOC &doc, JSON_DOC &result_json, const char *raw_path)
const char * db_json_get_string_from_document(const JSON_DOC *doc)
unsigned int db_json_get_depth(const JSON_DOC *doc)
void db_json_clear_json_iterator(JSON_ITERATOR *&json_itr)
void db_json_make_document_null(JSON_DOC *doc)
void db_json_delete_validator(JSON_VALIDATOR *&validator)
int db_json_validate_doc(JSON_VALIDATOR *validator, JSON_DOC *doc)
bool db_json_are_docs_equal(const JSON_DOC *doc1, const JSON_DOC *doc2)
std::string db_json_json_string_as_utf8(std::string raw_json_string)
int db_json_load_validator(const char *json_schema_raw, JSON_VALIDATOR *&validator)
int db_json_add_member_to_object(JSON_DOC *doc, const char *name, const char *value)
int db_json_contains_path(const JSON_DOC *document, const std::vector< std::string > &paths, bool find_all, bool &result)
int db_json_insert_func(const JSON_DOC *value, JSON_DOC &doc, const char *raw_path)
int db_value_to_json_value(const DB_VALUE &db_val, JSON_DOC_STORE &json_doc)
int db_json_object_contains_key(JSON_DOC *obj, const char *key, int &result)
int db_value_to_json_doc(const DB_VALUE &db_val, bool force_copy, JSON_DOC_STORE &json_doc)
bool db_json_path_contains_wildcard(const char *sql_path)
int db_value_to_json_key(const DB_VALUE &db_val, std::string &key_str)
bool db_json_get_bool_from_document(const JSON_DOC *doc)
char * db_json_get_bool_as_str_from_document(const JSON_DOC *doc)
JSON_DOC * db_json_allocate_doc()
int db_json_set_func(const JSON_DOC *value, JSON_DOC &doc, const char *raw_path)
char * db_json_get_raw_json_body_from_document(const JSON_DOC *doc)