JSON::Generator method number with tests