JSON save/load functions now shared

Client side can also use them.