i\'m working with the youtube json from google-api-client :
{
\"apiVersion\": \"2.0\",
\"data\": {
\"updated\": \"2011-01-05T13:48:33.146Z\",
Just say it from my personal experience, @Key may not work on serialization/de-serialization when choosing the wrong Json parser.
(1) When you use Gson parser, like below :
GsonBuilder gsb = new GsonBuilder();
Gson gson = gsb.create();
OneDriveItem oneDriveItem = gson.fromJson(jasonData1, OneDriveItem.class);
@Key does not work, you should use @SerializedName to annotate the field name.
(2) When you use JsonFactory from the package com.google.api.client.json, like below :
JacksonFactory jsonFactory=new JacksonFactory();
@Key should work.