Search code examples
c#jsonlistboxpixelsense

Convert C# SurfaceListBox into a JSON array




I'm working with the MS Surface table called Samsung SUR40 and use the language C# in MS Visual Studio 2010 Express.

What do i want to develop?
An API that records the Surface input and parses these to AS3 using sockets.

How i want to do this?
I want to convert a Surface listbox (i think this is the same as the usual WPF listbox) into a JSON array.


Solution

  • Just convert Listbox item collection into List or array, and then use Json.NET to serialize List into JSON.