using Atomx.Utils.Json.Converts;
using System.Text.Encodings.Web;
using System.Text.Json;
using System.Text.Unicode;

namespace Atomx.Utils.Json
{
    public class JsonOptions
	{
		public static JsonSerializerOptions DefaultOptions()
		{

			var opts = new JsonSerializerOptions
			{
				PropertyNameCaseInsensitive = true,
				PropertyNamingPolicy = JsonNamingPolicy.CamelCase,
				WriteIndented = true,
				Encoder = JavaScriptEncoder.Create(UnicodeRanges.All)
			};
			opts.Converters.Add(new LongJsonConverter());
			opts.Converters.Add(new DateTimeJsonConverter());
			opts.Converters.Add(new ClaimConverter());
			return opts;
		}
	}
}
