Skip to content

Deep JSON causes stack overflow #1180

@jdh30

Description

@jdh30

JsonValue parses JSON uses a suite of mutually recursive functions but the recursive calls are not in tail position so deep JSON values cause a stack overflow.

For example:

String.replicate 50000 "[" + String.replicate 50000 "]"
|> FSharp.Data.JsonValue.Parse

causes a stack overflow on my machine.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions