Skip to content

Validate Token Type Errors in readObject #318

Description

@lalitc375

Background

During the code review for the encoding/json/v2 migration in PR #292, it was identified that we need stricter validation around token types during object parsing.

Description

We need to develop a test case to explicitly confirm that the parser correctly handles unexpected token types. Specifically, if the parser encounters a token type other than EndObject or String at a position where a JSON key is expected, the system must return the appropriate, well-defined error.

This ensures that malformed JSON is caught early and produces a standard error matching previous behavior.

Code Pointers

Metadata

  • Priority: P0
  • Complexity: Medium

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions