JSONSerialize

Converts a BoxLang variable into a JSON (JavaScript Object Notation) string.

Method Signature

JSONSerialize(var=[any], queryFormat=[string], useSecureJSONPrefix=[string], useCustomSerializer=[boolean])

Arguments

Argument
Type
Required
Description
Default

var

any

true

The variable to convert to a JSON string.

queryFormat

string

false

If the variable is a query, specifies whether to serialize the query by rows or by columns.

row

useSecureJSONPrefix

string

false

If true, the JSON string is prefixed with a secure JSON prefix.

false

useCustomSerializer

boolean

false

If true, the JSON string is serialized using a custom serializer. (Not used)

Examples

Last updated

Logo

Copyright & Register Trademark by Ortus Solutions, Corp & Ortus Software, LLC