Open corbinyo opened 4 years ago
@corbinyo you can have null values, and you can see that as you step through the code that you have:
However, since this is possible, you then need to account for the possibility of it being a null value. To that end, you can't then do this:
itemData[0]["listings"][i]["token"].ToString(),
Since calls ToString()
on a null object will result in a Null Reference Exception.
When using:
with the Json:
The Null value from "Token" from the 1st listing object returns
NullReferenceException: Object reference not set to an instance of an object
Why Can I not have null values?