Go to main content

stringnify

Take an expression and return a string.

STRINGIFY

NAME

stringify - Takes an expression and returns a string.

SYNOPSIS

stringify(space:bool,  sort:bool, newline: bool, expression);

DESCRIPTION

stringify is used to take an expression and return a string. It can be used as a JSON stringnifier.

sort is used to sort the list of keys.

space is used to add a space after a '}'.

newline is used to add a newline after a "}'.
Note: stringnify is deprecated. Please use stringify instead.

EXAMPLES

res={{a={"a":1,"b":"3"}; a; stringify(a);}} return

res=\{"a":1,"b":"3"}\{"a":1,"b":"3"}.

The second expression is a string

SEE ALSO

{{ include("includes/strings.sn") }}

AUTHOR

Written by Pierre Laplante and Caroline Laplante, <laplante@sednove.com>

MODIFICATIONS

1.0 2014-09-09 21:24:14 laplante@sednove.com

1.1 2018-07-25 laplante@sednove.com Add argument newline

Edit

© 2024 extenso Inc. All rights reserved.