From 3bccbaa0eb5560861554de425f894d3a6c9358f4 Mon Sep 17 00:00:00 2001 From: wthompson Date: Wed, 13 Jul 2022 16:38:32 -0500 Subject: [PATCH] fix for parse blowing up on mixed case booleans --- JsonConverter.bas | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/JsonConverter.bas b/JsonConverter.bas index 876b865..412de66 100644 --- a/JsonConverter.bas +++ b/JsonConverter.bas @@ -524,13 +524,13 @@ Private Function json_ParseValue(json_String As String, ByRef json_Index As Long Case """", "'" json_ParseValue = json_ParseString(json_String, json_Index) Case Else - If VBA.Mid$(json_String, json_Index, 4) = "true" Then + If LCase(VBA.Mid$(json_String, json_Index, 4)) = "true" Then json_ParseValue = True json_Index = json_Index + 4 - ElseIf VBA.Mid$(json_String, json_Index, 5) = "false" Then + ElseIf LCase(VBA.Mid$(json_String, json_Index, 5)) = "false" Then json_ParseValue = False json_Index = json_Index + 5 - ElseIf VBA.Mid$(json_String, json_Index, 4) = "null" Then + ElseIf LCase(VBA.Mid$(json_String, json_Index, 4)) = "null" Then json_ParseValue = Null json_Index = json_Index + 4 ElseIf VBA.InStr("+-0123456789", VBA.Mid$(json_String, json_Index, 1)) Then