onWriteStorage = () => {
    if (--pendingWrites < 1) {
      if (onComplete) {
        onComplete();
      }

      // We've delayed updates to the child arrays, so flush them now.
      for (const name in json) {
        if (name in this.childLists_) {
          this.set(name, this.get(name));
        }
      }

      this.isImportingJson_ = false;
    }
  }
Import a JSON blob of preferences previously generated with exportAsJson.

This will create nested preference managers as well.

@param {!Object} json The JSON settings to import.
@param {function()=} onComplete Callback when all imports have finished.