Python – Write bytes in json file
To write a json
file for a dataset in the COCO format I have an RLE encoded mask with type(counts) == bytes
.
To write the dict in a json file i use json.dumps()
. This works for the strings, integers and floats in the dict, but not for the bytes element.