fix ModelType to deal with json conversion, and add test
Merge pull request #12 from edx/fix/brian/object-cache

fix ModelType to deal with json conversion, and add test