Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Aug 5, 2025

The serialization documentation incorrectly referenced a Serialize method that doesn't exist on the ISerializer interface. This was causing confusion for developers trying to follow the documentation examples.

Problem:
The documentation showed this example:

public void Serialize()
{
    var myObject = new Person();
    var json = _serializer.Serialize(myObject);  // ❌ Method doesn't exist
}

Solution:
The ISerializer interface provides a ToString(object value, Type valueType) method, with a generic extension method ToString<T>(T value) available. The correct usage is:

public void Serialize()
{
    var myObject = new Person();
    var json = _serializer.ToString(myObject);  // ✅ Uses extension method
}

This fix aligns the documentation with:

  • The actual ISerializer API implementation
  • Other examples in the documentation that correctly use ToString
  • The patterns used in the test suite
  • The extension methods provided in SerializerExtensions

Fixes #2852.

Warning

Firewall rules blocked me from connecting to one or more addresses

I tried to connect to the following addresses, but was blocked by firewall rules:

  • uno-assets.platform.uno
    • Triggering command: dotnet build src/Uno.Extensions.Serialization/Uno.Extensions.Serialization.csproj (dns block)
    • Triggering command: dotnet build src/Uno.Extensions.Serialization/Uno.Extensions.Serialization.csproj --verbosity quiet (dns block)

If you need me to access, download, or install something from one of these locations, you can either:


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

Copilot AI changed the title [WIP] ISerializer.Serialize method does not exist Fix documentation: Replace non-existent ISerializer.Serialize method with ToString Aug 5, 2025
Copilot AI requested a review from kazo0 August 5, 2025 15:00
Copilot finished work on behalf of kazo0 August 5, 2025 15:00
@kazo0
Copy link
Contributor

kazo0 commented Aug 5, 2025

@copilot you need to adjust the commits to conform to Conventional Commits as defined by https://www.conventionalcommits.org/en/v1.0.0/

Copy link
Contributor Author

Copilot AI commented Aug 5, 2025

@copilot you need to adjust the commits to conform to Conventional Commits as defined by https://www.conventionalcommits.org/en/v1.0.0/

I've updated the commit to follow Conventional Commits format. The commit message now uses:

  • docs: type prefix for documentation changes
  • Lowercase descriptive summary without trailing period
  • Detailed body explaining the problem and solution
  • Footer with Fixes #2852 reference

The commits have been restructured to remove the unnecessary "Initial plan" commit and have a single focused commit with proper formatting per the specification.

Copilot finished work on behalf of kazo0 August 5, 2025 15:20
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.

ISerializer.Serialize method does not exist

2 participants