I have an object defined as below. From my WCF Service I can return a List with no problems, but when I try to return as Json, it returns zero bytes. No error.
I have about 80 other methods in this project with no problems, but this one will simply not convert. I could change Serializer to NewtonSoft but this is nearing the end of this project. I've never seen this issue before.
My objectX is as below, is there something I've missed?
public class objectX
{
public string CompanyName { get; set; }
public string Username { get; set; }
public string BranchName { get; set; }
public Nullable<decimal> Amount { get; set; }
public int Id { get; set; }
public int ClientId { get; set; }
public int UserId { get; set; }
public int TypeId { get; set; }
public int Credits { get; set; }
public System.DateTime InvoiceDate { get; set; }
public string Notes { get; set; }
public Nullable<int> LinkedId { get; set; }
public string Status { get; set; }
public Nullable<System.DateTime> DateProcessed { get; set; }
public Nullable<int> ProcessedBy { get; set; }
public int BranchId { get; set; }
public Nullable<System.DateTime> CreatedOn { get; set; }
public Nullable<int> CreatedBy { get; set; }
public Nullable<System.DateTime> ModifiedOn { get; set; }
public Nullable<int> ModifiedBy { get; set; }
}
Here is the contract:
[OperationContract]
[WebInvoke(Method = "GET",
UriTemplate = "objectX/Read/{clientId}/{branchId}/{statuses}/{dateTime}",
ResponseFormat = WebMessageFormat.Json)]
List<objectX> objectXRead(string clientId, string branchId, string statuses, string dateTime);