Dump message as JSON if instructed