Object.to_string

Object.to_string

Object.to_string

Function

Serialize the object into a JSON string.

Syntax

Parameters

ParametersTypeRequiredDefault valueDescription
modeStringNoNoneReturns the indentation format when passing in JSON_PRETTY.

Return value

TypeDescription
StringReturns the object JSON string.

Example

Notes

  • Normal mode outputs compact JSON.
  • JSON_PRETTY is a system constant whose value is the string JSON_PRETTY.