Function parseJson

      • The parseJson combinator offers a method to convert JSON strings into the unknown type using the underlying functionality of JSON.parse. It also employs JSON.stringify for encoding.

        Type Parameters

        • I

        • A extends string

        Parameters

        • self: Schema<I, A>
        • Optional options: {
              replacer?: (string | number)[];
              reviver?: ((this, key, value) => any);
              space?: string | number;
          }
          • Optional replacer?: (string | number)[]
          • Optional reviver?: ((this, key, value) => any)
              • (this, key, value): any
              • Parameters

                • this: any
                • key: string
                • value: any

                Returns any

          • Optional space?: string | number

        Returns Schema<I, unknown>

        Since

        1.0.0