Closed greedykangaroo01 closed 8 months ago
quantity_requested
is an integer:
json_string.SetInt((get_value<int64_t>(fact, "quantity-requested")));
(*o).AddMember("quantity_requested", json_string, alloc);
Others will be adapted in an upcoming PR.
Currently, a few properties in the websocket that always contain numerical values are typed and thus sent as strings. I noticed this with
pose
,last_seen
(robots)quantity_delivered
,quantity_requested
,delivery_period
(orders)points_cyan
,points_magenta
(game state)time_to_display
(attention messages) If possible, I think it would be better to provide these values as numbers instead. The format of the websocket messages is used to type the frontend and while it was okay to use strings until now, the storage format in the MongoDB often uses numbers instead. Instead of converting them into strings to then later parse them back into floats, it makes more sense to always use the numerical values.