https://github.com/shihongxins/vbsjson
一个VBS的JSON数据转换工具类
https://github.com/shihongxins/vbsjson
json vbs vbs-json
Last synced: about 1 month ago
JSON representation
一个VBS的JSON数据转换工具类
- Host: GitHub
- URL: https://github.com/shihongxins/vbsjson
- Owner: shihongxins
- License: mit
- Created: 2020-11-22T14:41:11.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2020-11-23T03:42:41.000Z (over 5 years ago)
- Last Synced: 2025-11-28T18:36:01.238Z (8 months ago)
- Topics: json, vbs, vbs-json
- Language: VBScript
- Homepage:
- Size: 12.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
# VBSJSON
一个VBS的JSON数据转换工具类。
[PS:如果你喜欢的话请给我一个 **Star** ^_^ ]
## 说明
| JSON | VBS |
| --- | --- |
| `null` | `Null` |
| `true` | `True` |
| `false` | `False` |
| `string` | `vbString` |
| `number` | `vbInteger, vbLong, vbSingle, vbDouble` |
| `Array` | `vbArray, vbVariant, vbArray+vbVariant` |
| `Object` | `Dictionary` |
## 使用
```VB
' ./example/example.vbs
Dim FSO
Set FSO = CreateObject("Scripting.FileSystemObject")
Dim source1, source2
source1 = FSO.OpenTextFile("source1.json").ReadAll
source2 = FSO.OpenTextFile("source2.json").ReadAll
Dim JSON
Set JSON = new VBSJSON
Dim source1_parse, source2_parse
Set source1_parse = JSON.parse(source1)
source2_parse = JSON.parse(source2)
Dim source1_parse_stringify, source2_parse_stringify
source1_parse_stringify = JSON.stringify(source1_parse)
source2_parse_stringify = JSON.stringify(source2_parse)
```
## LICENSE
[MIT License](https://github.com/shihongxins/VBSJSON/blob/main/LICENSE)
## 参考
1. [JSON](https://www.json.org/json-zh.html)
2. [VBJSON](http://www.ediy.co.nz/vbjson-json-parser-library-in-vb6-xidc55680.html)
3. [Demon's VbsJson](http://demon.tw/my-work/vbs-json.html)