REST API Json format for self-defined structure

Hi All,

I use a self define structure for JSON deserialize as follow:

The structure consist of two parts, the first one is "Album" which is a database and the second part is "Photos" which is a list of data used to add to the Photo database.


I use postman to send the JSON in a post body:

{
    "Album" : {"Name" : "A1", "Description" : "First Album", "ThumbnailURL" :     "https://img1.gtimg.com/comic/pics/hv1/93/7/2224/144617478.jpg"}


    "Photos" : {[
        "PhotoURL" : "https://img1.gtimg.com/comic/pics/hv1/93/7/2224/144617478.jpg",
        "PhotoURL" : "https://img1.gtimg.com/comic/pics/hv1/92/7/2224/144617477.jpg"
    ]}
}

but receive the following error:
{    "Errors"\: [        "Failed to deserialize JSON to Structure1\:\nAfter parsing a value an unexpected character was encountered\: \". Path 'Album', line 5, position 1."    ],    "StatusCode"\: 500}


Can anyone tell me  what's wrong with the JSON body ( or any other error). Thank you 

Solution

You're missing a comma at the end of line 2 ;)

Solution

DavidA wrote:

You're missing a comma at the end of line 2 ;)

OH YES~!!!

THANK YOU :)