public class JSONFieldParser extends Object
| Modifier and Type | Method and Description |
|---|---|
static FoursquareEntity[] |
parseEntities(Class<?> clazz,
org.json.JSONArray jsonArray,
boolean skipNonExistingFields)
Static method that parses JSON array into array of FoursquareEntities
|
static FoursquareEntity[] |
parseEntitiesHash(Class<?> clazz,
org.json.JSONObject jsonHashList,
boolean skipNonExistingFields)
Static method that parses JSON "named array" into array of FoursquareEntities
|
static FoursquareEntity |
parseEntity(Class<?> clazz,
org.json.JSONObject jsonObject,
boolean skipNonExistingFields)
Static method that parses single JSON Object into FoursquareEntity
|
public static FoursquareEntity[] parseEntities(Class<?> clazz, org.json.JSONArray jsonArray, boolean skipNonExistingFields) throws FoursquareApiException
clazz - entity classjsonArray - JSON ArrayskipNonExistingFields - whether parser should ignore non-existing fieldsFoursquareApiException - when something unexpected happenspublic static FoursquareEntity[] parseEntitiesHash(Class<?> clazz, org.json.JSONObject jsonHashList, boolean skipNonExistingFields) throws FoursquareApiException
clazz - entity classjsonHashList - JSON "named array"skipNonExistingFields - whether parser should ignore non-existing fieldsFoursquareApiException - when something unexpected happenspublic static FoursquareEntity parseEntity(Class<?> clazz, org.json.JSONObject jsonObject, boolean skipNonExistingFields) throws FoursquareApiException
clazz - entity classjsonObject - JSON ObjectskipNonExistingFields - whether parser should ignore non-existing fieldsFoursquareApiException - when something unexpected happensCopyright © 2014 Foyt. All Rights Reserved.