How can I guarantee the correctly populated JSON objects on every server?
There's no guarantee, until you know which configuration is used on remote server.
How can I diagnose what is causing the difference between outputs?
There's an option for remote debugging if you attach sources to you application.