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

Provide read() methods to return Map<String,Object> and List in JsonReader

    Details

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

      Description

      The JsonReader can have two additional read() methods to de-serialize a JSON object or array.

      JsonReader {
      Map<String,Object> readObjectAsMap( )
      List readArrayAsList( )
      }

      Map<String,Object> --> JSON object
      List --> JSON array
      The element objects in the Map or List can be any valid Java-JSON types or a Map or a List.

      This will avoid the need to convert a JsonObject or JsonArray to a Map<String,Object> or a List object respectively after de-serializing via JsonReader.

        Activity

        Hide
        jitu added a comment -

        Will consider JsonArray to implement List<JsonValue>
        and JsonObject to implement Map<String, JsonValue>

        Show
        jitu added a comment - Will consider JsonArray to implement List<JsonValue> and JsonObject to implement Map<String, JsonValue>

          People

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

            Dates

            • Created:
              Updated:
              Resolved: