Nikiforov Alexey
4aa943df8c
Add ctor to JsonSerializerOptions that takes serializer defaults ( #36073 )
...
* add ctor to JsonSerializerOptions that takes serializer defaults
* add out of range handling; enhance xml documentation
* test serializer option construction via serializer defaults
* adjust PredefinedSerializerOptions tests
2020-05-12 17:13:16 -07:00
Carlos Sanchez Lopez
14094d2a63
Apply CA1835 - Prefer memory overloads for Stream.ReadAsync/WriteAsync ( #35941 )
...
* Apply CA1835 Roslyn fixes on .NET Libraries
- Prefer the Stream.ReadAsync and Stream.WriteAsync memory overloads.
- Unit test fix suggested by buyaa-n to adjust the usage of these overloads.
* Additional missing unit test overload for ReadOnlyMemory
2020-05-12 10:43:28 -07:00
Viktor Hofer
2cda9035cb
Use TargetFramework conditions consistently in libraries ( #35956 )
...
* Use TargetFramework condition consistently in libs
* Add docs section to describe the guideline
* Update Microsoft.Extensions.DependencyInjection.csproj
* Outline TargetFramework DesingTimeBuild issue
* Update Microsoft.Extensions.DependencyInjection.csproj
2020-05-11 11:00:11 -07:00
Steve Harter
230538bb8d
Improve deserialization perf for case-insensitive and missing-property cases ( #35848 )
2020-05-11 10:54:41 -05:00
Layomi Akinrinade
7949ab8a2f
Merge pull request #35826 from layomia/converter_handle_null
...
Add opt-in for converters to handle null
2020-05-08 13:56:28 -04:00
Layomi Akinrinade
32120db733
Merge pull request #32107 from YohDeadfall/fix-hidden-props
...
Fixed serialization of hidden base class members
2020-05-08 13:55:20 -04:00
Layomi Akinrinade
ce1a1714ac
Add tests for immutable object
2020-05-07 15:16:37 -07:00
Layomi Akinrinade
ee3320375d
Ensure JsonException thrown when null applied to type that can't be null
2020-05-07 15:05:05 -07:00
Layomi Akinrinade
5471c34967
Merge remote-tracking branch 'upstream/master' into converter_handle_null
2020-05-07 12:05:07 -07:00
Layomi Akinrinade
55eb2f246f
Make resumable converters delegate null handling to the serializer
2020-05-07 12:04:24 -07:00
Layomi Akinrinade
866b7ee100
Add logic to throw when converter doesn't handle null and null can't be assigned to property
2020-05-07 10:40:04 -07:00
Layomi Akinrinade
75845b5223
Apply review feedback - test & nullability fixes
2020-05-06 14:55:04 -07:00
YohDeadfall
d600e91871
Fixed rebase issues
2020-05-07 00:10:21 +03:00
Viktor Hofer
000046f6c8
Change netcoreapp5.0 to net5.0 ( #35176 )
...
* Change netcoreapp5.0 to net5.0
* Remove tfm downgrades
* Rename S.R.CS.Unsfae include folder
2020-05-06 13:53:21 +02:00
Layomi Akinrinade
b0329b19ad
Fix nullability annotations
2020-05-05 23:59:10 -07:00
Layomi Akinrinade
23f40ac8a7
Add more tests
2020-05-05 21:45:05 -07:00
Layomi Akinrinade
541b4f6e63
Fix test failing in release mode
2020-05-05 09:12:45 -07:00
Layomi Akinrinade
ad57eff7e6
Provide opt-in for converters to handle null
2020-05-04 21:28:14 -07:00
Anirudh Agnihotry
0ac72ac366
Remove TargetsNet* from the runtime repo ( #35589 )
...
* feedbacl from previous time
* remove TargetsNet* from ItemGroup
* removing targetFramework from .targets
2020-05-04 17:12:23 +02:00
Layomi Akinrinade
0f7a938c6e
Merge pull request #35700 from layomia/clean_up
...
Clean up misc areas in JsonSerializer
2020-05-02 02:18:53 -04:00
Layomi Akinrinade
c7bf654116
Move collection tests to dedicated class + more clean up
2020-05-01 19:46:23 -07:00
Layomi Akinrinade
69f152a79a
Clean up misc areas in JsonSerializer
2020-05-01 10:15:28 -07:00
Eric Erhardt
0764d8c117
Set charset in editorconfig for .csproj ( #35634 )
...
* Add editorconfig charset for csproj files.
This stops VS from inserting a BOM in these files.
* Removing BOM from .csproj files.
2020-04-30 09:54:26 -05:00
YohDeadfall
dc20062d74
Fixed tests
2020-04-30 15:16:28 +03:00
YohDeadfall
304fb56806
Fixed tests
2020-04-30 15:16:28 +03:00
YohDeadfall
07fd692b36
Added more tests
2020-04-30 15:16:28 +03:00
YohDeadfall
33cd6d6e24
Fixed rebase issues
2020-04-30 15:16:27 +03:00
YohDeadfall
87b0c43ea7
Added comment and improved test
2020-04-30 15:16:27 +03:00
YohDeadfall
cd56b451dd
Fixed failing test
2020-04-30 15:16:27 +03:00
YohDeadfall
9e42d7ce77
Covered by new slot hidden member serialization
2020-04-30 15:16:27 +03:00
YohDeadfall
efd6ab9d03
Canged test naming style
2020-04-30 15:16:27 +03:00
YohDeadfall
335c9d0b04
Fixed handling of public hidden prop by new slot
2020-04-30 15:16:27 +03:00
Yoh Deadfall
8f9653b7dc
Fixed tests
2020-04-30 15:16:27 +03:00
Yoh Deadfall
c3d7228d56
Added requested tests
2020-04-30 15:16:26 +03:00
Yoh Deadfall
ed8ca2b34e
Addressed review issues
2020-04-30 15:16:26 +03:00
YohDeadfall
827df7e23f
Simplified cache construction
2020-04-30 15:16:26 +03:00
YohDeadfall
a01bbe8adf
Added tests to check non-public props are ignored
2020-04-30 15:16:26 +03:00
YohDeadfall
05639b9f86
Fixed serialization of hidden base class members
2020-04-30 15:16:26 +03:00
Layomi Akinrinade
cc62091c58
Improve code coverage on collections with stream-based flows ( #35046 )
...
* Improve code coverage on collections with stream-based flows
* Address feedback & fortify tests
2020-04-29 07:46:47 -07:00
Anirudh Agnihotry
4c4b2635ed
Remove Targets* instances from .props files ( #35353 )
...
* remove TargetsNetfx from isPartialFacadeAssembly property
* Omit Resources corrected
* fix partial facade
* GeneratePlatformNotSupportedAssemblyMessage corrected
* OmitResources made similar to isPartialFacadeAssembly
* fixes omitsources
* moving targetFramework dependent properties to second property Group
* fix GeneratePlatformNotSupportedAssemblyWithGlobalPrefix
* correct define constants
* fix no warn
* fix assembly version
* fix packageTargetFramework
* fix the build
* src and ref intell working
* remove targets properties from tests file
* adding comment
2020-04-28 13:36:53 -07:00
Layomi Akinrinade
6f4abe4143
Guard against (de)serializing pointers & ref structs ( #34777 )
...
* Guard against (de)serializing pointers & ref structs
* Address review feedback
* Update isbyreflike check
* Address review feedback; fetch IsByRefLike with reflection
* Address review feedback
* Remove extra whitespace
* Add debug assert
* Add attribute-based fallback
* Ensure that property look-up with reflection is useful
* Remove IsByRefLike property reflection prob
* Move runtime type debug validation upstream
2020-04-27 12:29:45 -07:00
Layomi Akinrinade
17d6691ad3
Remove reader.TrySkip workaround in JsonDocument parse helper ( #35484 )
2020-04-26 23:08:25 -07:00
madmir and madmir
3cf050a9e4
Improve JsonDocumentOptions test coverage ( #35457 )
...
* Improve JsonDocumentOptions test coverage
* Apply review feedback
Co-authored-by: madmir <[email protected] >
2020-04-26 08:51:06 -07:00
Marcus Turewicz
890fab0a64
Use attribute Link syntax for Common files ( #35436 )
...
* Change <Link>...</Link> to Link="..."
* Format existing Link="..."
2020-04-25 05:26:50 -07:00
Layomi Akinrinade
832267e7d8
Add logic for immutable collection converters to share create-object delegate ( #35080 )
...
* Add logic for immutable collection converters to share create-object delegate
* Address review feedback
2020-04-24 09:25:42 -07:00
Steve Harter
d4b5390bb9
Remove DisallowNull annotation in JsonConverter.Write() ( #35022 )
2020-04-21 13:44:48 -05:00
Marcus Turewicz
2eef5a3dc0
Adds AssertContentsAgainstJsonNet to avoid unnecessary calls ( #34931 )
...
* Adds AssertContentsAgainstJsonNet to avoid unnecessary calls
Fixes #32351
* Remove temporary hack comments
2020-04-15 06:41:07 -07:00
Reza Jooyandeh
cfb109b4af
Fix NullReference on JsonExtensionData ( #34569 )
...
* Fix NullReference on JsonExtensionData
Fix NullReferenceException on serialization when JsonExtensionData dictionary has a custom JsonConverter.
Fix #32903
* Add test for converters declared through attribute
* Ensure custom serialization is not used for reading JsonExtensionData
* Cover all the combinations in tests
2020-04-14 16:55:10 -07:00
Layomi Akinrinade
b3e791dc6d
Add JsonIncludeAttribute & support for non-public accessors ( #34675 )
...
* Add JsonIncludeAttribute & support for non-public property accessors
* Address review feedback
* Remove extra reflection call for non-public properties
2020-04-14 11:24:23 -07:00
Layomi Akinrinade
6f080a4d81
Add logic for JsonIgnoreCondition[Never|WhenNull] on properties to win over global IgnoreReadOnlyValues ( #34672 )
2020-04-13 12:30:00 -07:00