JSON.stringify()

Encode the specified value into a JSON string.

Usage

Hover over inputs/exits for more info.

var JSON = require('machinepack-json');


// Encode the specified value into a JSON string.

JSON.stringify({

value: '*',

}).execSync();

Inputs

value required

The data to encode as a JSON string

'*'

Exits

error

An unexpected error occurred.

couldNotStringify

Could not stringify provided value into a JSON string.

success

OK.

'...{"some stringified json": "like this"}...'