PostgreSQL Source Code  git master
jsonfuncs.h File Reference
#include "common/jsonapi.h"
#include "utils/jsonb.h"
Include dependency graph for jsonfuncs.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

typedef enum JsonToIndex JsonToIndex
 
typedef void(* JsonIterateStringValuesAction) (void *state, char *elem_value, int elem_len)
 
typedef text *(* JsonTransformStringValuesAction) (void *state, char *elem_value, int elem_len)
 

Enumerations

enum  JsonToIndex {
  jtiKey = 0x01 , jtiString = 0x02 , jtiNumeric = 0x04 , jtiBool = 0x08 ,
  jtiAll = jtiKey | jtiString | jtiNumeric | jtiBool
}
 

Functions

JsonLexContextmakeJsonLexContext (text *json, bool need_escapes)
 
void pg_parse_json_or_ereport (JsonLexContext *lex, JsonSemAction *sem)
 
void json_ereport_error (JsonParseErrorType error, JsonLexContext *lex)
 
JsonTokenType json_get_first_token (text *json, bool throw_error)
 
uint32 parse_jsonb_index_flags (Jsonb *jb)
 
void iterate_jsonb_values (Jsonb *jb, uint32 flags, void *state, JsonIterateStringValuesAction action)
 
void iterate_json_values (text *json, uint32 flags, void *action_state, JsonIterateStringValuesAction action)
 
Jsonbtransform_jsonb_string_values (Jsonb *jsonb, void *action_state, JsonTransformStringValuesAction transform_action)
 
texttransform_json_string_values (text *json, void *action_state, JsonTransformStringValuesAction transform_action)
 
Datum json_populate_type (Datum json_val, Oid json_type, Oid typid, int32 typmod, void **cache, MemoryContext mcxt, bool *isnull)
 

Typedef Documentation

◆ JsonIterateStringValuesAction

typedef void(* JsonIterateStringValuesAction) (void *state, char *elem_value, int elem_len)

Definition at line 34 of file jsonfuncs.h.

◆ JsonToIndex

typedef enum JsonToIndex JsonToIndex

◆ JsonTransformStringValuesAction

typedef text*(* JsonTransformStringValuesAction) (void *state, char *elem_value, int elem_len)

Definition at line 37 of file jsonfuncs.h.

Enumeration Type Documentation

◆ JsonToIndex

Enumerator
jtiKey 
jtiString 
jtiNumeric 
jtiBool 
jtiAll 

Definition at line 24 of file jsonfuncs.h.

25 {
26  jtiKey = 0x01,
27  jtiString = 0x02,
28  jtiNumeric = 0x04,
29  jtiBool = 0x08,
31 } JsonToIndex;
JsonToIndex
Definition: jsonfuncs.h:25
@ jtiKey
Definition: jsonfuncs.h:26
@ jtiAll
Definition: jsonfuncs.h:30
@ jtiNumeric
Definition: jsonfuncs.h:28
@ jtiBool
Definition: jsonfuncs.h:29
@ jtiString
Definition: jsonfuncs.h:27

Function Documentation

◆ iterate_json_values()

void iterate_json_values ( text json,
uint32  flags,
void *  action_state,
JsonIterateStringValuesAction  action 
)

Definition at line 5352 of file jsonfuncs.c.

5354 {
5355  JsonLexContext *lex = makeJsonLexContext(json, true);
5356  JsonSemAction *sem = palloc0(sizeof(JsonSemAction));
5358 
5359  state->lex = lex;
5360  state->action = action;
5361  state->action_state = action_state;
5362  state->flags = flags;
5363 
5364  sem->semstate = (void *) state;
5367 
5368  pg_parse_json_or_ereport(lex, sem);
5369 }
void pg_parse_json_or_ereport(JsonLexContext *lex, JsonSemAction *sem)
Definition: jsonfuncs.c:501
static void iterate_values_object_field_start(void *state, char *fname, bool isnull)
Definition: jsonfuncs.c:5402
JsonLexContext * makeJsonLexContext(text *json, bool need_escapes)
Definition: jsonfuncs.c:517
static void iterate_values_scalar(void *state, char *token, JsonTokenType tokentype)
Definition: jsonfuncs.c:5376
void * palloc0(Size size)
Definition: mcxt.c:1099
json_ofield_action object_field_start
Definition: jsonapi.h:111
json_scalar_action scalar
Definition: jsonapi.h:115
void * semstate
Definition: jsonapi.h:106
Definition: regguts.h:318

