-1

failing parsing JSON on a post call with malformed JSON

{

    "role": 

    {
        "name": "string2",
    },
    {
        "name": "string3",
    },
    {
        "name": "string4",
    },
}

Any help on formatting the json is really helpful

Thank you

Karl Knechtel
  • 62,466
  • 11
  • 102
  • 153
anish anil
  • 2,299
  • 7
  • 21
  • 41
  • Does this answer your question? [How can I diagnose common errors in JSON data?](https://stackoverflow.com/questions/75188362/how-can-i-diagnose-common-errors-in-json-data) – Karl Knechtel Apr 01 '23 at 07:31

1 Answers1

1

role should be a JSON array:

{
    "role": [
        {
            "name": "string2"
        },
        {
            "name": "string3"
        },
        {
            "name": "string4"
        }
    ]
}
stuck
  • 1,477
  • 2
  • 14
  • 30