gpt4 book ai didi

c# - 从具有不同类型节点的 JSON 创建类

转载 作者:太空宇宙 更新时间:2023-11-03 20:48:13 26 4
gpt4 key购买 nike

我有一个包含 3 种不同类型节点的 JSON 字符串,自动生成器不允许我处理它。

如何将此结构构建到类中以反序列化?

{
"answers": [
{
"answerText": "No",
"section": "52.209-5.a.1.i.A"
},
{
"answerText": "No",
"section": "52.209-5.a.1.i.B"
},
{
"answerText": "No",
"section": "52.209-5.a.1.i.D"
},
{
"answerText": "No",
"section": "52.209-5.a.1.i.C"
},
{
"answerText": "No",
"section": "52.209-5.a.1.ii"
}
],
"id": "FAR 52.209-5"
},
{
"answers": {
"SamPointOfContact": {
"firstName": "Catherine",
"lastName": "Kuenzel",
"title": "VP of Public Sector US Enterprise Services"
},
"section": "52.203-2.b.2.i"
},
"id": "FAR 52.203-2"
},
{
"answers": [
{
"section": "52.212-3.c",
"naics": [
{
"naicsName": "Other Computer Related Services",
"hasSizeChanged": "null",
"isPrimary": false,
"ExcpCounter": 1,
"isSmallBusiness": "N",
"naicsCode": 541519
},
{
"naicsName": "Information Technology Value Added Resellers",
"hasSizeChanged": "null",
"isPrimary": false,
"ExcpCounter": 2,
"isSmallBusiness": "N",
"naicsCode": 541519
},
{
"naicsName": "Engineering Services",
"hasSizeChanged": "null",
"isPrimary": false,
"ExcpCounter": 1,
"isSmallBusiness": "N",
"naicsCode": 541330
},
{
"naicsName": "Military and Aerospace Equipment and Military Weapons",
"hasSizeChanged": "null",
"isPrimary": false,
"ExcpCounter": 2,
"isSmallBusiness": "N",
"naicsCode": 541330
},
{
"naicsName": "Contracts and Subcontracts for Engineering Services Awarded Under the National Energy Policy Act of 1992",
"hasSizeChanged": "null",
"isPrimary": false,
"ExcpCounter": 3,
"isSmallBusiness": "N",
"naicsCode": 541330
},
{
"naicsName": "Marine Engineering and Naval Architecture",
"hasSizeChanged": "null",
"isPrimary": false,
"ExcpCounter": 4,
"isSmallBusiness": "N",
"naicsCode": 541330
},
{
"naicsName": "Software Publishers",
"hasSizeChanged": "null",
"isPrimary": true,
"isSmallBusiness": "N",
"naicsCode": 511210
},
{
"naicsName": "Wired Telecommunications Carriers",
"hasSizeChanged": "null",
"isPrimary": false,
"isSmallBusiness": "N",
"naicsCode": 517311
},
{
"naicsName": "Data Processing, Hosting, and Related Services",
"hasSizeChanged": "null",
"isPrimary": false,
"isSmallBusiness": "N",
"naicsCode": 518210
},
{
"naicsName": "Custom Computer Programming Services",
"hasSizeChanged": "null",
"isPrimary": false,
"isSmallBusiness": "N",
"naicsCode": 541511
},
{
"naicsName": "Computer Systems Design Services",
"hasSizeChanged": "null",
"isPrimary": false,
"isSmallBusiness": "N",
"naicsCode": 541512
},
{
"naicsName": "Computer Facilities Management Services",
"hasSizeChanged": "null",
"isPrimary": false,
"isSmallBusiness": "N",
"naicsCode": 541513
},
{
"naicsName": "Other Scientific and Technical Consulting Services",
"hasSizeChanged": "null",
"isPrimary": false,
"isSmallBusiness": "N",
"naicsCode": 541690
},
{
"naicsName": "All Other Professional, Scientific, and Technical Services",
"hasSizeChanged": "null",
"isPrimary": false,
"isSmallBusiness": "N",
"naicsCode": 541990
}
]
}

据我所知,每个答案都有:

部分

和以下之一:answerText、SamPointOfContact 或 NAICS

来自 API 的完整 JSON 字符串:

{"sam_data":{"registration":{"pscCodes":"null","dodaac":"null","pastPerformancePoc":{"nonUsPhone":"null","firstName":"MELISSA","lastName":"RANSLEM","middleInitial":"null","address":{"zip":"20190","city":"Reston","countryCode":"USA","stateorProvince":"VA","line2":"null","line1":"12012 Sunset Hills RD","zipPlus4":"null"},"notes":"null","usPhoneExt":"null","title":"null","fax":"null","usPhone":"5713532701","email":"MELR@MICROSOFT.COM"},"lastUpdateDate":"2019-10-02 11:42:00.2","businessStartDate":"1981-06-25","congressionalDistrict":"WA 01","corporateUrl":"http://www.microsoft.com","samAddress":{"zip":"98052","city":"Redmond","countryCode":"USA","stateorProvince":"WA","line2":"null","line1":"1 Microsoft Way","zipPlus4":"8300"},"electronicBusinessPoc":{"nonUsPhone":"null","firstName":"MELISSA","lastName":"RANSLEM","middleInitial":"null","address":{"zip":"20190","city":"RESTON","countryCode":"USA","stateorProvince":"VA","line2":"null","line1":"12012 SUNSET HILLS ROAD","zipPlus4":"null"},"notes":"null","usPhoneExt":"null","title":"CONTRACTS MANAGER","fax":"4257086748","usPhone":"5713532701","email":"MELR@MICROSOFT.COM"},"corporateStructureCode":"2L","certificationsURL":{"pdfUrl":"https://sam.gov/SAM/filedownload?reportType=2&orgId=cjtAmfDzDsaKTO8U4n1UKUa2KrXbqstk%2BO0iASuNgvum%2B4NlFkRiGprZhIF96imb&pitId=49aNpMKWuSvejCJ3Wvi2DUfJJpLdlhT66P77hYyLHlRhcYGmjXFFJHD2XTuRV2vTUaRmz8pvfeEH%0Av7KcTAhZQg%3D%3D&requestId=mAs0396QKDkznCr"},"bondingInformation":{"serviceAggregate":"null","servicePerContract":"null","constructionAggregate":"null","constructionPerContract":"null"},"dunsPlus4":"0000","correspondenceFlag":"null","debtSubjectToOffset":false,"qualifications":{"pdfUrl":"null","acass":{"answers":{"answerText":"No","section":"SF330.1"},"id":"SF330"}},"cage":"60128","fiscalYearEndCloseDate":"06/30","publicDisplay":true,"ncage":"null","altGovtBusinessPoc":{"nonUsPhone":"null","firstName":"MELISSA","lastName":"RANSLEM","middleInitial":"null","address":{"zip":"20190","city":"RESTON","countryCode":"USA","stateorProvince":"VA","line2":"null","line1":"12012 SUNSET HILLS ROAD","zipPlus4":"null"},"notes":"null","usPhoneExt":"null","title":"null","fax":"null","usPhone":"5713532701","email":"MELR@MICROSOFT.COM"},"registrationDate":"2001-05-24 00:00:00.0","govtBusinessPoc":{"nonUsPhone":"null","firstName":"MELISSA","lastName":"RANSLEM","middleInitial":"null","address":{"zip":"20190","city":"RESTON","countryCode":"USA","stateorProvince":"VA","line2":"null","line1":"12012 SUNSET HILLS ROAD","zipPlus4":"null"},"notes":"null","usPhoneExt":"null","title":"CONTRACTS MANAGER","fax":"4257086748","usPhone":"5713532701","email":"MELR@MICROSOFT.COM"},"expirationDate":"2020-10-01 10:48:36.71","altElectronicBusinessPoc":{"nonUsPhone":"null","firstName":"MELISSA","lastName":"RANSLEM","middleInitial":"null","address":{"zip":"20190","city":"RESTON","countryCode":"USA","stateorProvince":"VA","line2":"null","line1":"12012 SUNSET HILLS ROAD","zipPlus4":"null"},"notes":"null","usPhoneExt":"null","title":"null","fax":"null","usPhone":"5713532701","email":"MELR@MICROSOFT.COM"},"purposeOfRegistration":"ALL_AWARDS","companyDivision":"null","financialAssistanceResponse":"No","submissionDate":"2019-10-02 10:48:36.7","creditCardUsage":true,"countryOfIncorporation":"USA","businessTypes":["2X","MF"],"certifications":{"pdfUrl":"https://sam.gov/SAM/filedownload?reportType=2&orgId=U8BeO3GBdtx5C03t2ZZrh09e%2BMOgCT%2F5q6WqC%2BSik3qQgeriyZFR3EyVmYmJJ8KN&pitId=XU%2BuEDYLvXBbO0%2BOG2x1eK2wC0FT4ocU%2Febr%2FvqOZWsbEd5NjPqoozGVWZIGLYHtToL8xJfOkUfk%0A%2BaJmd2jnmw%3D%3D&requestId=FCwZSoGN9o0tAc6","farResponses":[{"answers":[{"answerText":"No","section":"52.209-2.c.1"},{"answerText":"No","section":"52.209-2.c.2"}],"id":"FAR 52.209-2"},{"answers":[{"answerText":"No","section":"52.209-5.a.1.i.A"},{"answerText":"No","section":"52.209-5.a.1.i.B"},{"answerText":"No","section":"52.209-5.a.1.i.D"},{"answerText":"No","section":"52.209-5.a.1.i.C"},{"answerText":"No","section":"52.209-5.a.1.ii"}],"id":"FAR 52.209-5"},{"answers":{"SamPointOfContact":{"firstName":"Catherine","lastName":"Kuenzel","title":"VP of Public Sector US Enterprise Services"},"section":"52.203-2.b.2.i"},"id":"FAR 52.203-2"},{"answers":{"answerText":"No","section":"52.215-6.a"},"id":"FAR 52.215-6"},{"answers":{"answerText":"No","section":"52.214-14.a"},"id":"FAR 52.214-14"},{"answers":{"answerText":"Vendor will provide information with specific offers to the Government","section":"52.223-4"},"id":"FAR 52.223-4"},{"answers":{"answerText":"Vendor will provide information with specific offers to the Government","section":"52.223-9"},"id":"FAR 52.223-9"},{"answers":{"answerText":"No","section":"52.219-2.a"},"id":"FAR 52.219-2"},{"answers":[{"answerText":"TIN ON FILE","section":"52.204-3.d"},{"answerText":"Corporate Entity (Not Tax Exempt)","section":"52.204-3.e"},{"answerText":"No","section":"52.204-3.f"}],"id":"FAR 52.204-3"},{"answers":{"answerText":"No","section":"52.223-22.a"},"id":"FAR 52.223-22"},{"answers":[{"section":"52.212-3.c","naics":[{"naicsName":"Other Computer Related Services","hasSizeChanged":"null","isPrimary":false,"ExcpCounter":1,"isSmallBusiness":"N","naicsCode":541519},{"naicsName":"Information Technology Value Added Resellers","hasSizeChanged":"null","isPrimary":false,"ExcpCounter":2,"isSmallBusiness":"N","naicsCode":541519},{"naicsName":"Engineering Services","hasSizeChanged":"null","isPrimary":false,"ExcpCounter":1,"isSmallBusiness":"N","naicsCode":541330},{"naicsName":"Military and Aerospace Equipment and Military Weapons","hasSizeChanged":"null","isPrimary":false,"ExcpCounter":2,"isSmallBusiness":"N","naicsCode":541330},{"naicsName":"Contracts and Subcontracts for Engineering Services Awarded Under the National Energy Policy Act of 1992","hasSizeChanged":"null","isPrimary":false,"ExcpCounter":3,"isSmallBusiness":"N","naicsCode":541330},{"naicsName":"Marine Engineering and Naval Architecture","hasSizeChanged":"null","isPrimary":false,"ExcpCounter":4,"isSmallBusiness":"N","naicsCode":541330},{"naicsName":"Software Publishers","hasSizeChanged":"null","isPrimary":true,"isSmallBusiness":"N","naicsCode":511210},{"naicsName":"Wired Telecommunications Carriers","hasSizeChanged":"null","isPrimary":false,"isSmallBusiness":"N","naicsCode":517311},{"naicsName":"Data Processing, Hosting, and Related Services","hasSizeChanged":"null","isPrimary":false,"isSmallBusiness":"N","naicsCode":518210},{"naicsName":"Custom Computer Programming Services","hasSizeChanged":"null","isPrimary":false,"isSmallBusiness":"N","naicsCode":541511},{"naicsName":"Computer Systems Design Services","hasSizeChanged":"null","isPrimary":false,"isSmallBusiness":"N","naicsCode":541512},{"naicsName":"Computer Facilities Management Services","hasSizeChanged":"null","isPrimary":false,"isSmallBusiness":"N","naicsCode":541513},{"naicsName":"Other Scientific and Technical Consulting Services","hasSizeChanged":"null","isPrimary":false,"isSmallBusiness":"N","naicsCode":541690},{"naicsName":"All Other Professional, Scientific, and Technical Services","hasSizeChanged":"null","isPrimary":false,"isSmallBusiness":"N","naicsCode":541990}]},{"answerText":"No","section":"52.212-3.q.2.i"},{"answerText":"No","section":"52.212-3.q.2.ii"},{"answerText":"No","section":"52.212-3.c.11.ii"},{"answerText":"Yes","section":"52.212-3.d.1.i"},{"answerText":"Yes","section":"52.212-3.d.1.ii"},{"answerText":"Microsoft Corporation  has developed and has on file affirmative action programs required by Secretary of Labor regulations.","section":"52.212-3.d.2.i"},{"answerText":"Vendor will provide information with specific offers to the Government","section":"52.212-3.f"},{"answerText":"No","section":"52.212-3.h.1"},{"answerText":"No","section":"52.212-3.h.2"},{"answerText":"No","section":"52.212-3.h.4"},{"answerText":"No","section":"52.212-3.h.3"},{"answerText":"No","section":"52.212-3.h.5"},{"answerText":"No","section":"52.212-3.i.2.i"},{"section":"52.212-3.j"},{"answerText":"Vendor will provide information with specific offers to the Government","section":"52.212-3.k.1.2.i"},{"answerText":"Vendor will provide information with specific offers to the Government","section":"52.212-3.k.2.2"},{"answerText":"Corporate Entity (Not Tax Exempt)","section":"52.212-3.l.4"},{"answerText":"No","section":"52.212-3.l.5"},{"answerText":"No","section":"52.212-3.n.2.i"},{"answerText":"No","section":"52.212-3.n.2.ii"},{"answerText":"No","section":"52.212-3.p.1"},{"answerText":"No","section":"52.212-3.r.1"},{"answerText":"No","section":"52.226-2.b.1"},{"answerText":"No","section":"52.226-2.b.2"}],"id":"FAR 52.212-3"},{"answers":[{"section":"52.219-1.b","naics":[{"naicsName":"Other Computer Related Services","hasSizeChanged":"null","isPrimary":false,"ExcpCounter":1,"isSmallBusiness":"N","naicsCode":541519},{"naicsName":"Information Technology Value Added Resellers","hasSizeChanged":"null","isPrimary":false,"ExcpCounter":2,"isSmallBusiness":"N","naicsCode":541519},{"naicsName":"Engineering Services","hasSizeChanged":"null","isPrimary":false,"ExcpCounter":1,"isSmallBusiness":"N","naicsCode":541330},{"naicsName":"Military and Aerospace Equipment and Military Weapons","hasSizeChanged":"null","isPrimary":false,"ExcpCounter":2,"isSmallBusiness":"N","naicsCode":541330},{"naicsName":"Contracts and Subcontracts for Engineering Services Awarded Under the National Energy Policy Act of 1992","hasSizeChanged":"null","isPrimary":false,"ExcpCounter":3,"isSmallBusiness":"N","naicsCode":541330},{"naicsName":"Marine Engineering and Naval Architecture","hasSizeChanged":"null","isPrimary":false,"ExcpCounter":4,"isSmallBusiness":"N","naicsCode":541330},{"naicsName":"Software Publishers","hasSizeChanged":"null","isPrimary":true,"isSmallBusiness":"N","naicsCode":511210},{"naicsName":"Wired Telecommunications Carriers","hasSizeChanged":"null","isPrimary":false,"isSmallBusiness":"N","naicsCode":517311},{"naicsName":"Data Processing, Hosting, and Related Services","hasSizeChanged":"null","isPrimary":false,"isSmallBusiness":"N","naicsCode":518210},{"naicsName":"Custom Computer Programming Services","hasSizeChanged":"null","isPrimary":false,"isSmallBusiness":"N","naicsCode":541511},{"naicsName":"Computer Systems Design Services","hasSizeChanged":"null","isPrimary":false,"isSmallBusiness":"N","naicsCode":541512},{"naicsName":"Computer Facilities Management Services","hasSizeChanged":"null","isPrimary":false,"isSmallBusiness":"N","naicsCode":541513},{"naicsName":"Other Scientific and Technical Consulting Services","hasSizeChanged":"null","isPrimary":false,"isSmallBusiness":"N","naicsCode":541690},{"naicsName":"All Other Professional, Scientific, and Technical Services","hasSizeChanged":"null","isPrimary":false,"isSmallBusiness":"N","naicsCode":541990}]},{"answerText":"No","section":"52.219-1.b.8.ii"}],"id":"FAR 52.219-1"},{"answers":{"answerText":"Vendor will provide information with specific offers to the Government","section":"52.227-15.b.2"},"id":"FAR 52.227-15"},{"answers":{"answerText":"No","section":"52.204-17.b"},"id":"FAR 52.204-17"},{"answers":{"answerText":"No","section":"FAR 52.204-20.b"},"id":"FAR 52.204-20"},{"answers":{"answerText":"No","section":"52.222-18.c.1"},"id":"FAR 52.222-18"},{"answers":[{"answerText":"Yes","section":"52.222-22.a"},{"answerText":"Yes","section":"52.222-22.b"}],"id":"FAR 52.222-22"},{"answers":{"answerText":"Microsoft Corporation  has developed and has on file affirmative action programs required by Secretary of Labor regulations.","section":"52.222-25"},"id":"FAR 52.222-25"},{"answers":[{"answerText":"No","section":"52.209-11.b.1"},{"answerText":"No","section":"52.209-11.b.2"}],"id":"FAR 52.209-11"},{"answers":{"answerText":"Vendor will provide information with specific offers to the Government","section":"52.225-2.a"},"id":"FAR 52.225-2"},{"answers":{"answerText":"Vendor will provide information with specific offers to the Government","section":"52.225-4.a"},"id":"FAR 52.225-4"},{"answers":{"answerText":"Vendor will provide information with specific offers to the Government","section":"52.225-6.a"},"id":"FAR 52.225-6"},{"answers":{"answerText":"Vendor will provide information with specific offers to the Government","section":"52.222-48.a.1"},"id":"FAR 52.222-48"},{"answers":{"answerText":"Vendor will provide information with specific offers to the Government","section":"52.222-52.a.1.1"},"id":"FAR 52.222-52"},{"answers":{"answerText":"No","section":"SF330.1"},"id":"SF330"}],"dfarResponses":[{"answers":{"answerText":"No","section":"252.225-7022.b"},"id":"DFAR 252.225-7022"},{"answers":{"answerText":"No","section":"DFAR 252.216-7008.a"},"id":"DFAR 252.216-7008"},{"answers":{"answerText":"No","section":"DFAR 252.209-7002.1"},"id":"DFAR 252.209-7002"},{"answers":{"answerText":"Vendor will provide information with specific offers to the Government","section":"252.225-7000.c.1"},"id":"DFAR 252.225-7000"},{"answers":{"answerText":"Vendor will provide information with specific offers to the Government","section":"252.225-7020.c.1"},"id":"DFAR 252.225-7020"},{"answers":{"answerText":"Vendor will provide information with specific offers to the Government","section":"252.225-7022.c.1"},"id":"DFAR 252.225-7022"},{"answers":{"answerText":"Vendor will provide information with specific offers to the Government","section":"252.225-7035.c.1"},"id":"DFAR 252.225-7035"},{"answers":[{"answerText":"No","section":"252.225-7049.c.1"},{"answerText":"No","section":"252.225-7049.c.2"},{"answerText":"No","section":"252.225-7049.c.3"},{"answerText":"No","section":"252.225-7049.c.4"}],"id":"DFAR 252.225-7049"}]},"corporateStructureName":"Corporate Entity (Not Tax Exempt)","statusMessage":"Active","stateOfIncorporation":"WA","disasterRelief":"null","doingBusinessAsName":"Microsoft","mailingAddress":{"zip":"98052","city":"REDMOND","countryCode":"USA","stateorProvince":"WA","line2":"null","line1":"ONE MICROSOFT WAY","zipPlus4":"null"},"hasKnownExclusion":false,"altPastPerformancePoc":{"nonUsPhone":"null","firstName":"MELISSA","lastName":"RANSLEM","middleInitial":"null","address":{"zip":"20190","city":"RESTON","countryCode":"USA","stateorProvince":"VA","line2":"null","line1":"12012 SUNSET HILLS ROAD","zipPlus4":"null"},"notes":"null","usPhoneExt":"null","title":"CONTRACTS MANAGER","fax":"4257086748","usPhone":"5713532701","email":"MELR@MICROSOFT.COM"},"legalBusinessName":"Microsoft Corporation","duns":"081466849","divisionNumber":"null","activationDate":"2019-10-02 11:00:10.02812","naics":[{"naicsName":"Custom Computer Programming Services","isPrimary":false,"naicsCode":"541511"},{"naicsName":"Other Scientific and Technical Consulting Services","isPrimary":false,"naicsCode":"541690"},{"naicsName":"Computer Systems Design Services","isPrimary":false,"naicsCode":"541512"},{"naicsName":"Data Processing, Hosting, and Related Services","isPrimary":false,"naicsCode":"518210"},{"naicsName":"Other Computer Related Services","isPrimary":false,"naicsCode":"541519"},{"naicsName":"Computer Facilities Management Services","isPrimary":false,"naicsCode":"541513"},{"naicsName":"Software Publishers","isPrimary":true,"naicsCode":"511210"},{"naicsName":"All Other Professional, Scientific, and Technical Services","isPrimary":false,"naicsCode":"541990"},{"naicsName":"Engineering Services","isPrimary":false,"naicsCode":"541330"},{"naicsName":"Wired Telecommunications Carriers","isPrimary":false,"naicsCode":"517311"}],"status":"ACTIVE"}}}

最佳答案

您需要一个自定义转换器。

您正在尝试转换复杂类型,结果 Newtonsoft 不知道该怎么做。修复相当简单,记录在此处:Using a Custom JsonConverter to fix bad JSON results .

因为链接坏了,你需要的是:

class SingleValueArrayConverter<T> : JsonConverter
{
public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
{
throw new NotImplementedException();
}

public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
{
object retVal = new Object();
if (reader.TokenType == JsonToken.StartObject)
{
T instance = (T)serializer.Deserialize(reader, typeof(T));
retVal = new [] { instance };
}
else if (reader.TokenType == JsonToken.StartArray)
{
retVal = serializer.Deserialize(reader, objectType);
}
return retVal;
}

public override bool CanConvert(Type objectType) => objectType == typeof(T);
}

然后,您可以创建一些对象来表示您的数据:

class SamPointOfContact
{
public string firstName { get; set; }
public string lastName { get; set; }
public string title { get; set; }
}

class Naics
{
public string naicsName { get; set; }
public string hasSizeChanged { get; set; }
public bool isPrimary { get; set; }
public int ExcpCounter { get; set; }
public string isSmallBusiness { get; set; }
public int naicsCode { get; set; }
}

class Answer
{
public string answerText { get; set; }
public string section { get; set; }
public SamPointOfContact samPointOfContact { get; set; }
public Naics[] naics { get; set; }
}

class AnswerNode
{
[JsonConverter(typeof(SingleValueArrayConverter<Answer>))]
public Answer[] answers { get; set; }
public string id { get; set; }
}

class Root
{
public AnswerNode[] listOfAnswers { get; set; }
}

此外,我使用了数组而不是 List,而链接的博客使用了 List。如果您愿意,可以更改。

最后,像往常一样使用 Newtonsoft 反序列化:

Root result =
JsonConvert.DeserializeObject<Root>(
System.IO.File.ReadAllText("test.json"));

现在我通过获取你的 JSON 并将其放入快速数组 { "listOfAnswers": [ ... your original JSON ... ] } ,您需要对其进行修改以适合您的实际数据。

关于c# - 从具有不同类型节点的 JSON 创建类,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58454504/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com