I'm trying to get a struct from json object, but the work is harder than I expected
Code:
Function ResponseCardFromJSON Handle hoResponse Returns Panorama_tPedido
Boolean isParseOK
String StringVariable sJson
Handle hoJSON
Panorama_tPedido responseCard //Panorama_tPedido is my base struct
Send RemoveEmptyMembers hoResponse True True True //remove Null values
Get Create (RefClass(cJsonObject)) to hoJSON
Get ParseString of hoJSON (Stringify(hoResponse)) to isParseOK
Set pbRequireAllMembers of hoJson to False
If (isParseOK) Begin
Get JsonToDataType of hoJSON hoResponse to responseCard <-- error line
Get psParseError of hoJSON to StringVariable
End
Send Destroy to hoJSON
Send Destroy to hoResponse
Function_Return responseCard
End_Function
I added in attachment my json (JsonTest.txt) and my structures (generated by Unicorn InterGlobal's RestGen program)
the error i got is "Invalid Json Object Expected number!"
can anyone help me understand what is going on with my json data? thanks you
API_Structs.rar