Giter Site home page Giter Site logo

Comments (6)

alzimmermsft avatar alzimmermsft commented on July 4, 2024 1

Hi @xuanhai266, a new version of azure-ai-documentintelligence has shipped:

https://central.sonatype.com/artifact/com.azure/azure-ai-documentintelligence

With this I think the issue can be considered addressed.

from azure-sdk-for-java.

joshfree avatar joshfree commented on July 4, 2024

@alzimmermsft @jairmyree could you please assist @xuanhai266 here?

from azure-sdk-for-java.

alzimmermsft avatar alzimmermsft commented on July 4, 2024

Thanks for filing this issue @xuanhai266.

The issue appears to be that azure-search-documents includes a dependency on azure-core-serializer-json-jackson, which supplies a service provider implementation for JsonSerializer. So, when the request call is made instead of using the default implementation of JsonSerializer provided by azure-core it uses the one in azure-core-serializer-json-jackson which has one major difference in null values being included in serialization (the azure-core implementation is specifically meant for types managed by Azure SDKs and we don't send null values).

One solution to this problem is to Maven exclude the azure-core-serializer-json-jackson dependency from `azure-search-documents:

<dependency>
  <groupId>com.azure</groupId>
  <artifactId>azure-search-documents</artifactId>
  <version>11.7.0-beta.3</version>
  <exclusions>
    <exclusion>
      <groupId>com.azure</groupId>
      <artifactId>azure-core-serializer-json-jackson</artifactId>
    </exclusion>
  </exclusions>
</dependency>

Which I've verified locally makes the Document Intelligence API call work. But this could break features in azure-search-documents.

Another solution is preventing azure-core-serializer-json-jackson's JsonSerializer implementation to be loaded from the service provider.

I also looked at the in-development version of azure-ai-documentintelligence and it is migrating to our new serialization framework using azure-json and it worked without any dependency removes or changes to build as it no longer uses Jackson annotations for serialization.

from azure-sdk-for-java.

xuanhai266 avatar xuanhai266 commented on July 4, 2024

@alzimmermsft
Thank you for your response.

One solution to this problem is to Maven exclude the azure-core-serializer-json-jackson dependency from `azure-search-documents:

Yes, this workaround is working well.

But this could break features in azure-search-documents.

Do you know which features of azure-search-documents will be broken if I exclude the azure-core-serializer-json-jackson dependency?

I also looked at the in-development version of azure-ai-documentintelligence and it is migrating to our new serialization framework using azure-json and it worked without any dependency removes or changes to build as it no longer uses Jackson annotations for serialization.

When does this version of azure-ai-documentintelligence release?

from azure-sdk-for-java.

alzimmermsft avatar alzimmermsft commented on July 4, 2024

Do you know which features of azure-search-documents will be broken if I exclude the azure-core-serializer-json-jackson dependency?

When azure-core-serializer-json-jackson is excluded azure-search-documents will fall back to the default serializer provided by azure-core to manage serializing documents sent to and received from the Search service, unless a custom JsonSerializer is passed while creating the SearchClient (SearchClientBuilder.serializer). This will result in slightly different serialization handling provided by Jackson Databind, which may break some cases such as the default serializer in azure-core doesn't serialize null properties which is a valid case in a Search document.

When does this version of azure-ai-documentintelligence release?

Let me follow-up with the owner of the SDK on this.

from azure-sdk-for-java.

github-actions avatar github-actions commented on July 4, 2024

Hi @xuanhai266. Thank you for opening this issue and giving us the opportunity to assist. We believe that this has been addressed. If you feel that further discussion is needed, please add a comment with the text "/unresolve" to remove the "issue-addressed" label and continue the conversation.

from azure-sdk-for-java.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.