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

JSON API renaming: s/JsonArray/JsonList and s/JsonObject/JsonMap

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: 1.0-pr
    • Fix Version/s: 1.0-pr
    • Labels:
      None

      Description

      Mark Reinhold's feedback
      -------------------------
      Looking at this API in depth for the first time, I kept getting confused
      by the name "JsonObject".

      In Java terms, what JSON calls an "Object" is just a map, from strings to
      JSON values. Java already uses "Object" as the unifying supertype of all
      types, so I'd expect "JsonObject" to unify (some set of) JSON-specific
      value types.

      This suggests a renaming along these lines:

      JsonObject --> JsonMap
      JsonObjectBuilder --> JsonMapBuilder
      JsonStructure --> JsonObject

      I think Java developers would find this more natural, since most will
      never read the actual JSON specification.

      Remember that this API is for Java developers, not readers of the JSON
      specification.
      -------------

        Activity

        jitu created issue -
        jitu made changes -
        Field Original Value New Value
        Status Open [ 1 ] Resolved [ 5 ]
        Assignee jitu [ jitu ]
        Resolution Won't Fix [ 2 ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved: