I have Developed the C# Web Method. In this Method Request and Response are Json Array Format.
When I Read Json Array from Post Request, Error Occurred.
My Json Array is
[{"partner_hotel_code": "510","reservation_id": "7660"},{"partner_hotel_code": "510","reservation_id": "7666"}]
Error is
"Type 'System.Collections.Generic.IDictionary`2[[System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]' is not supported for deserialization of an array."
When i changed the Json into below mentioned format, My method is working Properly.
{"JsonData":[{"partner_hotel_code": "510","reservation_id": "7660"},{"partner_hotel_code": "510","reservation_id": "7666"}]}
But I don't want this format.
Please help, how to rectify the Problem.
>(postData); //or see this http://stackoverflow.com/questions/7895105/deserialize-json-with-c-sharp
– GorvGoyl Apr 12 '17 at 06:55