Hi i wonder if it is possible to unmarshal this given json to a struct
type Movie struct {
Title string
Actors []string
ID int
Length int
RelaseDate string
}
Here is an example of the json
{
"movies": [
{
"movie_title_A": {
"actors": [
"<actorID1123123>",
"<actorID1123123>",
"<actorID1123123>",
"<actorID1123123>",
"<actorID1123123>",
"<actorID1123123>...."
]
},
"ID": 99992,
"length": 120,
"relaseDate": "2.10.2012"
},
{
"movie_title_B": {
"actors": [
"<actorID1123123>",
"<actorID1123123>",
"<actorID1123123>",
"<actorID1123123>",
"<actorID1123123>",
"<actorID1123123>...."
]
},
"ID": 123124,
"length": 90,
"relaseDate": "10.10.2012"
}
]
}
As you can see the Name field can take on any name, since it is the title of the movie. Is there an efficient way to put it into the struct above? Any help would be nice, thanks