public Pose unmarshall(JsonUnmarshallerContext context) throws Exception { AwsJsonReader reader = context.getReader(); if (!reader.isContainer()) { reader.skipValue(); return null; } Pose pose = new Pose(); reader.beginObject(); while (reader.hasNext()) { String name = reader.nextName(); if (name.equals("Roll")) { pose.setRoll(FloatJsonUnmarshaller.getInstance().unmarshall(context)); } else if (name.equals("Yaw")) { pose.setYaw(FloatJsonUnmarshaller.getInstance().unmarshall(context)); } else if (name.equals("Pitch")) { pose.setPitch(FloatJsonUnmarshaller.getInstance().unmarshall(context)); } else { reader.skipValue(); } } reader.endObject(); return pose; }
public Label unmarshall(JsonUnmarshallerContext context) throws Exception { AwsJsonReader reader = context.getReader(); if (!reader.isContainer()) { reader.skipValue(); return null; } Label label = new Label(); reader.beginObject(); while (reader.hasNext()) { String name = reader.nextName(); if (name.equals("Name")) { label.setName(StringJsonUnmarshaller.getInstance().unmarshall(context)); } else if (name.equals("Confidence")) { label.setConfidence(FloatJsonUnmarshaller.getInstance().unmarshall(context)); } else { reader.skipValue(); } } reader.endObject(); return label; }