Android Question Invalid Json ?

victormedranop

Well-Known Member
Licensed User
Longtime User
I am have and error on a valid JSON sting.
this is the error
i validate with


and its valid. i will attach the file, if someone can help me

B4X:
(JSONException) org.json.JSONException: End of input at character 75652 of [{"Id":55,"Codigo":55,"Barra":55,"Producto":"GALLETAS OREO VAINILLA
 

Attachments

  • json.txt
    74 KB · Views: 131

DonManfred

Expert
Licensed User
Longtime User
i will attach the file, if someone can help me
The file is valid.

This is the code to parse it
B4X:
Dim parser As JSONParser
parser.Initialize(<text>)
Dim root As List = parser.NextArray
For Each colroot As Map In root
 Dim Categoria As String = colroot.Get("Categoria")
 Dim Codigo As Int = colroot.Get("Codigo")
 Dim Producto As String = colroot.Get("Producto")
 Dim Marca As String = colroot.Get("Marca")
 Dim Id As Int = colroot.Get("Id")
 Dim Imagen As String = colroot.Get("Imagen")
 Dim Barra As Int = colroot.Get("Barra")
 Dim Precio As Int = colroot.Get("Precio")
Next
 
Upvote 1
Top