Skip to content

Releases: Galaco/keyvalues

Fix for \r carriage returns

20 Sep 12:40
1a53bea
Compare
Choose a tag to compare

Fixed a case when mixed newlines (usage of \r) would cause corrupt values and missing keys

Type parsing improvements

17 Sep 22:33
Compare
Choose a tag to compare

3 changes in this version, 1 potentially breaking:

  • Add NewKeyValuePair() function; because there may be a situation where manually crafting a node is desired. This can only be used with raw types; slices are not supported.
  • Fixed some issues with type conversions. These stem from test code assuming that keyvalues would be created using values of their mapped types. In reality a keyvalue stream will always interpret keyvalues as string:string pairs. AsString(), AsInt(), AsFloat() now convert accordingly.
  • In some cases (e.g. Vmf) a KeyValues file can have multiple root nodes. Before, this was treated as being the case always, and all nodes were placed under a root node with key $root. This doesn't make sense for the majority of cases. Now, for cases where there is only a single root node, this $root node does not exist, and the actual defined root in the KeyValues stream will be the root returned from the reader.

Patch & Replace improvements

12 Feb 19:40
a9d2904
Compare
Choose a tag to compare

Simplified Patch and Replace requirements.

Support for Patch & Replace

04 Jan 12:55
Compare
Choose a tag to compare
  • Removed MergeInto function from *KeyValue
  • Added Patch and Replace functions to *KeyValue. Both require the top level node to match the rules of key being patch and replace respectively.

Allow for node deletion from tree

24 Dec 22:05
Compare
Choose a tag to compare
v1.2.3

Add function to remove a child from tree

Support for "patch" key

24 Dec 21:43
Compare
Choose a tag to compare
v1.2.2

Added support for reserved "patch" property

Escaping Improvements

24 Dec 21:05
Compare
Choose a tag to compare
v1.2.1

Improved escaping

Reverse tree access, recursive tree merging

24 Dec 17:45
Compare
Choose a tag to compare
  • Added parent link to KeyValue nodes.
  • Add new function to KeyValue struct; MergeInto() (see below)

A KeyValue can now be merged with another KeyValue. The entire tree of A will be merged with B, resulting in a tree that contains all nodes in A and B.
If a key appears in both A and B, A will replace B assuming they have the same Type, unless they both have child nodes, in which case they will be recursively merged. Merge will fail if there are mismatched types on nodes that appear in both A and B.

Correctly handle escaped '{' characters

22 Dec 15:48
Compare
Choose a tag to compare
v1.1.1

Fix OOB when '{' inside escaped value

Improved vmt support, improved key escape character removal

22 Dec 13:51
2b1eb5a
Compare
Choose a tag to compare