Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Getting result of a task
Message
De
21/11/2016 08:47:15
 
 
Information générale
Forum:
ASP.NET
Catégorie:
Common Language Runtime
Versions des environnements
Environment:
C# 5.0
OS:
Windows 10
Database:
MS SQL Server
Divers
Thread ID:
01643645
Message ID:
01643759
Vues:
33
>>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform