T - Type of the corresponding model object.public static interface IModelObject.IJsonUtil<T>
| Modifier and Type | Method and Description |
|---|---|
T |
createModelObject(com.google.gson.JsonObject jsonObject)
Build a model object with the information given in a json object.
|
T |
createModelObject(String json)
Build a model object with the information given in a json string.
|
T[] |
createModelObjectArray(com.google.gson.JsonArray jsonArray)
Create an array of model objects out of a json array object.
|
<X> X[] |
createModelObjectArray(com.google.gson.JsonArray jsonArray,
Class<X> clazz)
Create an array of model objects out of a json array object and a
Class object. |
T[] |
createModelObjectArray(String json)
Create an array of model objects out of a json string.
|
T[] |
createModelObjectArray(String json,
String key)
Create an array of model objects out of a json array, which is contained in a json object.
|
Paging<T> |
createModelObjectPaging(com.google.gson.JsonObject jsonObject)
Create a paging of model objects out of a json object.
|
Paging<T> |
createModelObjectPaging(String json)
Create a paging of model objects out of a json string.
|
Paging<T> |
createModelObjectPaging(String json,
String key)
Create a paging of model objects out of a json array, which is contained in a json object.
|
PagingCursorbased<T> |
createModelObjectPagingCursorbased(com.google.gson.JsonObject jsonObject)
Create a cursor-based paging of model objects out of a json object.
|
PagingCursorbased<T> |
createModelObjectPagingCursorbased(String json)
Create a cursor-based paging of model objects out of a json string.
|
PagingCursorbased<T> |
createModelObjectPagingCursorbased(String json,
String key)
Create a cursor-based paging of model objects out of a json array, which is contained in a json object.
|
boolean |
hasAndNotNull(com.google.gson.JsonObject jsonObject,
String memberName)
Check whether the supplied JSON object contains data in the given member, which is not
null. |
boolean hasAndNotNull(com.google.gson.JsonObject jsonObject,
String memberName)
null.jsonObject - The JSON object.memberName - The member name.T createModelObject(com.google.gson.JsonObject jsonObject)
jsonObject - A json object.T createModelObject(String json)
json - A json object.T[] createModelObjectArray(com.google.gson.JsonArray jsonArray)
jsonArray - A JsonArray.T[] createModelObjectArray(String json)
json - A JsonArray.T[] createModelObjectArray(String json, String key)
json - A JsonObject.key - The key of the json array in the json object.<X> X[] createModelObjectArray(com.google.gson.JsonArray jsonArray,
Class<X> clazz)
Class object.X - The model object type of the array and class object.jsonArray - A json array object.clazz - The class object.Paging<T> createModelObjectPaging(com.google.gson.JsonObject jsonObject)
jsonObject - A json object.Paging<T> createModelObjectPaging(String json)
json - A json string.Paging<T> createModelObjectPaging(String json, String key)
json - A JsonObject.key - The key of the json array in the json object.PagingCursorbased<T> createModelObjectPagingCursorbased(com.google.gson.JsonObject jsonObject)
jsonObject - A json object.PagingCursorbased<T> createModelObjectPagingCursorbased(String json)
json - A json string.PagingCursorbased<T> createModelObjectPagingCursorbased(String json, String key)
json - A JsonObject.key - The key of the json array in the json object.Copyright © 2020. All rights reserved.