Skip to content

Commit 552cf0f

Browse files
committed
Expose JsonElement instead of JsonObject to support null values
1 parent 3431ce4 commit 552cf0f

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

core/src/main/java/io/snabble/sdk/Shop.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import com.google.gson.Gson;
44
import com.google.gson.GsonBuilder;
5-
import com.google.gson.JsonObject;
5+
import com.google.gson.JsonElement;
66
import com.google.gson.annotations.SerializedName;
77

88
import java.io.Serializable;
@@ -66,7 +66,7 @@ public String getDayOfWeek() {
6666
@SerializedName("lon")
6767
private double longitude;
6868
private OpeningHourSpecification[] openingHoursSpecification;
69-
private JsonObject external;
69+
private JsonElement external;
7070

7171
public String getId() {
7272
return id;
@@ -120,7 +120,7 @@ public Map<String, Href> getLinks() {
120120
return links;
121121
}
122122

123-
public JsonObject getExternal() {
123+
public JsonElement getExternal() {
124124
return external;
125125
}
126126

@@ -149,7 +149,7 @@ public static class Builder {
149149
private double latitude;
150150
private double longitude;
151151
private OpeningHourSpecification[] openingHoursSpecification;
152-
private JsonObject external;
152+
private JsonElement external;
153153

154154
public Builder id(String id) {
155155
this.id = id;
@@ -207,7 +207,7 @@ public Builder openingHours(OpeningHourSpecification[] openingHours) {
207207
return this;
208208
}
209209

210-
public Builder external(JsonObject external) {
210+
public Builder external(JsonElement external) {
211211
this.external = external;
212212
return this;
213213
}

0 commit comments

Comments
 (0)