Skip to content

CarefulParsing.js

kyleady edited this page Jan 24, 2018 · 1 revision

Purpose

I am unable to maintain absolute control of all strings that will be parsed by JSON.parse(). This function gives the current gm a warning if something failed to parse instead of erroring out the API.

Usage

carefulParse(str)

If JSON.parse(str) works without error, it will return JSON.parse(str). Otherwise it will catch the error, warn the current GM, and log the string.

Requirements

-

Clone this wiki locally