MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / fxStringifyJSONName

Function fxStringifyJSONName

xs/sources/xsJSON.c:918–940  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

916}
917
918void fxStringifyJSONName(txMachine* the, txJSONStringifier* theStringifier, txInteger* theFlag)
919{
920 txSlot* aSlot = the->stack;
921 if (*theFlag & 1) {
922 fxStringifyJSONChars(the, theStringifier, ",", 1);
923 fxStringifyJSONIndent(the, theStringifier);
924 }
925 else
926 *theFlag |= 1;
927 if (*theFlag & 2) {
928 if (aSlot->kind == XS_INTEGER_KIND) {
929 fxStringifyJSONChars(the, theStringifier, "\"", 1);
930 fxStringifyJSONInteger(the, theStringifier, aSlot->value.integer);
931 fxStringifyJSONChars(the, theStringifier, "\"", 1);
932 }
933 else
934 fxStringifyJSONString(the, theStringifier, aSlot->value.string);
935 fxStringifyJSONChars(the, theStringifier, ":", 1);
936 if (theStringifier->indent[0])
937 fxStringifyJSONChars(the, theStringifier, " ", 1);
938 }
939 mxPop(); // POP KEY
940}
941
942void fxStringifyJSONNumber(txMachine* the, txJSONStringifier* theStringifier, txNumber theNumber)
943{

Callers 1

fxStringifyJSONPropertyFunction · 0.85

Calls 4

fxStringifyJSONCharsFunction · 0.85
fxStringifyJSONIndentFunction · 0.85
fxStringifyJSONIntegerFunction · 0.85
fxStringifyJSONStringFunction · 0.85

Tested by

no test coverage detected