Api & Custom Fields

I’m not able to update the custom fields and get “errors”:[{“message”:"custom_fields: Value is not valid JSON:

{ 
  "id":392096801051329,
  "custom_fields":{
    "24321869754625":"Test", 
    "188798652655039":197365168746421 
  },
  "due_on":"2017-08-01",
  "name":"James",
}   

It seems to be in the format provided and If I remove the custom_fields parameter I am able to update my task. What is missing?