Closed wiryonolau closed 1 year ago
vbNullString
is a string constant of zero length, a but more efficient than its equivalent literal""
.
vbNull is a constant = 1 returned byVarType()
when the variable has no valid data. You can use it on the receiving (ParseJson
) side in code like
If VarType(jsonObject("error")) <> vbNull Then
To send a null value , simply use Null directly or via a Variant.
Sub Test()
Dim payload As New Dictionary
Dim nullvar As Variant: nullvar = Null
payload.Add "id", nullvar
payload.Add "name", "someone"
Debug.Print JsonConverter.ConvertToJson(payload)
' =>{"id":null,"name":"someone"}
End Sub
If this solves your problem, please close your issue here.
Ok it's working. Thanks.
Hi, How do I pass null value ? I need convertToJson result to be as as null instead of "null"