Skip to content
Advertisement

String to JSONObject troubles

Is the first time I have to make this and I think I’m going to the wrong side. I trying to pass my String to a JSONObject but it’s nothing working. My code is this:

JavaScript

The locationObj value after:

JavaScript

enter image description here

(The code continue like a String and I don’t know why)

The class I’m going to use to map later is this

JavaScript

How can I convert my String locationStringJson to a FarmGeoJson.class?

Advertisement

Answer

Try the below method.

JavaScript
User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement