Permalink
Browse files

fix Code Review Comments

  • Loading branch information...
Yair Levi
Yair Levi committed Oct 6, 2017
1 parent 9bd0cf6 commit 27cf91b93257b75c3d107855f33e694e814009cd
@@ -80,13 +80,13 @@
long serializedDataSize;
// if set, will ignore malformed JSON in deserialization
boolean ignoreMalformedJson = false;
boolean explicitNullValue = false;
boolean explicitNull = false;
// properties used in configuration
public static final String PROP_IGNORE_MALFORMED_JSON = "ignore.malformed.json";
public static final String PROP_DOTS_IN_KEYS = "dots.in.keys";
public static final String PROP_CASE_INSENSITIVE ="case.insensitive" ;
public static final String PROP_EXPLICIT_NULL ="explicit.null.value" ;
public static final String PROP_EXPLICIT_NULL ="explicit.null" ;
JsonStructOIOptions options;
@@ -154,7 +154,7 @@ public void initialize(Configuration conf, Properties tbl) throws SerDeException
ignoreMalformedJson = Boolean.parseBoolean(tbl
.getProperty(PROP_IGNORE_MALFORMED_JSON, "false"));
explicitNullValue = Boolean.parseBoolean(tbl
explicitNull = Boolean.parseBoolean(tbl
.getProperty(PROP_EXPLICIT_NULL, "false"));
}
@@ -280,7 +280,7 @@ private JSONObject serializeStruct( Object obj,
serializeField(
data,
sf.getFieldObjectInspector()));
} else if(explicitNullValue) {
} else if(explicitNull) {
result.putNull(getSerializedFieldName(columnNames, i, sf));
}
} catch (JSONException ex) {
@@ -1140,9 +1140,7 @@ public JSONObject putNull(String key) throws JSONException {
if (key == null) {
throw new JSONException("Null key.");
}
this.map.put(key, null);
return this;
}

0 comments on commit 27cf91b

Please sign in to comment.