I have a native method in java file:-
class JNITest{
public native void test(String param1, Map<String, Number> param2, Map<String, Map<String, Double>> param3)
}
After generating header file from java, map is converted to jobject in header file method:-
JNIEXPORT void JNICALL Java_com_jni_JNITest_test
(JNIEnv *env,
jobject self,
jstring param1,
jobject param2,
jobject param3) { }
I have a native method in cpp as:
int cpp_native(
std::string param1,
std::map<std::string, float>& param2,
std::map<std::string, std::map<std::string, float> >& param3) { }
Q:- I need to convert Jobject back to std::map(cpp) to pass it to cpp native method, could anyone please suggest standard approach for doing the same? Thanks in advance.