Skip to content

Commit 66d2804

Browse files
committed
Cleanup
1 parent 32cdbc7 commit 66d2804

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

JsonConverter.bas

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ Public Function ConvertToJson(ByVal JsonValue As Variant, Optional ByVal Whitesp
348348

349349
json_BufferAppend json_Buffer, json_Indentation & "]", json_BufferPosition, json_BufferLength
350350

351-
ConvertToJson = json_BufferToString(json_Buffer, json_BufferPosition, json_BufferLength)
351+
ConvertToJson = json_BufferToString(json_Buffer, json_BufferPosition)
352352

353353
' Dictionary or Collection
354354
Case VBA.vbObject
@@ -441,7 +441,7 @@ Public Function ConvertToJson(ByVal JsonValue As Variant, Optional ByVal Whitesp
441441
json_BufferAppend json_Buffer, json_Indentation & "]", json_BufferPosition, json_BufferLength
442442
End If
443443

444-
ConvertToJson = json_BufferToString(json_Buffer, json_BufferPosition, json_BufferLength)
444+
ConvertToJson = json_BufferToString(json_Buffer, json_BufferPosition)
445445
Case VBA.vbInteger, VBA.vbLong, VBA.vbSingle, VBA.vbDouble, VBA.vbCurrency, VBA.vbDecimal
446446
' Number (use decimals for numbers)
447447
ConvertToJson = VBA.Replace(JsonValue, ",", ".")
@@ -591,7 +591,7 @@ Private Function json_ParseString(json_String As String, ByRef json_Index As Lon
591591
json_Index = json_Index + 4
592592
End Select
593593
Case json_Quote
594-
json_ParseString = json_BufferToString(json_Buffer, json_BufferPosition, json_BufferLength)
594+
json_ParseString = json_BufferToString(json_Buffer, json_BufferPosition)
595595
json_Index = json_Index + 1
596596
Exit Function
597597
Case Else
@@ -733,7 +733,7 @@ Private Function json_Encode(ByVal json_Text As Variant) As String
733733
json_BufferAppend json_Buffer, json_Char, json_BufferPosition, json_BufferLength
734734
Next json_Index
735735

736-
json_Encode = json_BufferToString(json_Buffer, json_BufferPosition, json_BufferLength)
736+
json_Encode = json_BufferToString(json_Buffer, json_BufferPosition)
737737
End Function
738738

739739
Private Function json_Peek(json_String As String, ByVal json_Index As Long, Optional json_NumberOfCharacters As Long = 1) As String
@@ -760,7 +760,6 @@ Private Function json_StringIsLargeNumber(json_String As Variant) As Boolean
760760
' Length with be at least 16 characters and assume will be less than 100 characters
761761
If json_Length >= 16 And json_Length <= 100 Then
762762
Dim json_CharCode As String
763-
Dim json_Index As Long
764763

765764
json_StringIsLargeNumber = True
766765

@@ -854,7 +853,7 @@ Private Sub json_BufferAppend(ByRef json_Buffer As String, _
854853
json_BufferPosition = json_BufferPosition + json_AppendLength
855854
End Sub
856855

857-
Private Function json_BufferToString(ByRef json_Buffer As String, ByVal json_BufferPosition As Long, ByVal json_BufferLength As Long) As String
856+
Private Function json_BufferToString(ByRef json_Buffer As String, ByVal json_BufferPosition As Long) As String
858857
If json_BufferPosition > 0 Then
859858
json_BufferToString = VBA.Left$(json_Buffer, json_BufferPosition)
860859
End If

0 commit comments

Comments
 (0)