codemelted.js Module
    Preparing search index...

    Function json_parse

    • Converts a string to a supported JSON data type.

      Parameters

      • data: string

        The data to parse.

      Returns any

      The JSON data type or null if the parsing fails.

      // To parse and stringify JSON data or types supported by JSON
      // Where data is an object, array, boolean, string, number, or null
      // Invalid data will return as null.
      let stringified = json_stringify(data);
      let parsed = json_parse(stringified);