-1
I have this string to turn into JSONArray
. strbuffer
takes the string.
String strbuffer = stringBuffer.toString();
JSONArray jsonArray = new JSONArray(strbuffer);
You’re making that mistake:
org.json.Jsonexception: Value {"token":"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJjb2RfdXN1YXJpbyI6IjIiLCJjYWRhc3Ryb191c3VhcmlvIjoic3RlbmlvYmFycm9zb0BnbWFpbC5jb20Qif.Pbzd8u3xpquhd25uc7a8fnebzdoi4ep_y8rhnkmzvi"} of type org type.json.Jsonobject cannot be converted to Jsonarray
{"token":"eyJ0eXAiOJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJjb2RfdXN1YXJpbyI6IjIiLCJjYWRhc3Ryb191c3VhcmlvIjoic3RlbmlvYmFycm9zb0BnbWFpbC5jb20ifQ.Pbzd8u3xpquhd25uc7a8fnebzdoi4ep_y8r6hnkmzvi"}
Thank you very much I understood.
– Stênio Barroso de Moraes