i've been looking around the web but could not find anything about the filestructure of the following file:

"price":"Preis: 1,90€",
"validString":"gültig bis 17.08.2011",
"validDescription":"gültig in 210"}],

This .dat-File is generated in javacode. (no source public)

I'm just lazy and dont want to write my own parser in java. ^^
There are methods like ObjectOutputStream and XMLEncoder/XMLDecoder but thats not XML and not binary as we can see.

Does anyone know what type of structure this is? Or better: does anyone know a parser for this code?

5 Years
Discussion Span
Last Post by noXi
Featured Replies

Parsing this is easy. Split each line at the first : and drop the " marks. That gives you a load of name/value pairs that you can do with as you wish. Unless you are really that lazy...


I am really that lazy. :) Just kidding. The tricky part is the one between [{ and }]. That can be an array, so that there is a strutcure like [{..},{..}]. But i'm writing a parser directly into the class which holds the data from this structure. Thanks anyway. (God.. please make more people using xmlencoders...) :(


Thanks peter_budo! That's it! You saved me more time. :)

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.