Function isStringify

  • 7x faster JSON.stringify() function with type checking.

    typia.json.stringify() is a combination function of is and stringify. Therefore, it converts an input value to JSON (JavaScript Object Notation) string, with type checking.

    In such reason, when input value is not matched with the type T, it returns null value. Otherwise, there's no problem on the input value, JSON string would be returned.

    For reference, with type checking, it is even 7x times faster than the native JSON.stringify() function. So, just enjoy the safe and fast JSON conversion with confidence.

    Type Parameters

    • T

      Type of the input value

    Parameters

    • input: T

      A value to be checked and converted

    Returns string | null

    JSON string value when exact type, otherwise null

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

  • 7x faster JSON.stringify() function with type checking.

    typia.json.isStringify() is a combination function of is and stringify. Therefore, it converts an input value to JSON (JavaScript Object Notation) string, with type checking.

    In such reason, when input value is not matched with the type T, it returns null value. Otherwise, there's no problem on the input value, JSON string would be returned.

    For reference, with type checking, it is even 7x times faster than the native JSON.stringify() function. So, just enjoy the safe and fast JSON conversion with confidence.

    Type Parameters

    • T

      Type of the input value

    Parameters

    • input: unknown

      A value to be checked and converted

    Returns string | null

    JSON string value when exact type, otherwise null

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