toJSON() {
    return {
      character: this.getCharacter(),
      unit: this.getUnit(),
    };
  }
/**
   * Customizes the JSON stringification behavior of the space.
   *
   * @returns {Object} The value to be serialized.
   */
Customizes the JSON stringification behavior of the space.
@returns {Object} The value to be serialized.
Customizes the JSON stringification behavior of the space . @returns { Object } The value to be serialized .
toJSON() {
    return {
      character: this.getCharacter(),
      unit: this.getUnit(),
    };
  }
toJSON ( ) { return { character : this . getCharacter ( ) , unit : this . getUnit ( ) , } ; }
Customizes the JSON stringification behavior of the space.
Customizes the JSON stringification behavior of the space .