Annada
Annada

Reputation: 1085

is "NULL" is valid for JSON null value in any of the JSON library used for android

previously json null was handling properly in app. But suddenly app failed to parse son, as it found NULL instead of null. I want to know, if "NULL" is valid null json object, in any of the json library used for android.

Upvotes: 1

Views: 469

Answers (2)

Vikas Gaurav
Vikas Gaurav

Reputation: 254

Yes,NULL is object in android,added in API level 1. See the below image,This is screen shot of android studio documentation. enter image description here

Upvotes: -1

N J
N J

Reputation: 27515

Here is some info .

  1. First of all null is keyword in JAVA for indicating object is empty(null).

  2. NULL is not keyword in JAVA

  3. NULL is valid value for string if it is enclosed by "". eg "NULL"

I want to know, if "NULL" is valid null json object, in any of the json library used for android.

Answer is NO.

Upvotes: 5

Related Questions