* Initial commit for JSON reference handling / preserve references
* Remove ReferenceHandling.Ignore option
* Code clean-up.
* Remove stale tests.
* Address PR feedback
* Reference handling inline (#1)
* Inline ReferenceHandling logic within main methods.
* remove stale Handle*Ref methods
* Refactor the code for Deserialization
* Create methods to reuse code
* Try to isolate Preserve logic as much as I can
* Replaced Exceptions for ThrowHelper methods
* Remove stale condition on $ref
* Add AggressiveInlining to HandlePropertyNameDefault
* Inline feature code in Serialization
* Fix preserve references for ExtensionData
* Split Reference dictionary into two, for (De)Serialize each.
Add Reference EqualityComparer to Serialize dictionary.
* Do not set PropertyName to s_missingProperty to avoid race condition issues.
* Remove Asserts that compare against an exception message.
* Set preserved array passing setPropertyDirectly = true to avoid issue when enumerable is already initialized.
* Code clean-up.
* Separate write code into WritePreservedObject and WriteReferenceObject
* Address some PR feedback:
* Switched ReferenceResolver to access it through a read-only property that initializes it the first time is tried to be accesed.
* Renamed some methods and properties
* Refactored WriteReference* methods.
* Fixed Exception messages
* Removed literal message comparison on tests.
* * Add round-tripping coverage to suitable unit tests
* Fix issues found with Round-tripping scenarios
* Move DictionaryPropertyIsPreserved to EndProperty() in order to fix issue where two dictionary properties were next to each other and the DictionaryPropertyIsPreserved was not reset.
* Add ReadStackFrame.IsNestedPreservedArray in order to identify preserved arrays nested and prevent using setPropertyDirectly on them.
* Add nullability annotations
* Code clean-up, reword comments and removed unnecesary properties in ReferenceHandling
* Fix issue where an object that tries to map into an enumerable could skip the validation that prevents this.
* Fix issue where the wrong type was passed into the throw helper for nested enumerable in HandleStartObject
* Address PR comments.
* Refactor flags on ReadStackFrame to avoid using unrelated fields for validation.
* Consolidated MetadataPropertyName enum logic on read and write.
* Reuse HandleStartObjectInEnumerable to handle arrays with metadata nested in a Dictionary.
* Refactor code:
* Change ReferenceResolver from class to struct to avoid one allocation.
* Replace propertyName.ToArray() for constant arrays in order to avoid allocation.
* Move some exception logic to the ThrowHelper class.
* * Apply optimizations:
* Use PropertyCacheArray on Values property lookup.
* Make Comparer static field to avoid one allocation at runtime.
* Document reasoning for DefaultReferenceResolver and ReferenreEqualsEqualityComparer
* Address PR comments.
* Addres more PR feedback:
* Add documentation to DefaultReferenceResolver public methods.
* Address PR feedback.
* Adderss more PR suggestions.
* * Move tests to Serialization namespace.
* On $values, set PropertyName on state.Current.JsonPropertyName instead.
* netcoreapp -> netcoreapp5.0 in .sln files
* netcoreapp; -> netcoreapp5.0; , netcoreapp- to netcoreapp5.0-
* netcoreapp- -> netcoreapp5.0 in .csproj
* 'netcoreapp -> 'netcoreapp5.0 in .csproj
* done with libraries sub folder
* missed semicolon
* minor changes
* netcoreapp -> netcoreapp5.0 in some extra files
* vNext target variable in configurations.props
* netcoreapp => netcoreapp5/0 in some other .props file
* netcoreapp -> vnext in .csproj
* making the netcorepap framework switch work
* fixing sendToHelix and linux build
* TargetFrameworkVNext -> netcoreappCurrent
* case correct netcoreappcurrent
* fixing send to helix zip path
* netfx -> net472 in .sln
* netfx; -> net472; in .props
* netfx- -> net472- in .props
* netfx - -> net472- in .csproj
* 'netfx-> 'net472 in .csproj
* netfx -> net472 manual change
* fixing ci build for netfx
* Not trying to change the global property
* Fixing build failure due to master changes in net https tests
* adding documentaiton and fixing filtering
* netcoreapp -> netcore5.0 in py file
* changing the path to use netcoreapp5.0 version
* feedback and override corefx path corrected in installers
* remaing netcoreapp5.0 changes done
* netcoreapp-> netcoreapp5.0 after live builds
* net472 -> netframeworkcurrent
* removing Microsoft.bcl packages
* targetframework conditions modified
* adding versionless config to avoid binplace
* uap standard conflicts
* remove package configurations
* negation if and remove exclude reference asset property
* adding choosing when statement
* using attribute
* Moveing packages to include to the common
* ChooseWhen -> IF
Commit migrated from https://github.com/dotnet/corefx/commit/99ea2b5aebf7361a5baa638c978cb6214fca5217
* Json prototype (dotnet/corefx#1)
Basic API for Json writable DOM with scenarios including collection initialization, accessing and modifying Json nodes.
* Json prototype - transformation API (dotnet/corefx#2)
* transformation API added
* assertions to existing scenarios added
* Json prototype (dotnet/corefx#1)
Basic API for Json writable DOM with scenarios including collection initialization, accessing and modifying Json nodes.
* Json prototype - transformation API (dotnet/corefx#2)
* transformation API added
* assertions to existing scenarios added
* JsonNumber implementation and tests (dotnet/corefx#3)
* IEquatables added
* JsonNumber implementation and unit tests added
* pragmas deleted
* review comments included, more tests added
* decimal support added to JsonNumber
* decimal support added to JsonArray and JsonObject
* all unimplemented classes and methods with accompanying tests removed
* First part of documentation added
* documentation completed
* missing exceptions added
* JsonElement changes removed
* part of the review comments included
* work on review comments
* code refactor
* more decimal tests added using MemberData
* more decimal tests added using MemberData
* more test cases added
* equals summary adjusted, equals tests added
* more Equals tests added, GetHashCode tests added, minor changes
* scientifing notation support added, rational numbers tests fixes
* rational overflow tests added
* ulong maxvalue tests added to rational types
* presision problems fixes
* exception strings fixed
* CI failing fixes (hopefully), review comments included
* missing == tests added to achieve 100% branch coverage
* review comments included
* trailing whitespaces fixes
* equals comments added
* equals object refactored to call quals json number
* merge fix
Commit migrated from https://github.com/dotnet/corefx/commit/5050ee83755eb07494d7d4ff6d759bc056ceb371
The ctor is already `protected`, so it can already be accessed by any derived type. The only benefit adding `internal` would provide is so that it could be called directly by something else in the assembly, but the type is `abstract`, so that doesn't make sense for a ctor.
Commit migrated from https://github.com/dotnet/corefx/commit/902294e7933e84601aa4543fc3afe0dcf85c2d99
* Remove WriteProperty methods and rename WriteValue to WriteTo in JsonElement (dotnet/corefx#39037)
* Add WriteTo method in JsonDocument and JsonProperty (dotnet/corefx#39037)
* Remove all repeated tests from JsonDocument and JsonProperty for now.
* Added null check for Utf8JsonWriter parameter in WriteTo methods on JsonElement, JsonDocument and JsonProperty
* Code review changes
Commit migrated from https://github.com/dotnet/corefx/commit/798468fb39d869a96104306483ed6ef4d63738ca
* Add JsonDocument.Write, JsonProperty.Write, and rename JsonValueTupe to
JsonValueKind.
* Add JsonDocument.Write API tests.
* Don't use GetPropertyRawBytes and add JsonProperty.Write API tests.
* Make GetPropertyRawValue private again.
* Remove the new Write APIs on JsonDocument, JsonProperty.
Commit migrated from https://github.com/dotnet/corefx/commit/f08256cbba2b249cc1e5ca67cf4a1c074adf035b
* Add simpler Utf8JsonReader ctors that dont require JsonReaderState or
IsFinalBlock.
* Update ctors and add tests for simple ctor.
* Address PR feedback.
* Implement the convenience ctor over the existing one.
* Update new tests to remove the BytesConsumed, Position usage.
Commit migrated from https://github.com/dotnet/corefx/commit/7f8333149a0f24fc3f007eefb976118cf9ab06c5
* Add JsonDocumentOptions and use that instead of JsonReaderOptions.
* Address PR feedback.
* Auto-generate the reference assembly.
* Auto-gen the ref from the source.
* Explicitly mark property getters as readonly.
* Cleanup and fix converter argument name to typeToConvert.
Commit migrated from https://github.com/dotnet/corefx/commit/e4d329737f0ab5c413c98a90ff485f91fd3f5fd0
* Add WritePropertyName standlone API on the Utf8JsonWriter.
* Fix write indented, add more tests, and more debug.asserts.
* Remove _isProperty field and rely on _tokenType ==
JsonTokenType.PropertyName
* Auto-gen the ref.
* Address PR feedback.
Commit migrated from https://github.com/dotnet/corefx/commit/a5b35f5600b615d4f30c64183891c83fd76bf491
* Removing the Manual reference file from System.Text.Json
* Readd the netcoreapp and uap configurations so that we don't have to bring AsyncInterfaces package into the shared framework closure
* Revert param name change as per PR Feedback
Commit migrated from https://github.com/dotnet/corefx/commit/5b3d41c1c63c4ebd93af7e6482e954e104827884
* Initial commit of serializer overload that takes reader.
* Move utf8jsonreader api to a new file.
* Add more reader tests and update some exception cases.
* Add start of WriteValue API.
* Add the new files that were missed in previous commit.
* Remove writer related changes.
Commit migrated from https://github.com/dotnet/corefx/commit/1c1b78f7ec1d04aeac059d3d4e4c975d3a3ad23e
* Add Skip and TrySkip APIs to Utf8JsonReader with tests.
* Auto-generate the ref assembly.
* Remove new lines and update bytes consumed to avoid adjusting OS specific offsets.
* Add IsFinalBlock public property.
* Break up the skip/try skip method into helpers.
* Add more direct tests and update impl to avoid unnecessary struct copy.
Commit migrated from https://github.com/dotnet/corefx/commit/2f2aca43ef9d24c794255c3ef5d0238dc479652b
* CoreFx dotnet/corefx#33347: Implement GetComment API
* Generate References as per correct steps
* Exclude delims & line separators, new unescape test
* Revert consume comment changes, test case fixes
* Partial revert of previous incorrect online merge
* fixed another online merge conflict resolution slippage
* Intermediate rebase from master
* Reworked files
* Reworked files 2
* Fix coding sytle as per review comments
Commit migrated from https://github.com/dotnet/corefx/commit/53aaaf3c848e4e737420de2b46f7cace397d730a