Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rossengeorgiev/vdf-parser
📜 Libraries to (de)serialize Valve's KeyValue format (VDF) in various languages
https://github.com/rossengeorgiev/vdf-parser
javascript keyvalue parser php serializer valve vdf
Last synced: 11 days ago
JSON representation
📜 Libraries to (de)serialize Valve's KeyValue format (VDF) in various languages
- Host: GitHub
- URL: https://github.com/rossengeorgiev/vdf-parser
- Owner: rossengeorgiev
- License: other
- Created: 2014-04-16T18:47:35.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2019-11-08T10:35:05.000Z (about 5 years ago)
- Last Synced: 2024-11-01T03:34:20.055Z (15 days ago)
- Topics: javascript, keyvalue, parser, php, serializer, valve, vdf
- Language: JavaScript
- Homepage: http://rgp.io/vdf-parser/
- Size: 136 KB
- Stars: 76
- Watchers: 5
- Forks: 23
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## KeyValue encoder/decoder for various languages
Format: https://developer.valvesoftware.com/wiki/KeyValues
VDF may contain comments. However, they are not preserved during decoding.
### Online (in your browser)
Go to http://rossengeorgiev.github.io/vdf-parser/
### Python
Moved to https://github.com/ValvePython/vdf
Install via pypi: `pip install vdf`
### Javascript
Using `vdf.js`
```javascript
data = VDF.parse(vdf_text);
vdf_text = VDF.stringify(data);
```Or the version on `npm` (https://www.npmjs.com/package/simple-vdf)
```bash
npm install simple-vdf
``````javascript
vdf = require('simple-vdf');
data = vdf.parse(vdf_text);
vdf_text = vdf.stringify(data);
```### PHP
```php
require_once('vdf.php');$array = vdf_decode($vdf);
$vdf = vdf_encode($array);
$indented_vdf = vdf_encode($array, true);
```### License
See [license](LICENSE) file.