Dim Map1 As Map = CreateMap( "TerminalToken": TRegisterShiftRecord1.ShiftTerminalID, _
"RegisterShiftID": TRegisterShiftRecord1.ShiftID, _
"BatchNumber": TRegisterShiftRecord1.iBatchNumber, _
"OpenedByToken": TRegisterShiftRecord1.OpenedByID, _
"ShiftStart": GeneralLib.GL_AIDTF_ConvertToHost_CheckValid( TRegisterShiftRecord1.ShiftStart, True ), _
"ClosedByToken": TRegisterShiftRecord1.ClosedByID, _
"ShiftEnd": TRegisterShiftRecord1.ShiftEnd, _
"ShiftStatus": TRegisterShiftRecord1.iStatus, _
"TerminalSyncCall": HTTPShared.CHTTP_TRUE, _
"LastUpdatedTicks": TRegisterShiftRecord1.lngLastUpdated )
If TRegisterShiftRecord1.ClosedByID = "" Then
Map1.Put("ClosedByToken",Null)
End If
If TRegisterShiftRecord1.ShiftEnd = "" Then
Map1.Put("ShiftEnd", Null)
End If
Dim JSONGenerator As JSONGenerator
Dim JSONstring As String
JSONGenerator.Initialize(Map1)
JSONstring = JSONGenerator.ToString