Skip to content

[RFC] Import upstream parser changes to parse deeply nested Json without st…#6

Draft
Numpsy wants to merge 1 commit intopimbrouwers:masterfrom
Numpsy:tails
Draft

[RFC] Import upstream parser changes to parse deeply nested Json without st…#6
Numpsy wants to merge 1 commit intopimbrouwers:masterfrom
Numpsy:tails

Conversation

@Numpsy
Copy link
Copy Markdown
Contributor

@Numpsy Numpsy commented Aug 24, 2025

…ack overflows

Imports the changes in

fsprojects/FSharp.Data#1225
fsprojects/FSharp.Data#1411

from FSharp.Data, to allow parsing of more deeply nested Json structures without a stack overflow.

Just a thought when looking at the differences between the two parsers, as it seemed like it might be a useful change to have?

…ack overflows

Imports the changes in

fsprojects/FSharp.Data#1225
fsprojects/FSharp.Data#1411

from FSharp.Data, to allow parsing of more deeply nested Json structures without a stack overflow
Comment thread test/Jay.Tests/Tests.fs
|> Json.parse
|> ignore

[<Fact(Skip = "Requires TailCAlls to be enabled")>]
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note:
TailCalls need to be enabled in the library build to get these tests to pass, and those are only enabled in release builds by default (FSharp.Data has them enabled in debug builds as well - see comments in fsprojects/FSharp.Data#1411).
It also looks like you need to use XUnit v3 to be able to mark the tests as Explicit rather than just skiping them

@Numpsy
Copy link
Copy Markdown
Contributor Author

Numpsy commented Aug 25, 2025

might be a useful change to have?

Saying that, this approach does seem to allocate somewhate more memory during parsing :-(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant