Uploaded image for project: 'OASIS Classification of Everyday Living (COEL) TC'
  1. OASIS Classification of Everyday Living (COEL) TC
  2. COEL-130

A more optimal representation of an Atom in JSON

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Labels:
      None

      Description

      A JSON Schema is a useful mechanism for specifying and verifying the structure of an Atom. A Schema can specify which elements are 'required', but specifying interdependency or mutual-exclusion (e.g. ContextTag IFF ContextValue; DeviceID XOR ConsumerID) is not straightforward. Some small changes to the structure of the Atom would make development of a schema easier - and as a consequence lighten the burden of validation in Atom processors.

      Suggestions include:

      1 Implement WHAT as an array of integers rather than four discrete elements. No need for complicated 'SubClass' is required if 'Element' is present.

      2 Implement Extension like the following:
      {
      "Int":{"IntTag": N, "IntValue": N}},
      "Str":{"StrTag": N, "StrValue": N}},
      "Flt":{"FltTag": N, "FltValue": N}}
      }
      ...so that we can make the elements Int, Str, Flt 'optional', but within them make the Tag and Value elements 'mandatory'

      3. Implement Context as
      {
      "Weather": N ### Optional
      "Ext":

      {"ContextTag": N "ContextValue":V}

      ### Optional Ext with mandatory Tag/Value
      }

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              paul.bruton Paul Bruton [X] (Inactive)
            • Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: