Open tehniss-nenad opened 11 months ago
Fine as far as it goes, although I would have rewritten the wholeIf
as aSelect Case
.
ButParseObject
has the same issue. Both issues (and maybe others) can be solved by testing injson_SkipSpaces
:
Private Sub json_SkipSpaces(json_String As String, ByRef json_Index As Long)
' Increment index to skip over spaces
Do While VBA.Mid$(json_String, json_Index, 1) = " "
json_Index = json_Index + 1
Loop
If json_Index > VBA.Len(json_String) Then
Err.Raise 10001, "JSONConverter", json_ParseErrorMessage(json_String, _
json_Index, "Unexpected end of input string - missing terminator?")
End If
End Sub
I agree, json_SkipSpaces is better place.
Before this patch, the application hangs if you do not close the array or string in array. For example "['val1','val2','val3]" or "['val1','val2','val3'"