use iolists in place of binaries when building json
fix test that was failing for the wrong reason
introduce option to skip checking for repeated keys