List of usage examples for com.google.gson JsonSerializer interface-usage
From source file com.ibm.common.activitystreams.internal.Adapter.java
/** * @author james * @version $Revision: 1.0 $ */ public abstract class Adapter<T> implements JsonSerializer<T>, JsonDeserializer<T> {
From source file com.ibm.util.merge.json.DirectiveSerializer.java
public class DirectiveSerializer implements JsonSerializer<AbstractDirective> { @Override public JsonElement serialize(AbstractDirective src, Type directive, JsonSerializationContext context) { switch (src.getType()) { case Directives.TYPE_REPLACE_VALUE:
From source file com.ibm.util.merge.json.ProviderSerializer.java
public class ProviderSerializer implements JsonSerializer<AbstractProvider> { @Override public JsonElement serialize(AbstractProvider src, Type provider, JsonSerializationContext context) { switch (src.getType()) { case Providers.TYPE_CSV:
From source file com.ibm.watson.developer_cloud.util.DateSerializer.java
/** * Date serializer. */ public class DateSerializer implements JsonSerializer<Date> { // SimpleDateFormat is NOT thread safe - they require private visibility and synchronized access
From source file com.idahokenpo.kenposchedule.data.serialization.WeekIdentifierSerializer.java
/** * * @author Korey */ public class WeekIdentifierSerializer implements JsonSerializer<WeekIdentifier> {
From source file com.indragie.cmput301as1.DateJSONSerializer.java
/** * Serializes {@link Date} objects to JSON. */ public class DateJSONSerializer implements JsonSerializer<Date> { /* (non-Javadoc)
From source file com.indragie.cmput301as1.ExpenseItemJSONSerializer.java
/** * Serializes an {@link ExpenseItem} to JSON. */ public class ExpenseItemJSONSerializer implements JsonSerializer<ExpenseItem> { /* (non-Javadoc)
From source file com.intuit.ipp.serialization.custom.JAXBElementJsonSerializer.java
public class JAXBElementJsonSerializer implements JsonSerializer<JAXBElement<? extends IntuitEntity>> { @Override public JsonElement serialize(final JAXBElement<? extends IntuitEntity> jaxbVariable, final Type typeOfSrc, final JsonSerializationContext context) { return new JsonPrimitive(MessageUtils.getGson().toJson(jaxbVariable.getValue()));
From source file com.itametis.jsonconverter.pathstrategy.PathSerializer.java
/** * The serialization is Standardized. * * @author <a href="mailto:chloe.mahalin@itametis.com">Chlo MAHALIN - ITAMETIS</a> */ public class PathSerializer implements JsonSerializer<Object> {
From source file com.javacreed.examples.gson.part1.BookSerialiser.java
public class BookSerialiser implements JsonSerializer<Book> { @Override public JsonElement serialize(final Book book, final Type typeOfSrc, final JsonSerializationContext context) { final JsonObject jsonObject = new JsonObject(); jsonObject.addProperty("title", book.getTitle());