mirror of
https://github.com/Radarr/Radarr.git
synced 2026-04-22 22:15:17 -04:00
New: Use System.Text.Json for Nancy and SignalR
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text.Json;
|
||||
using FluentValidation;
|
||||
using FluentValidation.Results;
|
||||
using Nancy;
|
||||
using Nancy.Responses.Negotiation;
|
||||
using Newtonsoft.Json;
|
||||
using NzbDrone.Core.Datastore;
|
||||
using Radarr.Http.Extensions;
|
||||
|
||||
@@ -248,7 +248,7 @@ namespace Radarr.Http.REST
|
||||
{
|
||||
resource = Request.Body.FromJson<TResource>();
|
||||
}
|
||||
catch (JsonReaderException e)
|
||||
catch (JsonException e)
|
||||
{
|
||||
throw new BadRequestException($"Invalid request body. {e.Message}");
|
||||
}
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
using Newtonsoft.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace Radarr.Http.REST
|
||||
{
|
||||
public abstract class RestResource
|
||||
{
|
||||
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)]
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
|
||||
public virtual int Id { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
|
||||
Reference in New Issue
Block a user