Serialize a list of objects in JSON C# and deserialize it on Android -



Serialize a list of objects in JSON C# and deserialize it on Android -

i need serialize list of objects in json c# , deserialize on android.

c#

public string serializedata(list<symbolsinfo> dave) { javascriptserializer jss = new javascriptserializer(); string json = jss.serialize(dave); homecoming json; }

serialization -- ok. how can deserialize list on android ?

[serializable] public partial class symbolsinfo { public string sname { get; set; } public nullable<double> sprice { get; set; } public nullable<int> svolume { get; set; } public system.datetime sdate { get; set; } }

according knowledge

android doesn't back upwards auto json deserialisation, , java library know jackson, check fasterxml/jackson @ github, don't think it's suitable android case.

the mutual solution read http response , parse manually using jsonobject / jsonarray according response. link contains explanation how utilize these object, check decode json section

about doing http request , current response, android back upwards 2 http client. more details check link

c# android json

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -