Example usage for com.google.gson JsonDeserializationContext deserialize

List of usage examples for com.google.gson JsonDeserializationContext deserialize

Introduction

In this page you can find the example usage for com.google.gson JsonDeserializationContext deserialize.

Prototype

public <T> T deserialize(JsonElement json, Type typeOfT) throws JsonParseException;

Source Link

Document

Invokes default deserialization on the specified object.

Usage

From source file:org.eclipse.che.api.machine.server.model.impl.adapter.MachineSourceAdapter.java

License:Open Source License

@Override
public MachineSource deserialize(JsonElement jsonElement, Type type, JsonDeserializationContext context)
        throws JsonParseException {
    return context.deserialize(jsonElement, MachineSourceImpl.class);
}

From source file:org.eclipse.che.api.machine.server.recipe.adapters.GroupAdapter.java

License:Open Source License

@Override
public Group deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context)
        throws JsonParseException {
    JsonObject groupObj = json.getAsJsonObject();
    return new GroupImpl(groupObj.get("name") == null ? null : groupObj.get("name").getAsString(),
            groupObj.get("unit") == null ? null : groupObj.get("unit").getAsString(),
            context.deserialize(groupObj.get("acl"), new TypeToken<List<String>>() {
            }.getType()));/*from  w  w  w  .java  2s  .co  m*/
}

From source file:org.eclipse.che.api.machine.server.recipe.adapters.PermissionsAdapter.java

License:Open Source License

@Override
public Permissions deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context)
        throws JsonParseException {
    return context.deserialize(json, PermissionsImpl.class);
}

From source file:org.eclipse.che.api.workspace.server.stack.adapters.CommandAdapter.java

License:Open Source License

@Override
public Command deserialize(JsonElement jsonElement, Type type, JsonDeserializationContext context)
        throws JsonParseException {
    return context.deserialize(jsonElement, CommandImpl.class);
}

From source file:org.eclipse.che.api.workspace.server.stack.adapters.EnvironmentAdapter.java

License:Open Source License

@Override
public Environment deserialize(JsonElement jsonElement, Type type, JsonDeserializationContext context)
        throws JsonParseException {
    return context.deserialize(jsonElement, EnvironmentImpl.class);
}

From source file:org.eclipse.che.api.workspace.server.stack.adapters.LimitsAdapter.java

License:Open Source License

@Override
public Limits deserialize(JsonElement jsonElement, Type type, JsonDeserializationContext context)
        throws JsonParseException {
    return context.deserialize(jsonElement, Limits.class);
}

From source file:org.eclipse.che.api.workspace.server.stack.adapters.MachineConfigAdapter.java

License:Open Source License

@Override
public MachineConfig deserialize(JsonElement jsonElement, Type type, JsonDeserializationContext context)
        throws JsonParseException {
    return context.deserialize(jsonElement, MachineConfigImpl.class);
}

From source file:org.eclipse.che.api.workspace.server.stack.adapters.MachineSourceAdapter.java

License:Open Source License

@Override
public MachineSource deserialize(JsonElement jsonElement, Type type, JsonDeserializationContext context)
        throws JsonParseException {
    return context.deserialize(jsonElement, MachineSource.class);
}

From source file:org.eclipse.che.api.workspace.server.stack.adapters.ProjectConfigAdapter.java

License:Open Source License

@Override
public ProjectConfig deserialize(JsonElement jsonElement, Type type, JsonDeserializationContext context)
        throws JsonParseException {
    return context.deserialize(jsonElement, ProjectConfigImpl.class);
}

From source file:org.eclipse.che.api.workspace.server.stack.adapters.StackComponentAdapter.java

License:Open Source License

@Override
public StackComponent deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context)
        throws JsonParseException {
    return context.deserialize(json, StackComponentImpl.class);
}