Anywhere
EJSON.stringify(val, [options])
import { EJSON } from 'meteor/ejson'
Source Serialize a value to a string.
For EJSON values, the serialization fully represents the value. For non-EJSON values, serializes the same way as JSON.stringify
.
Arguments
- val EJSON-able Object
-
A value to stringify.
Options
- indent Boolean, Integer, or String
-
Indents objects and arrays for easy readability. When
true
, indents by 2 spaces; when an integer, indents by that number of spaces; and when a string, uses the string as the indentation pattern. - canonical Boolean
-
When
true
, stringifies keys in an object in sorted order.
Please login to continue.