ln.json/JSONSpecial.cs

27 lines
854 B
C#
Raw Normal View History

2017-11-03 13:13:09 +01:00
using System;
2019-08-07 23:02:00 +02:00
namespace ln.json
2017-10-26 16:41:14 +02:00
{
2019-08-07 23:02:00 +02:00
public class JSONTrue : JSONValue
{
public static JSONTrue Instance { get; } = new JSONTrue();
private JSONTrue() : base(JSONValueType.TRUE) { }
public override string ToString() => "true";
2019-10-04 20:10:00 +02:00
public override object ToNative() => true;
}
2019-08-07 23:02:00 +02:00
public class JSONFalse : JSONValue
{
public static JSONFalse Instance { get; } = new JSONFalse();
private JSONFalse() : base(JSONValueType.FALSE) { }
public override string ToString() => "false";
2019-10-04 20:10:00 +02:00
public override object ToNative() => false;
}
2019-08-07 23:02:00 +02:00
public class JSONNull : JSONValue
{
public static JSONNull Instance { get; } = new JSONNull();
private JSONNull() : base(JSONValueType.NULL) { }
public override string ToString() => "null";
2019-10-04 20:10:00 +02:00
public override object ToNative() => null;
}
2017-10-26 16:41:14 +02:00
}