plomino / Plomino

Powerful and flexible web-based application builder
33 stars 37 forks source link

Support Missing.Value when encoding to JSON and raise a TypeError otherwise #745

Closed displacedaussie closed 8 years ago

displacedaussie commented 8 years ago

The current custom JSON Encoder causes an infinite recursion error if it attempts to encode an unexpected object. Instead of returning json.dumps(obj) it should raise a TypeError if the object can't be serialised.

This pull request handles this bug, while also supporting Missing.Value in the Encoder.