我有一段代码试图输入双引号,我的代码如下,
resulted_value = "{series_name : \"" + final_resulted_series_name + "\",period_name: \"" + period_name + "\",period_final_value: \"" + period_final_value + "\"}";
这里结果 \ 每次都显示,我使用了 "\"+variable+\"" 和 @"""variable""" 但我没有得到想要的输出..任何帮助将不胜感激。
------------------------------------ EDIT 1-------------------- 得到以下输出
["{series_name : \"Actual\",period_name:Q1 / 2013\",period_final_value:17\"}","\"{series_name : \\\"Actual\\\",period_name:Q1 / 2013\\\",period_final_value:17\\\"}\"","{series_name : \"Actual\",period_name:Q2 / 2013\",period_final_value:15\"}","\"{series_name : \\\"Actual\\\",period_name:Q2 / 2013\\\",period_final_value:15\\\"}\"","{series_name : \"Actual\",period_name:Q3 / 2013\",period_final_value:13\"}","\"{series_name : \\\"Actual\\\",period_name:Q3 / 2013\\\",period_final_value:13\\\"}\"","{series_name : \"Actual\",period_name:Q1 / 2013\",period_final_value:14.103\"}","\"{series_name : \\\"Actual\\\",period_name:Q1 / 2013\\\",period_final_value:14.103\\\"}\"","{series_name : \"Actual\",period_name:Q2 / 2013\",period_final_value:14.404499999999999\"}","\"{series_name : \\\"Actual\\\",period_name:Q2 / 2013\\\",period_final_value:14.404499999999999\\\"}\"","{series_name : \"Actual\",period_name:Q3 / 2013\",period_final_value:14.966999999999999\"}","\"{series_name : \\\"Actual\\\",period_name:Q3 / 2013\\\",period_final_value:14.966999999999999\\\"}\"","{series_name : \"Actual\",period_name:Q1 / 2013\",period_final_value:15.67\"}","\"{series_name : \\\"Actual\\\",period_name:Q1 / 2013\\\",period_final_value:15.67\\\"}\"","{series_name : \"Actual\",period_name:Q2 / 2013\",period_final_value:16.005\"}","\"{series_name : \\\"Actual\\\",period_name:Q2 / 2013\\\",period_final_value:16.005\\\"}\"","{series_name : \"Actual\",period_name:Q3 / 2013\",period_final_value:16.63\"}","\"{series_name : \\\"Actual\\\",period_name:Q3 / 2013\\\",period_final_value:16.63\\\"}\"","{series_name : \"Alarm\",period_name:Q1 / 2013\",period_final_value:17\"}","\"{series_name : \\\"Alarm\\\",period_name:Q1 / 2013\\\",period_final_value:17\\\"}\"","{series_name : \"Alarm\",period_name:Q2 / 2013\",period_final_value:15\"}","\"{series_name : \\\"Alarm\\\",period_name:Q2 / 2013\\\",period_final_value:15\\\"}\"","{series_name : \"Alarm\",period_name:Q3 / 2013\",period_final_value:13\"}","\"{series_name : \\\"Alarm\\\",period_name:Q3 / 2013\\\",period_final_value:13\\\"}\"","{series_name : \"Alarm\",period_name:Q1 / 2013\",period_final_value:14.103\"}","\"{series_name : \\\"Alarm\\\",period_name:Q1 / 2013\\\",period_final_value:14.103\\\"}\"","{series_name : \"Alarm\",period_name:Q2 / 2013\",period_final_value:14.404499999999999\"}","\"{series_name : \\\"Alarm\\\",period_name:Q2 / 2013\\\",period_final_value:14.404499999999999\\\"}\"","{series_name : \"Alarm\",period_name:Q3 / 2013\",period_final_value:14.966999999999999\"}","\"{series_name : \\\"Alarm\\\",period_name:Q3 / 2013\\\",period_final_value:14.966999999999999\\\"}\"","{series_name : \"Alarm\",period_name:Q1 / 2013\",period_final_value:15.67\"}","\"{series_name : \\\"Alarm\\\",period_name:Q1 / 2013\\\",period_final_value:15.67\\\"}\"","{series_name : \"Alarm\",period_name:Q2 / 2013\",period_final_value:16.005\"}","\"{series_name : \\\"Alarm\\\",period_name:Q2 / 2013\\\",period_final_value:16.005\\\"}\"","{series_name : \"Alarm\",period_name:Q3 / 2013\",period_final_value:16.63\"}","\"{series_name : \\\"Alarm\\\",period_name:Q3 / 2013\\\",period_final_value:16.63\\\"}\"","{series_name : \"Target\",period_name:Q1 / 2013\",period_final_value:17\"}","\"{series_name : \\\"Target\\\",period_name:Q1 / 2013\\\",period_final_value:17\\\"}\"","{series_name : \"Target\",period_name:Q2 / 2013\",period_final_value:15\"}","\"{series_name : \\\"Target\\\",period_name:Q2 / 2013\\\",period_final_value:15\\\"}\"","{series_name : \"Target\",period_name:Q3 / 2013\",period_final_value:13\"}","\"{series_name : \\\"Target\\\",period_name:Q3 / 2013\\\",period_final_value:13\\\"}\"","{series_name : \"Target\",period_name:Q1 / 2013\",period_final_value:14.103\"}","\"{series_name : \\\"Target\\\",period_name:Q1 / 2013\\\",period_final_value:14.103\\\"}\"","{series_name : \"Target\",period_name:Q2 / 2013\",period_final_value:14.404499999999999\"}","\"{series_name : \\\"Target\\\",period_name:Q2 / 2013\\\",period_final_value:14.404499999999999\\\"}\"","{series_name : \"Target\",period_name:Q3 / 2013\",period_final_value:14.966999999999999\"}","\"{series_name : \\\"Target\\\",period_name:Q3 / 2013\\\",period_final_value:14.966999999999999\\\"}\"","{series_name : \"Target\",period_name:Q1 / 2013\",period_final_value:15.67\"}","\"{series_name : \\\"Target\\\",period_name:Q1 / 2013\\\",period_final_value:15.67\\\"}\"","{series_name : \"Target\",period_name:Q2 / 2013\",period_final_value:16.005\"}","\"{series_name : \\\"Target\\\",period_name:Q2 / 2013\\\",period_final_value:16.005\\\"}\"","{series_name : \"Target\",period_name:Q3 / 2013\",period_final_value:16.63\"}","\"{series_name : \\\"Target\\\",period_name:Q3 / 2013\\\",period_final_value:16.63\\\"}\""]
我想消除 \ 并希望 "" 中的每个值,以便可以在进一步的代码中读取和使用它。