How to use LosFormatter from win form application?

  • Thread starter Thread starter Julia
  • Start date Start date
J

Julia

How to serialize and object to use as a parameter in a URL?

Hi,

I need to serialize an object in such a way that it can be passed as
parameter in a URL

http://www.domain.com?object=%d793btng....

I did some reading and I came to the conclusion that I need to create a
custom formatter and implements the IFormatter interface

the problem is that I don't quit know how to implements the
IFormatter.Serialize function

1.How do I get the attribute of each property?

2.How can i get all properties,i guess I need to use reflection?

2.How do I track the object which already Serialized(assuming the object
contains other objects)

Note that I cannot use binary formatter or other,since the code which do the
deserialization is a client side java script

thanks in advance.
 
The SOAP formatter outputs text so that can be used, i am not sure using
a custom IFormatter is the way to go, since there are a lot of issues
you need to consider as detailed in this link
http://www.dotnet247.com/247reference/msgs/37/189642.aspx

If you simply need to transfer the serialized object as text then you
can also use base-64 encoding to encode the binary output of
BinaryFormatter to text which can then be passed as a param in the URL.

Sijin Joseph
http://www.indiangeek.net
http://weblogs.asp.net/sjoseph
 
Back
Top