Refactoring for updated message json format