JSON/STRING->

Converts JSON string to a binary string

Input stack: json

Output stack: str

PumpkinDB> "\"a\"" JSON/STRING->
"a"

Allocation

Allocates for parsing JSON and encoding a string

Errors

EmptyStack error if there are less than one items on the stack

InvalidValue if supplied string is not valid.

Tests

works : "\"a\"" JSON/STRING-> "a" EQUAL?.
invalid_str : [0xffff JSON/STRING->] TRY UNWRAP 0x03 EQUAL?.
empty_stack : [JSON/STRING->] TRY UNWRAP 0x04 EQUAL?.

results matching ""

    No results matching ""