I can't find a good answer as to how to format a map in my json post when I want it to map directly to my Java pojo with the @RequestBody annotation. I'm assuming the json would look something like:
{
"myInt":"10",
"myMap":"{1:\"A\"}"
}
My pojo would have a myInt
field and a myMap
field. The myMap
field is of type Map<Integer,String>
What does the json for the map look like to get this to work?