public void Serialize(TextWriter writer, object data, ObjectSerializerSettings settings = null)
        {
            Condition.Requires(writer, "writer").IsNotNull();

              Encoding enc = GetEncoding(settings);
              FormUrlEncodingPropertyVisitor v = new FormUrlEncodingPropertyVisitor(writer, enc);
              Serializer.Serialize(data, v, settings);
        }
        public void Serialize(TextWriter writer, object data, ObjectSerializerSettings settings = null)
        {
            Condition.Requires(writer, "writer").IsNotNull();

            Encoding enc = GetEncoding(settings);
            FormUrlEncodingPropertyVisitor v = new FormUrlEncodingPropertyVisitor(writer, enc);

            Serializer.Serialize(data, v, settings);
        }