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.Seri alize 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(assu ming 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. 5 3690
Hi Julia:
Reflection would allow you to step through the public properties of
any object. The PropertyInfo class in the System.Reflecti on namespace
is pretty useful for getting the values of all properties:
PropertyInfo[] info = Type.GetType("S ystem.Type").Ge tProperties();
Then use GetValue on each PropertyInfo to return the value of each
property as an object..
HTH,
--
Scott http://www.OdeToCode.com
On Sun, 26 Sep 2004 09:58:04 +0200, "Julia" <co********@012 .net.il>
wrote: 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.Ser ialize 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(assu ming the object contains other objects)
Note that I cannot use binary formatter or other,since the code which do the deserializatio n is a client side java script
thanks in advance.
Additionally, you would have to encode the output to account for
characters that are not allowed.
Personally, I would choose to use the SOAP formatter and then use a POST
to post the contents to the server. The output of any object being
serialized is quite lengthy, and not suited for placement in a URL.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m
"Scott Allen" <bitmask@[nospam].fred.net> wrote in message
news:m1******** *************** *********@4ax.c om... Hi Julia:
Reflection would allow you to step through the public properties of any object. The PropertyInfo class in the System.Reflecti on namespace is pretty useful for getting the values of all properties:
PropertyInfo[] info = Type.GetType("S ystem.Type").Ge tProperties();
Then use GetValue on each PropertyInfo to return the value of each property as an object..
HTH,
-- Scott http://www.OdeToCode.com
On Sun, 26 Sep 2004 09:58:04 +0200, "Julia" <co********@012 .net.il> wrote:
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.Se rialize 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(assu ming the object contains other objects)
Note that I cannot use binary formatter or other,since the code which do the deserializati on is a client side java script
thanks in advance.
Thanks,i must use the URL since i am passing it using email
I am using Base64 to encode the output.
Thanks.
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard .caspershouse.c om> wrote in
message news:el******** ******@TK2MSFTN GP10.phx.gbl... Additionally, you would have to encode the output to account for characters that are not allowed.
Personally, I would choose to use the SOAP formatter and then use a
POST to post the contents to the server. The output of any object being serialized is quite lengthy, and not suited for placement in a URL.
Hope this helps.
-- - Nicholas Paldino [.NET/C# MVP] - mv*@spam.guard. caspershouse.co m
"Scott Allen" <bitmask@[nospam].fred.net> wrote in message news:m1******** *************** *********@4ax.c om... Hi Julia:
Reflection would allow you to step through the public properties of any object. The PropertyInfo class in the System.Reflecti on namespace is pretty useful for getting the values of all properties:
PropertyInfo[] info = Type.GetType("S ystem.Type").Ge tProperties();
Then use GetValue on each PropertyInfo to return the value of each property as an object..
HTH,
-- Scott http://www.OdeToCode.com
On Sun, 26 Sep 2004 09:58:04 +0200, "Julia" <co********@012 .net.il> wrote:
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.Se rialize 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(assu ming the object contains other objects)
Note that I cannot use binary formatter or other,since the code which do the deserializati on is a client side java script
thanks in advance.
Keep the QueryString under 255 characters...
--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
I get paid good money to
solve puzzles for a living
"Julia" <co********@012 .net.il> wrote in message
news:OR******** *****@TK2MSFTNG P14.phx.gbl... Thanks,i must use the URL since i am passing it using email I am using Base64 to encode the output.
Thanks.
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard .caspershouse.c om> wrote
in message news:el******** ******@TK2MSFTN GP10.phx.gbl... Additionally, you would have to encode the output to account for characters that are not allowed.
Personally, I would choose to use the SOAP formatter and then use a POST to post the contents to the server. The output of any object being serialized is quite lengthy, and not suited for placement in a URL.
Hope this helps.
-- - Nicholas Paldino [.NET/C# MVP] - mv*@spam.guard. caspershouse.co m
"Scott Allen" <bitmask@[nospam].fred.net> wrote in message news:m1******** *************** *********@4ax.c om... Hi Julia:
Reflection would allow you to step through the public properties of any object. The PropertyInfo class in the System.Reflecti on namespace is pretty useful for getting the values of all properties:
PropertyInfo[] info = Type.GetType("S ystem.Type").Ge tProperties();
Then use GetValue on each PropertyInfo to return the value of each property as an object..
HTH,
-- Scott http://www.OdeToCode.com
On Sun, 26 Sep 2004 09:58:04 +0200, "Julia" <co********@012 .net.il> wrote:
> >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.Se rialize 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(assu ming the
object>contains other objects) > >Note that I cannot use binary formatter or other,since the code which
do>the >deserializati on is a client side java script > >thanks in advance. > > >
Why?!?!
"Kevin Spencer" <ks******@takem pis.com> wrote in message
news:ur******** ******@TK2MSFTN GP15.phx.gbl... Keep the QueryString under 255 characters...
-- HTH, Kevin Spencer .Net Developer Microsoft MVP I get paid good money to solve puzzles for a living
"Julia" <co********@012 .net.il> wrote in message news:OR******** *****@TK2MSFTNG P14.phx.gbl... Thanks,i must use the URL since i am passing it using email I am using Base64 to encode the output.
Thanks.
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard .caspershouse.c om> wrote in message news:el******** ******@TK2MSFTN GP10.phx.gbl... Additionally, you would have to encode the output to account for characters that are not allowed.
Personally, I would choose to use the SOAP formatter and then use
a POST to post the contents to the server. The output of any object being serialized is quite lengthy, and not suited for placement in a URL.
Hope this helps.
-- - Nicholas Paldino [.NET/C# MVP] - mv*@spam.guard. caspershouse.co m
"Scott Allen" <bitmask@[nospam].fred.net> wrote in message news:m1******** *************** *********@4ax.c om... > Hi Julia: > > Reflection would allow you to step through the public properties of > any object. The PropertyInfo class in the System.Reflecti on
namespace > is pretty useful for getting the values of all properties: > > PropertyInfo[] info = Type.GetType("S ystem.Type").Ge tProperties(); > > Then use GetValue on each PropertyInfo to return the value of each > property as an object.. > > HTH, > > -- > Scott > http://www.OdeToCode.com > > > On Sun, 26 Sep 2004 09:58:04 +0200, "Julia" <co********@012 .net.il> > wrote: > >> >>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.Se rialize 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(assu ming the object >>contains other objects) >> >>Note that I cannot use binary formatter or other,since the code
which do >>the >>deserializati on is a client side java script >> >>thanks in advance. >> >> >> >
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: James Sleeman |
last post by:
Hi all,
i just spent an hour rifling through code to find the cause of a problem
only to find it's an oddity with serialization and recursive objects, so
figured I'd post for the next person who gets the same problem (y'all might
find it interesting too)...
********************************* Symptoms *********************************
When unserializing a previously serialized object, the __wakeup() function
is mysteriously called more...
|
by: Michel |
last post by:
Hi there,
What is the best way to serialize unknown data?
I have a class that contains a list of parameter objects.
The parameter has a value which can be a simple value of a complex class,
e.g.
class param {
object value;
}
|
by: David Sworder |
last post by:
Hi,
I've created a UserControl-derived class called MyUserControl that is
able to persist and subsequently reload its state. It exposes two methods as
follows:
public void Serialize(Stream s);
public void Deserialize(Stream s);
Within the MyUserControl class, there is a field of type MyInnerClass
|
by: andrewcw |
last post by:
I have an object to serialize.
TextWriter writer = new StreamWriter("test.xml");
serializer.Serialize(writer,obj);
writer.Close();
but below does not, why ?? I have a file that I will have
exclusively opened & I use the stream for that operation.
THANKS { I am tring to push the object back into
the stream )
|
by: Roberto Carriquiry |
last post by:
I am writeing a webService that needs to recieve a CDO.Person object as a
parameter. but when I run it I have a runtime error.
Cannot serialize member CDO.PersonClass.DataSource of type CDO.IDataSource
because it is an interface
I assume that something is wrong with the serialization of this object.
Does anyone have experience in this subject?
thanks
| |
by: Julia |
last post by:
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
|
by: Brad |
last post by:
I would like to serialize an arraylist of objects to xml so I can store the
xml in a database column. How would I code the serializing and
deserializing? Below is a (overly) simple, incomplete example of what I'd
want to accomplish.
Thanks
Brad
Example
|
by: Hone |
last post by:
I'm trying to serialize/deserialize the XML for an RSS 1.0 Feed (i.e. RDF)
and the root element, as required by the standard, looks like this:
<rdf:RDF ...>
</rdf:RDF>
However, I've tried everything using XmlRootAttribute, XmlTypeAttribute,
XmlSerializerNamespacesAttribute, etc, and nothing will serialize to or
deserialize from this root element format.
|
by: =?Utf-8?B?UGhpbCBKb2huc29u?= |
last post by:
Hi,
I am using dotnet remoting with a binarry formatter.
I have a property that returns a memorystream that has had a file loaded
into it.
When I try to access this property though I get an error regarding "the
proxy has no channel sink.......or no suitable Client channel to talk to
the server."
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |