Thanks for the update. I'm surprised this is the first time it's been hit. It looks like "\1"/etc are not supported in JSON(!) and you have to use \u0001 for everything.
I guess the solution for now might be to add a regex to Puck.eval to convert the characters, but long-term I guess JSON.stringify should be spec compliant even if it uses way more memory :(
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Thanks for the update. I'm surprised this is the first time it's been hit. It looks like
"\1"
/etc are not supported in JSON(!) and you have to use\u0001
for everything.I guess the solution for now might be to add a regex to
Puck.eval
to convert the characters, but long-term I guess JSON.stringify should be spec compliant even if it uses way more memory :(Issues filed at https://github.com/espruino/Espruino/issues/1737 and https://github.com/espruino/EspruinoWebTools/issues/1