How to convert a Java object to a C ++ object?

My problem is this. I have Java serialized binaries stored in files. I need to restore objects in C ++ and continue the process.

I think I can deserialize Java objects using Java, serialize acsii files again, and then load into C ++ code. Also, I know that you can call a Java function from C ++ using JNI, but I don't know how to pass parameters, i.e. Return objects back to C ++. But is there a better way?

Thank!

+3
source share
6 answers

, Java ++ Java.

JNI , Java, ++. , ++ , ( , ++).

Java- ++ , , , Java, , ++. ( Java), , , ( ++), , , Java.

+3

, Java, () , Protobuf (http://code.google.com/p/protobuf/) , ++.

+2

++. , , Java .

- Java , JSON java, google-gson , ++ .

+2

, , , . , Java ++, blob ++. , blob Java, . , ++ . , , , XML, XML ++ .

+1

, , . , / . ++ .

0

sashang, - , , Java. deserialise ++, . , , Java ++. , .

0

Source: https://habr.com/ru/post/1780598/


All Articles