tags:

views:

44

answers:

2

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"
}
A: 

Probably just a custom configuration file used by whatever system you're currently looking at?

JSON would have colons as Josh has pointed out

Longball27
+3  A: 

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.

Is there a way to parse this with regex?
c00lryguy
regular expressions are not for parsing, but see my edit on how to convert to JSON.