JSON Null Value

JSON Null Value

Basically, null means absence of value(which means nothing). Whenever we are specifying some value as null, it simply means nothing. The null value is used to represent the intentional absence of any object value.

For example:


As you can see in the above example, the values for the keys mobileNumber and emailAddress are null. The thing is that null can be used to represent intentional absence of some object value.

In this way, we have seen about some of the different datatypes for the data values in the JSON file. We can make use of the data, as and when required in our files. But make sure that when you are writing JSON files, you are using the valid data in the file. As we move forward, we would be using these types more often, as and when required, and with time and practice, you would become familiar with, and confident about the datatypes used in the files here.