Adding utility method to directly log JSON objects