namlook/mongokit — pull request #84 by davidovich (2012-03-20 18:36:49+00:00)
Title: Added missing fields support to from_json method.  Added json_type support as parameter to from_json.

I find this feature useful because my client is not mandated to provide every field for database updates. This change enables missing fields in the json representation to be used in the from_json method. It respects the required_fields array.

*For this feature I had to fix related bugs*

* Validation was failing when missing key was an array of dicts.
* There is still a failing test with my configuration that I was not able to fix (python 2.7.2, pymongo==2.1.1) in test_json.py (test_to_json_with_i18n_and_dot_notation): the validation throws a SchemaTypeError: bla.foo must be an instance of i18n not unicode

*Also in this pull reuqest*

Added json_type support as from_json parameter (not only json strings are accepted)
Fixed one failing test (test_anyjson_import_error).