What is this file format called

丶灬走出姿态 提交于 2020-01-03 08:42:09

问题


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.


回答1:


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.



来源:https://stackoverflow.com/questions/9330761/what-is-this-file-format-called

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!