I'm having a problem where I'm receiving strings as a typical string or it comes in the form of a list.
For example, I could get:
"Hello world"
Or I could get:
["Hello", "world"]
What's the ideal way to detect the second type in a string object and concatenate accordingly?
Sorry, some code for context:
String result = "";
try
{
result = json.getString("result"); //This could be one of the two options above
}
catch (JSONException e)
{
// Do nothing
}