* Replacing all _json(self) to serialize(self, purpose=None) #3895
* Flake8ify
Review ID - 2733001