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

Search: Add JsonConverters for Microsoft.Spatial #13165

Closed
tg-msft opened this issue Jul 1, 2020 · 2 comments · Fixed by #15387
Closed

Search: Add JsonConverters for Microsoft.Spatial #13165

tg-msft opened this issue Jul 1, 2020 · 2 comments · Fixed by #15387
Assignees
Labels
Client This issue points to a problem in the data-plane of the library. Search

Comments

@tg-msft
Copy link
Member

tg-msft commented Jul 1, 2020

Let's investigate releasing a support package for Track 1 customers that enables them to keep using Microsoft.Spatial types with our Track 2 library by providing JsonConverters. We should look at whether we can support both System.Text.Json and Json.NET (as separate packages).

We can start with the existing Track 1 converters at https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/search/Microsoft.Azure.Search.Data/src/Customizations/Serialization/GeoJsonPointConverter.cs. Most of the work will be deciding on a strategy for releasing targeted support packages like this.

@tg-msft tg-msft added Search Client This issue points to a problem in the data-plane of the library. labels Jul 1, 2020
@tg-msft tg-msft added this to the [2020] August milestone Jul 1, 2020
@pakrym
Copy link
Contributor

pakrym commented Jul 2, 2020

Should this be search specific?

@tg-msft
Copy link
Member Author

tg-msft commented Jul 2, 2020

I'm not sure yet - this is more of a placeholder than a plan. If it's a lot of work to do this for ALL of Microsoft.Spatial, then we'll probably only light up the parts we need for Search and maybe Cosmos. We also need to reach out to the OData folks who own Microsoft.Spatial with a heads up and see if there's an opportunity to collaborate.

@heaths heaths self-assigned this Sep 18, 2020
heaths added a commit to heaths/azure-sdk-for-net that referenced this issue Sep 22, 2020
heaths added a commit to heaths/azure-sdk-for-net that referenced this issue Sep 29, 2020
heaths added a commit that referenced this issue Sep 29, 2020
* Fix README for Microsoft.Azure.Core.NewtonsoftJson

* Add Json.NET converters for Microsoft.Spatial

Resolves #13165

* Rename converter to match Json.NET ObjectSerializer

It may be long, but it's consistent.

* Add GeometryFactory and adapter

Uses reflection to loosely bind Microsoft.Spatial types.

* Rename spatial adapters to proxies

* Proxy all supported Microsoft.Spatial types

* Update Search for current Azure.Core.GeoJson

* Encode spatial types for SearchFilter

Fixes #15299

* Implement IEquatable<GeoPosition> on GeoPosition

GeoPosition already implemented the interface, just without declaring it. May as well, so the struct doesn't have to be boxed when using EqualityComparer.Default, for example.

* Resolve PR build issues

* Resolve build analysis issues

Filed #15423 to remove exclusions later.

* Move Microsoft.Spatial support for Json.NET to core

* Remove unused methods

* Always run tests against Microsoft.Spatial

* Change GeometryPoint to GeographyPoint

* Fix README validation failure

* Resolve PR feedback

* Resolve PR feedback
@github-actions github-actions bot locked and limited conversation to collaborators Mar 28, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Client This issue points to a problem in the data-plane of the library. Search
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants