Module clique_json_writer

Data Types

alert()

alert() = {alert, [status_list() | table() | text()]}

elem()

elem() = text() | status_list() | table() | alert() | usage()

status()

status() = [elem()]

status_list()

status_list() = {list, iolist(), [iolist()]} | {list, [iolist()]}

table()

table() = {table, [[{atom() | string(), term()}]]}

text()

text() = {text, iolist()}

usage()

usage() = usage

Function Index

write/1Write status information in JSON format.

Function Details

write/1

write(Status::status()) -> {iolist(), iolist()}

Write status information in JSON format.

The current clique -> JSON translation looks something like this:
  {text, "hello world"} ->
      {"type" : "text", "text" : "hello world"}
  {text, [<<he>>, $l, "lo", ["world"]]} ->
      {"type" : "text", "text" : "hello world"}
  {list, ["a", "b", <<"c">>]} ->
      {"type" : "list", "list" : ["a", "b", "c"]}
  {list, "Camels", ["Dromedary", "Bactrian", "Sopwith"] ->
      {"type" : "list", "title" : "Camels", "list" : ["Dromedary", "Bactrian", "Sopwith"]}
  {alert, [{text, "Shields failing!"}]} ->
      {"type" : "alert", "alert" : [{"type" : "text", "text" : "Shields failing!"}]}
  usage ->
      {"type" : "usage",
       "usage" : "Usage: riak-admin cluster self-destruct [--delay <delayseconds>]"}
  {table, [[{name, "Nick"}, {species, "human"}], [{name, "Rowlf"}, {species, "dog"}]]} ->
      {"type" : "table",
       "table" : [{"name" : "Nick", "species" : "human"}, {"name", "Rowlf", "species", "dog"}]}


Generated by EDoc