Added Array json support, documentation and logging of errors