-
-
Notifications
You must be signed in to change notification settings - Fork 86
fixing null Values<T> #84
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
Conversation
|
Also to note, running the generator causes the build to fail due to incompatible types, manually removed the following extract from Thing.cs to match master. /// <summary>
/// Gets the context for the object, specifying that it comes from schema.org.
/// </summary>
[DataMember(Name = "@context", Order = 0)]
public override string Context => "http://schema.org";The generator also modifies a bunch of properties to be of type |
|
Thanks @shervinw for contributing! Have not forgotten about this PR. I'll try to take a look early next week. |
|
This looks exciting @shervinw! @RehanSaeed what do you think? |
|
I now have time to take a look at this. I've just upgraded the project to use .NET Core 3.0 and also publish NuGet packages to the GitHub package registry. Bravo! A simple change that seems to solve all issues. Not sure why I missed it. Added you as a contributor on the main page as thanks. |
|
Will release a major version update shortly. |
|
Great news guys! Well done @shervinw ! @RehanSaeed can I check that this lib will still be compatible with .NET Core 1 and 2? As our library built on top of it needs to be backwards compatible too... |
|
Yes it will. We still target netstandard1.1 and netstandard2.0. I only use .NET Core 3 SDK to build, test and pack the package. It also gives us HTML test results. |
|
Awesome thanks
Thanks
Shervin
…________________________________
From: Muhammad Rehan Saeed <notifications@github.com>
Sent: Thursday, September 26, 2019 12:28:29 PM
To: RehanSaeed/Schema.NET <Schema.NET@noreply.github.com>
Cc: Shervin Williams <shervin@itpod.co.uk>; Mention <mention@noreply.github.com>
Subject: Re: [RehanSaeed/Schema.NET] fixing null Values<T> (#84)
Yes it will. We still target netstandard1.1 and netstandard2.0. I only use .NET Core 3 SDK to build, test and pack the package. It also gives us HTML test results.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#84?email_source=notifications&email_token=AC2CYAX757AT42FPDHTPA53QLSMF3A5CNFSM4IUASWU2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7VH2XQ#issuecomment-535461214>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AC2CYATPRZD66BL5K3CR44DQLSMF3ANCNFSM4IUASWUQ>.
|
Based from the original null Values fix attempt from @nickevansuk, this PR just adds minor changes to solve the problem. Also see the problem origin.
Json.net has an internal method Newtonsoft.Json.Utilities.MiscellaneousUtils.ValueEquals(object objA, object objB) which utilises IEquatable to determine whether or not to write a property when DefaultValueHandling is specified.
The bulk of this fix occurs in Values{T1,T2}, Values{T1,T2, T3}, Values{T1,T2, T3, T4}, which contain method overrides specific to the issue.
I have also added an additional test that was previously removed.