JSON parsing and data storage