Convert decimal to float with ijson.items

987 views Asked by At

I am reading a big array of JSONS from a file with ijson.items , but numbers are converted to type Decimal.

Example Decimal('14.2')

The documentation says that there is an option use-float = true. But I don't know where to put this option.

Is it possible to use ijson.itemsand obtain floats?

1

There are 1 answers

3
GProst On
ijson.items(file, 'your.prefix', use_float=True)