Added arrays to JSON translator.
Also added test for opt.