Android : Android NDK Encoder

on Sunday, August 10, 2014


I am trying to use ndk to create a c++ interface for encoding, as Java code could easily been decompiled.


My java native interface would be



public native String encode(JSONObject json);


All I want to do is to input a json, and output a string based on the content inside the json.


I have created .h file



JNIEXPORT jstring JNICALL Java_com_kxiaozao_hellojni_HelloJni_jsonTest
(JNIEnv *env, jobject thisz, jobject json);


But how can I implement it with cpp to get data inside the json? I did find the library called jsoncpp, but couldn't find it useful.


0 comments:

Post a Comment