lazy property won't be maptoJSON ,and won't be correct de
- Dominant language
- Swift
- Stars
- 4.3k
- Forks
- 677
- PR merge metrics
- No merged PRs in 30d
Description
swift 4
HandyJSON 4- beta1
```
lazy var status:Int = {
switch self.order_status {
case .toTake:
return 0
case .taken:
return 0
case .done:
return 1
}
}()
```
it won't be map to JSON
but if force set
```
let _ = taskList.req.status
```
it will be `status.storage=0`
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the lazy Swift property case described in the issue with HandyJSON 4-beta1, then inspect the mapping path used by mapToJSON and lazy properties. Done means the property is serialized with the correct value without first reading status, with a regression test covering both behaviors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100