Skip to content
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

Add ServiceProvider Interface to azure-json and azure-xml #30635

Merged
merged 9 commits into from
Sep 1, 2022

Conversation

alzimmermsft
Copy link
Member

Description

Adds a ServiceProvider interface to both azure-json and azure-xml and adds implementation of the azure-json interface to azure-json-gson to enable loading implementations found on the classpath. Both the JSON and XML providers also offer a default fallback when an instance cannot be found on the classpath and this is the default handling.

All SDK Contribution checklist:

  • The pull request does not introduce [breaking changes]
  • CHANGELOG is updated for new features, bug fixes or other significant changes.
  • I have read the contribution guidelines.

General Guidelines and Best Practices

  • Title of the pull request is clear and informative.
  • There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.

Testing Guidelines

  • Pull request includes test coverage for the included changes.

@alzimmermsft alzimmermsft added Client This issue points to a problem in the data-plane of the library. Azure.Core azure-core labels Aug 24, 2022
@alzimmermsft alzimmermsft self-assigned this Aug 24, 2022
@azure-sdk
Copy link
Collaborator

azure-sdk commented Aug 24, 2022

API change check

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

azure-json
azure-json-gson
azure-xml

Copy link
Member

@lmolkova lmolkova left a comment

Choose a reason for hiding this comment

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

LGTM!

/**
* Contains configuration options for creating a {@link JsonReader} or {@link JsonWriter}.
*/
public final class JsonOptions {
Copy link
Member

Choose a reason for hiding this comment

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

future concern: we probably should allow implementations to have implementation-specific options and then would need to plumb jsonoptions through clients.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yep! Once we want to allow for implementation specific options we can make this class non-final

@alzimmermsft alzimmermsft merged commit 1ee4dd0 into Azure:main Sep 1, 2022
@alzimmermsft alzimmermsft deleted the AzCore_AddSpisToJsonAndXml branch September 1, 2022 16:26
kwonus-msft pushed a commit to kwonus-msft/azure-sdk-for-java-kw that referenced this pull request Sep 1, 2022
Add ServiceProvider Interface to azure-json and azure-xml
vcolin7 pushed a commit to vcolin7/azure-sdk-for-java that referenced this pull request Sep 9, 2022
Add ServiceProvider Interface to azure-json and azure-xml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Azure.Core azure-core Client This issue points to a problem in the data-plane of the library.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants