Implement the optional space
parameter in JSON.stringify( value[, replacer [, space] ] )
#346
Labels
enhancement
New feature or request
Milestone
The
JSON.stringify(value[, replacer[, space]])
takes in three arguments.The
space
argument is aString
orNumber
object that's used to insert white space into the outputJSON
string for readability purposes.If this is a
Number
, it indicates the number of space characters to use as white space; this number is capped at10
(if it is greater, the value is just10
). Values less than1
indicate that no space should be used.If this is a
String
, the string (or the first10
characters of the string, if it's longer than that) is used as white space. If this parameter is not provided (or isnull
), no white space is used.More information:
The text was updated successfully, but these errors were encountered: