Adjust code to able to process new json format