Json format

Hi everybody !

since v9, the json format in snap has changed. now, it’s formatted with spaces and carriage return.

i want to store costumes (pixels of costume) in the browser storage.

image
look at the length of the string in v8:
v8

since v9:


look at the length of the string in v9: 4.4 times bigger than in v8 !!!
v9

In v8 i can save a costume but not in v11 because of the size of the json…

How i can get a json like v8 in v11 ?

(I could probably manually remove all the spaces and line breaks, but…)

Thank’s in advance !

I mean, this:

does make sense to me. I’m wondering, what comes after the “but”? To be honest i think that is maybe the best solution :slight_smile:

untitled script pic - 2026-03-20T193616.690
untitled script pic - 2026-03-20T193717.776
untitled script pic - 2026-03-20T193857.392
This has a few complicated bugs but they will not occur within a list of pixels :)

Or

Tiny costume, different encoding

Little slower with big costumes (like a background), but it seem to work perfectly.

Thank you

Thk for the base64 idea, i will combine this with redgeographysnap json: the best of both worlds !

Now, i can store cst and sounds with base64 instead of using pixels/samples