X Tutup
Skip to content

I want to delete metadata of host-aggregates , but parameter lost after map serialization #71

@zhaoyi4j

Description

@zhaoyi4j

I want to delete metadata of host-aggregates , but parameter lost after map serialization。

This is my code.

IClient client = clientService.getClient(controllerId);
Map<String, String> metadata = new HashMap<>();
metadata.put("pinned", null);
client.compute().hostAggregates().setMetadata(id, metadata);

This request must run this code.

String content = ObjectMapperSingleton.getContext(this.request.getEntity().getClass()).writer().writeValueAsString(this.request.getEntity());

There are the following parameters in class of org.openstack4j.core.transport.ObjectMapperSingleton:

mapper.setSerializationInclusion(Include.NON_NULL);

HOW CAN I CHANGE THIS CONFIG TO

mapper.setSerializationInclusion(Include.ALWAYS);

THANK YOU !!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      X Tutup