I have a string that is returned to me that is formatted as a JSON. The string looks as follows
{ "Type" : "Notification". "MessageId" : "9343.....". "TopicArn" : "arn-....." "......" }
I have created a custom object that I would like to parse this string into
public class AmazonSNSMessage
{
private String Type;
private String Notification;
private String MessageId;
private String TopicArn;
private String Subject;
private String Message;
private String Timestamp;
private String SignatureVersion;
private String Signature;
private String UnsubscribeURL
// And all the appropriate get/set methods
}
Is there a JSON deserializer in Java that will take the string and create an instance of the AmazonSNSMessage?
C# Does this by calling this line
AmazonSNSMessage b = JsonConvert.DeserializeObject<AmazonSNSMessage>(TheString);
and ideally I would like something similar.