Use DjangoJSONEncoder for encoding form submissions. Fixes #798