Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Getting result of a task
Message
 
 
À
21/11/2016 08:08:09
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:
01643755
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 it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform