code: function toJSON(d) {
      if (!_.isString(d)) {
          d = JSON.stringify(d);
      }
  
      return d;
  }
docs: Default serialize function for SSE data and id.
  This does JSON.stringify(d) if d is not already a string.