arduino-libraries / Arduino_JSON

Official JSON Library for Arduino
GNU Lesser General Public License v2.1
151 stars 60 forks source link

Cannot even do a simple swap #17

Open chandlersonne opened 3 years ago

chandlersonne commented 3 years ago

JSONVar apList; JSONVar apObj1; JSONVar apObj2; apObj1["name"]=1; apObj2["name"]=2; apList[0]=apObj1; apList[1]=apObj2; //swap the 2 objects JSONVar tmp1; tmp1 = apList[2]; JSONVar tmp2; tmp2 = apList[1]; apList[2] = tmp2; apList[1] = tmp1; The last line causes exception somehow.