How to save nonlinear JuMP model to file?

The best solution would be if JuMP variables work the way Symbolics variables work and extract nonlinear expressions from functions IMHO.