Skip to content

Commit

Permalink
Handle subrecords in JsonSchema encoding (#4023)
Browse files Browse the repository at this point in the history
Rate limit · GitHub

Access has been restricted

You have triggered a rate limit.

Please wait a few minutes before you try again;
in some cases this may take up to an hour.

yciabaud authored and merlimat committed Apr 12, 2019
1 parent 9d6de67 commit c92d4e0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pulsar-client-cpp/python/pulsar/schema/schema.py
Original file line number Diff line number Diff line change
@@ -80,7 +80,7 @@ def __init__(self, record_cls):

def encode(self, obj):
self._validate_object_type(obj)
return json.dumps(obj.__dict__, indent=True).encode('utf-8')
return json.dumps(obj.__dict__, default=lambda o: o.__dict__, indent=True).encode('utf-8')

def decode(self, data):
return self._record_cls(**json.loads(data))

0 comments on commit c92d4e0

Please sign in to comment.