• Sends a JSON-formatted message to a player with formatting.

    Parameters

    • player: Player | Globals.modules.cmds.executeCommandPlayerW

      The player to whom the message will be sent. Can be a Player or executeCommandPlayerW instance.

    • value: any

      The value to be serialized into a JSON string and sent as a message.

    • Optionalspace: string | number

      Optional. Specifies the number of spaces or a string to use for indentation in the JSON output.

    Returns void

    The function attempts to serialize the value into a JSON string after making all of its properties enumerable. It uses the JSONB library which provides custom handling for various data types (e.g., bigint, Infinity, NaN, etc.). If the serialization fails, it falls back to not make the properties enumerable. The resulting JSON string is then sent as a message to the specified player.