1

I have manged to serialize an arraylist in java using xstream, send it to my c# application via http and then write that to file (just for now).

The serialized data was an arraylist in java. I want to try and re form this arraylist in c# from the xml i have.

I have been looking at http://code.google.com/p/xstream-dot-net/ to do this. Does anyone know if that is the right way to go or is there a better way of reforming the serialized data in c#?

4
  • Maybe you can use SOAP based serialization instead of XML based serialization. Commented Jan 6, 2011 at 11:07
  • Serialize an ArrayList to Xml in C# and compare the two files. I would think there are some differences that may provide an answer. Commented Jan 6, 2011 at 13:03
  • just in case anyone finds this question and wants an answer. xstream encodes base 64 so all you need to do on the csharp end is read through the generated xml and decode base 64 (terminology might be off here you get the picture) Commented Jan 6, 2011 at 18:02
  • 1
    If you have discovered an answer to your question, it is perfectly fine to post as the answer. Commented Jan 7, 2011 at 0:48

1 Answer 1

1

I have used JSON.NET (Newtonsoft) on the .NET side and Google's GSON on the java side and it seems to work for Dictionaries, Maps, Sets, Lists, Date, and primitive types with very little configuration involved. Refer to https://github.com/chandru9279/Spikes for it.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.