From a8a214304833351dbf628acaeefa93cc36b8a6ef Mon Sep 17 00:00:00 2001 From: Ahson Khan Date: Wed, 5 Jun 2019 11:18:50 -0700 Subject: [PATCH] Moving the JsonSerializer to the root namespace - System.Text.Json (dotnet/corefx#38120) * CHanging namespace for json serializer * Update ref and namespace to react to recent changes. * Auto-gen the ref. * Remove unnecessary using directive that got added recently. Commit migrated from https://github.com/dotnet/corefx/commit/7e0c5dd1927981131c370141c4ef44c0ebd26c05 --- .../System.Text.Json/ref/System.Text.Json.cs | 74 +++++++++++----------- .../Text/Json/Serialization/ClassMaterializer.cs | 2 +- .../System/Text/Json/Serialization/ClassType.cs | 2 +- .../Json/Serialization/JsonCamelCaseNamePolicy.cs | 2 +- .../Serialization/JsonClassInfo.AddProperty.cs | 4 +- .../Text/Json/Serialization/JsonClassInfo.cs | 3 +- .../Text/Json/Serialization/JsonNamingPolicy.cs | 2 +- .../Text/Json/Serialization/JsonPropertyInfo.cs | 3 +- .../Json/Serialization/JsonPropertyInfoCommon.cs | 2 +- .../Serialization/JsonPropertyInfoNotNullable.cs | 2 +- .../Json/Serialization/JsonPropertyInfoNullable.cs | 2 +- .../JsonSerializer.Read.HandleArray.cs | 2 +- .../JsonSerializer.Read.HandleDictionary.cs | 2 +- .../JsonSerializer.Read.HandleNull.cs | 2 +- .../JsonSerializer.Read.HandleObject.cs | 2 +- .../JsonSerializer.Read.HandlePropertyName.cs | 2 +- .../JsonSerializer.Read.HandleValue.cs | 2 +- .../Serialization/JsonSerializer.Read.Helpers.cs | 2 +- .../Json/Serialization/JsonSerializer.Read.Span.cs | 2 +- .../Serialization/JsonSerializer.Read.Stream.cs | 2 +- .../Serialization/JsonSerializer.Read.String.cs | 2 +- .../JsonSerializer.Read.Utf8JsonReader.cs | 2 +- .../Text/Json/Serialization/JsonSerializer.Read.cs | 2 +- .../JsonSerializer.Write.ByteArray.cs | 2 +- .../JsonSerializer.Write.HandleDictionary.cs | 2 +- .../JsonSerializer.Write.HandleEnumerable.cs | 2 +- .../JsonSerializer.Write.HandleObject.cs | 2 +- .../Serialization/JsonSerializer.Write.Helpers.cs | 2 +- .../Serialization/JsonSerializer.Write.Stream.cs | 2 +- .../Serialization/JsonSerializer.Write.String.cs | 2 +- .../Json/Serialization/JsonSerializer.Write.cs | 2 +- .../Json/Serialization/JsonSerializerOptions.cs | 3 +- .../Text/Json/Serialization/MemberAccessor.cs | 2 +- .../Json/Serialization/PooledByteBufferWriter.cs | 2 +- .../System/Text/Json/Serialization/PropertyRef.cs | 2 +- .../System/Text/Json/Serialization/ReadStack.cs | 2 +- .../Text/Json/Serialization/ReadStackFrame.cs | 2 +- .../Serialization/ReflectionEmitMaterializer.cs | 2 +- .../Json/Serialization/ReflectionMaterializer.cs | 2 +- .../System/Text/Json/Serialization/WriteStack.cs | 2 +- .../Text/Json/Serialization/WriteStackFrame.cs | 2 +- .../System.Text.Json/tests/Utf8JsonWriterTests.cs | 2 +- 42 files changed, 82 insertions(+), 79 deletions(-) diff --git a/src/libraries/System.Text.Json/ref/System.Text.Json.cs b/src/libraries/System.Text.Json/ref/System.Text.Json.cs index bb0457a..fd3fc90 100644 --- a/src/libraries/System.Text.Json/ref/System.Text.Json.cs +++ b/src/libraries/System.Text.Json/ref/System.Text.Json.cs @@ -129,6 +129,12 @@ namespace System.Text.Json public string Path { get { throw null; } } public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } } + public abstract partial class JsonNamingPolicy + { + protected JsonNamingPolicy() { } + public static System.Text.Json.JsonNamingPolicy CamelCase { get { throw null; } } + public abstract string ConvertName(string name); + } public readonly partial struct JsonProperty { private readonly object _dummy; @@ -155,6 +161,37 @@ namespace System.Text.Json public System.Text.Json.JsonReaderOptions Options { get { throw null; } } public System.SequencePosition Position { get { throw null; } } } + public static partial class JsonSerializer + { + public static object Parse(System.ReadOnlySpan utf8Json, System.Type returnType, System.Text.Json.JsonSerializerOptions options = null) { throw null; } + public static object Parse(string json, System.Type returnType, System.Text.Json.JsonSerializerOptions options = null) { throw null; } + public static TValue Parse(System.ReadOnlySpan utf8Json, System.Text.Json.JsonSerializerOptions options = null) { throw null; } + public static TValue Parse(string json, System.Text.Json.JsonSerializerOptions options = null) { throw null; } + public static System.Threading.Tasks.ValueTask ReadAsync(System.IO.Stream utf8Json, System.Type returnType, System.Text.Json.JsonSerializerOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.ValueTask ReadAsync(System.IO.Stream utf8Json, System.Text.Json.JsonSerializerOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static object ReadValue(ref System.Text.Json.Utf8JsonReader reader, System.Type returnType, System.Text.Json.JsonSerializerOptions options = null) { throw null; } + public static TValue ReadValue(ref System.Text.Json.Utf8JsonReader reader, System.Text.Json.JsonSerializerOptions options = null) { throw null; } + public static string ToString(object value, System.Type type, System.Text.Json.JsonSerializerOptions options = null) { throw null; } + public static string ToString(TValue value, System.Text.Json.JsonSerializerOptions options = null) { throw null; } + public static byte[] ToUtf8Bytes(object value, System.Type type, System.Text.Json.JsonSerializerOptions options = null) { throw null; } + public static byte[] ToUtf8Bytes(TValue value, System.Text.Json.JsonSerializerOptions options = null) { throw null; } + public static System.Threading.Tasks.Task WriteAsync(object value, System.Type type, System.IO.Stream utf8Json, System.Text.Json.JsonSerializerOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task WriteAsync(TValue value, System.IO.Stream utf8Json, System.Text.Json.JsonSerializerOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public sealed partial class JsonSerializerOptions + { + public JsonSerializerOptions() { } + public bool AllowTrailingCommas { get { throw null; } set { } } + public int DefaultBufferSize { get { throw null; } set { } } + public System.Text.Json.JsonNamingPolicy DictionaryKeyPolicy { get { throw null; } set { } } + public bool IgnoreNullValues { get { throw null; } set { } } + public bool IgnoreReadOnlyProperties { get { throw null; } set { } } + public int MaxDepth { get { throw null; } set { } } + public bool PropertyNameCaseInsensitive { get { throw null; } set { } } + public System.Text.Json.JsonNamingPolicy PropertyNamingPolicy { get { throw null; } set { } } + public System.Text.Json.JsonCommentHandling ReadCommentHandling { get { throw null; } set { } } + public bool WriteIndented { get { throw null; } set { } } + } public enum JsonTokenType : byte { None = (byte)0, @@ -381,47 +418,10 @@ namespace System.Text.Json.Serialization { public JsonIgnoreAttribute() { } } - public abstract partial class JsonNamingPolicy - { - protected JsonNamingPolicy() { } - public static System.Text.Json.Serialization.JsonNamingPolicy CamelCase { get { throw null; } } - public abstract string ConvertName(string name); - } [System.AttributeUsageAttribute(System.AttributeTargets.Property, AllowMultiple=false)] public sealed partial class JsonPropertyNameAttribute : System.Text.Json.Serialization.JsonAttribute { public JsonPropertyNameAttribute(string name) { } public string Name { get { throw null; } } } - public static partial class JsonSerializer - { - public static object ReadValue(ref Utf8JsonReader reader, Type returnType, JsonSerializerOptions options = null) { throw null; } - public static TValue ReadValue(ref Utf8JsonReader reader, JsonSerializerOptions options = null) { throw null; } - public static object Parse(System.ReadOnlySpan utf8Json, System.Type returnType, System.Text.Json.Serialization.JsonSerializerOptions options = null) { throw null; } - public static object Parse(string json, System.Type returnType, System.Text.Json.Serialization.JsonSerializerOptions options = null) { throw null; } - public static TValue Parse(System.ReadOnlySpan utf8Json, System.Text.Json.Serialization.JsonSerializerOptions options = null) { throw null; } - public static TValue Parse(string json, System.Text.Json.Serialization.JsonSerializerOptions options = null) { throw null; } - public static System.Threading.Tasks.ValueTask ReadAsync(System.IO.Stream utf8Json, System.Type returnType, System.Text.Json.Serialization.JsonSerializerOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static System.Threading.Tasks.ValueTask ReadAsync(System.IO.Stream utf8Json, System.Text.Json.Serialization.JsonSerializerOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static string ToString(object value, System.Type type, System.Text.Json.Serialization.JsonSerializerOptions options = null) { throw null; } - public static string ToString(TValue value, System.Text.Json.Serialization.JsonSerializerOptions options = null) { throw null; } - public static byte[] ToUtf8Bytes(object value, System.Type type, System.Text.Json.Serialization.JsonSerializerOptions options = null) { throw null; } - public static byte[] ToUtf8Bytes(TValue value, System.Text.Json.Serialization.JsonSerializerOptions options = null) { throw null; } - public static System.Threading.Tasks.Task WriteAsync(object value, System.Type type, System.IO.Stream utf8Json, System.Text.Json.Serialization.JsonSerializerOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static System.Threading.Tasks.Task WriteAsync(TValue value, System.IO.Stream utf8Json, System.Text.Json.Serialization.JsonSerializerOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - } - public sealed partial class JsonSerializerOptions - { - public JsonSerializerOptions() { } - public bool AllowTrailingCommas { get { throw null; } set { } } - public int DefaultBufferSize { get { throw null; } set { } } - public System.Text.Json.Serialization.JsonNamingPolicy DictionaryKeyPolicy { get { throw null; } set { } } - public bool IgnoreNullValues { get { throw null; } set { } } - public bool IgnoreReadOnlyProperties { get { throw null; } set { } } - public int MaxDepth { get { throw null; } set { } } - public bool PropertyNameCaseInsensitive { get { throw null; } set { } } - public System.Text.Json.Serialization.JsonNamingPolicy PropertyNamingPolicy { get { throw null; } set { } } - public System.Text.Json.JsonCommentHandling ReadCommentHandling { get { throw null; } set { } } - public bool WriteIndented { get { throw null; } set { } } - } } diff --git a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/ClassMaterializer.cs b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/ClassMaterializer.cs index 70fa56c..1f83418 100644 --- a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/ClassMaterializer.cs +++ b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/ClassMaterializer.cs @@ -5,7 +5,7 @@ using System.Diagnostics; using System.Reflection; -namespace System.Text.Json.Serialization +namespace System.Text.Json { internal abstract class ClassMaterializer { diff --git a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/ClassType.cs b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/ClassType.cs index 9ce9768..334e86b 100644 --- a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/ClassType.cs +++ b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/ClassType.cs @@ -2,7 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -namespace System.Text.Json.Serialization +namespace System.Text.Json { /// /// Determines how a given class is treated when it is (de)serialized. diff --git a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonCamelCaseNamePolicy.cs b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonCamelCaseNamePolicy.cs index c58fe98..b64bbbd 100644 --- a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonCamelCaseNamePolicy.cs +++ b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonCamelCaseNamePolicy.cs @@ -2,7 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -namespace System.Text.Json.Serialization +namespace System.Text.Json { internal sealed class JsonCamelCaseNamePolicy : JsonNamingPolicy { diff --git a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonClassInfo.AddProperty.cs b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonClassInfo.AddProperty.cs index 82316f5..7244fa5 100644 --- a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonClassInfo.AddProperty.cs +++ b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonClassInfo.AddProperty.cs @@ -3,9 +3,9 @@ // See the LICENSE file in the project root for more information. using System.Reflection; -using System.Text.Json.Serialization.Converters; +using System.Text.Json.Serialization; -namespace System.Text.Json.Serialization +namespace System.Text.Json { internal partial class JsonClassInfo { diff --git a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonClassInfo.cs b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonClassInfo.cs index deb64ec..7e63958 100644 --- a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonClassInfo.cs +++ b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonClassInfo.cs @@ -7,9 +7,10 @@ using System.Collections.Generic; using System.Diagnostics; using System.Reflection; using System.Runtime.InteropServices; +using System.Text.Json.Serialization; using System.Text.Json.Serialization.Converters; -namespace System.Text.Json.Serialization +namespace System.Text.Json { [DebuggerDisplay("ClassType.{ClassType}, {Type.Name}")] internal sealed partial class JsonClassInfo diff --git a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonNamingPolicy.cs b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonNamingPolicy.cs index ef1b426..1c8eeda 100644 --- a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonNamingPolicy.cs +++ b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonNamingPolicy.cs @@ -2,7 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -namespace System.Text.Json.Serialization +namespace System.Text.Json { /// /// Determines the naming policy used to convert a string-based name to another format, such as a camel-casing format. diff --git a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfo.cs b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfo.cs index 9016ba9..0f34a21 100644 --- a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfo.cs +++ b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfo.cs @@ -6,10 +6,11 @@ using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.Reflection; +using System.Text.Json.Serialization; using System.Text.Json.Serialization.Converters; using System.Text.Json.Serialization.Policies; -namespace System.Text.Json.Serialization +namespace System.Text.Json { [DebuggerDisplay("PropertyInfo={PropertyInfo}, Element={ElementClassInfo}")] internal abstract class JsonPropertyInfo diff --git a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfoCommon.cs b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfoCommon.cs index 5bc29c6..ca5dff0 100644 --- a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfoCommon.cs +++ b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfoCommon.cs @@ -9,7 +9,7 @@ using System.Reflection; using System.Text.Json.Serialization.Converters; using System.Text.Json.Serialization.Policies; -namespace System.Text.Json.Serialization +namespace System.Text.Json { /// /// Represents a strongly-typed property to prevent boxing and to create a direct delegate to the getter\setter. diff --git a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfoNotNullable.cs b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfoNotNullable.cs index 097a7fb..2da9060 100644 --- a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfoNotNullable.cs +++ b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfoNotNullable.cs @@ -5,7 +5,7 @@ using System.Collections.Generic; using System.Diagnostics; -namespace System.Text.Json.Serialization +namespace System.Text.Json { /// /// Represents a strongly-typed property that is not a . diff --git a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfoNullable.cs b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfoNullable.cs index 9f06863..ab890e7 100644 --- a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfoNullable.cs +++ b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfoNullable.cs @@ -5,7 +5,7 @@ using System.Collections.Generic; using System.Diagnostics; -namespace System.Text.Json.Serialization +namespace System.Text.Json { /// /// Represents a strongly-typed property that is a . diff --git a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleArray.cs b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleArray.cs index cd5668e..95cc63e 100644 --- a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleArray.cs +++ b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleArray.cs @@ -7,7 +7,7 @@ using System.Collections.Generic; using System.Diagnostics; using System.Text.Json.Serialization.Policies; -namespace System.Text.Json.Serialization +namespace System.Text.Json { public static partial class JsonSerializer { diff --git a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleDictionary.cs b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleDictionary.cs index 2871933..c1eae715 100644 --- a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleDictionary.cs +++ b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleDictionary.cs @@ -6,7 +6,7 @@ using System.Collections; using System.Diagnostics; using System.Text.Json.Serialization.Converters; -namespace System.Text.Json.Serialization +namespace System.Text.Json { public static partial class JsonSerializer { diff --git a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleNull.cs b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleNull.cs index 32a16de..a4ed20e 100644 --- a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleNull.cs +++ b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleNull.cs @@ -4,7 +4,7 @@ using System.Diagnostics; -namespace System.Text.Json.Serialization +namespace System.Text.Json { public static partial class JsonSerializer { diff --git a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleObject.cs b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleObject.cs index b81e957..18d3359 100644 --- a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleObject.cs +++ b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleObject.cs @@ -5,7 +5,7 @@ using System.Collections; using System.Diagnostics; -namespace System.Text.Json.Serialization +namespace System.Text.Json { public static partial class JsonSerializer { diff --git a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandlePropertyName.cs b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandlePropertyName.cs index 8e8b4fa..67f1ae2 100644 --- a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandlePropertyName.cs +++ b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandlePropertyName.cs @@ -6,7 +6,7 @@ using System.Buffers; using System.Collections; using System.Diagnostics; -namespace System.Text.Json.Serialization +namespace System.Text.Json { public static partial class JsonSerializer { diff --git a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleValue.cs b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleValue.cs index 82e01aa..c674348 100644 --- a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleValue.cs +++ b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleValue.cs @@ -2,7 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -namespace System.Text.Json.Serialization +namespace System.Text.Json { public static partial class JsonSerializer { diff --git a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.Helpers.cs b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.Helpers.cs index 767d58e..6ad6f20 100644 --- a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.Helpers.cs +++ b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.Helpers.cs @@ -2,7 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -namespace System.Text.Json.Serialization +namespace System.Text.Json { public static partial class JsonSerializer { diff --git a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.Span.cs b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.Span.cs index d3a9801..c3bb739 100644 --- a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.Span.cs +++ b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.Span.cs @@ -2,7 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -namespace System.Text.Json.Serialization +namespace System.Text.Json { public static partial class JsonSerializer { diff --git a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.Stream.cs b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.Stream.cs index 13e8e04..5f79b17 100644 --- a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.Stream.cs +++ b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.Stream.cs @@ -8,7 +8,7 @@ using System.IO; using System.Threading; using System.Threading.Tasks; -namespace System.Text.Json.Serialization +namespace System.Text.Json { public static partial class JsonSerializer { diff --git a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.String.cs b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.String.cs index fc35c4d..5a8e44e 100644 --- a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.String.cs +++ b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.String.cs @@ -2,7 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -namespace System.Text.Json.Serialization +namespace System.Text.Json { public static partial class JsonSerializer { diff --git a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.Utf8JsonReader.cs b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.Utf8JsonReader.cs index b444bc1..f130f576 100644 --- a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.Utf8JsonReader.cs +++ b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.Utf8JsonReader.cs @@ -5,7 +5,7 @@ using System.Buffers; using System.Diagnostics; -namespace System.Text.Json.Serialization +namespace System.Text.Json { public static partial class JsonSerializer { diff --git a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.cs b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.cs index 5f7e2ae..44c46e8 100644 --- a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.cs +++ b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.cs @@ -6,7 +6,7 @@ using System.Buffers; using System.Diagnostics; using System.Runtime.CompilerServices; -namespace System.Text.Json.Serialization +namespace System.Text.Json { /// /// Provides functionality to serialize objects or value types to JSON and diff --git a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.ByteArray.cs b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.ByteArray.cs index 7769842..23e4f10 100644 --- a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.ByteArray.cs +++ b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.ByteArray.cs @@ -2,7 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -namespace System.Text.Json.Serialization +namespace System.Text.Json { public static partial class JsonSerializer { diff --git a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.HandleDictionary.cs b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.HandleDictionary.cs index 5d7196a..1b94ae1 100644 --- a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.HandleDictionary.cs +++ b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.HandleDictionary.cs @@ -8,7 +8,7 @@ using System.Collections.Generic; using System.Diagnostics; using System.Text.Json.Serialization.Policies; -namespace System.Text.Json.Serialization +namespace System.Text.Json { public static partial class JsonSerializer { diff --git a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.HandleEnumerable.cs b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.HandleEnumerable.cs index 07c1290..495d5ce 100644 --- a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.HandleEnumerable.cs +++ b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.HandleEnumerable.cs @@ -5,7 +5,7 @@ using System.Collections; using System.Diagnostics; -namespace System.Text.Json.Serialization +namespace System.Text.Json { public static partial class JsonSerializer { diff --git a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.HandleObject.cs b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.HandleObject.cs index e0fb371..b5fa6bb 100644 --- a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.HandleObject.cs +++ b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.HandleObject.cs @@ -5,7 +5,7 @@ using System.Diagnostics; using System.Text.Json.Serialization.Converters; -namespace System.Text.Json.Serialization +namespace System.Text.Json { public static partial class JsonSerializer { diff --git a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.Helpers.cs b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.Helpers.cs index 7fd8aca..b909cf6 100644 --- a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.Helpers.cs +++ b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.Helpers.cs @@ -4,7 +4,7 @@ using System.Diagnostics; -namespace System.Text.Json.Serialization +namespace System.Text.Json { public static partial class JsonSerializer { diff --git a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.Stream.cs b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.Stream.cs index c001565..734ba29 100644 --- a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.Stream.cs +++ b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.Stream.cs @@ -6,7 +6,7 @@ using System.IO; using System.Threading; using System.Threading.Tasks; -namespace System.Text.Json.Serialization +namespace System.Text.Json { public static partial class JsonSerializer { diff --git a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.String.cs b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.String.cs index 3a408a8..ae9cf82 100644 --- a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.String.cs +++ b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.String.cs @@ -2,7 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -namespace System.Text.Json.Serialization +namespace System.Text.Json { public static partial class JsonSerializer { diff --git a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.cs b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.cs index da37ba3..31d5dad 100644 --- a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.cs +++ b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.cs @@ -4,7 +4,7 @@ using System.Diagnostics; -namespace System.Text.Json.Serialization +namespace System.Text.Json { public static partial class JsonSerializer { diff --git a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializerOptions.cs b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializerOptions.cs index 53adf0b..6260191 100644 --- a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializerOptions.cs +++ b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializerOptions.cs @@ -4,8 +4,9 @@ using System.Collections.Concurrent; using System.Diagnostics; +using System.Text.Json.Serialization; -namespace System.Text.Json.Serialization +namespace System.Text.Json { /// /// Provides options to be used with . diff --git a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/MemberAccessor.cs b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/MemberAccessor.cs index 167d812..890547d 100644 --- a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/MemberAccessor.cs +++ b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/MemberAccessor.cs @@ -5,7 +5,7 @@ using System.Reflection; using System.Runtime.CompilerServices; -namespace System.Text.Json.Serialization +namespace System.Text.Json { internal static class MemberAccessor { diff --git a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/PooledByteBufferWriter.cs b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/PooledByteBufferWriter.cs index de96edb..5850945 100644 --- a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/PooledByteBufferWriter.cs +++ b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/PooledByteBufferWriter.cs @@ -8,7 +8,7 @@ using System.IO; using System.Threading; using System.Threading.Tasks; -namespace System.Text.Json.Serialization +namespace System.Text.Json { internal sealed class PooledByteBufferWriter : IBufferWriter, IDisposable { diff --git a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/PropertyRef.cs b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/PropertyRef.cs index 187b382..41dbbe5 100644 --- a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/PropertyRef.cs +++ b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/PropertyRef.cs @@ -2,7 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -namespace System.Text.Json.Serialization +namespace System.Text.Json { internal readonly struct PropertyRef { diff --git a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/ReadStack.cs b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/ReadStack.cs index ba044b4..b32b739 100644 --- a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/ReadStack.cs +++ b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/ReadStack.cs @@ -6,7 +6,7 @@ using System.Collections; using System.Collections.Generic; using System.Diagnostics; -namespace System.Text.Json.Serialization +namespace System.Text.Json { [DebuggerDisplay("Current: ClassType.{Current.JsonClassInfo.ClassType}, {Current.JsonClassInfo.Type.Name}")] internal struct ReadStack diff --git a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/ReadStackFrame.cs b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/ReadStackFrame.cs index 6380a0c..a52c246 100644 --- a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/ReadStackFrame.cs +++ b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/ReadStackFrame.cs @@ -8,7 +8,7 @@ using System.Diagnostics; using System.Runtime.CompilerServices; using System.Text.Json.Serialization.Converters; -namespace System.Text.Json.Serialization +namespace System.Text.Json { [DebuggerDisplay("ClassType.{JsonClassInfo.ClassType}, {JsonClassInfo.Type.Name}")] internal struct ReadStackFrame diff --git a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/ReflectionEmitMaterializer.cs b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/ReflectionEmitMaterializer.cs index f7fbd48..66abff3 100644 --- a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/ReflectionEmitMaterializer.cs +++ b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/ReflectionEmitMaterializer.cs @@ -8,7 +8,7 @@ using System.Reflection; using System.Reflection.Emit; using System.Text.Json.Serialization.Converters; -namespace System.Text.Json.Serialization +namespace System.Text.Json { internal sealed class ReflectionEmitMaterializer : ClassMaterializer { diff --git a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/ReflectionMaterializer.cs b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/ReflectionMaterializer.cs index c7c9895..1750f5a 100644 --- a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/ReflectionMaterializer.cs +++ b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/ReflectionMaterializer.cs @@ -6,7 +6,7 @@ using System.Diagnostics; using System.Reflection; using System.Text.Json.Serialization.Converters; -namespace System.Text.Json.Serialization +namespace System.Text.Json { internal sealed class ReflectionMaterializer : ClassMaterializer { diff --git a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/WriteStack.cs b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/WriteStack.cs index a97da5b..9f7dd4d 100644 --- a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/WriteStack.cs +++ b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/WriteStack.cs @@ -6,7 +6,7 @@ using System.Collections.Generic; using System.Diagnostics; using System.Text.Json.Serialization.Converters; -namespace System.Text.Json.Serialization +namespace System.Text.Json { internal struct WriteStack { diff --git a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/WriteStackFrame.cs b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/WriteStackFrame.cs index 42bd112..2526401 100644 --- a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/WriteStackFrame.cs +++ b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/WriteStackFrame.cs @@ -7,7 +7,7 @@ using System.Collections; using System.Diagnostics; using System.Text.Json.Serialization.Converters; -namespace System.Text.Json.Serialization +namespace System.Text.Json { internal struct WriteStackFrame { diff --git a/src/libraries/System.Text.Json/tests/Utf8JsonWriterTests.cs b/src/libraries/System.Text.Json/tests/Utf8JsonWriterTests.cs index 9a046b3..d2375b1 100644 --- a/src/libraries/System.Text.Json/tests/Utf8JsonWriterTests.cs +++ b/src/libraries/System.Text.Json/tests/Utf8JsonWriterTests.cs @@ -3818,7 +3818,7 @@ namespace System.Text.Json.Tests public void WriteDateTime_TrimsFractionCorrectly_SerializerRoundtrip() { DateTime utcNow = DateTime.UtcNow; - Assert.Equal(utcNow, Serialization.JsonSerializer.Parse(Serialization.JsonSerializer.ToUtf8Bytes(utcNow), typeof(DateTime))); + Assert.Equal(utcNow, JsonSerializer.Parse(JsonSerializer.ToUtf8Bytes(utcNow), typeof(DateTime))); } private static void WriteTooLargeHelper(JsonWriterOptions options, ReadOnlySpan key, ReadOnlySpan value, bool noThrow = false) -- 2.7.4