Adds smart json support for WTForms. Useful for when using WTForms with RESTful APIs.
I've found some unexpected (to me) behaviour in WTForms-JSON where an empty string in an optional string field with a minimum length did not result in a validation error nor exclusion of the field from patch_data. I've written a small [test script](https://gist.github.com/kshade/a9a2e9ba514461bdbf02e17ce0ea4b1a), here is the output I'm getting from it: ``` WTForms-JSON version 0.3.3 json {} errors {} form.data {'name': None, 'potato': None} form.patch_data {} json {'name': ''} errors {} form.data {'name': None, 'potato': None} form.patch_data {'name': None} json {'name': 'a'} errors {'name': ['Field must be between 2 and 128 characters long.']} form.data {'name': 'a', 'potato': None} form.patch_data {'name': 'a'} json {'name': 'ab'} errors {} form.data {'name': 'ab', 'potato': None} form.patch_data {'name': 'ab'} json {'potato': None} errors {} form.data {'name': None, 'potato': None} form.patch_data {'potato': None} json {'potato': ''} errors {} form.data {'name': None, 'potato': None} form.patch_data {'potato': None} json {'potato': 'minimum'} errors {'potato': ['Invalid value, must be one of: maximum.']} form.data {'name': None, 'potato': 'minimum'} form.patch_data {'potato': 'minimum'} json {'potato': 'maximum'} errors {} form.data {'name': None, 'potato': 'maximum'} form.patch_data {'potato': 'maximum'} ``` Length validation doesn't happen with the second test case, but it also isn't removed from patch_data like in the first. Potato intuitively should only ever be "maximum" or not present, but both an empty string and None are accepted as None.
This issue appears to be discussing a feature request or bug report related to the repository. Based on the content, it seems to be still under discussion. The issue was opened by kshade and has received 2 comments.