1
votes

I am using AWS SDK for java using maven dependency in my code. When I perform any action it gives me output in the JSON format. but that JSON doesn't seem to be in correct format. key, value pair should ideally be quoted with double quotes in JSON. Is this the default behavior of SDK?? because when I use aws-cli it outputs the correct format.

My JSON output using java sdk looks like:

[{InstanceId: i----fe,PublicIp: 0.0.0.56,AllocationId: eipalloc-8--c,AssociationId: eip--0c,Domain: vpc,NetworkInterfaceId: eni--c0,NetworkInterfaceOwnerId: ------,PrivateIpAddress: 0.0.0.0}]

Why key-value pair is not having quotes , any idea?

1

1 Answers

0
votes

Your snippet looks like the output of the toString() function in the Instance class. It's not intended to be JSON and instead just a human-readable string.