IDE Issue 8

From MemberWiki

Jump to: navigation, search

IDE Issue 8: Complex datatypes

Introduction

During the IDE phone call on 06Dec2007 (http://www.openajax.org/member/wiki/IDE_Minutes_2007-12-06), there was discussion about what we should do about parameters that consist of complex datatypes, such as JavaScript object literals (e.g., { name:"Ferdinand Magellan", occupation:"explorer"}).

Jon's proposed resolution

We should discuss this issue after discussing IDE Issue 7 (Datatypes). But assuming that people generally go along with the proposed resolution for that other issue, then here is the proposed resolution for this issue:

  • Object literals, and anything else that has an object as its root, have two options for their datatype:
    • The datatype could simply be object (i.e., type="object"). Documentation for that property would then describe what fields (sub-properties) can be provided on the object.
    • The datatype could be a custom datatype (i.e., a QName) with a fallback datatype of object (e.g., type="Acme:ProductRequirements" fallbackType="object").
  • Down the road, the industry might define a standard for JSON Schema, in which case we can extend our metadata format by adding a new element, something like <datatype name="<QName>" schema="<uri>/>, which is placed at the top of the metadata file to associate a JSON Schema with a custom datatype.
Personal tools