List of usage examples for com.google.gson JsonSerializationContext serialize
public JsonElement serialize(Object src, Type typeOfSrc);
From source file:org.cmg.jresp.json.GroupPredicateSerializer.java
License:Open Source License
private JsonElement doSerializeOrPredicate(Or src, JsonObject json, JsonSerializationContext context) { json.add("left", context.serialize(src.getLeft(), GroupPredicate.class)); json.add("right", context.serialize(src.getRight(), GroupPredicate.class)); return json;/* w ww .j a v a 2s. co m*/ }
From source file:org.eclipse.che.api.machine.server.recipe.adapters.GroupAdapter.java
License:Open Source License
@Override public JsonElement serialize(Group src, Type typeOfSrc, JsonSerializationContext context) { return context.serialize(src, GroupImpl.class); }
From source file:org.eclipse.che.api.machine.server.recipe.adapters.PermissionsAdapter.java
License:Open Source License
@Override public JsonElement serialize(Permissions src, Type typeOfSrc, JsonSerializationContext context) { return context.serialize(src, PermissionsImpl.class); }
From source file:org.eclipse.che.api.machine.server.recipe.adapters.RecipeTypeAdapter.java
License:Open Source License
@Override public JsonElement serialize(Recipe recipe, Type type, JsonSerializationContext context) { return context.serialize(recipe, RecipeImpl.class); }
From source file:org.eclipse.che.api.workspace.server.stack.adapters.CommandAdapter.java
License:Open Source License
@Override public JsonElement serialize(Command command, Type type, JsonSerializationContext context) { return context.serialize(command, CommandImpl.class); }
From source file:org.eclipse.che.api.workspace.server.stack.adapters.EnvironmentAdapter.java
License:Open Source License
@Override public JsonElement serialize(Environment src, Type type, JsonSerializationContext context) { return context.serialize(src, EnvironmentImpl.class); }
From source file:org.eclipse.che.api.workspace.server.stack.adapters.LimitsAdapter.java
License:Open Source License
@Override public JsonElement serialize(Limits limits, Type type, JsonSerializationContext context) { return context.serialize(limits, Limits.class); }
From source file:org.eclipse.che.api.workspace.server.stack.adapters.MachineConfigAdapter.java
License:Open Source License
@Override public JsonElement serialize(MachineConfig machineConfig, Type type, JsonSerializationContext context) { return context.serialize(machineConfig, MachineConfigImpl.class); }
From source file:org.eclipse.che.api.workspace.server.stack.adapters.MachineSourceAdapter.java
License:Open Source License
@Override public JsonElement serialize(MachineSource machineSource, Type type, JsonSerializationContext context) { return context.serialize(machineSource, MachineSource.class); }
From source file:org.eclipse.che.api.workspace.server.stack.adapters.ProjectConfigAdapter.java
License:Open Source License
@Override public JsonElement serialize(ProjectConfig src, Type type, JsonSerializationContext context) { return context.serialize(src, ProjectConfigImpl.class); }