Created
July 8, 2018 12:12
-
-
Save ssougnez/d2d9e15f955167190e36187c25f200a9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace AnotherDevBlog.Core.API | |
{ | |
using Newtonsoft.Json; | |
using Newtonsoft.Json.Serialization; | |
using System.Web.Http.Results; | |
using Umbraco.Web.WebApi; | |
public class CustomDataController : UmbracoApiController | |
{ | |
public JsonResult<string[]> GetData() | |
{ | |
return Json(new[] { "One", "Two", "Three", "Four", "Five" }, new JsonSerializerSettings { ContractResolver = new CamelCasePropertyNamesContractResolver() }); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment