Found an unhandled corner case in writeJSON()
Fixed the cause of the malfunctioning array storage routine associated with writeJSON()