Function validateStringify

  • 5x faster JSON.stringify() function with detailed type validation.

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

    In such reason, when input value is not matched with the type T, it returns IValidation.IFailure value with detailed error reasons. Otherwise, there's no problem on the input value, JSON string would be stored in data property of the output IValidation.ISuccess instance.

    For reference, with detailed type validation, it is even 5x 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 IValidation<string>

    Validation result with JSON string value

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

  • 5x faster JSON.stringify() function with detailed type validation.

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

    In such reason, when input value is not matched with the type T, it returns IValidation.IFailure value with detailed error reasons. Otherwise, there's no problem on the input value, JSON string would be stored in data property of the output IValidation.ISuccess instance.

    For reference, with detailed type validation, it is even 5x 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 IValidation<string>

    Validation result with JSON string value

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