I do not know what I'm wrong with the truth, I get this error
Sub Reference_onChildAdded(snapshot As Object, child As String)
Log($"Reference_onChildAdded(${snapshot})"$)
Log(child)
Log($"ref_onDatachange()"$)
Dim snap As DataSnapshot = snapshot
Log("Value="&snap.Value)
Dim parser As JSONParser
parser.Initialize(snapshot)
Dim root As Map = parser.NextValue
Dim json As String = root.Get("title")
End Sub
error:
Value={Uid=CLSgTB9noBQVh5fheGqfvEmegWu1, tstamp2=01/22/2017, 20:25:18, UNam=Gabriela Riccomini, Title=null, tstamp=1485127518112, barrio=Jularo, Body=(EditText): Left=0, Top=748, Width=498, Height=124, Tag=, Text=}
Error occurred on line: 531 (Main) is Dim json As String = root.Get("title")
java.lang.ClassCastException: java.lang.String cannot be cast to anywheresoftware.b4a.objects.collections.Map$MyMap
at anywheresoftware.b4a.objects.collections.Map.Get(Map.java:63)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:708)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:337)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:247)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:134)
at anywheresoftware.b4a.BA$2.run(BA.java:328)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5593)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:960)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755)