json and database update