alibaba / alibaba/HandyJSON

HandyJSON数组转String, 编译器一直报错

Open
#356 1 comment 0 reactions 0 assignees View on GitHub
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()

Screen Shot 2019-10-31 at 6 00 02 PM

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.