added json converstion method to RestUtils class