Improved the JSONUtil

I improved some of the utilities within the JSONUtil.java file.
Hopefully, we'll get past bugs this time.