Class in reactor_core_io.js

JsonEx

6 functions in 3 groups · hide internal

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.

Checks (True / False) 1

_isLiveObject() A display object, picture or GPU texture: the screen's, not the game's state.

Other 4

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

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.

Checks (True / False)

_isLiveObject

static internal source
JsonEx._isLiveObject(value)

A display object, picture or GPU texture: the screen's, not the game's state.

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.

_encode

static internal source
JsonEx._encode(value, depth)

Encode. (Same as the RPG Maker MZ method of this name.)

_decode

static internal source
JsonEx._decode(value)

Decode. (Same as the RPG Maker MZ method of this name.)