JSON_SERIALIZE_PRETTY

Description

Serializes the provided object into a JSON string with pretty-printed formatting.

Syntax

JSON_SERIALIZE_PRETTY(json) -> String

Parameters

ParameterData TypeRequiredDescription
jsonObjectYesThe value to serialize into a pretty-printed JSON string.

Example

JSON_SERIALIZE_PRETTY(VLOOKUP_ALL("Contact", "FirstName, LastName", "AccountId", Id))
-- Returns the matching Contact field maps as an indented JSON string.
[{
  "FirstName" : "Adriana",
  "LastName" : "Cunningham",
  "AccountId" : "001DC00000yTLiRYAW",
  "Id" : "003DC00000cy97sYAA"
}]

Related Formulas