> As mentioned in
> https://github.com/bitcoin/bitcoin/pull/17675#issuecomment-563188648
This makes more functional tests compatible with option `--usecli`, by fixing the JSON serialization error for `Decimal` objects. This was the most common error preventing tests to run with `--usecli` in D8316.
Before:
```
$ ninja && test/functional/test_runner.py --usecli 2>&1 | cut -f2 -d'|' | grep -E ' (Passed|Skipped|Failed|) *$' | sort | uniq -c
97 ✓ Passed
49 ○ Skipped
```
After:
```
$ ninja && test/functional/test_runner.py --usecli 2>&1 | cut -f2 -d'|' | grep -E ' (Passed|Skipped|Failed|) *$' | sort | uniq -c
108 ✓ Passed
38 ○ Skipped
```
This is a backport of Core PR17705
Depends on D8317