Skip to content

Representing options (Radio buttons/drop-down list) #4

Description

@johnlim

Hi Mike,

How would you represent radio options/drop-down menu items within collection-json? My idea is to use links in items like this:

{ "collection" :
  {
    "version" : "1.0",
    "href" : "http://example.org/friends/profile/jdoe",

    "links" : [
      {"rel" : "feed", "href" : "http://example.org/friends/jdoe/rss"}
    ],

    "items" : [
      {
        "href" : "http://example.org/friends/profile/edit/jdoe",
        "data" : [
          {"name" : "Field", "value" : "Occupation", "prompt" : "Occupation"},
        ],
        "links" : [
          {"rel" : "options", "href" : "http://examples.org/field/options/occupations", "prompt" : "Available Options in occupations", "render": "link},
        ]
      },
........

By doing this, the client requires making GET calls to the links, which increases transaction overheads. How would you go about representing it? :)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions