水淼json问题
官方json库的到可读文本是这种([\"2023-10-6 20:0:0\"]),水淼json的读值会自动去掉反斜杠,怎么读出和官方库一样的结果?使用例子呢,数据呢,按道理读值不会自己去掉斜杠的 本帖最后由 1980882096 于 2023-10-7 09:44 编辑
shuimiao 发表于 2023-10-6 21:41
使用例子呢,数据呢,按道理读值不会自己去掉斜杠的
{
"日期" : "[[\"2023-10-6 8:30:0\"], [\"2023-10-6 8:45:0\"], [\"2023-10-6 9:15:0\"], [\"2023-10-6 9:30:0\"], [\"2023-10-6 9:45:0\"], [\"2023-10-6 10:0:0\"], [\"2023-10-6 10:45:0\"], [\"2023-10-6 11:0:0\"], [\"2023-10-6 11:15:0\"], [\"2023-10-6 11:30:0\"], [\"2023-10-6 11:45:0\"], [\"2023-10-6 12:0:0\"], [\"2023-10-6 12:15:0\"], [\"2023-10-6 13:0:0\"], [\"2023-10-6 13:30:0\"], [\"2023-10-6 14:30:0\"], [\"2023-10-6 14:45:0\"], [\"2023-10-6 15:0:0\"], [\"2023-10-6 15:15:0\"], [\"2023-10-6 15:30:0\"], [\"2023-10-6 15:45:0\"], [\"2023-10-6 16:30:0\"], [\"2023-10-6 16:45:0\"], [\"2023-10-6 17:0:0\"], [\"2023-10-6 17:15:0\"], [\"2023-10-6 17:30:0\"], [\"2023-10-6 17:45:0\"], [\"2023-10-6 18:0:0\"], [\"2023-10-6 18:15:0\"], [\"2023-10-6 18:30:0\"], [\"2023-10-6 18:45:0\"], [\"2023-10-6 19:0:0\"], [\"2023-10-6 19:15:0\"], [\"2023-10-6 20:0:0\"], [\"2023-10-6 20:15:0\"], [\"2023-10-6 20:30:0\"], [\"2023-10-6 20:45:0\"], [\"2023-10-6 21:0:0\"], [\"2023-10-6 21:15:0\"], [\"2023-10-6 22:30:0\"], [\"2023-10-6 22:45:0\"], [\"2023-10-6 23:15:0\"], [\"2023-10-6 23:30:0\"], [\"2023-10-7 0:0:0\"], [\"2023-10-7 0:15:0\"], [\"2023-10-7 0:30:0\"], [\"2023-10-7 0:45:0\"], [\"2023-10-7 1:0:0\"], [\"2023-10-7 1:15:0\"], [\"2023-10-7 1:45:0\"], [\"2023-10-7 2:0:0\"], [\"2023-10-7 2:15:0\"], [\"2023-10-7 2:30:0\"], [\"2023-10-7 2:45:0\"], [\"2023-10-7 3:0:0\"], [\"2023-10-7 3:30:0\"], [\"2023-10-7 3:45:0\"], [\"2023-10-7 4:0:0\"], [\"2023-10-7 4:15:0\"], [\"2023-10-7 4:30:0\"], [\"2023-10-7 4:45:0\"], [\"2023-10-7 5:15:0\"], [\"2023-10-7 5:45:0\"], [\"2023-10-7 6:0:0\"], [\"2023-10-7 6:15:0\"], [\"2023-10-7 6:45:0\"], [\"2023-10-7 7:0:0\"], [\"2023-10-7 7:30:0\"], [\"2023-10-7 8:0:0\"], [\"2023-10-7 8:30:0\"], [\"2023-10-7 8:45:0\"], [\"2023-10-7 9:0:0\"], [\"2023-10-7 9:15:0\"], [\"2023-10-7 9:30:0\"]]"
}
麻烦看下,谢谢
这只是解析工具自动ucs2解码了而已。火山的解析模块里取值是不会自动解码的,保持原值返回的。
解析工具的树右键菜单-节点取值时自动UCS2解码,取消选中,就是原值 本帖最后由 1980882096 于 2023-10-7 11:52 编辑
shuimiao 发表于 2023-10-7 10:46
这只是解析工具自动ucs2解码了而已。火山的解析模块里取值是不会自动解码的,保持原值返回的。
解析工具的 ...
[["2023-10-6 10:30:0"], ["2023-10-6 10:45:0"], ["2023-10-6 11:0:0"], ["2023-10-6 11:15:0"], ["2023-10-6 11:30:0"], ["2023-10-6 11:45:0"], ["2023-10-6 12:0:0"], ["2023-10-6 12:15:0"], ["2023-10-6 13:0:0"], ["2023-10-6 13:30:0"], ["2023-10-6 14:30:0"], ["2023-10-6 14:45:0"], ["2023-10-6 15:0:0"], ["2023-10-6 15:15:0"], ["2023-10-6 15:30:0"], ["2023-10-6 15:45:0"], ["2023-10-6 16:30:0"], ["2023-10-6 16:45:0"], ["2023-10-6 17:0:0"], ["2023-10-6 17:15:0"], ["2023-10-6 17:30:0"], ["2023-10-6 17:45:0"], ["2023-10-6 18:0:0"], ["2023-10-6 18:15:0"], ["2023-10-6 18:30:0"], ["2023-10-6 18:45:0"], ["2023-10-6 19:0:0"], ["2023-10-6 19:15:0"], ["2023-10-6 20:0:0"], ["2023-10-6 20:15:0"], ["2023-10-6 20:30:0"], ["2023-10-6 20:45:0"], ["2023-10-6 21:0:0"], ["2023-10-6 21:15:0"], ["2023-10-6 22:30:0"], ["2023-10-6 22:45:0"], ["2023-10-6 23:15:0"], ["2023-10-6 23:30:0"], ["2023-10-7 0:0:0"], ["2023-10-7 0:15:0"], ["2023-10-7 0:30:0"], ["2023-10-7 0:45:0"], ["2023-10-7 1:0:0"], ["2023-10-7 1:15:0"], ["2023-10-7 1:45:0"], ["2023-10-7 2:0:0"], ["2023-10-7 2:15:0"], ["2023-10-7 2:30:0"], ["2023-10-7 2:45:0"], ["2023-10-7 3:0:0"], ["2023-10-7 3:30:0"], ["2023-10-7 3:45:0"], ["2023-10-7 4:0:0"], ["2023-10-7 4:15:0"], ["2023-10-7 4:30:0"], ["2023-10-7 4:45:0"], ["2023-10-7 5:15:0"], ["2023-10-7 5:45:0"], ["2023-10-7 6:0:0"], ["2023-10-7 6:15:0"], ["2023-10-7 6:45:0"], ["2023-10-7 7:0:0"], ["2023-10-7 7:30:0"], ["2023-10-7 8:0:0"], ["2023-10-7 8:30:0"], ["2023-10-7 8:45:0"], ["2023-10-7 9:0:0"], ["2023-10-7 9:15:0"], ["2023-10-7 9:30:0"], ["2023-10-7 10:0:0"], ["2023-10-7 10:15:0"], ["2023-10-7 10:30:0"], ["2023-10-7 10:45:0"], ["2023-10-7 11:0:0"], ["2023-10-7 11:15:0"], ["2023-10-7 11:30:0"]]
上面说的不清楚,我的意思是水淼json如何取出和官方到可读文本一样带斜杠的json
本帖最后由 1980882096 于 2023-10-7 11:54 编辑
就是到可读文本这里和官方不一样 之前用的官方json,后来发现水淼json效率高太多,换过来发现取出的值不一样了 官方的置入文本值和水淼的写路径值不一样,他的置文本就是真的文本,而水淼的写路径值,不仅是文本,还能写数组和对象。你要写入的数据以[开头,就会被当成数组写入。写路径值()的第二个参数有说明。
数组、对象数据如果要强行当成文本来写入,就需要先UCS2编码,这样[和"都会被反斜杠转义,这样才能使用写路径值()被当成文本值来写入。现在开源的json模块没有自带ucs2编解码,论坛有分享。等回头我升级下json模块自带吧 shuimiao 发表于 2023-10-7 13:05
官方的置入文本值和水淼的写路径值不一样,他的置文本就是真的文本,而水淼的写路径值,不仅是文本,还能写 ...
谢谢,明白了,为什么不搞个写文本命令,而要用编码解决呢 1980882096 发表于 2023-10-7 13:42
谢谢,明白了,为什么不搞个写文本命令,而要用编码解决呢
json解析模块升级了,写路径值()第6个参数可以UCS2编码 https://bbs.voldp.com/forum.php?mod=viewthread&tid=19608&page=1
页:
[1]
2