I'm pretty new to python. I have about 21 JSON files to send with a POST request. Unfortunately the service a which I'm trying to send these files (Qualtrics) only accepts file size up to 5MB. With that said, I need to split these JSON files every 4.5 MB (just to be sure). This python script is part of a data stream, so if it failes, the next steps will not be executed.
So, what I have now and what my script do is:
- From CSV convert to JSON
- JSON format is [{"key1":"value","key2":"value",...},{...}]
- Send a POST request with that JSON.
- The script failes if file size is > 5MB.
I already tried to search for a solution but I wasn't lucky. I have been able to split CSV but since a 2MB CSV turns into a 5.5MB JSON I cannot be completely sure.
Do you guys have any suggestion? Another thing that blocks me is that since i'm working on a linux server that is not mine, I haven't been grantend permission to install additional libraries and even if I ask for it I get a NO as a response...
Thank you very much.