MCPcopy Create free account
hub / github.com/RedisGraph/RedisGraph / JsonEncoder_SIValue

Function JsonEncoder_SIValue

src/util/json_encoder.c:233–243  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

231}
232
233char *JsonEncoder_SIValue(SIValue v) {
234 // Create an empty sds string.
235 sds s = sdsempty();
236 // Populate the sds string with encoded data.
237 s = _JsonEncoder_SIValue(v, s);
238 // Duplicate the sds string into a standard C string.
239 char *retval = rm_strdup(s);
240 // Free the sds string.
241 sdsfree(s);
242 return retval;
243}
244

Callers 1

AR_TOJSONFunction · 0.85

Calls 4

sdsemptyFunction · 0.85
_JsonEncoder_SIValueFunction · 0.85
rm_strdupFunction · 0.85
sdsfreeFunction · 0.85

Tested by

no test coverage detected