Example #1
0
        private void SerializeString(JsonWriter writer, object value, JsonStringContract contract)
        {
            contract.InvokeOnSerializing(value, Serializer.Context);

            string s;

            TryConvertToString(value, contract.UnderlyingType, out s);
            writer.WriteValue(s);

            contract.InvokeOnSerialized(value, Serializer.Context);
        }
    private void SerializeString(JsonWriter writer, object value, JsonStringContract contract)
    {
      contract.InvokeOnSerializing(value, Serializer.Context);

      string s;
      TryConvertToString(value, contract.UnderlyingType, out s);
      writer.WriteValue(s);

      contract.InvokeOnSerialized(value, Serializer.Context);
    }