Fix Json Builder.

 When creating a new object in the getter it should be added
 to the parent json.
Merge pull request #324 from manolo/mcm_fix_jsongenerator

Fix to Json Builder