codekingpro/portable-devtools
115k
1/*-------------------------------------------------------------------------2 *3 * json.h4 * Declarations for JSON data type support.5 *6 * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group7 * Portions Copyright (c) 1994, Regents of the University of California8 *9 * src/include/utils/json.h10 *11 *-------------------------------------------------------------------------12 */13 14#ifndef JSON_H15#define JSON_H16 17#include "lib/stringinfo.h"18 19/* functions in json.c */20extern void escape_json(StringInfo buf, const char *str);21extern char *JsonEncodeDateTime(char *buf, Datum value, Oid typid,22 const int *tzp);23extern bool to_json_is_immutable(Oid typoid);24extern Datum json_build_object_worker(int nargs, Datum *args, bool *nulls,25 Oid *types, bool absent_on_null,26 bool unique_keys);27extern Datum json_build_array_worker(int nargs, Datum *args, bool *nulls,28 Oid *types, bool absent_on_null);29extern bool json_validate(text *json, bool check_unique_keys, bool throw_error);30 31#endif /* JSON_H */32 