Geometry converter no longer writes. It was causing a reference loop by zeus82 · Pull Request #147 · GeoJSON-Net/GeoJSON.Net · GitHub
Skip to content

Geometry converter no longer writes. It was causing a reference loop#147

Merged
xfischer merged 2 commits into
GeoJSON-Net:masterfrom
zeus82:master
Jun 5, 2020
Merged

Geometry converter no longer writes. It was causing a reference loop#147
xfischer merged 2 commits into
GeoJSON-Net:masterfrom
zeus82:master

Conversation

@zeus82

@zeus82 zeus82 commented Jun 5, 2020

Copy link
Copy Markdown
Contributor

Serializing Geometry using this converter resulted in:

Newtonsoft.Json.JsonSerializationException: Self referencing loop detected with type 'GeoJSON.Net.Geometry.Polygon'. Path ''

This PR fixes that.

@xfischer

xfischer commented Jun 5, 2020

Copy link
Copy Markdown
Member

Comment thread src/GeoJSON.Net/Converters/GeometryConverter.cs
@zeus82

zeus82 commented Jun 5, 2020

Copy link
Copy Markdown
Contributor Author

Hi @zeus82, thanks for reporting this. This went out of the Tests radar.

Can you provide an example for the code that's causing the exception, in order to add it to the tests project ?

I have added a unit test that shows the problem.

@xfischer

xfischer commented Jun 5, 2020

Copy link
Copy Markdown
Member

@xfischer xfischer merged commit 3a1c85a into GeoJSON-Net:master Jun 5, 2020
xfischer added a commit that referenced this pull request Jun 5, 2020
GH-147

Co-Authored-By: Sanjeev M <zeus82@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants