Page MenuHomeFeedback Tracker

EXP: 1.03 JSON File size
New, NormalPublic

Description

I was writing a bunch of data into a json file, and the patch notes said:

Changed: Increased max file size limit for script created files to 50MB

Json file max seems to be capped at 64kb in the current state of EXP.


As you can see from the photo's at 64kb it cuts off writing to the file.

Details

Severity
Tweak
Resolution
Open
Reproducibility
Always
Operating System
Windows 10
Category
Modding
Steps To Reproduce

Export a bunch of data into a json file.

Related Objects

Event Timeline

Also, on the topic of json files. For the longest time the json file loader has had issues outputting maps which have any type of key (enum, string, int), and a user made class as a value, I really need maps to output to json, and it shouldn't matter the data being outputted:


Geez added a subscriber: rVn.
ukulelekid713 added a comment.EditedMay 14 2019, 1:19 AM

It seems to save the data correctly; however, it doesn't load the map/class correctly, and results in said error.

Edit:

After trail and error it seems that the issue only exists when you have a map as a class variable, and you try to load the class instance from a json file, but not if you choose the map types specifically. In other words,

		JsonFileLoader<map<string, ref BankAccount>>.JsonLoadFile(BANKFILE, accounts); //Good

		JsonFileLoader<BankManager>.JsonLoadFile(BANKFILE, this); //Bad

After more test, it seems to have issues regardless of file serializer, and json serializer. I cannot seem to ever load a map that contains a string key, and a user-created class as a value.

Having the exact same issue in 1.04 stable

Try multiMap 3_Game\DayZ\tools\tools.c

A multimap is not a solution to this issue, @Jacob_Mango. I don't need an array of values to one key, and the way the multimap serializes is absolute cancer without making them into a template class. Also, there is still a 64kb limit on JsonSerializer stuff, so yeah....

yeah after testing a bunch, it's only an issue when writing to a file beyond 64kb in length. Following the code, it seems that the limit may actually be in the way that it takes the data into a single string.

Reading a json file that is larger than 64kb is no issue at all though.

I have not found the same issue when using FileSerializer (so far)

Thank you Cleetus, yes the only issue seems to be the json file limit when saving.

TheBuster added a subscriber: TheBuster.EditedMay 28 2020, 5:39 PM

There are any workaround to handle the 64kb issue?