Added JSON parsing and saving to database