Skip to content
Browse files

convert JSONNull to null.

  • Loading branch information...
1 parent fd58f69 commit 6d612ca38a16f7a13887f4e2bc0f9b57758650d2 Robert Newson committed Nov 9, 2010
Showing with 3 additions and 0 deletions.
  1. +3 −0 src/main/java/com/github/rnewson/couchdb/lucene/DocumentConverter.java
View
3 src/main/java/com/github/rnewson/couchdb/lucene/DocumentConverter.java
@@ -20,6 +20,7 @@
import java.lang.reflect.InvocationTargetException;
import net.sf.json.JSONArray;
+import net.sf.json.JSONNull;
import net.sf.json.JSONObject;
import org.apache.log4j.Logger;
@@ -119,6 +120,8 @@ private Object convert(final Object obj) {
return convertArray((JSONArray) obj);
} else if (obj instanceof JSONObject) {
return convertObject((JSONObject) obj);
+ } else if (obj instanceof JSONNull) {
+ return null;
} else {
return obj;
}

0 comments on commit 6d612ca

Please sign in to comment.
Something went wrong with that request. Please try again.