Skip to content

Commit f6f11e6

Browse files
committed
Use correct names when serializing object
The minFraud tests do this and these new fields should be consistent with the other fields.
1 parent 7cb3643 commit f6f11e6

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
CHANGELOG
22
=========
33

4+
2.16.1 (2021-11-18)
5+
-------------------
6+
7+
* Added `JsonProperty` annotations to `getMobileCountryCode()` and
8+
`getMobileNetworkCode()` so that it is possible to serialize the
9+
object as JSON and then deserialize without losing data.
10+
411
2.16.0 (2021-11-18)
512
-------------------
613

src/main/java/com/maxmind/geoip2/model/IspResponse.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ public String getIsp() {
139139
* This property is available from the City and Insights web services and
140140
* the GeoIP2 Enterprise database.
141141
*/
142+
@JsonProperty("mobile_country_code")
142143
public String getMobileCountryCode() {
143144
return this.mobileCountryCode;
144145
}
@@ -149,6 +150,7 @@ public String getMobileCountryCode() {
149150
* This property is available from the City and Insights web services and
150151
* the GeoIP2 Enterprise database.
151152
*/
153+
@JsonProperty("mobile_network_code")
152154
public String getMobileNetworkCode() {
153155
return this.mobileNetworkCode;
154156
}

src/main/java/com/maxmind/geoip2/record/Traits.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -553,6 +553,7 @@ public boolean isTorExitNode() {
553553
* This property is available from the City and Insights web services and
554554
* the GeoIP2 Enterprise database.
555555
*/
556+
@JsonProperty("mobile_country_code")
556557
public String getMobileCountryCode() {
557558
return this.mobileCountryCode;
558559
}
@@ -563,6 +564,7 @@ public String getMobileCountryCode() {
563564
* This property is available from the City and Insights web services and
564565
* the GeoIP2 Enterprise database.
565566
*/
567+
@JsonProperty("mobile_network_code")
566568
public String getMobileNetworkCode() {
567569
return this.mobileNetworkCode;
568570
}

0 commit comments

Comments
 (0)