writeFieldData = (tiddler, field, data, indent) => {

  if (typeof data !== 'object') {
    return;
  }

  indent = parseInt(indent);
  indent = (indent > 0 && field === 'text' ? indent : 0);

  setField(tiddler, field, JSON.stringify(data, null, indent));

}
Serialize json data and store it in a tiddler's field.

@param {Tiddler} tiddler - The tiddler to store the json in.
@param {string} field - The field that will store the json.
@param {Object} data - The json data.
@param {int} [indent = 0] - the indentation