Float JSON serialization outputs approxiamte value
Using BasicFormats.FloatJsonFormat to serialize 1.85f of type Float yields 1.850000023841858 in the resulting JSON.
This is caused by the fact that JsNumber has no apply for Float, just for Double.
Proposal: add JsNumber.apply(Float).
Worst thing here is that there is no way to override/hide implicit BasicFormats.FloatJsonFormat since it's an object and not a value.
Came across this behaviour as well. The issue appears to be in JsNumber.apply (https://github.com/spray/spray-json/blob/master/src/main/scala/spray/json/JsValue.scala#L97) where the Float should be converted to a BigDecimal using BigDecimal.decimal rather than BigDecimal (see documentation there). Got a PR that adds a apply method for Floats to JsNumber: https://github.com/spray/spray-json/pull/241