Class DriveItemListParser
java.lang.Object
com.amilesend.onedrive.parse.resource.parser.DriveItemListParser
- All Implemented Interfaces:
GsonParser<List<DriveItem>>
Parses a response body that contains a list of
DriveItems.
Example response body:
{
"value": [
{"name": "myfile.jpg", "size": 2048, "file": {} },
{"name": "Documents", "folder": { "childCount": 4} },
{"name": "Photos", "folder": { "childCount": 203} },
{"name": "my sheet(1).xlsx", "size": 197 }
]
}
API Documentation- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classUsed to deserialize a response body that contains a list of drive items. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionparse(@NonNull com.google.gson.Gson gson, @NonNull InputStream jsonStream) Deserializes a JSON-formatted input stream to the defined POJO type.
-
Constructor Details
-
DriveItemListParser
public DriveItemListParser()
-
-
Method Details
-
parse
Description copied from interface:GsonParserDeserializes a JSON-formatted input stream to the defined POJO type.- Specified by:
parsein interfaceGsonParser<List<DriveItem>>- Parameters:
gson- the Gson instance used to deserialize the stringjsonStream- stream with expected JSON-formatted contents- Returns:
- the parsed POJO instance
-