fix dirty checking of nested objects

store json when loading, and then compare json at end to determine
if a child object has changed.
Merge pull request #71 from seanmonstar/dirty-checking

fix dirty checking of nested objects