Using json.net, I've created a json string which is a serialized version of my data table, and am able to deserialize it back to a data table. Let's say my serialized text looks like this:
[{ username: "alan", firstName: "Alan", lastName: "Johnson", email: "alan@test.com" },
{ username: "allison", firstName: "Allison", lastName: "House", email: "al@test.com" },
{ username: "ryan", firstName: "Ryan", lastName: "Carson", email: "ryan@test.com" } ]
What I'd like to do is add some text to the beginning before the [, or to the end after the ], which would be included in the json text and not hinder the deserialization back to a data table.
I'm using the serialize command, sometimes with a class object as the second (optional) parameter of the serialization command, sometimes not. If I use the second argument, it results in a much more verbose json, which includes table and column definition information.
Either way, I want to possibly add a segment in the json text which will indicate success or failure of the lookup, but will not cause the deserialization to break.
Can anybody suggest a json.net method to do this?
Thanks...