Skip to content

Commit 3365d59

Browse files
committed
fix(error-collection): use camel-case serialization
1 parent 75e72b7 commit 3365d59

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/JsonApiDotNetCore/Internal/ErrorCollection.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using System.Collections.Generic;
22
using Newtonsoft.Json;
3+
using Newtonsoft.Json.Serialization;
34

45
namespace JsonApiDotNetCore.Internal
56
{
@@ -20,7 +21,8 @@ public void Add(Error error)
2021
public string GetJson()
2122
{
2223
return JsonConvert.SerializeObject(this, new JsonSerializerSettings {
23-
NullValueHandling = NullValueHandling.Ignore
24+
NullValueHandling = NullValueHandling.Ignore,
25+
ContractResolver = new CamelCasePropertyNamesContractResolver()
2426
});
2527
}
2628
}

0 commit comments

Comments
 (0)