private static CreateUnsupportedTypeException ( |
||
writer | ||
value | object | |
return |
private static JsonWriterException CreateUnsupportedTypeException(JsonWriter writer, object value)
{
return JsonWriterException.Create(writer, "Unsupported type: {0}. Use the JsonSerializer class to get the object's JSON representation.".FormatWith(CultureInfo.InvariantCulture, value.GetType()), null);
}
public virtual void WriteValue(object value) { if (value == null) { this.WriteNull(); return; } if (value is BigInteger) { throw JsonWriter.CreateUnsupportedTypeException(this, value); } JsonWriter.WriteValue(this, ConvertUtils.GetTypeCode(value), value); }