Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Getting result of a task
Message
From
21/11/2016 08:47:15
 
General information
Forum:
ASP.NET
Category:
Common Language Runtime
Environment versions
Environment:
C# 5.0
OS:
Windows 10
Database:
MS SQL Server
Miscellaneous
Thread ID:
01643645
Message ID:
01643759
Views:
32
>>Firstly fix your headers - you can see what's needed so set the headers accordingly.
>>
>>The Json object (TicketUsageRequests) is an array of objects so put the item in an array.
>
>I may be dumb, but I can not figure out how to include the name of my object. I only managed to send the following so far:
>
>
>[{"TicketBarcode":"01120800369238","TicketUsageDate":"2016-10-28T15:09:06.7021957-06:00","UserID":"name here"}]
>
>I defined public class
>
>
> public class TicketUsageRequests
>    {
>       public String TicketBarcode { get; set; } // "01120000369239",
>       public String TicketUsageDate { get; set; } // "2016-03-28T15:09:06.7021957-06:00",
>       public String UserID { get; set; } // "patrick"
>    }
>
>and I added a new property to my main class
>
>
>public List<TicketUsageRequests> TicketUsageRequests { get; set; }
>
>but when I send it, I'm getting list of objects without any name and not what I need to send.

If you are building your object in C# then see this answer : http://stackoverflow.com/questions/16898731/creating-an-json-array-in-c-sharp
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform