def _dump_json(catalog, subpath, dest_path=None, should_decompress=True, gzip=True):

    if gzip:
        subpath = helpers.append_file_extension_for_format(subpath, Formats.GZ)

    data = catalog._read(subpath)  # TODO: fix private method references

    if gzip and should_decompress:
        out = utils.gunzip_bytes(data)
    else:
        out = data

    if dest_path is not None:
        with open(dest_path, 'w+b') as f:
            f.write(out)
        log.info((dest_path) % 'Wrote %s')
    else:
        print out
dataset/ETHPy150Open mindsnacks/Zinc/src/zinc/cli.py/_dump_json/swapped operands of `%`