Issue Details (XML | Word | Printable)

Type: Improvement Improvement
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Unassigned
Reporter: jfuerth
Votes: 0
Watchers: 0

If you were logged in you would be able to see more operations.

Shorten getter method names; make chained getters read well when used together

Created: 06/Feb/13 04:06 PM   Updated: 10/Feb/13 06:49 AM   Resolved: 10/Feb/13 06:49 AM
Component/s: None
Affects Version/s: None
Fix Version/s: 1.0-pfd

Time Tracking:
Not Specified

Participants: jfuerth and jitu

 Description  « Hide

The idea here is to make the following two changes, which work well together:

1. Remove 'value' from most getter names
2. Use the same method naming convention on JsonNumber as is used on java.lang.Number

The result is that repetitive-looking use cases like jsonObject.getNumberValue("num").getDoubleValue() turn into this non-repetitive arrangement: jsonObject.getNumber("num").doubleValue().

This suggestion, along with JSON_PROCESSING_SPEC-53, has been implemented here: