Added JSON read and write