Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is this file format called

I need to parse a file which is in the following format:

"General"
{
"Description" = "Some Text"
"Version" = "4"
"ProjType" = "1"
}
"Configurations"
{
    "Mice"
    {
    "BuildOutputs" = "BuildProject"
    "OutputFile" = "output.txt"
    }
    "Men"
    {
    "BuildOutputs" = "BuildProject"
    "ChangedSinceLastBuilt" = "True"
    }
}

Does anyone have any idea what file format this is? If it's well known then there could be already made libraries to help parse it. It appears to be similar to JSON but instead of colons it uses equals sign and instead of commas it forcefully uses a new line.

like image 289
A Dark Divided Gem Avatar asked Feb 17 '12 15:02

A Dark Divided Gem


1 Answers

You could simply read in the entire file and then convert = to : and each line break with , - then you could parse it with an existing json library. Perhaps you would have to insert a ; at the end of the data.

like image 67
Cyclonecode Avatar answered Nov 09 '22 02:11

Cyclonecode