What kind of syntax is this (yaml, ini, ...)?
Could anybody help me figure out the syntax of the code below?
"AddonInfo"
{
"name" "Addon name"
开发者_运维知识库 "version" "Current Version"
"up_date" "Date of update"
"author_name" "Addon's Author"
"author_email" ""
"info" "Addon's Info"
"override" "0"
}
It's a Half-Life 2 (to be specific, garrys mod) Configuration File. I think it's only used by the source engine.
Edit:
A simple regexp to convert to JSON:
config_str.gsub(/(")\s*"(.*?)"/, '\1: "\2",').gsub(/(".*?")\s*{/, '\1: {')
Where gsub
is the function for global replacement.
Probably just a custom configuration file used by whatever system you're currently looking at?
JSON would have colons as Josh has pointed out
精彩评论