<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def publish_json(self, channel, obj):
 """Post a JSON-encoded message to channel."""

        return self.publish(channel, json.dumps(obj))