HACKER Q&A
📣 Karsteski

Parser for the vdata format used in the Source 2 engine?


Hi, I'm a self-taught junior programmer and I've never written a parser. I was wondering if anyone knew of a parser for the vdata format (example below) used in the Source 2 engine? I want to get character data for this game to make an app, but I've not found any parsers for this weird data format, so I figured I'd have to write one myself before I even got started on my app. Also, any advice on writing a parser? This seems difficult to get right.

.vdata format:

  
  {
      key = "value"
      key = 
      {
          key = "value"
          key2 = "value2"
          "1" = "value"
      }
      key_array =
      {
          [
              1,
              2,
              3,
          ]
      }
  }


  👤 solardev Accepted Answer ✓