Json generation overhaul.

The Json is only generated by plugin save and not by the plugin call!