Add getJsonBody method for better JSON handling