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.mobicents.servlet.restcomm.http.converter.AbstractConverter.java
License:Open Source License
protected void writeVoiceMethod(final String voiceMethod, final JsonObject object) { if (voiceMethod != null) { object.addProperty("voice_method", voiceMethod); } else {//from www . ja va2s .c o m object.add("voice_method", JsonNull.INSTANCE); } }
From source file:org.mobicents.servlet.restcomm.http.converter.AbstractConverter.java
License:Open Source License
protected void writeVoiceUrl(final URI voiceUrl, final JsonObject object) { if (voiceUrl != null) { object.addProperty("voice_url", voiceUrl.toString()); } else {/*from www . ja va2 s .co m*/ object.add("voice_url", JsonNull.INSTANCE); } }
From source file:org.mobicents.servlet.restcomm.http.converter.ApplicationConverter.java
License:Open Source License
private void writeRcmlUrl(final URI rcmlUrl, final JsonObject object) { if (rcmlUrl != null) { object.addProperty("rcml_url", rcmlUrl.toString()); } else {/* www .jav a 2 s .c o m*/ object.add("rcml_url", JsonNull.INSTANCE); } }
From source file:org.mobicents.servlet.restcomm.http.converter.ApplicationConverter.java
License:Open Source License
private void writeKind(final Application.Kind kind, final JsonObject object) { if (kind != null) { object.addProperty("kind", kind.toString()); } else {//from ww w.j a va2 s. com object.add("kind", JsonNull.INSTANCE); } }
From source file:org.mobicents.servlet.restcomm.http.converter.EmailMessageConverter.java
License:Open Source License
private void writeBody(final String body, final JsonObject object) { if (body != null) { object.addProperty("body", body); } else {/* ww w .j a v a 2 s . c o m*/ object.add("body", JsonNull.INSTANCE); } }
From source file:org.mobicents.servlet.restcomm.http.converter.IncomingPhoneNumberConverter.java
License:Open Source License
private void writeSmsApplicationSid(final Sid smsApplicationSid, final JsonObject object) { if (smsApplicationSid != null) { object.addProperty("sms_application_sid", smsApplicationSid.toString()); } else {//from w ww . j ava 2 s . c o m object.add("sms_application_sid", JsonNull.INSTANCE); } }
From source file:org.mobicents.servlet.restcomm.http.converter.NotificationConverter.java
License:Open Source License
private void writeMessageText(final String messageText, final JsonObject object) { if (messageText != null) { object.addProperty("message_text", messageText); } else {//ww w . ja va 2 s . c o m object.add("message_text", JsonNull.INSTANCE); } }
From source file:org.mobicents.servlet.restcomm.http.converter.NotificationConverter.java
License:Open Source License
private void writeRequestVariables(final String requestVariables, final JsonObject object) { if (requestVariables != null) { object.addProperty("request_variables", requestVariables); } else {// w w w .j ava 2 s . co m object.add("request_variables", JsonNull.INSTANCE); } }
From source file:org.mobicents.servlet.restcomm.http.converter.NotificationConverter.java
License:Open Source License
private void writeResponseHeaders(final String responseHeaders, final JsonObject object) { if (responseHeaders != null) { object.addProperty("response_headers", responseHeaders); } else {/*w ww. j a v a 2s . c om*/ object.add("response_headers", JsonNull.INSTANCE); } }
From source file:org.mobicents.servlet.restcomm.http.converter.NotificationConverter.java
License:Open Source License
private void writeResponseBody(final String responseBody, final JsonObject object) { if (responseBody != null) { object.addProperty("response_body", responseBody); } else {/*from ww w . j a va2 s . com*/ object.add("response_body", JsonNull.INSTANCE); } }