I have two applications that need to talk to each other. App1 should be able to serialize an object that App2 can then deserialize. Easy done, right? Here is the problem; App1 is based on C #, App2 is based on Java. Therefore, App1 needs to write the file in Java binary file format. How can I do that?
As I see it, I have two options. Firstly, this is some way of serializing a Java object in C #, so App1 just creates the corresponding file. My other option would be to write a Java converter that reads in a file and populates the object accordingly and serializes the newly populated object. So a C # application would just have to write some sort of formatted text file, which then interprets.
I cannot make any changes to the Java application.
How to do it?
Update:
The Java application is already in the hands of clients, so changing the serialization scheme will result in incompatibility with existing client data. The Java application uses the native Java series to work with this object. Modifications to the Java application cannot occur.
A C # application uses protocol buffers to serialize its own data.
source
share