j4mie/micromodels — pull request #5 by jschwertfeger (2012-05-03 08:18:49+00:00)
Title: Added automagic unwrapping of models

Some web apps (e.g. Rails-based ones) return JSON with the models wrapped like this:

```
{
"house": {
"left_door": {
"door": {"color":"black"}
}
"right_door": {
"door": {"color":"red"}
}
}
```

These commits support automagic unwrapping of such JSON if in Python the outer model is called `House` and the inner model `Door`. Should the names not match one can still force unwrapping of a model. The unwrapping magic can also be disabled. Both forcing and disabling can be done via constructor on the model level or via field definition on the field level.