alibaba / alibaba/HandyJSON

如何在数据模型内部,进行update

Open
#449 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Swift
Stars
4.3k
Forks
677
PR merge metrics
No merged PRs in 30d

Description

override func decode(with data: Data!) {
let json = ....
JSONDeserializer.update(object: self, from: json)
}

如何在模型内部进行update,报错Cannot pass immutable value as inout argument: 'self' is immutable

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the reported override func decode(with data: Data!) and the JSONDeserializer.update(object: self, from: json) call. Reproduce the compiler error about passing immutable self as an inout argument, then inspect the relevant update API and surrounding model-decoding behavior. Done means the issue's model-internal update scenario has a documented or supported resolution.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.