1
votes

How to parse the JSON response which has other language(japan) using vba code. Getting following error message

Code:

Dim item As Variant
Dim jsonObject As Object
Dim ws As Worksheet
Set ws = Worksheets("Result")
Dim i As Long
i = 3
Set jsonObject = JsonConverter.ParseJson(sResponse)
For Each item In jsonObject("data")("judgementSummary")
ws.Cells(i, 3) = item("result")
ws.Cells(i, 4) = item("wording")
i = i + 1
Next

"Run time error '10001': Error parsing JSON: ^Expecting '{' or '['. Function in JSONConverter file: ' Error: Invalid JSON string
Err.Raise 10001, "JSONConverter", json_ParseErrorMessage(JsonString, json_Index, "Expecting '{' or '['")"

{"data":{"policies":[{"policyNumber":"5555201001","childNumber":"00","checkDigit":"4","policyHolderName":"Æ-»à ¸ÌÕ","insuredName":"マイク","insuredGender":null,"insuredAge":null,"productName":"ç·åˆåŒ»ç™‚ä¿é™º(無解約返還金) (2018)","productCode":"860","productGenerationCode":null,"childAndWife":"0","comprehensiveAmount":"0","femaleSurgeryProduct":"865","hostErrorCode":"03"},{"policyNumber":"1411008301","childNumber":"00","checkDigit":"3","policyHolderName":"Ú²Êà ²ËÆ","insuredName":"マイク","insuredGender":"1","insuredAge":"03","productName":"5å¹´ã”ã¨åˆ©å·®é…当付終身医療ä¿é™º","productCode":"235","productGenerationCode":"03","childAndWife":"0","comprehensiveAmount":"0","femaleSurgeryProduct":"580","hostErrorCode":null}]},"error":null}
What have you tried? What's your code? where is the JSON coming from? Please read How to Ask and give a minimal reproducible example including a proper error description.Pᴇʜ
I want to read the JSON file into Excel sheet using vba. Actual JSON response is coming from service call. Am unable to parse the JSON response since it contain japanese language.Sasi Rekha