Python Forum
500 error cannot deserialize json object
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
500 error cannot deserialize json object
Unable to resolve this error while calling API endpoint in flask. Passing the data as json in the POST request. Could someone hep me with the way to resolve this error.

[500 b'Cannot deserialize the current JSON object (e.g. {"name":"value"}) into type 'System.Guid[]' because the type requires a JSON array (e.g. [1,2,3]) to deserialize correctly.\r\nTo fix this error either change the JSON to a JSON array (e.g. [1,2,3]) or change the deserialized type so that it is a normal .NET type (e.g. not a primitive type like integer, not a collection type like an array or List<T>) that can be deserialized from a JSON object. JsonObjectAttribute can also be added to the type to force it to deserialize from a JSON object.\r\nPath 'id', line 1, position 6.' ]
My code
[def sync_user_direct(self):
            self.port = 4240
            path = 'qrs/usersdirconnect/syncuserdirect'
            body = {"id": "fba0485e-2f45-4a2f-951c-ef257f469ba8"}
            print(, data=json.dumps(body)))
            return json.loads(, data=json.dumps(body)).decode('utf-8'))]

Possibly Related Threads…
Thread Author Replies Views Last Post
  Error object has no attribute text hcyeap 3 8,218 May-21-2019, 07:12 AM
Last Post: buran
  Error when decoding JSON ( Expecting ',' delimiter:) tortoise 7 16,931 Feb-18-2019, 08:27 AM
Last Post: tortoise
  Json decoding error saisankalpj 3 1,729 Jul-23-2018, 07:06 PM
Last Post: nilamo
  AttributeError: 'NoneType' object has no attribute error vk7 1 4,433 Feb-02-2018, 08:36 AM
Last Post: buran

Forum Jump:

User Panel Messages

Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020