I have a huge amount of files that are structured like this:
// NAME = XXXX
// MARKER = YYYY
// SOURCE = ZZZZ
# Real data follows, one item per line
Item1
Item2
Item3
I'm trying to move out of this legacy format because it's a bother to parse (sometimes there are 3 // lines, sometimes 4): given that the Item1, etc... lists are not long (max 400 items or so) I was thinking of a suitable replacement. The absolute necessity would be to be text-based.
I had in mind two ideas:
The goals are however to avoid custom parsing as much as possible (the main issue for these files) and rely on built parsers (Python ones in my specific case). Assuming I go for 1, is JSON actually an appropriate choice?
Here are some reasons in favor of JSON:
One possible problem with JSON: