---
title: "Discussion on \"How to restrict serialized properties with Json.NET and Web API 2.0 using a custom ContractResolver\" | Hashnode"
description: "Discussion on \"How to restrict serialized properties with Json.NET and Web API 2.0 using a custom ContractResolver\". I recently were in a situation where I needed to hide parts of my models from unauthorized users.\nI tried a few different things that weren’t that pretty or maintainable, but in the end I found a pretty simple solution.\nTo accompany this post I have ..."
url: "https://hashnode.com/posts/how-to-restrict-serialized-properties/628e228043220290a7eea885"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [How to restrict serialized properties with Json.NET and Web API 2.0 using a custom ContractResolver](https://blog.krusen.dk/how-to-restrict-serialized-properties?utm_source=hashnode&utm_medium=feed)

I recently were in a situation where I needed to hide parts of my models from unauthorized users. I tried a few different things that weren’t that pretty or maintainable, but in the end I found a pretty simple solution. To accompany this post I have ...

Sep 18, 2014 · 6 min read · blog.krusen.dk  
Read the article

## Written by

[Søren Kruse](https://hashnode.com/@Krusen)

@Krusen · Odense, Denmark

  
[View profile](https://hashnode.com/@Krusen)

Tech Lead @ IMPACT Commerce

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
