public JSONObject mapColorDataToJSON ( ) { final JSONObject jsonObject = new JSONObject ( ) ; try { jsonObject . put ( "name" , name ) ; jsonObject . put ( "color" , color ) ; } catch ( JSONException e ) { final String message = LogMessageUtil . failMsg ( e ) ; LoggerFactory . getLogger ( AccumulatedSingleGraphAO . class ) . warn ( message , e ) ; } return jsonObject ; }
Maps accumulator s color and name to JSON object .