OK. To share data between platforms, you need two things: 1. A shared data layout 2. A shared serialization protocol
For 1: the inbuilt DataTable layout is implementation specific. There is no shared (/common/agreed) shape that both .NET and Java both use, so: nothing is readily available out of the box here. Instead of using DataTable, I would strongly suggest either a DTO defined via something like a shared schema (such as .proto, but let's not get ahead of ourselves), or if you are using unpredictable data (since DataTable is often used ad-hoc): something much less formal - maybe just CSV/TSV For 2: protobuf could indeed help with this bit, if we define a shared schema in 1; however, your question suggests you're using BinaryFormatter, in which case please let me emphasize: *whatever route you go*: don't use BinaryFormatter. It will hurt you - the only question is when. On Tue, 26 Apr 2022, 04:36 'avei shriety' via Protocol Buffers, < [email protected]> wrote: > A request from C# is sent to Java Server, and in Server, it will call *.Net > Core* to serialize the C# DataTable. So I could get the binaryData(like > byte[] format). When the binaryData return to C#, C# could use > *binFormatter.Deserialize() * to get the correct DataTable. > > Now I wonder that how I can get the byte[] Data in Java, which is > serialized by *.Net Core binFormatter.Serialize()*? Or I just wonder that > how I could get this serialized data like coding "*String ss = > data.getString("SS")"* > > -- > You received this message because you are subscribed to the Google Groups > "Protocol Buffers" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/protobuf/24eb176c-bc77-4ae3-a639-5b127ae4a8c2n%40googlegroups.com > <https://groups.google.com/d/msgid/protobuf/24eb176c-bc77-4ae3-a639-5b127ae4a8c2n%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "Protocol Buffers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/protobuf/CAF95VAwE4k-5ooqCyrCgHLGeUKCc0EFkSJB%2B4NSV_BbnDzT6gw%40mail.gmail.com.
