JsonSerializerOptions.MaxDepth Propriedade
Definição
Obtém ou define a profundidade máxima permitida ao serializar ou desserializar JSON, com o valor padrão de 0, indicando uma profundidade máxima de 64.Gets or sets the maximum depth allowed when serializing or deserializing JSON, with the default value of 0 indicating a maximum depth of 64.
public:
property int MaxDepth { int get(); void set(int value); };
public int MaxDepth { get; set; }
member this.MaxDepth : int with get, set
Public Property MaxDepth As Integer
Valor da propriedade
A profundidade máxima permitida ao serializar ou desserializar JSON.The maximum depth allowed when serializing or deserializing JSON.
Exceções
Esta propriedade foi definida após a serialização ou desserialização.This property was set after serialization or deserialization has occurred.
A profundidade máxima está definida como um valor negativo.The max depth is set to a negative value.
Comentários
Após essa profundidade, você lança um JsonException .Going past this depth throws a JsonException.