From 20f9fcd4f5ddd01a8590de437a61bc22664d09f9 Mon Sep 17 00:00:00 2001 From: Harald Wolff Date: Fri, 4 Oct 2019 20:10:00 +0200 Subject: [PATCH] Implement ToNative() on JSONSpecial --- JSONSpecial.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/JSONSpecial.cs b/JSONSpecial.cs index 46e89b8..6b9ee14 100644 --- a/JSONSpecial.cs +++ b/JSONSpecial.cs @@ -6,18 +6,21 @@ namespace ln.json public static JSONTrue Instance { get; } = new JSONTrue(); private JSONTrue() : base(JSONValueType.TRUE) { } public override string ToString() => "true"; - } + public override object ToNative() => true; + } public class JSONFalse : JSONValue { public static JSONFalse Instance { get; } = new JSONFalse(); private JSONFalse() : base(JSONValueType.FALSE) { } public override string ToString() => "false"; - } + public override object ToNative() => false; + } public class JSONNull : JSONValue { public static JSONNull Instance { get; } = new JSONNull(); private JSONNull() : base(JSONValueType.NULL) { } public override string ToString() => "null"; - } + public override object ToNative() => null; + } }