References generate_unaccent_rules::action, iterate_values_object_field_start(), iterate_values_scalar(), makeJsonLexContext(), JsonSemAction::object_field_start, palloc0(), pg_parse_json_or_ereport(), JsonSemAction::scalar, and JsonSemAction::semstate.

Referenced by json_to_tsvector_worker().

◆ iterate_jsonb_values()

void iterate_jsonb_values ( Jsonb jb,
uint32  flags,
void *  state,
JsonIterateStringValuesAction  action 
)

Definition at line 5284 of file jsonfuncs.c.

5286 {
5287  JsonbIterator *it;
5288  JsonbValue v;
5290 
5291  it = JsonbIteratorInit(&jb->root);
5292 
5293  /*
5294  * Just recursively iterating over jsonb and call callback on all
5295  * corresponding elements
5296  */
5297  while ((type = JsonbIteratorNext(&it, &v, false)) != WJB_DONE)
5298  {
5299  if (type == WJB_KEY)
5300  {
5301  if (flags & jtiKey)
5302  action(state, v.val.string.val, v.val.string.len);
5303 
5304  continue;
5305  }
5306  else if (!(type == WJB_VALUE || type == WJB_ELEM))
5307  {
5308  /* do not call callback for composite JsonbValue */
5309  continue;
5310  }
5311 
5312  /* JsonbValue is a value of object or element of array */
5313  switch (v.type)
5314  {
5315  case jbvString:
5316  if (flags & jtiString)
5317  action(state, v.val.string.val, v.val.string.len);
5318  break;
5319  case jbvNumeric:
5320  if (flags & jtiNumeric)
5321  {
5322  char *val;
5323 
5325  NumericGetDatum(v.val.numeric)));
5326 
5327  action(state, val, strlen(val));
5328  pfree(val);
5329  }
5330  break;
5331  case jbvBool:
5332  if (flags & jtiBool)
5333  {
5334  if (v.val.boolean)
5335  action(state, "true", 4);
5336  else
5337  action(state, "false", 5);
5338  }
5339  break;
5340  default:
5341  /* do not call callback for composite JsonbValue */
5342  break;
5343  }
5344  }
5345 }
Datum numeric_out(PG_FUNCTION_ARGS)
Definition: numeric.c:735
#define DirectFunctionCall1(func, arg1)
Definition: fmgr.h:631
long val
Definition: informix.c:664
@ jbvNumeric
Definition: jsonb.h:238
@ jbvBool
Definition: jsonb.h:239
@ jbvString
Definition: jsonb.h:237
JsonbIteratorToken
Definition: jsonb.h:21
@ WJB_KEY
Definition: jsonb.h:23
@ WJB_DONE
Definition: jsonb.h:22
@ WJB_VALUE
Definition: jsonb.h:24
@ WJB_ELEM
Definition: jsonb.h:25
JsonbIterator * JsonbIteratorInit(JsonbContainer *container)
Definition: jsonb_util.c:819
JsonbIteratorToken JsonbIteratorNext(JsonbIterator **it, JsonbValue *val, bool skipNested)
Definition: jsonb_util.c:855
void pfree(void *pointer)
Definition: mcxt.c:1175
#define NumericGetDatum(X)
Definition: numeric.h:61
#define DatumGetCString(X)
Definition: postgres.h:610
enum jbvType type
Definition: jsonb.h:263
char * val
Definition: jsonb.h:272
JsonbContainer root
Definition: jsonb.h:223

References generate_unaccent_rules::action, DatumGetCString, DirectFunctionCall1, jbvBool, jbvNumeric, jbvString, JsonbIteratorInit(), JsonbIteratorNext(), jtiBool, jtiKey, jtiNumeric, jtiString, numeric_out(), NumericGetDatum, pfree(), Jsonb::root, generate_unaccent_rules::type, JsonbValue::type, JsonbValue::val, val, WJB_DONE, WJB_ELEM, WJB_KEY, and WJB_VALUE.

Referenced by jsonb_to_tsvector_worker().

◆ json_ereport_error()

void json_ereport_error ( JsonParseErrorType  error,
JsonLexContext lex 
)

Definition at line 611 of file jsonfuncs.c.

612 {
615  ereport(ERROR,
616  (errcode(ERRCODE_UNTRANSLATABLE_CHARACTER),
617  errmsg("unsupported Unicode escape sequence"),
618  errdetail("%s", json_errdetail(error, lex)),
619  report_json_context(lex)));
620  else
621  ereport(ERROR,
622  (errcode(ERRCODE_INVALID_TEXT_REPRESENTATION),
623  errmsg("invalid input syntax for type %s", "json"),
624  errdetail("%s", json_errdetail(error, lex)),
625  report_json_context(lex)));
626 }
int errdetail(const char *fmt,...)
Definition: elog.c:1037
int errcode(int sqlerrcode)
Definition: elog.c:693
int errmsg(const char *fmt,...)
Definition: elog.c:904
#define ERROR
Definition: elog.h:33
#define ereport(elevel,...)
Definition: elog.h:143
char * json_errdetail(JsonParseErrorType error, JsonLexContext *lex)
Definition: jsonapi.c:1067
@ JSON_UNICODE_CODE_POINT_ZERO
Definition: jsonapi.h:51
@ JSON_UNICODE_HIGH_ESCAPE
Definition: jsonapi.h:53
static int report_json_context(JsonLexContext *lex)
Definition: jsonfuncs.c:639
static void error(void)
Definition: sql-dyntest.c:147

References ereport, errcode(), errdetail(), errmsg(), ERROR, error(), json_errdetail(), JSON_UNICODE_CODE_POINT_ZERO, JSON_UNICODE_HIGH_ESCAPE, and report_json_context().

Referenced by get_array_start(), json_get_first_token(), json_validate(), and pg_parse_json_or_ereport().

◆ json_get_first_token()

JsonTokenType json_get_first_token ( text json,
bool  throw_error 
)

Definition at line 5571 of file jsonfuncs.c.

5572 {
5573  JsonLexContext *lex;
5574  JsonParseErrorType result;
5575 
5576  lex = makeJsonLexContext(json, false);
5577 
5578  /* Lex exactly one token from the input and check its type. */
5579  result = json_lex(lex);
5580 
5581  if (result == JSON_SUCCESS)
5582  return lex->token_type;
5583 
5584  if (throw_error)
5585  json_ereport_error(result, lex);
5586 
5587  return JSON_TOKEN_INVALID; /* invalid json */
5588 }
JsonParseErrorType json_lex(JsonLexContext *lex)
Definition: jsonapi.c:519
JsonParseErrorType
Definition: jsonapi.h:37
@ JSON_SUCCESS
Definition: jsonapi.h:38
@ JSON_TOKEN_INVALID
Definition: jsonapi.h:21
void json_ereport_error(JsonParseErrorType error, JsonLexContext *lex)
Definition: jsonfuncs.c:611
JsonTokenType token_type
Definition: jsonapi.h:80

References json_ereport_error(), json_lex(), JSON_SUCCESS, JSON_TOKEN_INVALID, makeJsonLexContext(), and JsonLexContext::token_type.

Referenced by ExecEvalJsonIsPredicate(), and json_typeof().

◆ json_populate_type()

Datum json_populate_type ( Datum  json_val,
Oid  json_type,
Oid  typid,
int32  typmod,
void **  cache,
MemoryContext  mcxt,
bool isnull 
)

Definition at line 3137 of file jsonfuncs.c.

