Class DriveListParser
java.lang.Object
com.amilesend.onedrive.parse.resource.parser.DriveListParser
- All Implemented Interfaces:
GsonParser<List<Drive>>
Parses a response body that contains a list of
Drives.
Example response body:
{
"value": [
{
"id": "942CAEB0-13AE-491B-85E4-7557CDC0F25F",
"driveType": "documentLibrary",
"name": "Shared Documents",
"owner": {
"user": {
"id": "AE2A1EE9-81A7-423C-ABE4-B945F47509BB",
"displayName": "Ryan Gregg"
}
}
},
{
"id": "C1CD3ED9-0E98-4B0B-82D3-C8FB784B9DCC",
"driveType": "documentLibrary",
"name": "Contoso Project Files",
"owner": {
"user": {
"id": "406B2281-18E8-4416-9857-38C531B904F1",
"displayName": "Daron Spektor"
}
}
}
]
}
API Documentation- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classUsed to deserialize a response body that contains a list of drives. -
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
-
DriveListParser
public DriveListParser()
-
-
Method Details
-
parse
Description copied from interface:GsonParserDeserializes a JSON-formatted input stream to the defined POJO type.- Specified by:
parsein interfaceGsonParser<List<Drive>>- Parameters:
gson- the Gson instance used to deserialize the stringjsonStream- stream with expected JSON-formatted contents- Returns:
- the parsed POJO instance
-