public virtual void WriteValue(object value) { if (value == null) { this.WriteNull(); } else { if (value is BigInteger) { throw smethod_4(this, value); } smethod_3(this, Class181.smethod_1(value), value); } }
public static string ToString(object value) { if (value == null) { return(Null); } switch (Class181.smethod_1(value)) { case Enum17.Char: return(ToString((char)value)); case Enum17.Boolean: return(ToString((bool)value)); case Enum17.SByte: return(ToString((sbyte)value)); case Enum17.Int16: return(ToString((short)value)); case Enum17.UInt16: return(ToString((ushort)value)); case Enum17.Int32: return(ToString((int)value)); case Enum17.Byte: return(ToString((byte)value)); case Enum17.UInt32: return(ToString((uint)value)); case Enum17.Int64: return(ToString((long)value)); case Enum17.UInt64: return(ToString((ulong)value)); case Enum17.Single: return(ToString((float)value)); case Enum17.Double: return(ToString((double)value)); case Enum17.DateTime: return(ToString((DateTime)value)); case Enum17.DateTimeOffset: return(ToString((DateTimeOffset)value)); case Enum17.Decimal: return(ToString((decimal)value)); case Enum17.Guid: return(ToString((Guid)value)); case Enum17.TimeSpan: return(ToString((TimeSpan)value)); case Enum17.BigInteger: return(smethod_0((BigInteger)value)); case Enum17.Uri: return(ToString((Uri)value)); case Enum17.String: return(ToString((string)value)); case Enum17.DBNull: return(Null); } throw new ArgumentException("Unsupported type: {0}. Use the JsonSerializer class to get the object's JSON representation.".smethod_0(CultureInfo.InvariantCulture, value.GetType())); }