Skip to content

Conversation

@habbes
Copy link
Contributor

@habbes habbes commented Apr 23, 2025

Issues

This pull request fixes ##3236.

Description

New OData Writer stack with better performance and better integration with System.Text.Json

Checklist (Uncheck if it is not completed)

  • Test cases added
  • Build and test with one-click build and test script passed

Additional work necessary

If documentation update is needed, please add "Docs Needed" label to the issue and provide details about the required document change in the issue.

* Create tests

* Add support for types that implement IEnumerable<T>

* Add support for non-generic IEnumerable

* Support generic types that implement IEnumerable<T> with a different element type
* Add nullable enum tests

* Implement support for nullable enums
* Add test case for nullable byte array

* Write null if byte array property is null
* Add tests

* Add tests with type info

* Write null if resource is null
…erties with null values. (#3413)

* Create tests

* Implement support for skipping null reference type properties

* Support for skipping nullable value types

* ODataIgnore.WhenWritingNull should not skip non-nullable value types
…ignore properties of a type. (#3414)

* Create tests

* Handle ODataIgnoreProperties conditions in type info factory

* Add more ODataIgnore tests

* Add tests to verify ODataIgnore and ODataIgnoreProperties precedence rules

* Resolve precedence between property-level and class-level ignore conditions

* Update test for better clarity

* Update test for better clarity
…not written (#3419)

* Add tests

* Add async hook test case

* Write property name only if IStreamValueWriter Write methods are called
#3421)

* Add tests

* Fix serialization parity in DateTimeOffset
* Add tests for basic JsonElement input support

* Create ODataElementEnumeratorSelector to enumerate collections

* Auto-detect whether type info should be used for resources or collections

* Create hybrid writer that supports writing resources and collections based on ValueKind

* property async enumerable selector test

* Implement async enumerable property selector (inefficiently)

* Create test for async elements selector

* Implement async enumerable element selector (inefficiently)

* Correctly detect resource-based property info when GetOpenProperties is set

* Create interface for writing property values to buffer

* Fix writer provider precendence rules and heuristics

* Allow writing to raw value

* Fix raw value writer tests

* Minor cleanup

* Untyped json from async source tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants