java - Efficiently store easily parsable data in a file? -
I need to store passable data easily in a file as the option of database backed solution (not to debate) is. Since many of its data is going to be stored, it will be a light syntax, it is not necessarily necessary to be human readable, but it should be personal. Note that there are going to be many types of fields / columns, some of which can be used and none of these
without my database, I see many options, all the problems CSV - I could technically do this, and it is very light though parsing would be an issue, and then it would suck if I wanted to add a column. Multilanguage support isfy, mainly people's own custom parser
So everyone has their own disadvantages. But what would be best if trying to target language support and some small file sizes?
If you're just using the basics of all these formats, all parsers are trivial if CSV is an option, so for XML and JSON, you are talking on names / value pairs blocks, so it does not even include a recursive framework. Json.org is very much support for any language.
He said.
I do not know what the problem is with CSV, if people write bad parsers then it is very bad. If you are concerned about compatibility, then adopt the default CSV model from Excel. Anyone who can not parse CSV from Excel, is not going too far into this world. In CSV you will get the most vulnerable support New lines and carriage returns If this is not your data, then this is not a problem. Only another issue quotation is embedded, and they are saved in CSV. If you do not need both of them, then even more trivial than that.
For "Adding Columns", you have all these problems. If you add a column, then you want to rewrite the whole file. I do not see this one big issue.
If space is your concern, CSV is the most compact, after JSON, XML. None of the resulting files can be easily updated. They will have to rewrite too much for any changes in all data. The advantage of CSV is that it has been easily added because there is no end element (such as JSON and XML).
Comments
Post a Comment