Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can a serialized simple java object be deserialized by C#?

Assuming all fields of a java class are java primitives, if such an object has been serialized, can it be successfully deserialized by C# into an instance of an "equivalent" C# class?

Is the reverse possible - C# to java?


I realise there are many language agnostic formats, such as XML that could be used to get the job done. I am more interested in whether using the native serialized data is feasible.

like image 447
Bohemian Avatar asked Jul 23 '13 05:07

Bohemian


2 Answers

The formats of serialized streams are available. I think you can write a class easily to parse the byte stream and create the required class in C#.

An article that specifies the serialized format: http://www.javaworld.com/community/node/2915

like image 103
Raji Avatar answered Sep 30 '22 03:09

Raji


WOX will be helpful to achieve interoperable serialization.
it can serialize/deserialize Java/C# objects into/from standard XML(platform independent)

like image 21
Ashok Damani Avatar answered Sep 30 '22 02:09

Ashok Damani