Jsonable

Jsonable

Base class for data classes for json getter

Constructor

new Jsonable(data)

Description:
  • Constructor

Source:
See:
  • push/api/data/* for examples
Parameters:
Name Type Description
data object

data object

Members

json

Description:
  • Get new object containing all fields ready for sending to client side

Source:

Get new object containing all fields ready for sending to client side

Methods

setData(data)

Description:
  • Set data doing any decoding / transformations along the way

Source:
Parameters:
Name Type Description
data object

data to set

toJSON() → {string}

Description:
  • Compatibility layer for cache & standard node.js functions IPC

Source:
Returns:

json string

Type
string

updateData(update)

Description:
  • Update internal data doing any decoding / transformations along the way

Source:
Parameters:
Name Type Description
update object

data update