Template:Needs Translation/
函数名
|
Function: list llJson2List( string src );
|
参数:string src
|
返回值:返回一个通过解析 src 生成的列表,这是一个表示 json 的字符串
|
示例
|
示例一
string Json2CSV(string jcsv){//Converts a Json into a string of comma separated values. == Removes the top level [ and ] and all " from top level JSON_STRING values.
list li = llJson2List(jcsv);
return llList2CSV(li);
}
//If the Json is a 1-dimensional array of strings like "[\"a\",\"b\",\"c\"]", the returned CSV-string will be: "a,b,c" //This is a much shorter CSV that will save some memory.
//If the Json contains a nested arrays like "[[1,2],[\"PI\",4]]", the returned csv string will be : "[1,2],[\"Pi\",4]"
//"[1,2],[\"Pi\",4]" is not a very readable CSV-string and not shortened by much. "PI" is not a top level string value because it is nested 1 level deeper. llJson2List unescapes those
|