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