Fixed JSON parsing when root is not an object.

closes #1830
Merge branch 'origin/master'