public KeyPair unmarshall(JsonUnmarshallerContext context) throws Exception { KeyPair keyPair = new KeyPair();
public KeyPair unmarshall(JsonUnmarshallerContext context) throws Exception { AwsJsonReader reader = context.getReader(); if (!reader.isContainer()) { reader.skipValue(); return null; } KeyPair keyPair = new KeyPair(); reader.beginObject(); while (reader.hasNext()) { String name = reader.nextName(); if (name.equals("PublicKey")) { keyPair.setPublicKey(StringJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("PrivateKey")) { keyPair.setPrivateKey(StringJsonUnmarshaller.getInstance() .unmarshall(context)); } else { reader.skipValue(); } } reader.endObject(); return keyPair; }
public KeyPair unmarshall(JsonUnmarshallerContext context) throws Exception { AwsJsonReader reader = context.getReader(); if (!reader.isContainer()) { reader.skipValue(); return null; } KeyPair keyPair = new KeyPair(); reader.beginObject(); while (reader.hasNext()) { String name = reader.nextName(); if (name.equals("PublicKey")) { keyPair.setPublicKey(StringJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("PrivateKey")) { keyPair.setPrivateKey(StringJsonUnmarshaller.getInstance() .unmarshall(context)); } else { reader.skipValue(); } } reader.endObject(); return keyPair; }
public KeyPair unmarshall(JsonUnmarshallerContext context) throws Exception { KeyPair keyPair = new KeyPair();