1
I’m having trouble in syntax of shoppingsObj, why are you making this mistake?
Expected a JSON Object, array or literal.
shoppingsObj = {
"shoppings": [
{ "nome": "Bangu Shopping", "licenseKey":"0", "acessKey":"0", "secretKey":"0", "latitude1":["-22.879832"], "latitude2":["-22.877738"], "longitude1:":["-43.468601"], "longitude2:":["-43.465978"] },
{ "nome": "Boulevard Shopping Campos", "licenseKey":"0", "acessKey":"0", "secretKey":"0", "latitude1":["-21.755484"], "latitude2":["-21.753139"], "longitude1:":["-41.350870"], "longitude2:":["-41.346417"] }
]
}
Your
JSON
has an invalid format. You are manipulating it withjavascript
?– Marcelo de Andrade
Hello Thiago. Where does this come from? Ajax request? Are you using jQuery or another framework? Did you write this manually in your . js? Could you explain exactly how you got this JSON?
– Guilherme Nascimento
@Marcelodeandrade, I’m manipulating with java for Android. I need to create an object that is the shoppingsObj and then do the following shoppingsObj.latitude[] = "";
– Thiago Saad
@Guilhermenascimento wrote here above now.
– Thiago Saad
It is possible to post the whole object, or at least a little more complete?
– Paulo Martins
Wait, so you’re writing in Java then? I guess this syntax will only work with the Json package and doing the Parse of a string. Could give details of the code?
– Guilherme Nascimento