-Added JsonLoadSettings

-Added CommentsHandling
-Changed LINQ to JSON load to ignore array comments by default
This commit is contained in:
James Newton-King
2015-10-06 22:17:25 +13:00
parent 172c1d8f30
commit 2bf31b9605
22 changed files with 366 additions and 68 deletions
@@ -0,0 +1,30 @@
using System;
namespace Newtonsoft.Json.Linq
{
/// <summary>
/// Specifies the settings used when loading JSON.
/// </summary>
public class JsonLoadSettings
{
private CommentHandling _commentHandling;
/// <summary>
/// Gets or sets how JSON comments are handled when loading JSON.
/// </summary>
/// <value>The JSON comment handling.</value>
public CommentHandling CommentHandling
{
get { return _commentHandling; }
set
{
if (value < CommentHandling.Ignore || value > CommentHandling.Load)
{
throw new ArgumentOutOfRangeException("value");
}
_commentHandling = value;
}
}
}
}