Json load lint

Resolve lint and coverity issues with recent changes for JSON loading.