Be careful when generating badge json.

Fixes #260.
Merge pull request #271 from fedora-infra/feature/careful-in-json-generation

Be careful when generating badge json.