Hi Creators,
We will be modifying the behavior of the JSONEncode and JSONDecode methods on HttpService to add special encoding for inf/-inf/NaN values.
We will start rolling out this change on Mar 10, 2026. However, since we understand that this may break some games, we are offering the opportunity to opt-in early now or to opt-out until Apr 10, 2026. This can be done using the following opt-in/opt-out form.
This change will have no visible effect if you are using these APIs to transfer data exclusively between different Roblox APIs.
However, if you are using these APIs to send data to and from systems outside of Roblox, the impact may be transparent. The updated JSON data structure, which uses specific JSON object formats to represent inf, -inf, and NaN, is detailed below:
{
"m": null,
"t": "numeric",
"v": "inf"
}
{
"m": null,
"t": "numeric",
"v": "-inf"
}
{
"m": null,
"t": "numeric",
"v": "NaN"
}
Example
{
"myValue": inf -- e.g. using math.huge or 1/0 in Luau
}
will now be encoded to:
{
"myValue": {
"m": null,
"t": "numeric",
"v": "inf"
}
}
Creators using the HTTPService:JSONDecode API to decode the message will receive:
{
"myValue": inf -- e.g. using math.huge or 1/0 in Luau
}
Even after this change is shipped, the behavior should still be identical to what you would observe now.
Reason for this change
To improve performance, some internal services that utilize the output of the JSONEncode method will now require valid JSON content.
Currently, the system outputs values like inf and NaN. These are not standard JSON, but the existing implementation permits them.
To minimize data size, we use the single letters m, t, v to denote the special object marker, the data type, and the actual value, respectively.
What experiences does this change break?
This change could only break your experience if you are using HttpService:JSONEncode to generate an object to send to an external system.
If your usage of the outputted JSON already incorporates specific logic to handle these fields, such as inf and NaN, you may need to change this logic to recognize this new encoding format.
Updates to documentation will follow shortly.
As always, your feedback is invaluable for us to improve our services and fit your needs. Feel free to share any comments or questions below and we’ll do our best to answer!
Happy building!
The Roblox Creator Services Team