Skip to content

json native calls

Uwe van Almsick edited this page Mar 26, 2018 · 9 revisions

chayns®net runtime JSON NativeCalls

content


general

The JSON NativeCalls are used to communicate with the environments like DavidClient or Clipinc.
This is not the JSON chaynsCalls docu.

window.external.jsonCall(JSON.stringify(config));

config object

key type description
action number actionId
value.callback string path to callback function
value.id string unique uuid (v1) that indentify the call instance in the callback
value.parameter object(string: any) contained in callback without modification
value.data object(string: any) call specific data
{
  "action": 1,
  "value": {
    "callback": "path.callbackName",
    "id": "b3546680-1ac2-11e7-b54f-e7385e90e951",
    "parameter": {},
    "data": {}
  }
}

result object

key type description
id string uuid that passed with config
parameter object(string: any) parameter property from config object
data object(string: any) result data
status object contains the status information (also on success)
status.code number status enum
status.description string optional error descripion
{
    "id": "b3546680-1ac2-11e7-b54f-e7385e90e951",
    "parameter": {},
    "data": {},
    "status":{
         "code": 1
     }
}
status enum
{
  "Error": -2,
  "NotAvailable": -1,
  "Success": 1
}

list of all JSONCalls

A list of all JSONCalls can be found at the JSON NativeCalls List Wiki Page.