https://github.com/schwarz/key_values3
KeyValues3 (KV3) parser in Elixir
https://github.com/schwarz/key_values3
deadlock dota2 elixir keyvalues3 parser-combinator source2-keyvalues3
Last synced: 9 months ago
JSON representation
KeyValues3 (KV3) parser in Elixir
- Host: GitHub
- URL: https://github.com/schwarz/key_values3
- Owner: schwarz
- License: mit
- Created: 2024-09-10T18:16:58.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-09-11T05:03:03.000Z (over 1 year ago)
- Last Synced: 2025-07-04T23:35:46.223Z (9 months ago)
- Topics: deadlock, dota2, elixir, keyvalues3, parser-combinator, source2-keyvalues3
- Language: Elixir
- Homepage:
- Size: 12.7 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://hex.pm/packages/key_values3) [](https://hexdocs.pm/key_values3/)
# KeyValues3
This library helps you turn [KeyValues3](https://developer.valvesoftware.com/wiki/KeyValues3) values into Elixir values.
KeyValues3 is a JSON-like file format used by Valve and Source engine games.
## Wrong Exit?
If the file you want to read looks something like this:
```
"SomeKey"
{
"someInt" "52"
"someString" "hello"
}
```
then you probably are looking at an older [KeyValues](https://developer.valvesoftware.com/wiki/KeyValues) version and need a [VDF parser](https://hex.pm/packages/vdf) instead.
## Installation
Add `key_values3` to your list of dependencies in `mix.exs`:
```elixir
def deps do
[
{:key_values3, "~> 0.1.0"}
]
end
```
## Usage
``` elixir
iex(1)> KeyValues3.decode_value!("{m_strValue = \"0\"}")
%{"m_strValue" => "0"}
```
Full documentation can be found at https://hexdocs.pm/key_values3.