Closed yikibug closed 8 years ago
美化打印结果,最后一个元素后面不出现逗号“,”,如下: { hasBug = ( "YES", "NO" ), dataString = "我是转换成", title = "http://www.henishuo.com", count = 11, results = {( "集合值2", "集合值1", {( "可变集合", "字典->不可变集合->可变集合", { key = "字典转成data", key1 = "在set、数组、字典中嵌套" } )} )}, summaries = ( "sm1", "sm2", { keysm = { stkey = "字典->数组->字典->字典" } }, { key = "字典转成data", key1 = "在set、数组、字典中嵌套" } ), contact = ( "关注博客地址:http://www.henishuo.com", "QQ群: 324400294", "关注微博:标哥Jacky", "关注GITHUB:CoderJackyHuang" ), name = "标哥的技术博客", parameters = { key1 = "value1", key13 = { key = "字典转成data", key1 = "在set、数组、字典中嵌套" }, key2 = { key11 = "value11", key12 = ( "三层", "字典->字典->数组" ) } } }
只是增加最后一个元素不添加逗号而已吗!
美化打印结果,最后一个元素后面不出现逗号“,”,如下: { hasBug = ( "YES", "NO" ), dataString = "我是转换成", title = "http://www.henishuo.com", count = 11, results = {( "集合值2", "集合值1", {( "可变集合", "字典->不可变集合->可变集合", { key = "字典转成data", key1 = "在set、数组、字典中嵌套" } )} )}, summaries = ( "sm1", "sm2", { keysm = { stkey = "字典->数组->字典->字典" } }, { key = "字典转成data", key1 = "在set、数组、字典中嵌套" } ), contact = ( "关注博客地址:http://www.henishuo.com", "QQ群: 324400294", "关注微博:标哥Jacky", "关注GITHUB:CoderJackyHuang" ), name = "标哥的技术博客", parameters = { key1 = "value1", key13 = { key = "字典转成data", key1 = "在set、数组、字典中嵌套" }, key2 = { key11 = "value11", key12 = ( "三层", "字典->字典->数组" ) } } }