Skip to content

AdditionalData not serialized for collections #511

@bougar

Description

@bougar

Hello everyone,
DefaultSerializer.getChildAdditionalData() lacks support of collections. As you can see, lists are not contemplated. As a result Items of Lists are not serialized with additional properties. On the other hand, HashMap should be changed to Map in order to support more generic collections.

This issue is strongly related with #295 and the fix should be similar.

Expected behavior

helloWord additional of ChatMessageMention property should be serialized

Actual behavior

helloWorld additional of ChatMessageMention is not serialized

Steps to reproduce the behavior

ChatMessage chatMessage = new ChatMessage();
ChatMessageMention chatMessageMention = new ChatMessageMention();
chatMessageMention.additionalDataManager().put("helloWord", new JsonPrimitive("3.141516"));
chatMessage.mentions = Collections.singletonList(chatMessageMention);
DefaultSerializer serializer = new DefaultSerializer(new DefaultLogger());
System.out.println(serializer.serializeObject(chatMessage));

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions