Skip to content

Commit

Permalink
Remove JSON_SERIALIZER_SETTINGS
Browse files Browse the repository at this point in the history
  • Loading branch information
paulirwin committed Oct 8, 2024
1 parent e6bac31 commit 420ba30
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 10 deletions.
2 changes: 1 addition & 1 deletion src/Lucene.Net.Replicator/Http/HttpClientBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ protected virtual HttpResponseMessage ExecutePost(string request, object entity,
//.NET Note: No headers? No ContentType?... Bad use of Http?
HttpRequestMessage req = new HttpRequestMessage(HttpMethod.Post, QueryString(request, parameters));

req.Content = new StringContent(JToken.FromObject(entity, JsonSerializer.Create(ReplicationService.JSON_SERIALIZER_SETTINGS))
req.Content = new StringContent(JToken.FromObject(entity, JsonSerializer.Create())
.ToString(Formatting.None), Encoding.UTF8, "application/json");

return Execute(req);
Expand Down
9 changes: 0 additions & 9 deletions src/Lucene.Net.Replicator/Http/ReplicationService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -81,15 +81,6 @@ public enum ReplicationAction
/// </summary>
public const string REPLICATE_FILENAME_PARAM = "filename";

/// <summary>
/// Json Serializer Settings to use when serializing and deserializing errors.
/// </summary>
// LUCENENET specific
public static readonly JsonSerializerSettings JSON_SERIALIZER_SETTINGS = new JsonSerializerSettings()
{
TypeNameHandling = TypeNameHandling.All
};

private const int SHARD_IDX = 0, ACTION_IDX = 1;

private readonly string context;
Expand Down

0 comments on commit 420ba30

Please sign in to comment.