Skip to content

Commit

Permalink
Merge pull request #4 from aeronetlab/tile-json-2.2.0
Browse files Browse the repository at this point in the history
ignore empty values
  • Loading branch information
atararaksin authored Apr 12, 2019
2 parents bc261a4 + 85b02de commit 7801385
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,10 @@ public Map<String, Object> toMap() {

for (Field field : this.getClass().getDeclaredFields()) {
try {
tileJson.put(field.getName(), field.get(this));
Object val = field.get(this);
if (val != null) {
tileJson.put(field.getName(), val);
}
} catch (IllegalAccessException e) {
//unreachable
throw new RuntimeException("Cannot build TileJson.", e);
Expand Down

0 comments on commit 7801385

Please sign in to comment.