You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+34-1
Original file line number
Diff line number
Diff line change
@@ -68,4 +68,37 @@ Of course the class KeyValues also provides the standard `dict` interface method
68
68
69
69
# What is missing
70
70
71
-
Generally the checking of VDF file syntax, i.e. if brackets are closed and so on. The only check is if after `"key"` is a starting bracket `{`.
71
+
Generally the checking of VDF file syntax, i.e. if brackets are closed and so on. The only check is if after `"key"` is a starting bracket `{`. So it's expected that input VDF file will have a 'clean' structure:
72
+
73
+
* one key or key-value per line, if value isn't subpart:
74
+
```
75
+
"key" "value"
76
+
```
77
+
* values can be on two lines (I have to implement this because Valve do it sometimes in their VDF files):
78
+
```
79
+
"key" "val
80
+
ue"
81
+
```
82
+
* when value is a subpart, starting bracket `{` is expected to be on separate line after the corresponding key:
83
+
```
84
+
"key"
85
+
{
86
+
"key2" "value"
87
+
}
88
+
```
89
+
* everything that doesn't match key or key-value regex or if line doesn't start with `{` or `}` is ignored. So this is ok:
90
+
```
91
+
"key"
92
+
// some comment
93
+
{
94
+
"key2" "value"
95
+
}
96
+
```
97
+
* even this should be ok, but don't do it, because Valve itself won't probably parse it :)
0 commit comments