Users of Looker’s beta API can receive output as JSON. As of Looker 3.52 users can choose to have JSON numbers returned to them as numbers, instead of quoted strings.
This will impact all API function calls where:
- You specify
result_formatparameter (such as in the
- You do NOT specify
apply_formatting=trueon the call
This change is associated with the JSON Numbers as Strings legacy feature (for more details see the Legacy Features docs page). By default, this feature is checked, which means that no change in behavior will occur. If you want the new behavior, un-check this legacy feature and click the Update Legacy Features button.
This change should make JSON results easier to work with. However, users who had been casting strings into numbers during their JSON parsing, or who did want to consume numbers as strings, may need modify their code.
Old Output Example
In the old behavior, all JSON values are returned as quoted strings:
New Output Example
With the new behavior, numbers are no longer quoted: