Please help me in converting this code to B4i. On the B4A, it works perfectly.
The function registers a user in the MYSQL database, returning as value by PHP, only the ID number.
The value of the "Value" variable must return a number.
But it has an exception Error parsing string: Error Domain = NSCocoaErrorDomain Code = 3840 "JSON text did not start with array or object to allow fragments not set." UserInfo = {NSDebugDescription = JSON text did not start with array or option to allow fragments not set.}
The function registers a user in the MYSQL database, returning as value by PHP, only the ID number.
B4X:
If Job.JobName = "InserirUsuario" Then
Valor = Parser.NextObject
Dim ValorInt As Int
If IsNumber(Valor) Then
ValorInt = Valor
If ValorInt > 0 Then
IDGerado = ValorInt
CadastroUsuarioFinal(IDGerado)
Else
HD.ToastMessageShow(CST.MENSAGEM_CADASTRO_ERRO, False)
End If
Else
HD.ToastMessageShow(CST.MENSAGEM_CADASTRO_ERRO, False)
End If
End If
The value of the "Value" variable must return a number.
But it has an exception Error parsing string: Error Domain = NSCocoaErrorDomain Code = 3840 "JSON text did not start with array or object to allow fragments not set." UserInfo = {NSDebugDescription = JSON text did not start with array or option to allow fragments not set.}