Skip to content

Write-only methods contain a VALUE attribute #32

@jangxx

Description

@jangxx

Nodes with their ACCESS attribute set to write-only still return a VALUE attribute. For example:

{
  "DESCRIPTION": "root node",
  "FULL_PATH": "/",
  "ACCESS": 0,
  "CONTENTS": {
    "input": {
      "FULL_PATH": "/input",
      "ACCESS": 0,
      "CONTENTS": {
        "MoveForward": {
          "DESCRIPTION": "Moves you forward while the input equals 1..",
          "FULL_PATH": "/input/MoveForward",
          "ACCESS": 2, // <-- ACCESS indicates write-only...
          "TYPE": "T",
          "VALUE": [ // <-- ...but the VALUE attribute is still present
            false
          ]
        },
        // [ ... ]
     }
   }
}

This violates the proposal however:

VALUE The value stored with this string is an array that should contain one JSON item for each of the types described in the "TYPES" attribute (the structure of this array is described in greater detail in "Other notes on attributes"). Each item in the array should be a JSON representation of the corresponding OSC value type (a table is provided above with JSON equivalents for OSC data types).

  • If a query is performed for the "VALUE" attribute, but the "ACCESS" attribute indicates that the OSC method isn't readable, the query should return a 204 (no content/inappropriate request).
  • If a query is performed for the "VALUE" attribute, but the OSC method does not yet have a value, the query should return an empty JSON object.

(relevant part highlighted in italics)

ref: https://github.com/Vidvox/OSCQueryProposal#optional-attributes

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions