A best-behaved JSON emitter would require you to denote which elements are intended to be numbers, the same way it uses an object to let you denote which elements should be booleans. This would be in keeping with the design of perl, that a scalar should never have an implied type, and use typed operators to coerce the data as it gets used. It's only due to history and implementation details that our JSON modules have tried to be overly clever about detecting which scalars are meant to be numbers, and given us this headache.