Hi I have a JSON like:
{
"name" : "avg",
"code" : {"value":" import android
droid = android.Android()
droid.makeToast('Hello, Android!')",
"type":"PythonScript"
}
}
However, in value field(Python script for Android) I need a newline character between the 3 statements. Something like,
"value":"import android " + "\n" + "droid = android.Android()" + "\n" + "droid.makeToast('Hello, Android!')"
Is it possible to do this? Thanks in advance 🙂
Its better to configure your server to send you HTML-encoded value string. Afterwards, it would be easier to re-construct and show in
TextView, for e.g.Your expected Json response:
Once you read the value string:
Then its easier to put it in TextView using html encoding: