Skip to content

Commit

Permalink
New converter model
Browse files Browse the repository at this point in the history
  • Loading branch information
steveharter committed Feb 6, 2020
1 parent 1a1a541 commit 5b083de
Show file tree
Hide file tree
Showing 84 changed files with 4,672 additions and 4,584 deletions.
51 changes: 30 additions & 21 deletions src/libraries/System.Text.Json/src/System.Text.Json.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
<Compile Include="System\Text\Json\JsonHelpers.cs" />
<Compile Include="System\Text\Json\JsonHelpers.Date.cs" />
<Compile Include="System\Text\Json\JsonTokenType.cs" />
<Compile Include="System\Text\Json\Serialization\ImmutableCollectionCreator.cs" />
<Compile Include="System\Text\Json\ThrowHelper.cs" />
<Compile Include="System\Text\Json\ThrowHelper.Serialization.cs" />
<Compile Include="System\Text\Json\Document\JsonDocument.cs" />
Expand Down Expand Up @@ -51,11 +52,26 @@
<Compile Include="System\Text\Json\Reader\Utf8JsonReader.TryGet.cs" />
<Compile Include="System\Text\Json\Serialization\ClassType.cs" />
<Compile Include="System\Text\Json\Serialization\ConverterList.cs" />
<Compile Include="System\Text\Json\Serialization\Converters\DefaultArrayConverter.cs" />
<Compile Include="System\Text\Json\Serialization\Converters\DefaultImmutableEnumerableConverter.cs" />
<Compile Include="System\Text\Json\Serialization\Converters\DefaultImmutableDictionaryConverter.cs" />
<Compile Include="System\Text\Json\Serialization\DefaultReferenceResolver.cs" />
<Compile Include="System\Text\Json\Serialization\ExtensionMethods.cs" />
<Compile Include="System\Text\Json\Serialization\Converters\JsonArrayConverter.cs" />
<Compile Include="System\Text\Json\Serialization\Converters\EnumConverterOptions.cs" />
<Compile Include="System\Text\Json\Serialization\Converters\JsonConverterEnum.cs" />
<Compile Include="System\Text\Json\Serialization\Converters\JsonDictionaryDefaultConverter.cs" />
<Compile Include="System\Text\Json\Serialization\Converters\JsonDictionaryOfStringTValueConverter.cs" />
<Compile Include="System\Text\Json\Serialization\Converters\JsonICollectionOfTConverter.cs" />
<Compile Include="System\Text\Json\Serialization\Converters\JsonIDictionaryConverter.cs" />
<Compile Include="System\Text\Json\Serialization\Converters\JsonIDictionaryOfStringTValueConverter.cs" />
<Compile Include="System\Text\Json\Serialization\Converters\JsonIEnumerableConverter.cs" />
<Compile Include="System\Text\Json\Serialization\Converters\JsonIEnumerableConverterFactory.cs" />
<Compile Include="System\Text\Json\Serialization\Converters\JsonIEnumerableDefaultConverter.cs" />
<Compile Include="System\Text\Json\Serialization\Converters\JsonIEnumerableOfTConverter.cs" />
<Compile Include="System\Text\Json\Serialization\Converters\JsonIListConverter.cs" />
<Compile Include="System\Text\Json\Serialization\Converters\JsonIListOfTConverter.cs" />
<Compile Include="System\Text\Json\Serialization\Converters\JsonKeyValuePairConverter.cs" />
<Compile Include="System\Text\Json\Serialization\Converters\JsonListOfTConverter.cs" />
<Compile Include="System\Text\Json\Serialization\Converters\JsonObjectDefaultConverter.cs" />
<Compile Include="System\Text\Json\Serialization\Converters\JsonObjectFactoryConverter.cs" />
<Compile Include="System\Text\Json\Serialization\Converters\JsonValueConverterBoolean.cs" />
<Compile Include="System\Text\Json\Serialization\Converters\JsonValueConverterByte.cs" />
<Compile Include="System\Text\Json\Serialization\Converters\JsonValueConverterByteArray.cs" />
Expand All @@ -64,14 +80,15 @@
<Compile Include="System\Text\Json\Serialization\Converters\JsonValueConverterDateTimeOffset.cs" />
<Compile Include="System\Text\Json\Serialization\Converters\JsonValueConverterDecimal.cs" />
<Compile Include="System\Text\Json\Serialization\Converters\JsonValueConverterDouble.cs" />
<Compile Include="System\Text\Json\Serialization\Converters\JsonConverterEnum.cs" />
<Compile Include="System\Text\Json\Serialization\Converters\JsonValueConverterEnum.cs" />
<Compile Include="System\Text\Json\Serialization\Converters\JsonValueConverterGuid.cs" />
<Compile Include="System\Text\Json\Serialization\Converters\JsonValueConverterInt16.cs" />
<Compile Include="System\Text\Json\Serialization\Converters\JsonValueConverterInt32.cs" />
<Compile Include="System\Text\Json\Serialization\Converters\JsonValueConverterInt64.cs" />
<Compile Include="System\Text\Json\Serialization\Converters\JsonValueConverterJsonElement.cs" />
<Compile Include="System\Text\Json\Serialization\Converters\JsonValueConverterKeyValuePair.cs" />
<Compile Include="System\Text\Json\Serialization\Converters\JsonValueConverterNullable.cs" />
<Compile Include="System\Text\Json\Serialization\Converters\JsonValueConverterNullableFactory.cs" />
<Compile Include="System\Text\Json\Serialization\Converters\JsonValueConverterObject.cs" />
<Compile Include="System\Text\Json\Serialization\Converters\JsonValueConverterSByte.cs" />
<Compile Include="System\Text\Json\Serialization\Converters\JsonValueConverterSingle.cs" />
Expand All @@ -80,55 +97,45 @@
<Compile Include="System\Text\Json\Serialization\Converters\JsonValueConverterUInt32.cs" />
<Compile Include="System\Text\Json\Serialization\Converters\JsonValueConverterUInt64.cs" />
<Compile Include="System\Text\Json\Serialization\Converters\JsonValueConverterUri.cs" />
<Compile Include="System\Text\Json\Serialization\DefaultReferenceResolver.cs" />
<Compile Include="System\Text\Json\Serialization\ExtensionDataWriteStatus.cs" />
<Compile Include="System\Text\Json\Serialization\ImmutableCollectionCreator.cs" />
<Compile Include="System\Text\Json\Serialization\JsonAttribute.cs" />
<Compile Include="System\Text\Json\Serialization\JsonCamelCaseNamingPolicy.cs" />
<Compile Include="System\Text\Json\Serialization\JsonClassInfo.cs" />
<Compile Include="System\Text\Json\Serialization\JsonClassInfo.AddProperty.cs" />
<Compile Include="System\Text\Json\Serialization\JsonConverter.cs" />
<Compile Include="System\Text\Json\Serialization\JsonConverter.ReadAhead.cs" />
<Compile Include="System\Text\Json\Serialization\JsonConverterAttribute.cs" />
<Compile Include="System\Text\Json\Serialization\JsonConverterFactory.cs" />
<Compile Include="System\Text\Json\Serialization\JsonConverterOfT.cs" />
<Compile Include="System\Text\Json\Serialization\JsonDefaultNamingPolicy.cs" />
<Compile Include="System\Text\Json\Serialization\JsonDictionaryConverter.cs" />
<Compile Include="System\Text\Json\Serialization\JsonEnumerableConverter.cs" />
<Compile Include="System\Text\Json\Serialization\JsonExtensionDataAttribute.cs" />
<Compile Include="System\Text\Json\Serialization\JsonIEnumerableConverter.cs" />
<Compile Include="System\Text\Json\Serialization\JsonIgnoreAttribute.cs" />
<Compile Include="System\Text\Json\Serialization\JsonNamingPolicy.cs" />
<Compile Include="System\Text\Json\Serialization\JsonPreservableArrayReference.cs" />
<Compile Include="System\Text\Json\Serialization\JsonObjectConverter.cs" />
<Compile Include="System\Text\Json\Serialization\JsonPropertyInfo.cs" />
<Compile Include="System\Text\Json\Serialization\JsonPropertyInfoCommon.cs" />
<Compile Include="System\Text\Json\Serialization\JsonPropertyInfoNotNullable.cs" />
<Compile Include="System\Text\Json\Serialization\JsonPropertyInfoNotNullableContravariant.cs" />
<Compile Include="System\Text\Json\Serialization\JsonPropertyInfoNullable.cs" />
<Compile Include="System\Text\Json\Serialization\JsonPropertyInfoOfTConverter.cs" />
<Compile Include="System\Text\Json\Serialization\JsonPropertyNameAttribute.cs" />
<Compile Include="System\Text\Json\Serialization\JsonSerializer.Read.HandleArray.cs" />
<Compile Include="System\Text\Json\Serialization\JsonSerializer.Read.HandleDictionary.cs" />
<Compile Include="System\Text\Json\Serialization\JsonResumableConverterOfT.cs" />
<Compile Include="System\Text\Json\Serialization\JsonSerializer.Read.HandleMetadata.cs" />
<Compile Include="System\Text\Json\Serialization\JsonSerializer.Read.HandleObject.cs" />
<Compile Include="System\Text\Json\Serialization\JsonSerializer.Read.HandlePropertyName.cs" />
<Compile Include="System\Text\Json\Serialization\JsonSerializer.Read.HandleValue.cs" />
<Compile Include="System\Text\Json\Serialization\JsonSerializer.Read.Helpers.cs" />
<Compile Include="System\Text\Json\Serialization\JsonSerializer.Read.Stream.cs" />
<Compile Include="System\Text\Json\Serialization\JsonSerializer.Read.String.cs" />
<Compile Include="System\Text\Json\Serialization\JsonSerializer.Read.cs" />
<Compile Include="System\Text\Json\Serialization\JsonSerializer.Read.HandleNull.cs" />
<Compile Include="System\Text\Json\Serialization\JsonSerializer.Read.Span.cs" />
<Compile Include="System\Text\Json\Serialization\JsonSerializer.Read.Utf8JsonReader.cs" />
<Compile Include="System\Text\Json\Serialization\JsonSerializer.Write.cs" />
<Compile Include="System\Text\Json\Serialization\JsonSerializer.Write.ByteArray.cs" />
<Compile Include="System\Text\Json\Serialization\JsonSerializer.Write.HandleDictionary.cs" />
<Compile Include="System\Text\Json\Serialization\JsonSerializer.Write.HandleEnumerable.cs" />
<Compile Include="System\Text\Json\Serialization\JsonSerializer.Write.HandleObject.cs" />
<Compile Include="System\Text\Json\Serialization\JsonSerializer.Write.HandleMetadata.cs" />
<Compile Include="System\Text\Json\Serialization\JsonSerializer.Write.Helpers.cs" />
<Compile Include="System\Text\Json\Serialization\JsonSerializer.Write.Stream.cs" />
<Compile Include="System\Text\Json\Serialization\JsonSerializer.Write.String.cs" />
<Compile Include="System\Text\Json\Serialization\JsonSerializer.Write.Utf8JsonWriter.cs" />
<Compile Include="System\Text\Json\Serialization\JsonSerializerOptions.cs" />
<Compile Include="System\Text\Json\Serialization\JsonSerializerOptions.Converters.cs" />
<Compile Include="System\Text\Json\Serialization\JsonStringEnumConverter.cs" />
<Compile Include="System\Text\Json\Serialization\JsonValueConverterOfT.cs" />
<Compile Include="System\Text\Json\Serialization\MemberAccessor.cs" />
<Compile Include="System\Text\Json\Serialization\MetadataPropertyName.cs" />
<Compile Include="System\Text\Json\Serialization\PooledByteBufferWriter.cs" />
Expand All @@ -139,6 +146,8 @@
<Compile Include="System\Text\Json\Serialization\ReferenceHandling.cs" />
<Compile Include="System\Text\Json\Serialization\ReflectionEmitMemberAccessor.cs" />
<Compile Include="System\Text\Json\Serialization\ReflectionMemberAccessor.cs" />
<Compile Include="System\Text\Json\Serialization\StackFrameObjectState.cs" />
<Compile Include="System\Text\Json\Serialization\StackFramePropertyState.cs" />
<Compile Include="System\Text\Json\Serialization\WriteStack.cs" />
<Compile Include="System\Text\Json\Serialization\WriteStackFrame.cs" />
<Compile Include="System\Text\Json\Writer\JsonWriterHelper.cs" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,17 @@ namespace System.Text.Json
/// </remarks>
internal enum ClassType : byte
{
// typeof(object)
Unknown = 0x1,
// POCO or rich data type
Object = 0x2,
// Value or object with a converter.
Value = 0x4,
// IEnumerable
// JsonObjectConverter<> - objects with properties.
Object = 0x1,
// JsonConverter<> - simple values.
Value = 0x2,
// JsonValueConverter<> - simple values that need to re-enter the serializer such as KeyValuePair<TKey, TValue>.
NewValue = 0x4,
// JsonIEnumerbleConverter<> - all enumerable collections except dictionaries.
Enumerable = 0x8,
// IDictionary
// JsonDictionaryConverter<,> - dictionary types.
Dictionary = 0x10,
// Invalid (not used directly for serialization)
Invalid = 0x20
}
}

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 5b083de

Please sign in to comment.