Skip to content

Conversation

@omgtehlion
Copy link

This fixes a problem with json files like this, when inside an array there are objects mixed with literals:

{
  array: [
    { some: "object" },
    null,
    { another: "object" },
    false,
  ]
}

In the transition from ValueBegin to ValueEnd a check of last level container type was performed before popping the stack, so the parser was confused and considered that it was inside an object, instead of an array.

This fix peeks the last level container after popping the container stack.

@omgtehlion
Copy link
Author

omgtehlion commented Jul 12, 2025

This error was not triggered for null value existing in the test fixture because it (the null literal) was handled differently from true and false. This commit fixes the discrepancy as well.

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