fix JSON encoder to use Long instead of Int for numbers