Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use System.Text.Json as a backend for view model serialization #1799

Merged
merged 34 commits into from
Nov 3, 2024

Conversation

exyi
Copy link
Member

@exyi exyi commented Mar 17, 2024

All UI tests are currently passing (on Asp.Net Core), most unit tests pass on both .NET Core and .NET Framework, Owin UI tests do not start because of some assembly version conflicts.

Changes to Samples and UI tests are minimal (only dependency version changes, as this requires System.Text.Json 8):

src/Framework/Core/DotVVM.Core.csproj Outdated Show resolved Hide resolved
src/Framework/Core/ViewModel/BindAttribute.cs Show resolved Hide resolved
throw new NotSupportedException(string.Format("resource collection name {0} is not supported", prop.Key));
}
return repo;
throw new NotImplementedException();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ask if VS Extension needs this

return rt;
}
throw new NotImplementedException();
// var rt = new DotvvmRouteTable();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ask if VS extension needs this.

exyi and others added 15 commits April 26, 2024 13:53
* fix debug JsonConverters (must be factories to accomodate derived types)
* add charset=utf8 to all returned Content-Types
* DiagnosticsRequestTracer.ViewModelSerialized now accepts Func<Stream>
* Removed viewmodel_stringification_seconds metric as it is no longer relevant (serialization and stringification are now the same thing)
* add some [doc]comments
Just to avoid balooning this monster PR.
This specific feature is also likely to be removed, depending on the answer from VS Extension guys.
It is neccessary in order to support IGridViewDataSet type hierarchy.
The issue didn't occur before, because we didn't map interface correctly,
ignoring inherited properties. It didn't matter, because we never serialized them.
Now we can end up serializing interface if DynamicDispatch is disabled.

The shadowing allows redefining a property with another property of the same
.NET Name with a compatible type.
Not needed anymore, the types are natively supported by the serialized
@exyi exyi marked this pull request as ready for review July 12, 2024 10:36
@exyi exyi merged commit 8cf46af into main Nov 3, 2024
14 of 15 checks passed
@exyi exyi deleted the system.text.json branch November 3, 2024 13:57
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.

2 participants