try {
return this.toString(0);
} catch (Exception e) {
- return null;
+ return "";
}
}
*/
@SuppressWarnings("unchecked")
public static String valueToString(Object value) throws JSONException {
- if (value == null || value.equals(null)) {
+ if (value == null) {
return "null";
}
if (value instanceof JSONString) {
@SuppressWarnings("unchecked")
static final Writer writeValue(Writer writer, Object value,
int indentFactor, int indent) throws JSONException, IOException {
- if (value == null || value.equals(null)) {
+ if (value == null) {
writer.write("null");
} else if (value instanceof LOGJSONObject) {
((LOGJSONObject) value).write(writer, indentFactor, indent);