#๐Ÿ”’ Data Saving Help

28 messages ยท Page 1 of 1 (latest)

rain mirage
#

is it better to store data in json file or convert and save data to binary ?

am having a size issue with my json file currently since am saving a few hunder thousand lines of data in a json currently and that leads to vsc crashes even notpad sometimes, that data isnt for me to see btw, am more concerned about the size of the file then its readability, the code is the only one that needs to access it. is there any other alternatives to json?

i tried to use ujson to lower the size of my json file but nothing happend

shut meteorBOT
#

@rain mirage

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

warm cairn
#

look if you only need to store code readable data, you could do it in binary too

#

I've used it once, when I had to save a lot of files

#

and json took too much space

#

just know that it may be risky

rain mirage
#

could you explain

warm cairn
#

hmm

#

what kinda data are you trying to save?

#

also is this for like an app that you will be going to distribute to end users?

#

because you can never trust users.

#

if you can reliably store data in binary format, go for it

rain mirage
#

its an open source project that i am planning on placing as my first project on my github

#

and it stores path files and data from them

warm cairn
#

sure then

#

if you need any help you are free to ask

rain mirage
#

am wondering which other way there is other then binary

#

since am wondering is binary gonna reduce the file size

warm cairn
#

well json has a lot of extra characters too

#

like all those commas,

#

quotes

#

tabs

#

and all that

#

you will be saving some space

#

you could even perform some compression if you really want to save space

rain mirage
#

i suppose

shut meteorBOT
#
Python help channel closed

This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.