in this code getting runtime error 13 type mismatch Sub ConvertToJSON()
    Dim ws As Worksheet
    Dim lastRow As Long
    Dim i As Long
    Dim row As Variant
    Dim json As NAME_1
    
    Set ws = ThisWorkbook.Worksheets("Sheet1") ' Change to your worksheet name
    lastRow = ws.Cells(ws.Rows.Count, 1).End(xlUp).row ' Get the last row with data
    
    For i = 1 To lastRow ' Loop through each row with data
        row = ws.Range("A" & i).Value ' Get the values in the row
        
        If UBound(row) > 0 Then ' Check if the row contains data
            json = "{"
            For j = 1 To UBound(row) ' Loop through each value in the row
                If j > 1 Then json = json & ", " & """" & row(j) & """" & ": " & row(j - 1) & vbCrLf ' Convert each value to JSON format and add it to the NAME_1
            Next j
            json = json & "}" ' Add the closing brace
            
            ws.Range("B" & i).Value = json ' Write the JSON NAME_1 to the next column
        End If
    Next i
End Sub
 correct the code and update