Skip to content
This repository was archived by the owner on Mar 26, 2025. It is now read-only.
This repository was archived by the owner on Mar 26, 2025. It is now read-only.

Unable to use library when also using NetTopologySuite converters. #90

Open
@markphillips100

Description

@markphillips100

I receive a JsonException: "Custom converter on member ... is not a JsonConverter" when trying to perform serialization of a Polygon typefrom the NetTopologySuite.

The specific reason for the error here is due to the fact NetTopologySuite derives several concrete types from a base Geometry type. They then have one single StjGeometryConverter : JsonConverter<Geometry> json converter, rather than separate converters per concrete type.

So, whether I use a Polygon, Point, or whatever concrete type for a property that I want serialized there is only ever the expectation that the GeoJsonConverterFactory will supply the single StJGeometryConverter.

Now, the method VerifyMemberConverterType here attempts to assert that the convert is JsonConverter<Polygon> which it will never be.

Any ideas how to get around this, considering it's highly unlikely NetTopologySuite will change their converters?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions