Skip to content

JsonConverter attribute usage #15

@WorldMaker

Description

@WorldMaker

It would be useful if this project included a JSON.NET JsonConverter at the top level that could just be used with a [JsonConverter()] attribute: https://www.newtonsoft.com/json/help/html/JsonConverterAttributeClass.htm

Ideally, I should be able to just adjust my EF model or DTO to my EF model, and wherever JSON serialization happens (such as automatically by WebAPI) it will convert to GeoJSON:

[JsonConverter(typeof(DbGeometryGeoJsonConverter))]
public DbGeometry Geometry { get; set; }

I don't see an example like this in the documentation and searching the source code there doesn't appear to be a class that can be directly used as a JsonConverter in this way. Let me know if I just missed it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions