toCloneObject(isDeep = true) {
    const json = {};

    Object.keys(this.#json).forEach((field) => {
      if (isNotUndefined(this.get(field))) {
        json[field] = clone(this.get(field));
      }
    });

    if (isDeep) {
      json.layers = this.layers.map((layer) => {
        return layer.clone(isDeep);
      });
    }

    return json;
  }
set json content

@param {object} obj
@param {{origin: string}} context