Skip to content

Instantly share code, notes, and snippets.

View shizik's full-sized avatar

Marko Ilievski shizik

View GitHub Profile
@shizik
shizik / AreaSpecificCamelCaseJsonFormatter.cs
Created June 5, 2013 08:23
Adds custom JSON formatting rules to controllers of the specified area.
using System;
using System.Net;
using System.Net.Http;
using System.Net.Http.Formatting;
using System.Net.Http.Headers;
using System.Threading.Tasks;
using System.Web.Http.Routing;
using Newtonsoft.Json;
using Newtonsoft.Json.Serialization;
@shizik
shizik / CamelCaseJsonAttribute.cs
Created June 5, 2013 08:19
Attribute can be used on specific action or controller to override the default JSON formatting for WebApi.
using System;
using System.Linq;
using System.Net.Http.Formatting;
using System.Web.Http.Controllers;
using Newtonsoft.Json.Serialization;
namespace DemoApplication.Extensions.WebApi
{
public class CamelCaseJsonAttribute : Attribute, IControllerConfiguration
{