Archivi tag: Json

Pass json POST data to Web API method and enumerate it

This is a very tricky problem. I had to create a REST service that receives any json class and elaborates its properties and values without knowing anything about the object received. Here the body posted And here the REST service’s … Continua a leggere

Pubblicato in .Net, c#, REST | Contrassegnato , , | Lascia un commento

Serializing Entity Framework classes with JSON (Web API) without relationship

How many times have you ever tried to serialize an object of a type generated by EntityFramework. As you know with Entity Framework the relationship between to tables are made using virtual IEnumerable. As just you try to access to … Continua a leggere

Pubblicato in .Net, Asp.Net, c#, Entity Framework, MVC | Contrassegnato , | Lascia un commento

JSON Serialization C#

Today I write DAL layer that comunicate with the service with JSON. First of all I used JavaScriptSerializer object but I found some problem with DateTime type. When it deserialize the DateTime it consider the UTC delta and day light … Continua a leggere

Pubblicato in Asp.Net, c# | Contrassegnato , , , , , , , | Lascia un commento

WCF REST, configure endopoint to return SOAP, XML and JSON

WCF is a great technology but unfortunatly it’s not so easy to configure it to work correctly. I’ve spent many hours to understand exact how to configure WCF to gain the right result. Creating a WCF it’s easy, and it’s … Continua a leggere

Pubblicato in Asp.Net, c#, WCF | Contrassegnato , , , , , , , , | 4 commenti