Fernando Romero Fernando Romero - 1 year ago 133
JSON Question

Receiving an incorrect JSON string from connection

Data received from connection HttpUrlConnection

I get this information when I make a connection from Android Studio.
Suppose I will receive a different string to process it with a JSON object, for example:

[
{
"id":"24",
"nombre":"Fernando",
"telefono":"11111111"
},
{
"id":"26",
"nombre":"Wincenslao",
"telefono":"78783434"
}
]


This string is correct but I get another different string in Android Studio
See the attached image. Could you please help?

Answer Source

You are requesting a Web page via HttpUrlConnection. The creators of that Web site are not expecting this; they want that Web page to be viewed in Web browsers that have JavaScript enabled.

Please contact the maintainers of that Web site and ask them if they have a proper Web service API that you can use.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download