unifying "updateJson" logic, which also allows caching, still todos left