Interface JsonSerializable

All Known Subinterfaces:
NamedRecord
All Known Implementing Classes:
Anonymizer, AnonymousIpResponse, AnonymousPlusResponse, AsnResponse, City, CityResponse, ConnectionTypeResponse, Continent, Country, CountryResponse, DomainResponse, EnterpriseResponse, InsightsResponse, IpRiskResponse, IspResponse, Location, MaxMind, Postal, RepresentedCountry, Subdivision, Traits

public interface JsonSerializable
Interface for classes that can be serialized to JSON. Provides default implementation for toJson() method.
  • Method Summary

    Modifier and Type
    Method
    Description
    default String
     
  • Method Details

    • toJson

      default String toJson() throws IOException
      Returns:
      JSON representation of this object. The structure is the same as the JSON provided by the GeoIP2 web service.
      Throws:
      IOException - if there is an error serializing the object to JSON.