change json to dict method