Exemple #1
0
 public static string Unescape(string escaped)
 {
     var tokenizer = new JSONTokener(escaped);
     return (tokenizer.NextValue().ToString());
 }
 public static bool DeserializeSystemBoolean(Stream stream, SerializationFormat serializationFormat, WebMessageFormat webMessageFormat)
 {
     if (IsXml(serializationFormat, webMessageFormat))
     {
         var doc = GetXDocument(stream);
         return DeserializeSystemBoolean(doc.Root);
     }
     else
     {
         var json = GetString(stream);
         var tokenizer = new JSONTokener(json);
         return bool.Parse(tokenizer.NextValue().ToString());
     }
 }