GeezerVison is showing github.com — Adding methods to JsonParser to get objects · Issue #9 · javaee/json-processing-spec
This repository was archived by the owner on Aug 10, 2023. It is now read-only.
This repository was archived by the owner on Aug 10, 2023. It is now read-only.
Adding methods to JsonParser to get objects #9
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 getJsonValue(Class clazz) { return null; }
Activity
glassfishrobot commented on Jun 14, 2012
ContributorAuthor
More actions
glassfishrobot commented on Sep 20, 2014
ContributorAuthor
More actions
kchung said:
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.
glassfishrobot commented on Apr 25, 2017
ContributorAuthor
More actions
This issue was imported from java.net JIRA JSON_PROCESSING_SPEC-9
Metadata
Metadata
Development
No branches or pull requestsIssue actions