Found an issue in SpiderBasic ? Please report it here !
User avatar
Peter
 
Posts: 445
Joined: Mon Feb 24, 2014 10:17 pm
Location: 127.0.0.1

InsertJSONMap() & static Arrays in structured Maps

by Peter Wed Nov 29, 2017 2:09 pm

Works in PB, but not in SB:

Code: Select all
Structure myItemStructure
  Value.s
EndStructure

Structure myMapStructure
  Item.myItemStructure[1]
EndStructure

NewMap myMap.myMapStructure()

; -----------------

myMap("myKey1")\Item[0]\Value = "Key1ItemValue"

CreateJSON(0) : InsertJSONMap(JSONValue(0), myMap())
Debug Len(ComposeJSON(0)) ; 47 -> OK
FreeJSON(0)

; -----------------

myMap("myKey2")\Item[0]\Value = "Key2ItemValue"

CreateJSON(0) : InsertJSONMap(JSONValue(0), myMap())
Debug Len(ComposeJSON(0)) ; 47 -> not OK (expected 93 like in PB)
FreeJSON(0)


Thanks in advance & Greetings ... Peter
Return to Bugs Reports

Who is online

Users browsing this forum: No registered users and 1 guest