Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at

  • Norbert Haberl 32 posts 115 karma points
    Mar 16, 2020 @ 11:51
    Norbert Haberl

    JsonProperty Attribute not working in ApiController


    I have this code [Route("")] [HttpGet] public IHttpActionResult GetOrders([FromUri] GetOrdersDto dto)

    where the dto has different names of fields

    [JsonProperty(PropertyName = "start")]
    public DateTime From { get; set; }

    The problem is that the start name is ignored and therefore always NULL.

    Does Umbraco not using JsonNet as default formatter ?

    Any help appreciated!

Please Sign in or register to post replies

Write your reply to: