File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -66,8 +66,6 @@ private class ServiceSetup
6666 URL = "https://console.ng.bluemix.net/catalog/services/tradeoff-analytics/" , ServiceID = "TradeoffAnalyticsV1" } ,
6767 new ServiceSetup ( ) { ServiceName = "Personality Insights" , ServiceAPI = "personality-insights/api" ,
6868 URL = "https://console.ng.bluemix.net/catalog/services/personality-insights/" , ServiceID = "PersonalityInsightsV2" } ,
69- //new ServiceSetup() { ServiceName = "Conversation (Experimental)", ServiceAPI = "conversation-experimental/api",
70- // URL ="https://console.ng.bluemix.net/catalog/services/conversation/", ServiceID="ConversationExperimentalV1" },
7169 new ServiceSetup ( ) { ServiceName = "Conversation" , ServiceAPI = "conversation/api" ,
7270 URL = "https://console.ng.bluemix.net/catalog/services/conversation/" , ServiceID = "ConversationV1" } ,
7371 new ServiceSetup ( ) { ServiceName = "RetrieveAndRank" , ServiceAPI = "retrieve-and-rank/api" ,
Original file line number Diff line number Diff line change @@ -111,7 +111,25 @@ public bool ParseJSON(string json)
111111 }
112112 catch ( Exception e )
113113 {
114- Log . Error ( "Config" , "Caught Exception: {0}" , e . ToString ( ) ) ;
114+ try
115+ {
116+ IDictionary iParse = Json . Deserialize ( json ) as IDictionary ;
117+ m_URL = ( string ) iParse [ "url" ] ;
118+ m_User = ( string ) iParse [ "username" ] ;
119+ m_Password = ( string ) iParse [ "password" ] ;
120+ m_Note = ( string ) iParse [ "note" ] ;
121+ if ( ! string . IsNullOrEmpty ( ( string ) iParse [ "apikey" ] ) )
122+ m_Apikey = ( string ) iParse [ "apikey" ] ;
123+ if ( ! string . IsNullOrEmpty ( ( string ) iParse [ "api_key" ] ) )
124+ m_Apikey = ( string ) iParse [ "api_key" ] ;
125+
126+ return true ;
127+ }
128+ catch
129+ {
130+ Log . Error ( "Config" , "Caught Exception: {0}" , e . ToString ( ) ) ;
131+ }
132+ Log . Error ( "Config" , "Caught Exception: {0}" , e . ToString ( ) ) ;
115133 }
116134
117135 return false ;
You can’t perform that action at this time.
0 commit comments