static stringify_(val) {
    const json = JSON.stringify(val);
    return json.replace(/</g, '\\x3c');
  }
Converts the given value to an embeddable JSON string and returns it. The
resulting string can be embedded in HTML because the '<' character is
encoded.

@param {*} val
@return {string}
@private