chore(json): use new failingWithException method

related to #CAM-2459
chore(json): rename method appendAt to insertAt

related to #CAM-2460
chore(json): use int for index which cannot be null

related to #CAM-2460
test(json): add string primitive script test for json mapping

related to #CAM-2545