I have a json in which userId
property is coming as string "null" -
"userId":"null"
I have a method which checks whether my string is null or not -
public static boolean isEmpty(String value) {
return value == null || value.isEmpty();
}
But every time my above method returns back me as false
for above userId
? It should true since userId is null. Is there any other api in Guava or Apache Commons which can do this?