eclipse-ee4j / eclipse-ee4j/parsson

JsonPaser#getString() returns wrong value

Open
#7 10 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
17
Forks
25
PR merge metrics
No merged PRs in 30d

Description

The reference implementation fails to raise an error when the input JSON is invalid. Here is a reproducer:

JsonParser parser = Json.createParser(new StringReader("{\"a\":13"));
parser.next(); // START_OBJECT
parser.next(); // KEY_NAME
parser.next(); // VALUE_NUMBER
System.out.println(parser.getString()); // "13a":1
#### Environment
JDK7
#### Affected Versions
[1.0.4]

Contributor guide

Open the contributing guide

Research direction

Start by running the provided Json.createParser and JsonParser#getString reproducer on JDK7, then trace the parser behavior for the incomplete JSON input. Done means invalid JSON raises an error instead of returning the malformed value shown in the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.