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

Unable to deserialize to Newtonsoft.Json.Linq.JToken #64

@gimmi

Description

@gimmi

Hi,

given the following dto

public class Dto
{
    public Guid Id { get; set; }
    public string Name { get; set; }
}

this code work as expected, receiving application/json body and responding with application/json

Post["/echo"] = arg => this.Bind<Dto>();

the same request return an empty json ({}) with this implementation

Post["/echo"] = arg => this.Bind<JObject>();

What's wrong with this endpoint? Isn't deserialization to JToken working?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions