How to send a Map in JSON

  1. Key always should be string.
  2. Why it still doesn’t work? Because the error is caused by the redundant brace inside of “elementsToUpdate”. Below is an example:
"elementsToUpdate": {
  {  // redundant
    "1": {
      "country": "USA",
      "title": "string"
    }
  }  // redundant
}

correct one : 
"elementsToUpdate": {
    "1": {
      "country": "USA",
      "title": "string"
    }
}

Leave a Comment