Added some code to help write storage code - convert some attributes to Json