Module clique_json_writer

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