有这么这个api
curl --request PATCH \
--url https://test.com/api/v1/money \
--header 'content-type: application/json' \
--data '{
"amount": 100.00
}'
- amount只支持带有两位小数点的数字
- 这样是不行的🙅♂️ { "amount": "100.00" }
- 这样也是不行的🙅 { "amount": 100 }
- 这样是可以的👌 { "amount": 100.01 }
问题:
- 在请求api的时候如何把 100 变成 100.00 ?