Don't write script when dumping json.
Tidy noop handling.