Click here to Skip to main content
15,902,938 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I need to send a reference type object to a different destination/application. Do I need to serialize the object before sending it?; Do we have other alternative available to serialization process in such case?

What I have tried:

I need to send a reference type object to a different destination/application. Do I need to serialize the object before sending it?; Do we have other alternative available to serialization process in such case?
Posted
Updated 18-Dec-16 8:04am

You have to send the data to the destination in the form it is expecting.

If you are writing both applications you can do as you please, however using the likes of JSON makes it easier to implement and maintain.
 
Share this answer
 
Comments
knackCoder 18-Dec-16 14:38pm    
Thanks Michael for your response. The application I would require to interact with is already functional. Now we are building a application and as part of some functionality we have to pass information from our system. So please suggest among Binary/XML/JSON serialization, which one will be more reliable;
Michael_Davies 18-Dec-16 14:48pm    
Without knowing exactly what you are serialising it is difficult to say, personally I'd avoid XML.

There are Binary JSON as well as text JSON serialisers, search on this site, best to test them out and see which best fits your requirements.
Quote:
I need to send a reference type object to a different destination/application. Do I need to serialize the object before sending it?; Do we have other alternative available to serialization process in such case?
The alternative is rolling your own serializzation mechanism, that is
  • Retrieve all state information of the object.
  • Write such information using a protocol common to both the applications (and send it to the other application)
  • On the target application side, using the information retrieved, build up a fresh object.

Usually, if an existing serialization mechanism is available, things are a bit easier.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900