I need to exchange an object between Objective-C client and Java Server. I ask my friends how it can implement, and he answer me that read byte is the way to go. But how can it implements? How can I know the variable length, and related information? Thanks.
-
It's relatively meaningless to say "exchange objects" between Java and Objective-C without specifying some sort of extra-linguistic object concept.Hot Licks– Hot Licks2012-04-20 16:13:32 +00:00Commented Apr 20, 2012 at 16:13
Add a comment
|
3 Answers
You need some sort of serialization format. You could use a text-based format such as XML or JSON, decoding it appropriately (whether by hand or not). Alternatively, there are various portable binary-based serialization formats available, such as Protocol Buffers which has an Objective-C port.
Comments
There are a lot of options here. JSON, protocol buffers, ... There's even a giant list of possibilities.