JSON

@native @JSType trait JSON extends StObject
trait StObject
class Object
trait Any
class Object
trait Matchable
class Any

Value members

Concrete methods

def parse(text: String): Any

Converts a JavaScript Object Notation (JSON) string into an object.

Converts a JavaScript Object Notation (JSON) string into an object.

Value Params
reviver

A function that transforms the results. This function is called for each member of the object. If a member contains nested objects, the nested objects are transformed before the parent object is.

text

A valid JSON string.

def parse(text: String, reviver: ThisFunction2[Any, String, Any, Any]): Any
def stringify(value: Any): String

Converts a JavaScript value to a JavaScript Object Notation (JSON) string.

Converts a JavaScript value to a JavaScript Object Notation (JSON) string.

Value Params
replacer

A function that transforms the results.

space

Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read.

value

A JavaScript value, usually an object or array, to be converted.

def stringify(value: Any, replacer: Array[Double | String]): String
def stringify(value: Any, replacer: Array[Double | String], space: String): String
def stringify(value: Any, replacer: Array[Double | String], space: Double): String
def stringify(value: Any, replacer: ThisFunction2[Any, String, Any, Any]): String
def stringify(value: Any, replacer: ThisFunction2[Any, String, Any, Any], space: String): String
def stringify(value: Any, replacer: ThisFunction2[Any, String, Any, Any], space: Double): String
def stringify(value: Any, replacer: Null, space: String): String
def stringify(value: Any, replacer: Null, space: Double): String
def stringify(value: Any, replacer: Unit, space: String): String
def stringify(value: Any, replacer: Unit, space: Double): String

Inherited methods

def hasOwnProperty(v: String): Boolean
Inherited from
Object
def isPrototypeOf(v: Object): Boolean
Inherited from
Object
def propertyIsEnumerable(v: String): Boolean
Inherited from
Object
def toLocaleString(): String
Inherited from
Object
def valueOf(): Any
Inherited from
Object

Concrete fields

@JSName
val toStringTag: String