Cleaned up tests and renamed testclass to the same name as the file.
Added unittest for reproducing issue in #1788
Refactored code.
Renamed tests for adding and removing items on array in typed json.
Fixed incorrect code when an item in an typed json array was removed or the whole array cleared. Solves #1788
Added missing preprocessor directive for debug code in test.
Merge branch 'issue/1788' into develop