摘要: String date = "2017-09-19 14:40:01"; String date = "2017/09-19 14:40:01";String response = date.replaceAll("[[\\s-:punct:]]","").replaceAll("[[\\s/:pu 阅读全文
posted @ 2024-07-03 10:25 fxg 阅读(2) 评论(0) 推荐(0) 编辑
摘要: map 转json Map<String, Object> map = new HashMap<>(); map.put("key1", "value1"); map.put("key2", 123); map.put("key3", new Object()); System.out.printl 阅读全文
posted @ 2024-06-26 10:49 fxg 阅读(3) 评论(0) 推荐(0) 编辑
摘要: private static bool CheckValidationResult(object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors errors) { return true; //总是接受 } 阅读全文
posted @ 2024-06-15 16:01 fxg 阅读(4) 评论(0) 推荐(0) 编辑
摘要: Intellij IDEA使用@Autowired注解,出现could not autowire错误,解决方案 地址: https://blog.csdn.net/rambler_designer/article/details/89040125 阅读全文
posted @ 2024-06-10 13:59 fxg 阅读(1) 评论(0) 推荐(0) 编辑
摘要: function getCurrDate(time){ const date = new Date(time); const year = date.getFullYear(); const month = String(date.getMonth() + 1).padStart(2, '0'); 阅读全文
posted @ 2024-06-07 15:51 fxg 阅读(3) 评论(0) 推荐(0) 编辑
摘要: //示例1 const jsonString = '{"name":"John", "age":30, "city":"New York"}'; const jsonObject = JSON.parse(jsonString); console.log(jsonObject["name"]); / 阅读全文
posted @ 2024-06-07 11:54 fxg 阅读(1) 评论(0) 推荐(0) 编辑
摘要: 基于前面写的内容,我们可以快速读取一个数组的JSON串了,直接上代码: procedure TForm6.Button2Click(Sender: TObject); begin var jsonstr:= '{' + ' "code": 0,' + ' "msg": "Success",' + ' 阅读全文
posted @ 2023-09-01 10:14 fxg 阅读(8) 评论(0) 推荐(0) 编辑
摘要: 转自:https://www.cnblogs.com/kinglandsoft/p/16934314.html 前面写了如何快速读取一个JSON串,但只是针对简单的类型,如果JSON串中有数组该怎么办呢? 一、例子代码 先看下面的代码,读取一个学生的各科成绩。 procedure TForm6.Bu 阅读全文
posted @ 2023-09-01 10:07 fxg 阅读(3) 评论(0) 推荐(0) 编辑
摘要: 转自:https://www.cnblogs.com/kinglandsoft/p/16934314.html 一、前言 Delphi自带了json支持,引用System.json,你就可以处理json,读写json格式的内容都是被支持的。发展了几个版本,无论性能及稳定性都已经成熟,我不喜欢引用更多 阅读全文
posted @ 2023-09-01 10:04 fxg 阅读(13) 评论(0) 推荐(0) 编辑
摘要: use data.DBJson,system.JSON procedure TForm18.Button2Click(Sender: TObject);var cV: TDatasetToJSONBridge; jo: Tjsonobject;begin cV := TDatasetToJSONBr 阅读全文
posted @ 2023-09-01 09:43 fxg 阅读(21) 评论(0) 推荐(0) 编辑