Effect CommunityEC
Effect Community3y ago
11 replies
Kristian Notari

Json Schema encode: Maximum call stack size exceeded

While messing up with schema and json, I wrote a test for a use case of mine and noticed that encoding using a Schema<string, json> gives you maximum call stack size exceeded (at least while testing with vitest).

In the screen you can find a minimal repro. Doing the same with the classic JSON.stringify throws correctly without the call stack size exceede error, but with the message reporting the circular structure.
image.png
Was this page helpful?