Added JSON load/save functions.