Skip to content

Conversation

@steveharter
Copy link
Contributor

General clean-up of converters and the System.Text.Json.csproj.

S.T.Json.csproj:

  • Use default sorting in Visual Studio. After this, as long as we use VS to add files etc then we shouldn't have to manually edit the .csproj for alphabetical sorting.

Converters (internal converters only)

  • Move converters to sub folders (Collection, Value and Object). There are too many in the current folder (52). Keep the same namespace.
  • Remove "Json" prefix for converter class name.
  • Ensure "Factory" is appended to each converter factory (not consistent today).
  • Ensure every converter's file name == class name.
  • To preserve git history, use separate commits with merge commit so git treats these as renames not delete+add.

Misc

  • Delete unused file (JsonPreservableArrayReference.cs)
  • Move\rename ExtensionMethods.cs to Converters\Collection\IEnumerableConverterFactoryHelpers.cs

@steveharter steveharter added NO-SQUASH The PR should not be squashed area-System.Text.Json labels Feb 12, 2020
@steveharter steveharter added this to the 5.0 milestone Feb 12, 2020
@steveharter steveharter self-assigned this Feb 12, 2020
@steveharter steveharter force-pushed the FileCleanup branch 2 times, most recently from 04621bd to 208e067 Compare February 12, 2020 20:33
Copy link
Member

@jozkee jozkee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Otherwise; looks good to me.

@@ -9,7 +9,8 @@ namespace System.Text.Json.Serialization.Converters
/// <summary>
/// Default base class implementation of <cref>JsonIEnumerableConverter{TCollection, TElement}</cref>.
/// </summary>
internal abstract class JsonIEnumerableDefaultConverter<TCollection, TElement> : JsonCollectionConverter<TCollection, TElement>
internal abstract class IEnumerableDefaultConverter<TCollection, TElement>
: JsonCollectionConverter<TCollection, TElement>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

JsonConllectionConverter, JsonDictionaryConverter and JsonObjectConverter are not renamed becuase those are the ones that are going to become public, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct. If that's not the case then we can revisit the naming at that point.

Copy link
Contributor

@ahsonkhan ahsonkhan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other than that, looks good.

@steveharter
Copy link
Contributor Author

Test failures unrelated (issues logged):

  • System.Security.Cryptography.Pkcs.Tests
  • System.Runtime.Loader.DefaultContext.Tests
  • System.Utf8String.Experimental.Tests
  • System.Net.Security.Tests

@steveharter steveharter merged commit 0e0e852 into dotnet:master Feb 13, 2020
@steveharter steveharter deleted the FileCleanup branch February 13, 2020 21:50
@ghost ghost locked as resolved and limited conversation to collaborators Dec 10, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-System.Text.Json NO-SQUASH The PR should not be squashed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants