Exemple #1
0
 internal override void ToJson(
     IJsonContext context, IJsonWriter writer, IJsonMapper <JsonElement> elMapper)
 {
     if (_value == null)
     {
         writer.WriteRaw(JsonLiterals.Null);
     }
     else
     {
         writer.EncodeAndWrite(_value);
     }
 }
Exemple #2
0
        public override void ToJson(IJsonContext context, IJsonWriter writer, char instance)
        {
            var charString = instance.ToString();

            writer.EncodeAndWrite(charString);
        }
 public override void ToJson(IJsonContext context, IJsonWriter writer, string instance)
 {
     writer.EncodeAndWrite(instance);
 }
Exemple #4
0
 public override void ToJson(IJsonContext context, IJsonWriter writer, Guid instance)
 {
     writer.EncodeAndWrite(instance.ToString("D"));
 }