How to catch the Json string without knowing what’s in it?

Asked

Viewed 92 times

0

I use jo.getString("name") to get the value of a Json file, it’s like I get this name without having to put the "name" inside getString?

  • What is the context of the question? What language? You can create an example verifiable?

1 answer

-1

Well I think this is not possible because json work with key and value {"name":"Alessandro"} to access the value 'Alessandro' you must access by your key or key that in the case is the "name" and that in android you use getString("name") if it is a string that you want to get.

  • It is possible yes.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.