8 – Help my rest api display decimal

I create rest api custom module.
use DrupalrestResourceResponse;

I need output

 "data": {
    "image": "data:image/;base64,",
    "name": "Name",
    "point": 5.0,
  }

But output

 "data": {
    "image": "data:image/;base64,",
    "name": "Name Activy",
    "ponint": 5,
  }