I have this object:

> obj <- list(test=1.0)
> obj
$test
[1] 1

> toJSON(obj)
[1] "{\"test\":1}"

How do force the serialization of obj$test to be "1.0" instead of "1"?
I.e. the output should be:

> toJSON(obj)
[1] "{\"test\":1.0}"

	[[alternative HTML version deleted]]

