jsonSerializer.DeserializeObject and arrays
- by Chin
I have a column in the a database with values like the below.
[{"noteText":"Today was sunny.","noteDate":"2010-03-30 10:06:22"},{"noteDate":"2010-04-06 13:21:36","noteText":"Today was windy."}]
I think they are from an array of objects serialized via flash to Json.
What I need to do is pull out the noteText and noteDate values only and record them back to the database as a normal string.
I was hoping to just deserialize back to objects and build up a string from there, however,
due to my unfamiliarity with c# and .Net I've hit a brick wall trying to deserialize the string.
var obj = jsonSerializer.DeserializeObject(ns);
Am I going in the right direction or should I be looking at doing some string manipulation?
Any pointers much appreciated.