You want `float.round(2)` rather than `sprintf('%.2f', float)` because the latter is a string and json will quote it.