Skip to content

Commit 8b2a839

Browse files
committed
v2.0.0
1 parent 1948b09 commit 8b2a839

File tree

3 files changed

+14
-6
lines changed

3 files changed

+14
-6
lines changed

JsonConverter.bas

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Attribute VB_Name = "JsonConverter"
22
''
3-
' VBA-JSON v1.0.3
3+
' VBA-JSON v2.0.0
44
' (c) Tim Hall - https://github.com/VBA-tools/VBA-JSON
55
'
66
' JSON Converter for VBA
@@ -133,7 +133,11 @@ Private Type json_Options
133133
' By default, VBA-JSON will use String for numbers longer than 15 characters that contain only digits
134134
' to override set `JsonConverter.JsonOptions.UseDoubleForLargeNumbers = True`
135135
UseDoubleForLargeNumbers As Boolean
136+
137+
' The JSON standard requires object keys to be quoted (" or '), use this option to allow unquoted keys
136138
AllowUnquotedKeys As Boolean
139+
140+
' The solidus (/) is not required to be escaped, use this option to escape them as \/ in ConvertToJson
137141
EscapeSolidus As Boolean
138142
End Type
139143
Public JsonOptions As json_Options

README.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# VBA-JSON
22

3-
JSON conversion and parsing for VBA (Windows and Mac Excel, Access, and other Office applications).
4-
It grew out of the excellent project [vba-json](https://code.google.com/p/vba-json/),
3+
JSON conversion and parsing for VBA (Windows and Mac Excel, Access, and other Office applications).
4+
It grew out of the excellent project [vba-json](https://code.google.com/p/vba-json/),
55
with additions and improvements made to resolve bugs and improve performance (as part of [VBA-Web](https://github.com/VBA-tools/VBA-Web)).
66

7-
Tested in Windows Excel 2013 and Excel for Mac 2011, but should apply to 2007+.
7+
Tested in Windows Excel 2013 and Excel for Mac 2011, but should apply to 2007+.
88

99
- For Windows-only support, include a reference to "Microsoft Scripting Runtime"
1010
- For Mac and Windows support, include [VBA-Dictionary](https://github.com/VBA-tools/VBA-Dictionary).
@@ -20,7 +20,7 @@ Set Json = JsonConverter.ParseJSON("{""a"":123,""b"":[1,2,3,4],""c"":{""d"":456}
2020
' Json("c")("d") -> 456
2121
Json("c")("e") = 789
2222

23-
Debug.Print JsonConverter.ConvertToJson(Json)
23+
Debug.Print JsonConverter.ConvertToJson(Json)
2424
' -> "{""a"":123,""b"":[1,2,3,4],""c"":{""d"":456,""e"":789}}"
2525
```
2626

@@ -32,4 +32,8 @@ VBA-JSON includes a few options for customizing parsing/conversion if needed:
3232
This can lead to issues when BIGINT's are used (e.g. for Ids or Credit Cards), as they will be invalid above 15 digits.
3333
By default, VBA-JSON will use `String` for numbers longer than 15 characters that contain only digits, use this option to use `Double` instead.
3434
- __AllowUnquotedKeys__ (Default = `False`) The JSON standard requires object keys to be quoted (`"` or `'`), use this option to allow unquoted keys.
35-
- __EscapeSolidus__ (Default = `False`) The solidus (/) is not required to be escaped, use this option to escape them as `\/` in `ConvertToJson`.
35+
- __EscapeSolidus__ (Default = `False`) The solidus (`/`) is not required to be escaped, use this option to escape them as `\/` in `ConvertToJson`.
36+
37+
```VB.net
38+
JsonConverter.JsonOptions.EscapeSolidus = True
39+
```

specs/VBA-JSON - Specs.xlsm

282 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)