This commit fixes a few issues with json-utils:
1. The implementation is lacking tests
2. The implementation hardcodes indent = 2 in many places and
does not respect the `indent` parameter passed by users
3. The implementation is buggy when passed an empty object or array