-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Conversation
"System.Resources.ResourceManager": "4.0.0", | ||
"System.Runtime": "4.0.20", | ||
"System.Runtime.Extensions": "4.0.10", | ||
"System.Runtime.Handles": "4.0.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What actually uses handles?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nothing. I copied this from another assembly and never trimmed it. I can probably get rid of most of these.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Targeting netstandard1.0 with the following dependencies worked for me:
"netstandard1.0": {
"dependencies": {
"System.Collections": "4.0.11",
"System.IO": "4.1.0",
"System.Linq": "4.1.0",
"System.Runtime": "4.1.0",
"System.Runtime.Extensions": "4.1.0",
"System.Resources.ResourceManager": "4.0.1"
}
}
See ericstj@9a1cf68 & ericstj@2400019. If you make me a collaborator I'll push to your branch. |
@mhutch, would like your opinion on ericstj@2400019. This has us deferring to the inbox implementation of System.Json.dll on xamarin profiles. Otherwise we could give Xamarin profiles the implementation from the package itself. |
Build and package as a netstandard1.0 assembly. Clean up project file.
|
||
namespace System.Json | ||
{ | ||
public class JsonObject : JsonValue, IDictionary<string, JsonValue>, ICollection<JsonPair> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this expose more interfaces like IReadOnly*, same q for all types.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could consider it, but my understanding is we're only really adding this assembly for compatibility with Mono (it doesn't exist on desktop), and that we'd suggest developers write new JSON-related code using Json.NET and/or https://github.com/dotnet/corefxlab/tree/master/src/System.Text.Json depending on how that experiment turns out, rather than writing new code using this library. So I'm not sure how much effort we want to expend on adding APIs, interface implementations, etc. We could certainly look into it, though, but I'd like that to be a separate effort it if happens.
yay for a new assembly! thank you |
|
Yeah, LGTM too. For the question about adding more interfaces I think that could be addressed separately. |
Thanks, guys, and Eric, thank you very much for helping to fix the packaging. |
I would definitely prefer to defer to our implementation on Mono-based frameworks in order to fuse the types (e.g. what happens if someone gets a System.Json object from a netstandard library and passes it to an Xamarin.iOS library) and to shrink our deployed app size by ensuring we don't deploy multiple implementations. |
<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Build"> | ||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" /> | ||
<PropertyGroup> | ||
<AssemblyVersion>4.0.0.0</AssemblyVersion> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this version needs to match the version xamarin has inbox (2.0.5.0). We should test that.
Add System.Json Commit migrated from dotnet/corefx@3f4c1df
System.Json.dll is part of Silverlight and doesn't ship in the .NET Framework, nor do we encourage its usage. But, it's available and used with Mono, and in order to enable compatibility between Mono and .NET Core, we're adding it as an available assembly.
This PR ports the Mono implementation over to corefx. This includes porting the tests, adding packaging, cleaning up the source, etc. I've not done any performance work, increased code coverage of the tests, etc. This is mainly about making the APIs available. We can tweak is subsequently as is necessary.
cc: @danmosemsft, @KrzysztofCwalina, @ericstj, @ianhays