fxbox / deprecated-taxonomy

This repository has moved.
https://github.com/fxbox/foxbox/
Mozilla Public License 2.0
0 stars 9 forks source link

Improve Service serialization #42

Open fabricedesre opened 8 years ago

fabricedesre commented 8 years ago

Right now the clock service is serialized as:

{
    "adapter": "clock@link.mozilla.org",
    "getters": {
      "getter:timeofday.clock@link.mozilla.org": {
        "adapter": "clock@link.mozilla.org",
        "id": "getter:timeofday.clock@link.mozilla.org",
        "kind": "CurrentTimeOfDay",
        "mechanism": "getter",
        "service": "service:clock@link.mozilla.org",
        "tags": []
      },
      "getter:timestamp.clock@link.mozilla.org": {
        "adapter": "clock@link.mozilla.org",
        "id": "getter:timestamp.clock@link.mozilla.org",
        "kind": "CurrentTime",
        "mechanism": "getter",
        "service": "service:clock@link.mozilla.org",
        "tags": []
      }
    },
    "id": "service:clock@link.mozilla.org",
    "properties": {
      "model": "Mozilla clock v1"
    },
    "setters": {},
    "tags": []
  }

I'd like getters to be an array to not repeat the getter id both as a property name and as an id value.