List of usage examples for com.google.gson JsonSerializer interface-usage
From source file de.chaosfisch.util.DateTimeTypeConverter.java
public class DateTimeTypeConverter implements JsonSerializer<DateTime>, JsonDeserializer<DateTime> { @Override public JsonElement serialize(final DateTime src, final Type typeOfSrc, final JsonSerializationContext context) { return new JsonPrimitive(src.toString()); }
From source file de.dentrassi.pm.maven.NodeAdapter.java
public class NodeAdapter implements JsonSerializer<Node>, JsonDeserializer<Node> { @Override public JsonElement serialize(final Node node, final Type type, final JsonSerializationContext ctx) { if (node == null) { return JsonNull.INSTANCE;
From source file de.elomagic.carafile.share.DateSerializer.java
/** * */ public class DateSerializer implements JsonSerializer<Date> { @Override
From source file de.feike.tiingoclient.JSON.java
class DateAdapter implements JsonSerializer<Date>, JsonDeserializer<Date> { private final ApiClient apiClient; /** * Constructor for DateAdapter *
From source file de.grobmeier.postmark.DateTimeTypeAdapter.java
/**
* Postmark for Java
* <p/>
* This library can be used to leverage the postmarkapp.com functionality from a Java client
* <p/>
* http://github.com/jaredholdcroft/postmark-java
From source file de.hshannover.f4.trust.irongpm.rest.IfmapGraphJsonAdapter.java
/**
* Adapter class to (de-)serialize and transform between JSON and the JGraphT datamodel using Google gson.
*
* @author Leonard Renners
*
*/
From source file de.justi.yagw2api.common.json.TupleTypeAdapter.java
public final class TupleTypeAdapter implements JsonSerializer<Tuple>, JsonDeserializer<Tuple> { @Override public JsonElement serialize(final Tuple src, final Type typeOfSrc, final JsonSerializationContext context) { final JsonArray jsonArray = new JsonArray(); for (Object tuplePart : src.asList()) {
From source file de.skubware.opentraining.db.rest.ExerciseImageGSONSerializer.java
/**
* Class for serializing {@link ExerciseType} to the wger.de-JSON-format.
*
* The use of static members is not ideal, but should not cause too much
* problems. Unfortunately GSON/retrofit do not allow to pass the maps as method
* parameter, so they have to be set via static methods before.
From source file de.skubware.opentraining.db.rest.ExerciseTypeGSONSerializer.java
/**
* Class for serializing {@link ExerciseType} to the wger.de-JSON-format.
*
* The use of static members is not ideal, but should not cause too much problems.
* Unfortunately GSON/retrofit do not allow to pass the maps as method parameter,
* so they have to be set via static methods before.
From source file de.winniehell.battlebeavers.storage.SoldierSerializer.java
/** * serializer class for {@link Soldier} * @author <a href="https://github.com/winniehell/">winniehell</a> */ class SoldierSerializer implements JsonSerializer<Soldier> { @Override