3139 {
3140  JsValue jsv = {0};
3141  JsonbValue jbv;
3142 
3143  jsv.is_json = json_type == JSONOID;
3144 
3145  if (*isnull)
3146  {
3147  if (jsv.is_json)
3148  jsv.val.json.str = NULL;
3149  else
3150  jsv.val.jsonb = NULL;
3151  }
3152  else if (jsv.is_json)
3153  {
3154  text *json = DatumGetTextPP(json_val);
3155 
3156  jsv.val.json.str = VARDATA_ANY(json);
3157  jsv.val.json.len = VARSIZE_ANY_EXHDR(json);
3158  jsv.val.json.type = JSON_TOKEN_INVALID; /* not used in
3159  * populate_composite() */
3160  }
3161  else
3162  {
3163  Jsonb *jsonb = DatumGetJsonbP(json_val);
3164 
3165  jsv.val.jsonb = &jbv;
3166 
3167  /* fill binary jsonb value pointing to jb */
3168  jbv.type = jbvBinary;
3169  jbv.val.binary.data = &jsonb->root;
3170  jbv.val.binary.len = VARSIZE(jsonb) - VARHDRSZ;
3171  }
3172 
3173  if (!*cache)
3174  *cache = MemoryContextAllocZero(mcxt, sizeof(ColumnIOData));
3175 
3176  return populate_record_field(*cache, typid, typmod, NULL, mcxt,
3177  PointerGetDatum(NULL), &jsv, isnull);
3178 }
#define VARHDRSZ
Definition: c.h:638
#define DatumGetTextPP(X)
Definition: fmgr.h:292
@ jbvBinary
Definition: jsonb.h:244
#define DatumGetJsonbP(d)
Definition: jsonb.h:71
static Datum populate_record_field(ColumnIOData *col, Oid typid, int32 typmod, const char *colname, MemoryContext mcxt, Datum defaultval, JsValue *jsv, bool *isnull)
Definition: jsonfuncs.c:3071
void * MemoryContextAllocZero(MemoryContext context, Size size)
Definition: mcxt.c:906
#define VARDATA_ANY(PTR)
Definition: postgres.h:361
#define VARSIZE(PTR)
Definition: postgres.h:316
#define PointerGetDatum(X)
Definition: postgres.h:600
#define VARSIZE_ANY_EXHDR(PTR)
Definition: postgres.h:354
struct JsValue::@22::@23 json
JsonbValue * jsonb
Definition: jsonfuncs.c:300
bool is_json
Definition: jsonfuncs.c:290
union JsValue::@22 val
Definition: jsonb.h:221
Definition: c.h:633

References DatumGetJsonbP, DatumGetTextPP, JsValue::is_json, jbvBinary, JsValue::json, JSON_TOKEN_INVALID, JsValue::jsonb, MemoryContextAllocZero(), PointerGetDatum, populate_record_field(), Jsonb::root, JsonbValue::type, JsValue::val, JsonbValue::val, VARDATA_ANY, VARHDRSZ, VARSIZE, and VARSIZE_ANY_EXHDR.

Referenced by ExecEvalJsonExprCoercion().

◆ makeJsonLexContext()

JsonLexContext* makeJsonLexContext ( text json,
bool  need_escapes 
)

Definition at line 517 of file jsonfuncs.c.

518 {
520  VARSIZE_ANY_EXHDR(json),
522  need_escapes);
523 }
JsonLexContext * makeJsonLexContextCstringLen(char *json, int len, int encoding, bool need_escapes)
Definition: jsonapi.c:144
int GetDatabaseEncoding(void)
Definition: mbutils.c:1210

References GetDatabaseEncoding(), makeJsonLexContextCstringLen(), VARDATA_ANY, and VARSIZE_ANY_EXHDR.

Referenced by datum_to_jsonb(), each_worker(), elements_worker(), get_worker(), iterate_json_values(), json_array_length(), json_get_first_token(), json_in(), json_object_keys(), json_strip_nulls(), json_validate(), populate_recordset_worker(), and transform_json_string_values().

◆ parse_jsonb_index_flags()

uint32 parse_jsonb_index_flags ( Jsonb jb)

Definition at line 5216 of file jsonfuncs.c.

5217 {
5218  JsonbIterator *it;
5219  JsonbValue v;
5221  uint32 flags = 0;
5222 
5223  it = JsonbIteratorInit(&jb->root);
5224 
5225  type = JsonbIteratorNext(&it, &v, false);
5226 
5227  /*
5228  * We iterate over array (scalar internally is represented as array, so,
5229  * we will accept it too) to check all its elements. Flag names are
5230  * chosen the same as jsonb_typeof uses.
5231  */
5232  if (type != WJB_BEGIN_ARRAY)
5233  ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
5234  errmsg("wrong flag type, only arrays and scalars are allowed")));
5235 
5236  while ((type = JsonbIteratorNext(&it, &v, false)) == WJB_ELEM)
5237  {
5238  if (v.type != jbvString)
5239  ereport(ERROR,
5240  (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
5241  errmsg("flag array element is not a string"),
5242  errhint("Possible values are: \"string\", \"numeric\", \"boolean\", \"key\", and \"all\".")));
5243 
5244  if (v.val.string.len == 3 &&
5245  pg_strncasecmp(v.val.string.val, "all", 3) == 0)
5246  flags |= jtiAll;
5247  else if (v.val.string.len == 3 &&
5248  pg_strncasecmp(v.val.string.val, "key", 3) == 0)
5249  flags |= jtiKey;
5250  else if (v.val.string.len == 6 &&
5251  pg_strncasecmp(v.val.string.val, "string", 6) == 0)
5252  flags |= jtiString;
5253  else if (v.val.string.len == 7 &&
5254  pg_strncasecmp(v.val.string.val, "numeric", 7) == 0)
5255  flags |= jtiNumeric;
5256  else if (v.val.string.len == 7 &&
5257  pg_strncasecmp(v.val.string.val, "boolean", 7) == 0)
5258  flags |= jtiBool;
5259  else
5260  ereport(ERROR,
5261  (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
5262  errmsg("wrong flag in flag array: \"%s\"",
5263  pnstrdup(v.val.string.val, v.val.string.len)),
5264  errhint("Possible values are: \"string\", \"numeric\", \"boolean\", \"key\", and \"all\".")));
5265  }
5266 
5267  /* expect end of array now */
5268  if (type != WJB_END_ARRAY)
5269  elog(ERROR, "unexpected end of flag array");
5270 
5271  /* get final WJB_DONE and free iterator */
5272  type = JsonbIteratorNext(&it, &v, false);
5273  if (type != WJB_DONE)
5274  elog(ERROR, "unexpected end of flag array");
5275 
5276  return flags;
5277 }
unsigned int uint32
Definition: c.h:452
int errhint(const char *fmt,...)
Definition: elog.c:1151
@ WJB_END_ARRAY
Definition: jsonb.h:27
@ WJB_BEGIN_ARRAY
Definition: jsonb.h:26
char * pnstrdup(const char *in, Size len)
Definition: mcxt.c:1316
int pg_strncasecmp(const char *s1, const char *s2, size_t n)
Definition: pgstrcasecmp.c:69

References elog(), ereport, errcode(), errhint(), errmsg(), ERROR, jbvString, JsonbIteratorInit(), JsonbIteratorNext(), jtiAll, jtiBool, jtiKey, jtiNumeric, jtiString, pg_strncasecmp(), pnstrdup(), Jsonb::root, generate_unaccent_rules::type, JsonbValue::type, JsonbValue::val, WJB_BEGIN_ARRAY, WJB_DONE, WJB_ELEM, and WJB_END_ARRAY.

Referenced by json_to_tsvector(), json_to_tsvector_byid(), jsonb_to_tsvector(), and jsonb_to_tsvector_byid().

◆ pg_parse_json_or_ereport()

void pg_parse_json_or_ereport ( JsonLexContext lex,
JsonSemAction sem 
)

Definition at line 501 of file jsonfuncs.c.

502 {
503  JsonParseErrorType result;
504 
505  result = pg_parse_json(lex, sem);
506  if (result != JSON_SUCCESS)
507  json_ereport_error(result, lex);
508 }
JsonParseErrorType pg_parse_json(JsonLexContext *lex, JsonSemAction *sem)
Definition: jsonapi.c:168

References json_ereport_error(), JSON_SUCCESS, and pg_parse_json().

Referenced by datum_to_jsonb(), each_worker(), elements_worker(), get_json_object_as_hash(), get_worker(), iterate_json_values(), json_array_length(), json_in(), json_object_keys(), json_recv(), json_strip_nulls(), jsonb_from_cstring(), populate_array_json(), populate_recordset_worker(), and transform_json_string_values().

◆ transform_json_string_values()

text* transform_json_string_values ( text json,
void *  action_state,
JsonTransformStringValuesAction  transform_action 
)

Definition at line 5466 of file jsonfuncs.c.

5468 {
5469  JsonLexContext *lex = makeJsonLexContext(json, true);
5470  JsonSemAction *sem = palloc0(sizeof(JsonSemAction));
5472 
5473  state->lex = lex;
5474  state->strval = makeStringInfo();
5475  state->action = transform_action;
5476  state->action_state = action_state;
5477 
5478  sem->semstate = (void *) state;
5487 
5488  pg_parse_json_or_ereport(lex, sem);
5489 
5490  return cstring_to_text_with_len(state->strval->data, state->strval->len);
5491 }
static void transform_string_values_object_start(void *state)
Definition: jsonfuncs.c:5499
static void transform_string_values_scalar(void *state, char *token, JsonTokenType tokentype)
Definition: jsonfuncs.c:5556
static void transform_string_values_array_element_start(void *state, bool isnull)
Definition: jsonfuncs.c:5547
static void transform_string_values_array_start(void *state)
Definition: jsonfuncs.c:5515
static void transform_string_values_object_end(void *state)
Definition: jsonfuncs.c:5507
static void transform_string_values_array_end(void *state)
Definition: jsonfuncs.c:5523
static void transform_string_values_object_field_start(void *state, char *fname, bool isnull)
Definition: jsonfuncs.c:5531
StringInfo makeStringInfo(void)
Definition: stringinfo.c:41
json_struct_action array_end
Definition: jsonapi.h:110
json_struct_action object_start
Definition: jsonapi.h:107
json_aelem_action array_element_start
Definition: jsonapi.h:113
json_struct_action array_start
Definition: jsonapi.h:109
json_struct_action object_end
Definition: jsonapi.h:108
text * cstring_to_text_with_len(const char *s, int len)
Definition: varlena.c:200

References JsonSemAction::array_element_start, JsonSemAction::array_end, JsonSemAction::array_start, cstring_to_text_with_len(), makeJsonLexContext(), makeStringInfo(), JsonSemAction::object_end, JsonSemAction::object_field_start, JsonSemAction::object_start, palloc0(), pg_parse_json_or_ereport(), JsonSemAction::scalar, JsonSemAction::semstate, transform_string_values_array_element_start(), transform_string_values_array_end(), transform_string_values_array_start(), transform_string_values_object_end(), transform_string_values_object_field_start(), transform_string_values_object_start(), and transform_string_values_scalar().

Referenced by ts_headline_json_byid_opt().

◆ transform_jsonb_string_values()

Jsonb* transform_jsonb_string_values ( Jsonb jsonb,
void *  action_state,
JsonTransformStringValuesAction  transform_action 
)

Definition at line 5421 of file jsonfuncs.c.

5423 {
5424  JsonbIterator *it;
5425  JsonbValue v,
5426  *res = NULL;
5428  JsonbParseState *st = NULL;
5429  text *out;
5430  bool is_scalar = false;
5431 
5432  it = JsonbIteratorInit(&jsonb->root);
5433  is_scalar = it->isScalar;
5434 
5435  while ((type = JsonbIteratorNext(&it, &v, false)) != WJB_DONE)
5436  {
5437  if ((type == WJB_VALUE || type == WJB_ELEM) && v.type == jbvString)
5438  {
5439  out = transform_action(action_state, v.val.string.val, v.val.string.len);
5440  v.val.string.val = VARDATA_ANY(out);
5441  v.val.string.len = VARSIZE_ANY_EXHDR(out);
5442  res = pushJsonbValue(&st, type, type < WJB_BEGIN_ARRAY ? &v : NULL);
5443  }
5444  else
5445  {
5446  res = pushJsonbValue(&st, type, (type == WJB_KEY ||
5447  type == WJB_VALUE ||
5448  type == WJB_ELEM) ? &v : NULL);
5449  }
5450  }
5451 
5452  if (res->type == jbvArray)
5453  res->val.array.rawScalar = is_scalar;
5454 
5455  return JsonbValueToJsonb(res);
5456 }
@ jbvArray
Definition: jsonb.h:241
Jsonb * JsonbValueToJsonb(JsonbValue *val)
Definition: jsonb_util.c:94
JsonbValue * pushJsonbValue(JsonbParseState **pstate, JsonbIteratorToken seq, JsonbValue *jbval)
Definition: jsonb_util.c:568
bool isScalar
Definition: jsonb.h:355

References JsonbIterator::isScalar, jbvArray, jbvString, JsonbIteratorInit(), JsonbIteratorNext(), JsonbValueToJsonb(), pushJsonbValue(), res, Jsonb::root, generate_unaccent_rules::type, JsonbValue::type, JsonbValue::val, VARDATA_ANY, VARSIZE_ANY_EXHDR, WJB_BEGIN_ARRAY, WJB_DONE, WJB_ELEM, WJB_KEY, and WJB_VALUE.

Referenced by ts_headline_jsonb_byid_opt().