vrchat-community / vrc-oscquery-lib

OSCQuery library in .NET
MIT License
49 stars 9 forks source link

VALUE attribute has the wrong JSON types #25

Closed jangxx closed 1 year ago

jangxx commented 1 year ago

According to the OSCQuery proposal, the values in the VALUE attribute array should have JSON types matching their data types, i.e. numbers for floats and int, true and false for booleans, etc.

ref: https://github.com/Vidvox/OSCQueryProposal#other-notes-on-attributes

Looking at the values returned from the VRChat client, the library does not honor this, since it serializes all values to strings. For example:

{
    "test_param1": {
        "DESCRIPTION": "test_param1",
        "FULL_PATH": "/avatar/parameters/test_param1",
        "ACCESS": 3,
        "TYPE": "T",
        "VALUE": "False"
    },
    "test_param2": {
        "DESCRIPTION": "test_param2",
        "FULL_PATH": "/avatar/parameters/test_param2",
        "ACCESS": 3,
        "TYPE": "f",
        "VALUE": "0"
    },
}
momo-the-monster commented 1 year ago

@jangxx - I'm marking this as complete, let me know if you think we're still missing something.