getPreviousState() {
      Logger.debug(`Getting previous state`);
      return this.previousState;
    }
Converts the current state tree to a JSON string.

This method serializes the entire state tree into a JSON-formatted string,
which can be used for storage, transmission, or debugging purposes.

@returns {string} A JSON string representation of the current state.