Reputation: 3330
I need a Java library that can handle some sort of file configuration. I need to easily be able to store both arrays and strings to it, using the simplest code possible. I don't care if it's JSON or XML or YAML, it just needs to be stored in a text file. I'm not concerned with speed or library file size, just datatype versatility and API simplicity. Any suggestions? Thanks!
Upvotes: 0
Views: 141
Reputation: 2364
I used the XMLEncoder for this on something I wrote. It allows you to store entire Arrays in xml format. Apache commons configurations may be a good fit for you too as mentioned above. The XMLEnocder is nice because you can just take a java object and write it to a file. Here's a link to an example.
Upvotes: 1