private String getPayLoad ( Key key , Application app ) { if ( app == null ) { return EMPTY_PAYLOAD ; } EncoderWrapper encoderWrapper = serverCodecs . getEncoder ( key . getType ( ) , key . getEurekaAccept ( ) ) ; try { return encoderWrapper . encode ( app ) ; } catch ( Exception e ) { logger . error ( "Failed to encode the payload for application {}" , app . getName ( ) , e ) ; return "" ; } }
Generate pay load with both JSON and XML formats for a given application .