Limit nesting depth of parsed JSON
Fix tests