parent
2eafc04615
commit
6c02b985bc
|
@ -4,7 +4,7 @@ namespace Ooui
|
|||
{
|
||||
class JsonConvert
|
||||
{
|
||||
static void WriteJsonString (System.IO.TextWriter w, string s)
|
||||
public static void WriteJsonString (System.IO.TextWriter w, string s)
|
||||
{
|
||||
w.Write ('\"');
|
||||
for (var i = 0; i < s.Length; i++) {
|
||||
|
|
|
@ -52,15 +52,17 @@ namespace Ooui
|
|||
w.Write (TargetId);
|
||||
w.Write ("\",\"k\":\"");
|
||||
w.Write (Key);
|
||||
w.Write ('\"');
|
||||
if (Value != null) {
|
||||
w.Write ("\",\"v\":");
|
||||
w.Write (",\"v\":");
|
||||
JsonConvert.WriteJsonValue (w, Value);
|
||||
}
|
||||
if (ResultId != null) {
|
||||
w.Write (",\"rid\":");
|
||||
JsonConvert.WriteJsonString (w, ResultId);
|
||||
}
|
||||
w.Write ('}');
|
||||
}
|
||||
else {
|
||||
w.Write ("\"}");
|
||||
}
|
||||
}
|
||||
|
||||
public string ToJson ()
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue