public Emotion unmarshall(JsonUnmarshallerContext context) throws Exception { Emotion emotion = new Emotion();
public Emotion unmarshall(JsonUnmarshallerContext context) throws Exception { AwsJsonReader reader = context.getReader(); if (!reader.isContainer()) { reader.skipValue(); return null; } Emotion emotion = new Emotion(); reader.beginObject(); while (reader.hasNext()) { String name = reader.nextName(); if (name.equals("Type")) { emotion.setType(StringJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("Confidence")) { emotion.setConfidence(FloatJsonUnmarshaller.getInstance() .unmarshall(context)); } else { reader.skipValue(); } } reader.endObject(); return emotion; }