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,15 +52,17 @@ 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);
|
||||||
|
}
|
||||||
|
if (ResultId != null) {
|
||||||
|
w.Write (",\"rid\":");
|
||||||
|
JsonConvert.WriteJsonString (w, ResultId);
|
||||||
|
}
|
||||||
w.Write ('}');
|
w.Write ('}');
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
w.Write ("\"}");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public string ToJson ()
|
public string ToJson ()
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue