Json NETMF

Hello everyone.

Does anyone have found a good(that works) Json parser? I need serialize something like this:

{"DeviceId":1,"Id":1,"Location":{"Id":1,"Lat":-23.5516,"Long":-46.6344,"Speed":0},"Timestamp":"\/Date(1334677685100+0000)\/","Weather":{"AtmosphericPressure":"xx","Humidity":6.4399999999999995,"Id":1,"Luminosity":61.56,"Temperature":27.289}}

Into something like this:


    [DataContract]
    public partial class DeviceState
    {
    	[DataMember]
    	public int Id { get; set; }
    	[DataMember]
    	public int DeviceId { get; set; }
    	[DataMember]
    	public System.DateTime Timestamp { get; set; }
    
    	[DataMember]
    	public virtual Weather Weather { get; set; }
    	[DataMember]
    	public virtual Location Location { get; set; }
    }

I’ve found some libraries on code.tinyclr.com but they are or incomplete or don’t work like IndianaJones.NETMF.Json. This one always I try to serialize/deserialize something I get an exception on the code. Even the code sample that comes with the library don’t work.

Anyone can share any library that really works?

Thanks!

Best regards…

What kind of exception are you getting. You can always extend the json implementation from code.tinyclr.com and add missing parts that you need.