I'm using Json.net in a 3.5 CF setting and have a problem verifying that a string is indeed complete JSON.
I am using:
var o = JObject.Parse(incomingString);
which will return null if the JSON is incomplete - but not always. If the JSON is something "mostly formed", it will parse correctly. This simple example returns an object:
{ "Name":"Bob", "Pets":[ {"Type":"Cat", "Name":"Pudge"
but if I break the JSON elsewhere, it returns null as expected.
{ "Name":"Bob", "Pets":[ {"Type":"Cat", "Nam
With no closing brackets it seems to "assume" those brackets and returns a proper JObject, but since this JSON data is streaming in I need to verify that all brackets are matched before I process it.
In our limited sandbox, I don't seem to have any of the validation methods available on the newer APIs. Any suggestions for verifying that I have the entire JSON before I process it? Thanks.