Problem. We log things to a database. To keep disk space usage capped we export from the database to files that can be copied off, or just plane deleted. Some power above me wants to see this as JSON.
I see a single JSON files as a single object. So in this case we'd create an object with a list of log messages. Problem is, this file could have several million log items in it which I imagine would choke most parsers. So the only way to do it I think is for each log item to have its own JSON object.
This means that JSON parsers can't handle the file as it. But we could write a line parser to read in the file and push each line through a JSON parser.
Does this sound correct?
I believe XML would have the same problem, but at least there we have SAX.. Or we could do it as a bunch of minidocs all prefixed by their length.
Thanks.