I need to serialize a object class:

```
public class DigitalInput {

    private String id;
    private Date timestamp;
    private String matter;
    private String comment;
    private String channelId;

    private List<IndexableProperty> otherProps;
    ...
}

```

And I receive this JSON:

```
{
    "timestamp":"2015-07-27T10:47:53.765Z",
    "matter":"aleatory-1",
    "comment":"aleatory comment-1",
    "channelId":null,
    "property_aleatoryString":"account-1@domain.com",
    "property_aleatoryNumber":6.3573580981989274E17,
    "property_aleatoryDouble":1.2,
    "property_aleatoryDate":"2015-07-27T08:03:01.9892765Z"
}

```

So, I need to set all property\_\* properties inside the otherProps list as `IndexableProperty` objects.

I've created a Deserializer to do that:

```
public class DigitalInputDeserializer extends JsonDeserializer<DigitalInput> {

     @Override
     public DigitalInput deserialize(JsonParser p, DeserializationContext ctxt)
        throws IOException, JsonProcessingException {

        JsonNode node = p.getCodec().readTree(p);
        String id = node.get("_id").asText();
        Date timestamp = Instant.parse(node.get("timestamp").asText()).toDate();
        String matter = node.get("matter").asText();
        String description = node.get("comment").asText();
        String channelId = node.get("channelId").asText();

        ...  // I don't know how to deserialize property_* like fields in a list

        return new DigitalInput(id, channelId, timestamp, matter, description);
    }

}

```

**EDIT**

I've added next, the configuration of ObjectMapper:

```
@ApplicationScoped
public class JacksonApplicationResources
{

    protected ObjectMapper mapper;

    @PostConstruct
    protected void initialize_resources() throws IllegalStateException
    {
        this.mapper = new ObjectMapper();

        SimpleModule module = new SimpleModule();

        // Chanel
        module.addDeserializer(Channel.class, new ChannelDeserializer());
        module.addSerializer(Channel.class, new ChannelSerializer());

        module.addDeserializer(DigitalInput.class, new DigitalInputDeserializer());
        module.addSerializer(DigitalInput.class, new DigitalInputSerializer());

        this.mapper.registerModule(module);
    }

    public ObjectMapper getMapper() {
        return this.mapper;
    }
}

```
['https://Stackoverflow.com/questions/31648275', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/3227319/']
Have you look at `Multibinder`? 
This is example directly from [API](http://google.github.io/guice/api-docs/latest/javadoc/com/google/inject/multibindings/Multibinder.html)

```
 public class SnacksModule extends AbstractModule {
   protected void configure() {
     Multibinder<Snack> multibinder
         = Multibinder.newSetBinder(binder(), Snack.class);
     multibinder.addBinding().toInstance(new Twix());
     multibinder.addBinding().toProvider(SnickersProvider.class);
     multibinder.addBinding().to(Skittles.class);
   }
 }

```
If you wanted to do something like this:

```
baseClass obj1;

obj1.add(new classAbc);
obj2.add(new classDef);

bind(interface1.class).toInstance(obj1);

```

You could, but only if your `baseClass` is of the *Composite pattern* (where objects can also act as containers for other objects). Otherwise, you'll need to provide your alternatives in another container, like a List:

```
List<Interface1> interfaceList = new ArrayList<>();

interfaceList.add(new classAbc());
interfaceList.add(new classDef());

bind(new TypeLiteral<List<Interface1>>() {}).toInstance(interfaceList);

```

Though with that solution above:

1. It won't pick up on dependencies of implementors `classAbc`, `classDef`, etc.
2. It creates all of these dependencies pre-emptively, whether they're needed or not.
3. The list is mutable, so someone else can affect the permanently-kept list.

Instead, a manual simulation of Multibinding might look like this [untested]:

```
public class YourModule extends AbstractModule {
  @Override public void configure() {}

  @Provides Set<Interface1> createSet(ClassAbc abc, ClassDef def) {
    return ImmutableSet.of(abc, def);
  }

  // Provider<ClassAbc> can't usually be cast to Provider<Interface1>
  @SuppressWarnings 
  @Provides Set<Provider<Interface1>> createProviderSet(
      Provider<ClassAbc> abc, Provider<ClassDef> def) {
    return ImmutableSet.of(
        (Provider<Interface1>) abc,
        (Provider<Interface1>) def);
  }
}

```