List of usage examples for com.google.gson JsonNull INSTANCE
JsonNull INSTANCE
To view the source code for com.google.gson JsonNull INSTANCE.
Click Source Link
From source file:org.restcomm.connect.http.converter.GeolocationConverter.java
License:Open Source License
protected void writeAccuracy(final Long accuracy, final JsonObject object) { if (accuracy != null) { object.addProperty("accuracy", accuracy); } else {// w w w .j a va 2 s .co m object.add("accuracy", JsonNull.INSTANCE); } }
From source file:org.restcomm.connect.http.converter.GeolocationConverter.java
License:Open Source License
protected void writePhysicalAddress(final String physicalAddress, final JsonObject object) { if (physicalAddress != null) { object.addProperty("physical_address", physicalAddress); } else {/* w w w . j ava 2 s . co m*/ object.add("physical_address", JsonNull.INSTANCE); } }
From source file:org.restcomm.connect.http.converter.GeolocationConverter.java
License:Open Source License
protected void writeInternetAddress(final String internetAddress, final JsonObject object) { if (internetAddress != null) { object.addProperty("internet_address", internetAddress); } else {// ww w .j av a 2s.com object.add("internet_address", JsonNull.INSTANCE); } }
From source file:org.restcomm.connect.http.converter.GeolocationConverter.java
License:Open Source License
protected void writeFormattedAddress(final String formattedAddress, final JsonObject object) { if (formattedAddress != null) { object.addProperty("formatted_address", formattedAddress); } else {/*from www .j a v a 2 s . c o m*/ object.add("formatted_address", JsonNull.INSTANCE); } }
From source file:org.restcomm.connect.http.converter.GeolocationConverter.java
License:Open Source License
protected void writeLocationTimestamp(final DateTime locationTimestamp, final JsonObject object) { if (locationTimestamp != null) { object.addProperty("location_timestamp", new SimpleDateFormat("EEE, d MMM yyyy HH:mm:ss Z", Locale.US) .format(locationTimestamp.toDate())); } else {//from w w w . j ava 2 s.c om object.add("location_timestamp", JsonNull.INSTANCE); } }
From source file:org.restcomm.connect.http.converter.GeolocationConverter.java
License:Open Source License
protected void writeEventGeofenceLatitude(final String eventGeofenceLatitude, final JsonObject object) { if (eventGeofenceLatitude != null) { object.addProperty("event_geofence_latitude", eventGeofenceLatitude); } else {//from ww w .jav a 2 s. c om object.add("event_geofence_latitude", JsonNull.INSTANCE); } }
From source file:org.restcomm.connect.http.converter.GeolocationConverter.java
License:Open Source License
protected void writeEventGeofenceLongitude(final String eventGeofenceLongitude, final JsonObject object) { if (eventGeofenceLongitude != null) { object.addProperty("event_geofence_longitude", eventGeofenceLongitude); } else {// w ww.j a v a 2 s .co m object.add("event_geofence_longitude", JsonNull.INSTANCE); } }
From source file:org.restcomm.connect.http.converter.GeolocationConverter.java
License:Open Source License
protected void writeRadius(final Long radius, final JsonObject object) { if (radius != null) { object.addProperty("radius", radius); } else {// w w w . java 2s. c o m object.add("radius", JsonNull.INSTANCE); } }
From source file:org.restcomm.connect.http.converter.GeolocationConverter.java
License:Open Source License
protected void writeGeolocationPositioningType(final String geolocationPositioningType, final JsonObject object) { if (geolocationPositioningType != null) { object.addProperty("geolocation_positioning_type", geolocationPositioningType); } else {//from ww w. j ava2 s.co m object.add("geolocation_positioning_type", JsonNull.INSTANCE); } }
From source file:org.restcomm.connect.http.converter.GeolocationConverter.java
License:Open Source License
protected void writeLastGeolocationResponse(final String lastGeolocationResponse, final JsonObject object) { if (lastGeolocationResponse != null) { object.addProperty("last_geolocation_response", lastGeolocationResponse); } else {//from w ww . j av a 2 s .com object.add("last_geolocation_response", JsonNull.INSTANCE); } }