Details

    • Type: New Feature New Feature
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
      None

      Description

      Something like the following, that gives the objects from the parser

      /**

      • getJsonValue(JsonObject.class) is valid in START_OBJECT state,
      • moves cursor to END_OBJECT
        *
      • getJsonValue(JsonArray.class) is valid in START_ARRAY state
      • moves cursor to END_ARRAY
        *
      • getJsonValue(JsonString.class) is valid in VALUE_STRING state
        *
      • getJsonValue(JsonNumber.class) is valid in VALUE_NUMBER state
        */
        public <T extends JsonValue> T getJsonValue(Class<T> clazz) { return null; }

        Activity

        Hide
        kchung added a comment -

        This issue, together with issue 29, would be useful for processing big JSON data. It is important to be able to load the JSON values are of interest and skip those that are not.

        However, it is most likely that the criteria for getting or skipping JSON values lies within the values themselves. For instance, say we have an array of objects representing the contacts, and we are only interested in getting the contacts who are females that live in New York city. We'll need to process some parts of the object to determine if it should be loaded or skipped, and we cannot make that decision at the beginning of an object. How to factor that into the API is the challenge.

        Show
        kchung added a comment - This issue, together with issue 29, would be useful for processing big JSON data. It is important to be able to load the JSON values are of interest and skip those that are not. However, it is most likely that the criteria for getting or skipping JSON values lies within the values themselves. For instance, say we have an array of objects representing the contacts, and we are only interested in getting the contacts who are females that live in New York city. We'll need to process some parts of the object to determine if it should be loaded or skipped, and we cannot make that decision at the beginning of an object. How to factor that into the API is the challenge.

          People

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

            Dates

            • Created:
              Updated: