Returns a JSON representation of a typed array.
Buffer
objects are represented. See Buffer.typed array to serialize
JSON representation
var Float64Array = require( `@stdlib/array/float64` );
var arr = new Float64Array( [ 5.0, 3.0 ] );
var json = toJSON( arr );
// returns { 'type': 'Float64Array', 'data': [ 5.0, 3.0 ] }
Typed array data type.