-
-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JSON parsing optimizations #364
Conversation
|
||
for(int i = start + 1; i < end; i++){ | ||
final char ch = json.charAt(i); | ||
switch(E){ |
Check warning
Code scanning / CodeQL
Missing enum case in switch
throw new JsonSyntaxException("Unexpected array value syntax: '" + ln + '\'', json); | ||
continue; | ||
case LITERAL: // expecting literal value | ||
switch(T){ |
Check warning
Code scanning / CodeQL
Missing enum case in switch
throw new JsonSyntaxException("Unexpected object value syntax: '" + ln + '\'', json); | ||
continue; | ||
case LITERAL: // expecting literal value | ||
switch(T){ |
Check warning
Code scanning / CodeQL
Missing enum case in switch
case ',': // next in object | ||
case '}': // end of object | ||
E = START_OF_KEY; // prepare for next | ||
switch(T){ // push value |
Check warning
Code scanning / CodeQL
Missing enum case in switch
try{ | ||
list.add(Integer.parseInt(V)); | ||
}catch(final NumberFormatException ignored){ | ||
list.add(Long.parseLong(V)); |
Check notice
Code scanning / CodeQL
Missing catch of NumberFormatException
try{ | ||
list.add(Double.parseDouble(V)); | ||
}catch(final NumberFormatException ignored){ | ||
list.add(Long.parseLong(V)); |
Check notice
Code scanning / CodeQL
Missing catch of NumberFormatException
try{ | ||
obj.set(K, Integer.parseInt(V)); | ||
}catch(final NumberFormatException ignored){ | ||
obj.set(K, Long.parseLong(V)); |
Check notice
Code scanning / CodeQL
Missing catch of NumberFormatException
try{ | ||
obj.set(K, Double.parseDouble(V)); | ||
}catch(final NumberFormatException ignored){ | ||
obj.set(K, Long.parseLong(V)); |
Check notice
Code scanning / CodeQL
Missing catch of NumberFormatException
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Katsute I have approved this pull request
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Katsute I have approved this pull request
Prerequisites
Issues must meet the following criteria:
GitHub Copilot Disclaimer
The use of GitHub Copilot is strictly prohibited on this repository.
Changes Made
List any changes made and/or other relevant issues.
WF-4168613316
Release Notes
This library is now 70% faster after this change.