I want to parse a dictionary into a JSON with this logic: https://github.com/VBA-tools/VBA-JSON and write it to a file.
Parsing works, writing the file as well, but characters like öäü are displayed wrong. Here is my code:
Function writeJsonFromDict(dict As Dictionary)
Dim fsT As Object
Set fsT = CreateObject("ADODB.Stream")
fsT.Type = 2
fsT.Charset = "utf-8"
fsT.Open
fsT.WriteText ConvertToJson(dict, Whitespace:=2)
fsT.SaveToFile "path/to/file.json", 2
End Function
Expected output:
"myValue": "Bühne",
Actual output:
"myValue": "B\u00FChne",
What am I doing wrong?