puppetlabs-stdlib
puppetlabs-stdlib copied to clipboard
Rewrite loadjson to use the modern function API
Summary
This also resolves a bug where JSON.parse returned a StringIO. To properly catch this, the tests are rewritten to avoid mocking where possible. Exceptions are with external URLs and where a failure is expected.
Related Issues (if any)
Fixes #1414
Checklist
- [x] 🟢 Spec tests.
- [ ] 🟢 Acceptance tests.
- [ ] Manually verified. (For example
puppet apply)