Function stringify

  • 8x faster JSON.stringify() function.

    Converts an input value to a JSON (JavaScript Object Notation) string, about 8x faster than the native JSON.stringify() function. The 5x faster principle is because it writes an optimized JSON conversion plan, only for the type T.

    For reference, this typia.json.stringify() does not validate the input value type. It just believes that the input value is following the type T. Therefore, if you can't ensure the input value type, it would be better to call one of below functions instead.

    Type Parameters

    • T

      Type of the input value

    Parameters

    • input: T

      A value to be converted

    Returns string

    JSON string value

    Jeongho Nam - https://github.com/samchon