Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Confused question, I mean you can use pretty much anything to store the data then again pretty much anything for the transit/deserialization.
Eg. MongoDB uses BSON which is derived from JSON.
It's perfectly sane to use if the use-case benefits from it. -
It's written uncompressed and without strict schema. If we go this route, I'd say TOML is more appropriate. At least, it will be a lot readable by human.
But you'll have to handle all these hot relations on application level (like cascade removal). -
Not much different from storing in a Text file, if you're talking about JSON oriented databases, yeah, good for very narrow types of data, but, if you actually want to scale it, it's not a good idea.
-
mundo0349114yFor an MVP or just Proof of concept, yes.
For real world, no.
Imagine the file keep growing and growing, your code will have to read it all everytime it opens it. It just doesn't scale and it is prone to errors. -
LOL no is the short answer.
long answer is how much data ?
json marks every last field with its title, it stores it in text, the bloat is unbelievable compared to a packed binary database !
for small amounts of data json is fine, but if you're talking a long term solution where the data will pile up then definitely not ! -
Oo Oo - what if you crash in the middle of updating the file? or multithread updates? Transactions?
Fuck no. Json is not a R/W database.
Related Rants
Using JSON instead of a database
Is it a good practice?
question
nosql