标签:ogr 报错 解析 方便 cfa strong instr pre function
{ "programmers": [
{ "firstName": "Brett", "lastName":"McLaughlin", "email": "brett@newInstance.com" },
{ "firstName": "Jason", "lastName":"Hunter", "email": "jason@servlets.com" },
{ "firstName": "Elliotte", "lastName":"Harold", "email": "elharo@macfaq.com" }
],
"authors": [
{ "firstName": "Isaac", "lastName": "Asimov", "genre": "science fiction" },
{ "firstName": "Tad", "lastName": "Williams", "genre": "fantasy" },
{ "firstName": "Frank", "lastName": "Peretti", "genre": "christian fiction" }
],
"musicians": [
{ "firstName": "Eric", "lastName": "Clapton", "instrument": "guitar" },
{ "firstName": "Sergei", "lastName": "Rachmaninoff", "instrument": "piano" }
]
}
{"ChatType":"LongChat","UserState":"Online","CallingState":"Leisure","Msg":"Other"}
function DataStruct(chatType: ChatType, userState: UserState, callingState: CallingState, msg: Msg) {
const result: string = `{
"ChatType": "`+ ChatType[chatType] + `",
"UserState": "`+ UserState[userState] + `",
"CallingState": "`+ CallingState[callingState] + `",
"Msg": "`+ Msg[msg] + `"
}`
return result;
}
JsonData jsonResult = JsonMapper.ToObject(Encoding.UTF8.GetString(data));
作者:艾孜尔江
转载请务必标明出处!
标签:ogr 报错 解析 方便 cfa strong instr pre function
原文地址:https://www.cnblogs.com/ezhar/p/14344368.html