HandyJSON数组转String, 编译器一直报错
- Dominant language
- Swift
- Stars
- 4.3k
- Forks
- 677
- PR merge metrics
- No merged PRs in 30d
Description
public class Program: HandyJSON {
public var id: String!
public var name: String!
public var xml: String!
public var programPath: String!
public required init() {}
public init(id: String, name: String, xml: String, programPath: String) {
self.id = id
self.name = name
self.xml = xml
self.programPath = programPath
}
}
let jsons = [Program]()
let jsonString = jsons.toJSONString()

Contributor guide
No contributing guide indexed for this repository
Research direction
Use the Program example and the jsons.toJSONString() call as the reproduction, then inspect the compiler diagnostic in the attached screenshot and the array-serialization entry point. Done means the example compiles and produces a JSON string for an empty [Program] array.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- data
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100