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 map not populated for collections #295

Copy link
Copy link
@kitherill

Description

@kitherill
Issue body actions

DefaultSerializer.setChildAdditionalData() lacks support of collections. As you can see, only a HashMap (why not just Map???) and IJsonBackedObject are supported. As a result all other collections fail to get additionalDataManager field populated. For instance, DriveItems fetched with GET /user/{userId}/drive/root/delta don't have this field populated for createdBy.user object. Same object's property is populated for Drive as response's value field is scalar.

Expected behavior

DriveItem.createdBy.user.additionalDataManager should contain user email

Actual behavior

DriveItem.createdBy.user.additionalDataManager is empty

Steps to reproduce the behavior

        final String json = "{\n"
                + "    \"@odata.context\": \"https://graph.microsoft.com/v1.0/$metadata#users('02008492-3fec-4ce4-bb54-980ad856856f')/drive/root/children\",\n"
                + "    \"value\": [\n"
                + "        {\n"
                + "            \"createdBy\": {\n"
                + "                \"user\": {\n"
                + "                    \"email\": \"the@email.com\",\n"
                + "                    \"id\": \"02008492-3fec-4ce4-bb54-980ad856856f\",\n"
                + "                    \"displayName\": \"John Doe\"\n"
                + "                }\n"
                + "            }\n"
                + "        }\n"
                + "    ]\n"
                + "}";
        
        final DefaultSerializer serializer = new DefaultSerializer(new DefaultLogger());
        final DriveItemDeltaCollectionResponse deserialized = serializer
                .deserializeObject(json, DriveItemDeltaCollectionResponse.class);

        System.out.println(deserialized.value.get(0).createdBy.user.additionalDataManager());```

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.