TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: Parser for the vdata format used in the Source 2 engine?

2 点作者 Karsteski9 个月前
Hi, I&#x27;m a self-taught junior programmer and I&#x27;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&#x27;ve not found any parsers for this weird data format, so I figured I&#x27;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.<p>.vdata format:<p><pre><code> &lt;!-- kv3 encoding:text:version{e21c7f3c-8a33-41c5-9977-a76d3a32aa0d} format:generic:version{7412167c-06e9-4698-aff2-e63eb59037e7} --&gt; { key = &quot;value&quot; key = { key = &quot;value&quot; key2 = &quot;value2&quot; &quot;1&quot; = &quot;value&quot; } key_array = { [ 1, 2, 3, ] } }</code></pre>

1 comment

solardev9 个月前
Maybe <a href="https:&#x2F;&#x2F;github.com&#x2F;ValveResourceFormat&#x2F;ValveResourceFormat?tab=readme-ov-file">https:&#x2F;&#x2F;github.com&#x2F;ValveResourceFormat&#x2F;ValveResourceFormat?t...</a> ?<p>Maybe it&#x27;s the &quot;keyvalues3&quot; format. The test for it seems to be here: <a href="https:&#x2F;&#x2F;github.com&#x2F;ValveResourceFormat&#x2F;ValveResourceFormat&#x2F;blob&#x2F;master&#x2F;Tests&#x2F;KeyValuesTest.cs">https:&#x2F;&#x2F;github.com&#x2F;ValveResourceFormat&#x2F;ValveResourceFormat&#x2F;b...</a>
评论 #41240491 未加载