0
C# android java
anyone good in xamarin android? who knows how to pass a list to json?
4 Answers
+ 1
If you use newtonsoft json (as I can remember, its by default), you should use something like this:
List<int> l = new List{1,2,3,4,5};
var jsonString = JsonConvert.SerializeObject(l);
More info and examples by link:
http://www.newtonsoft.com/json/help/html/SerializingCollections.htm
+ 1
Its the same :) The newtonsoft library is very powerful)))
You can try to watch examples :)
0
Thanks Nick..how about if that list is part of list. Like,if an Item has 5 items in it,and it's part of a list.
0
I'll let you know.