Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

AdditionalData not serialized for collections #511

Copy link
Copy link
@bougar

Description

@bougar
Issue body actions

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));
Reactions are currently unavailable

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.