Fix nested json structs not being nested correctly.
Added tests for responses.
Merge pull request #1 from Clever/fix-nested-structs

Fix nested json structs not being nested correctly.