【发布时间】:2015-09-09 21:22:11
【问题描述】:
当我尝试使用两个 string[] 或两个 List 打印架构时出现错误。 string[] 和 List 都可以。
在目标类中有这个。
public string[] ovoList;
public string[] procList;
在架构转换为字符串而不是在其生成位置的行上导致错误。
static void Main(){
JSchemaGenerator generator = new JSchemaGenerator();
JSchema schema = generator.Generate(typeof(UNIKK.UIEngine.UIFrame));
//Error is thrown on two lines below
Console.WriteLine(schema);
File.WriteAllText(@"OVOSchema.json", schema.ToString());
我尝试了 Newtonsoft.JSON 6.0.8 和最新的 7.x 以及 Newtonsoft.JSON.Schema 1.0.11 我用 nuget 抓住了它们并正在运行 Xamarin 工作室 版本 5.9.5(构建 10) 单声道 4.0.3 ((分离/d6946b4) 在 OS X 上
错误跟踪是
System.Uri.EnsureAbsoluteUri () 在 /private/tmp/source-mono-mac-4.0.0-branch-c5sr3/bockbuild-mono-4.0.0-branch/profiles/mono-mac-xamarin/build-根/mono-4.0.3/mcs/class/System/System/Uri.cs:2062 System.Uri.GetComponents (components=System.UriComponents.Host|System.UriComponents.Port|System.UriComponents.Scheme|System.UriComponents.UserInfo, format=System.UriFormat.Unescaped) 在 /private/tmp/source-mono- mac-4.0.0-branch-c5sr3/bockbuild-mono-4.0.0-branch/profiles/mono-mac-xamarin/build-root/mono-4.0.3/mcs/class/System/System/Uri.cs: 1731 System.Uri.Compare (uri1={#}, uri2={#/properties/ovoList},partsToCompare=System.UriComponents.Host|System.UriComponents.Port|System.UriComponents.Scheme|System.UriComponents.UserInfo, compareFormat= System.UriFormat.Unescaped, comparisonType=System.StringComparison.InvariantCultureIgnoreCase) 在 /private/tmp/source-mono-mac-4.0.0-branch-c5sr3/bockbuild-mono-4.0.0-branch/profiles/mono-mac- xamarin/build-root/mono-4.0.3/mcs/class/System/System/Uri.cs:1768 System.UriParser.IsBaseOf (baseUri={#}, relativeUri={#/properties/ovoList}) 在 /private/tmp/source-mono-mac-4.0.0-branch-c5sr3/bockbuild-mono-4.0.0-分支/配置文件/mono-mac-xamarin/build-root/mono-4.0.3/mcs/class/System/System/UriParser.cs:208
System.Uri.IsBaseOf (uri={#/properties/ovoList}) 在 /private/tmp/source-mono-mac-4.0.0-branch-c5sr3/bockbuild-mono-4.0.0-branch/profiles /mono-mac-xamarin/build-root/mono-4.0.3/mcs/class/System/System/Uri.cs:1740
【问题讨论】: