As mentioned in the title I have a variable of type Jproperty? How can I identify if it is empty?
I can check if is NULL but not able to check if it is empty
As mentioned in the title I have a variable of type Jproperty? How can I identify if it is empty?
I can check if is NULL but not able to check if it is empty
2
Answers
You could check if its null or empty
Hope this helps.
I am new to stack overflow so sorry for the indendation.
Assuming that you are talking about Newtonsoft Json.NET library then:
Checking for
null
can be done by checkingJTokenType.Null
:For empty string you can try something like: