Class in reactor_core_io.js

JsonEx

3 public functions in 2 groups · show internal (_) functions

The Database: everything Core loads at boot.

Familiar territory. JsonEx keeps the RPG Maker MZ API, so existing MZ knowledge, tutorials and plugin code apply. Reactor's additions are marked with descriptions below.

The static class that handles JSON with object information.

@namespace
function JsonEx()

Quick Reference

Setup & Creation 1

makeDeepCopy() Makes a deep copy of the specified object.

Other 2

stringify() Converts an object to a JSON string with object information.
parse() Parses a JSON string and reconstructs the corresponding object.

Setup & Creation

makeDeepCopy

static source
JsonEx.makeDeepCopy(object)

Makes a deep copy of the specified object.

Details

Makes a deep copy of the specified object.

@param
object object The object to be copied.
@returns
object The copied object.

Other

stringify

static source
JsonEx.stringify(object)

Converts an object to a JSON string with object information.

Details

Converts an object to a JSON string with object information.

@param
object object The object to be converted.
@returns
string The JSON string.

parse

static source
JsonEx.parse(json)

Parses a JSON string and reconstructs the corresponding object.

Details

Parses a JSON string and reconstructs the corresponding object.

@param
json string The JSON string.
@returns
object The reconstructed object.