Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Status
- {
- public string Content {get; set;}
- public string Publisher {get; set;}
- public List<string> Tags {get; set;}
- }
- {
- "content":"this is my baby dog",
- "publisher":"someone"
- "tags":[ "tag1", "tag2" ]
- }
- [HttpPost]
- public IActionResult Publish([FromBody] Status status)
- {
- // status should be deserialized now
- }
- {
- "content":"this is my baby dog",
- "publisher":"someone",
- "tags":[ "tag1", "tag2" ]
- }
- {
- "content":"this is my baby dog",
- "publisher":"someone",
- "tags":[ {"tag1":"tag1"}, {"tag2":"tag2"} ]
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement