t6-gsc-utils icon indicating copy to clipboard operation
t6-gsc-utils copied to clipboard

Only writing up to 20480 chars

Open Mrcubix opened this issue 2 years ago • 2 comments

I have a chunk of code that's supposed to fix serialization issues cause by this tool making some struct unreadable (why use an arbitrary id with no meaning when you can use the path of the original)

I noticed that when writing to a file, only 20480 are written.

serialized_level = jsonSerialize(level, 4);
writeFile(sub_path + "/" + sub_key + ".json", serialized_level, false);

Here, only 20480 characters will get written. I Assume the bottleneck here is from writeFile() unless jsonSerialize use a separate mean of serialization than jsonDump().

Mrcubix avatar May 25 '22 23:05 Mrcubix

Strings are truncated to 0x5000 which is close to the max length of gsc strings. Use jsonDump instead.

I have a chunk of code that's supposed to fix serialization issues cause by this tool making some struct unreadable (why use an arbitrary id with no meaning when you can use the path of the original)

Not sure what you are referring to

fedddddd avatar May 26 '22 00:05 fedddddd

Not sure what you are referring to

Before: 20220526_084615

After: 20220526_084554

Meaningless data to human readable data in a separate file

Mrcubix avatar May 26 '22 06:05 Mrcubix