automotive-bg icon indicating copy to clipboard operation
automotive-bg copied to clipboard

Add complex inline structures to the viwi protocol

Open wzr1337 opened this issue 7 years ago • 3 comments

For some use cases it might be needed to allow complex data structures in addition to primitives

(see automotive-bg/rsi/protocol/)

wzr1337 avatar Sep 11 '17 14:09 wzr1337

In the RSI protocol document, author specifies the graph interface where all leaf nodes seems to have a primitive value (int, string, etc.). I wonder the primitives you mentioned is same as the primitive value for the leaf nodes I mentioned.

In general, the leaf nodes could have a value as a nested object within a JSON format while I guess you want to make the leaf nodes have a value like a inline string with complex structure. Am I right? I'd like to see a use case to understand why the complex data structures with inline need.

anawhj avatar Sep 27 '17 05:09 anawhj

@anawhj You are partially right. I want to nest complex JSON structures in leaf node properties.

E.g. PlayerObject:

{
  "id": "01065B9A-6908-48E0-9D2E-914160480826",
  "name": "Player One",
  "uri": "/media/players/01065B9A-6908-48E0-9D2E-914160480826",
  "offset": 1234,
  "artist": {
    "name": "P!nk",
    "birthday": {
      "month": 9,
      "day": 8,
      "year": 1979
    }
  }
}

In this example, I want to group the artist name with additional information. The birthday is again a substructure.

I still want to handle the complex sturcture as "like primitive", as you will not be able to access birthday or name directly, nor filter nor any other complex operation. It would just be a well structured "BLOB" of data, Events will fire when it changes.. regardless of changes in "name" or "birthday".

I will publish a concrete Pull-Request before Thursday this week.

wzr1337 avatar Nov 06 '17 10:11 wzr1337

Just opened the PR referenced above: https://github.com/w3c/automotive-bg/pull/67

wzr1337 avatar Nov 07 '17 20:11 wzr1337