Convert strings to numbers where appropriate.

This assures that the json encode properly quotes strings and leaves
numbers unquoted.