B4J Question As(JSON).ToMap and Warning #22

tchart

Well-Known Member
Licensed User
Longtime User
Ive started using the As(JSON).ToMap approach in some of my projects (prior to the new library update I had a fuinction to do this) but Im getting the #22 Warning that the types dont match.

If there any way to tidy this up?

B4X:
Dim body as Map
body = Cursor.GetString2(0).As(JSON).ToMap ' Shows Warning #22

Ive tried brackets around various bits but this doesnt seem to help.

I find Warning #22 useful so I dont want to disable it.
 

TILogistic

Expert
Licensed User
Longtime User
?
'ignore

Dim m As Map = s.As(JSON).ToMap 'ignore
 
Upvote 0

tchart

Well-Known Member
Licensed User
Longtime User
?
'ignore


Awesome, I wasnt aware of that! Thanks @oparra
 
Upvote 0
Top