Issue with `Schema.is` and `Schema.validate` when using `Schema.parseJson` in Effect Typescript
Schema.is/validate fails when decode passes when using Schema.parseJson
I ran into a problem with using
Minimal reproduction:
gives:
Note that the
From the
Note that this will fail with any valid Json, I used the above as its a little clearer to see from the
https://effect.website/play/#49db060dbf23
I ran into a problem with using
Schema.is to check if something matches a schema, when the schema uses Schema.parseJson. Turns out that both is and validate will fail on valid into, and decode will pass.Minimal reproduction:
gives:
Note that the
decode is successful (right) and the validate is a failure, (left). is is a success but with false as the result.From the
ParseError output, it appears that the parseJson hasn't been applied.Note that this will fail with any valid Json, I used the above as its a little clearer to see from the
ParseError where the problem lies.https://effect.website/play/#49db060dbf23
