同样的字符串,有一些事长度为3,有一些长度为2,导致Convert.ToByte(macStringArray[i], 16);出错。
最后,把长度为2的复制过去,就好了。
要复制"1C-
只复制1C不行
{
"pc101":"1C-69-7A-BD-05-C4",
"pc102":"1C-69-7A-BD-06-AD",
"pc103":"1C-69-7A-BD-05-E4",
"pc104":"1C-69-7A-BD-2E-CE",
"pc105":"1C-69-7A-BC-E6-80",
"pc106":"1C-69-7A-BD-03-0E",
"pc107":"1C-69-7A-BD-08-A9",
"pc108":"1C-69-7A-BD-05-91",
"pc109":"1C-69-7A-BD-17-CB",
"pc110":"1C-69-7A-BC-F8-E0",
"pc111":"1C-69-7A-BD-03-F1",
"pc112":"1C-69-7A-BD-08-CC",
"pc113":"1C-69-7A-BD-01-08",
"pc114":"1C-69-7A-BD-03-5C",
"pc115":"1C-69-7A-BC-F8-85",
"pc116":"1C-69-7A-BD-07-8A",
"pc117":"1C-69-7A-BD-03-DE",
"pc118":"1C-69-7A-BD-1A-F0",
"pc119":"1C-69-7A-BD-1B-E4",
"pc120":"1C-69-7A-BD-06-18"
}