From 52c6f7e01c962a387a6df397175779cf2aa3a91c Mon Sep 17 00:00:00 2001 From: Ziver Koc Date: Fri, 20 Nov 2015 16:51:19 +0100 Subject: [PATCH] Some bug fixes --- src/zutil/parser/json/JSONObjectInputStream.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/zutil/parser/json/JSONObjectInputStream.java b/src/zutil/parser/json/JSONObjectInputStream.java index b40af53..6114457 100755 --- a/src/zutil/parser/json/JSONObjectInputStream.java +++ b/src/zutil/parser/json/JSONObjectInputStream.java @@ -162,9 +162,11 @@ public class JSONObjectInputStream extends InputStream implements ObjectInput, C Map map = (Map)type.newInstance(); for(Iterator it=json.keyIterator(); it.hasNext();){ String subKey = it.next(); - map.put( - subKey, - readType((genType.length>=2? genType[1] : null), null, subKey, json.get(subKey))); + if(json.get(subKey) != null) { + map.put( + subKey, + readType((genType.length >= 2 ? genType[1] : null), null, subKey, json.get(subKey))); + } } return map; }