Bleeding out Swan.Tiny
This commit is contained in:
@@ -15,8 +15,7 @@ namespace Swan.Formatters {
|
||||
/// serializer such as the beloved Json.NET.
|
||||
/// </summary>
|
||||
public class SerializerOptions {
|
||||
private static readonly ConcurrentDictionary<Type, Dictionary<Tuple<String, String>, MemberInfo>>
|
||||
TypeCache = new ConcurrentDictionary<Type, Dictionary<Tuple<String, String>, MemberInfo>>();
|
||||
private static readonly ConcurrentDictionary<Type, Dictionary<Tuple<String, String>, MemberInfo>> TypeCache = new ConcurrentDictionary<Type, Dictionary<Tuple<String, String>, MemberInfo>>();
|
||||
|
||||
private readonly String[]? _includeProperties;
|
||||
private readonly String[]? _excludeProperties;
|
||||
|
||||
@@ -99,7 +99,7 @@ namespace Swan.Formatters {
|
||||
/// </example>
|
||||
public static String Serialize(Object? obj, Boolean format = false, String? typeSpecifier = null, Boolean includeNonPublic = false, String[]? includedNames = null, params String[] excludedNames) => Serialize(obj, format, typeSpecifier, includeNonPublic, includedNames, excludedNames, null, JsonSerializerCase.None);
|
||||
|
||||
/// <summary>
|
||||
/*/// <summary>
|
||||
/// Serializes the specified object into a JSON string.
|
||||
/// </summary>
|
||||
/// <param name="obj">The object.</param>
|
||||
@@ -109,7 +109,7 @@ namespace Swan.Formatters {
|
||||
/// <returns>
|
||||
/// A <see cref="System.String" /> that represents the current object.
|
||||
/// </returns>
|
||||
public static String Serialize(Object? obj, JsonSerializerCase jsonSerializerCase, Boolean format = false, String? typeSpecifier = null) => Serialize(obj, format, typeSpecifier, false, null, null, null, jsonSerializerCase);
|
||||
public static String Serialize(Object? obj, JsonSerializerCase jsonSerializerCase, Boolean format = false, String? typeSpecifier = null) => Serialize(obj, format, typeSpecifier, false, null, null, null, jsonSerializerCase);*/
|
||||
|
||||
/// <summary>
|
||||
/// Serializes the specified object into a JSON string.
|
||||
@@ -145,7 +145,7 @@ namespace Swan.Formatters {
|
||||
/// </returns>
|
||||
public static String Serialize(Object? obj, SerializerOptions options) => Serializer.Serialize(obj, 0, options);
|
||||
|
||||
/// <summary>
|
||||
/*/// <summary>
|
||||
/// Serializes the specified object only including the specified property names.
|
||||
/// </summary>
|
||||
/// <param name="obj">The object.</param>
|
||||
@@ -205,7 +205,7 @@ namespace Swan.Formatters {
|
||||
/// }
|
||||
/// </code>
|
||||
/// </example>
|
||||
public static String SerializeExcluding(Object? obj, Boolean format, params String[] excludeNames) => Serialize(obj, new SerializerOptions(format, null, null, excludeNames));
|
||||
public static String SerializeExcluding(Object? obj, Boolean format, params String[] excludeNames) => Serialize(obj, new SerializerOptions(format, null, null, excludeNames));*/
|
||||
|
||||
/// <summary>
|
||||
/// Deserializes the specified json string as either a Dictionary[string, object] or as a List[object]
|
||||
@@ -258,7 +258,7 @@ namespace Swan.Formatters {
|
||||
/// </code></example>
|
||||
public static Object? Deserialize(String? json) => Deserialize(json, JsonSerializerCase.None);
|
||||
|
||||
/// <summary>
|
||||
/*/// <summary>
|
||||
/// Deserializes the specified JSON string and converts it to the specified object type.
|
||||
/// Non-public constructors and property setters are ignored.
|
||||
/// </summary>
|
||||
@@ -304,7 +304,7 @@ namespace Swan.Formatters {
|
||||
/// <returns>
|
||||
/// Type of the current conversion from json result.
|
||||
/// </returns>
|
||||
public static Object? Deserialize(String json, Type resultType, Boolean includeNonPublic = false, JsonSerializerCase jsonSerializerCase = JsonSerializerCase.None) => Converter.FromJsonResult(Deserializer.DeserializeInternal(json), jsonSerializerCase, resultType, includeNonPublic);
|
||||
public static Object? Deserialize(String json, Type resultType, Boolean includeNonPublic = false, JsonSerializerCase jsonSerializerCase = JsonSerializerCase.None) => Converter.FromJsonResult(Deserializer.DeserializeInternal(json), jsonSerializerCase, resultType, includeNonPublic);*/
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace Swan.Formatters {
|
||||
/// <seealso cref="Attribute" />
|
||||
[AttributeUsage(AttributeTargets.Property)]
|
||||
public sealed class JsonPropertyAttribute : Attribute {
|
||||
/// <summary>
|
||||
/*/// <summary>
|
||||
/// Initializes a new instance of the <see cref="JsonPropertyAttribute" /> class.
|
||||
/// </summary>
|
||||
/// <param name="propertyName">Name of the property.</param>
|
||||
@@ -15,7 +15,7 @@ namespace Swan.Formatters {
|
||||
public JsonPropertyAttribute(String propertyName, Boolean ignored = false) {
|
||||
this.PropertyName = propertyName ?? throw new ArgumentNullException(nameof(propertyName));
|
||||
this.Ignored = ignored;
|
||||
}
|
||||
}*/
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the name of the property.
|
||||
|
||||
Reference in New Issue
Block a user