Add methods for automatic conversion of Records.

- create separate methods in JSONToStorage class
- move parts of code to these methods