Why are my API-accessed JSON objects returning numbers instead of strings?

Knowledge Drop

Last tested: Oct 7, 2019

There was a legacy feature that allowed JSON numbers to return as strings that was completely removed in 5.4. You can find information about how to solve this problem here: Deprecation Notice: JSON Numbers Can be Returned as Numbers Instead of Strings in API (3.52+).