Skip to content

Support BinaryData serialization #45423

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
May 22, 2025
Merged

Conversation

srnagar
Copy link
Member

@srnagar srnagar commented May 21, 2025

No description provided.

@Copilot Copilot AI review requested due to automatic review settings May 21, 2025 06:42
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces support for BinaryData serialization within the JSON serializer and adjusts the relevant tests accordingly. Key changes include:

  • Removal of the unused MockSerializer in the test directory.
  • Addition of BinaryData serialization/deserialization logic in JsonWriter and JsonSerializer.
  • Updates to JsonSerializerTests to validate BinaryData handling and corresponding updates in the spotbugs exclusions.

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
sdk/clientcore/core/src/test/java/io/clientcore/core/utils/serializers/MockSerializer.java Removed obsolete mock serializer class.
sdk/clientcore/core/src/test/java/io/clientcore/core/serialization/json/JsonSerializerTests.java Updated package and added tests for BinaryData serialization/deserialization.
sdk/clientcore/core/src/main/java/io/clientcore/core/serialization/json/JsonWriter.java Extended writeUntyped to handle BinaryData by delegating to its writeTo method.
sdk/clientcore/core/src/main/java/io/clientcore/core/serialization/json/JsonSerializer.java Added BinaryData deserialization support with dedicated helper methods.
sdk/clientcore/core/src/main/java/io/clientcore/core/instrumentation/logging/ExceptionLoggingEvent.java Overloaded addKeyValue to support Object values with appropriate documentation.
sdk/clientcore/core/spotbugs-exclude.xml Adjusted file exclusions to reflect package changes.

Copy link
Contributor

github-actions bot commented May 21, 2025

API Change Check

APIView identified API level changes in this PR and created the following API reviews

io.clientcore:core

@srnagar srnagar enabled auto-merge (squash) May 22, 2025 20:46
@srnagar srnagar merged commit 8e2dc4b into Azure:main May 22, 2025
32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants