Implement json save
not working yet