B4J Question [BANanoServer] As(JSON).ToMap Raising a compilation error

Mashiane

Expert
Licensed User
Longtime User
Hi there

Not sure if Im missing something..

B4X:
[ERROR 69]: [BROWSERTest,addeditchat: 7] as is not supported in BANano!

Reproduction:

Create a BANanoServer REST API with PWA Project.

Add the following code in BrowserApp

B4X:
public Sub AddEditChat(chatrec As String)
    Dim rec As Map = chatrec.As(JSON).ToMap
End Sub

B4X:
[ERROR 69]: [BROWSERApp,addeditchat: 54] as is not supported in BANano!
--> 
--> Current next: as --> Current index: 2
--> Current Translation: 
--> Var :    B4JName: chatrec, EventName: , JSName: __4ca ,ISPRIVATE: true,B4JTYPE: string, IsArray: false, InitValue: ""
[ERROR 69]: [BROWSERApp,addeditchat: 54] as is not supported in BANano!
--> 
--> Current next: as --> Current index: 2
--> Current Translation: 
--> Var :    B4JName: chatrec, EventName: , JSName: __4ca ,ISPRIVATE: true,B4JTYPE: string, IsArray: false, InitValue: ""
[ERROR 52]: [BROWSERApp,addeditchat: 54]  -> json() is not supported in BANano!
--> 
--> Current index: 6
--> Var :    B4JName: , EventName: , JSName:  ,ISPRIVATE: true,B4JTYPE: json, IsArray: false, InitValue: /* json NOT SUPPORTED */
[ERROR 21]: [BROWSERApp,addeditchat: 54] tomap is not supported in BANano!

Of course for now I will use BANano.FromJSON(?)
 
Top