Implement text KeyValues 3 by xPaw · Pull Request #61 · ValveResourceFormat/ValveKeyValue

Skip to content

Navigation Menu

Sign in

Appearance settings

Conversation

@xPaw

  • Flagged values
    • Add Flag to KVValue for flagged strings (text) or flagged anything (binary)
    • Ensure that KV1 serialiser drops the flag when serialising (should happen by default, but check / write unit test)
    • Ensure that flag and value is maintained when deserialising to a strongly-typed object model that has a KVValue field/property.
  • Create KV3 text deserializer
  • Create KV3 text serializer
  • Write tests for converting KV3 to KV1
  • Write tests for converting KV1 to KV3
  • Support null type
  • Support different types of root values (arrays, strings, nulls, etc)
    • This partially works but a few things don't like value flags and arrays.
  • Add support for accessing and setting header encoding/format. We will likely need a breaking change for deserialize method to return some kind of KV file object, rather than KVObject directly. This KVFile object will likely be needed for KV2 implementation too.
  • Better support for arrays
  • Verify whether latest Source2 versions still support multiple flags at once (might have been removed)

@xPaw

@yaakov-h Can you give this an initial review pass? I especially want to hear about stuff around handling arrays and flags.

@xPaw xPaw linked an issue

Dec 5, 2022

that may be closed by this pull request

@xPaw xPaw mentioned this pull request

Dec 5, 2022

kristiker

@xPaw xPaw mentioned this pull request

Dec 25, 2022

Labels

2 participants

@xPaw @kristiker