json-processing-spec
  1. json-processing-spec
  2. JSON_PROCESSING_SPEC-54

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

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.0-pfd
    • Labels:
      None

      Description

      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:

      https://github.com/jfuerth/javax-json/commit/shorter-method-names

        Activity

        jfuerth created issue -
        jitu made changes -
        Field Original Value New Value
        Fix Version/s 1.0-pfd [ 16271 ]
        jitu made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]

          People

          • Assignee:
            Unassigned
            Reporter:
            jfuerth
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: