alibaba / alibaba/HandyJSON

deserialize function error

Open
#280 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

class a{
var code:Int?
var data:String?
var message:String?
}

class b{
var id:Int?
var info:String?
}

//json:
let json="{code:1,data:{id:202,info:"...."},message:\"....\"}"

let clsa=a.deserializeFrom(json: json)
//deserialize succes,but

clsa.data="{id=\"...\"",message=\"...\'}" //debug data
//clas.data struct has been change, con't be use this string to deserialize to class b.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at the deserializeFrom entry point and reproduce the example using classes a and b with nested data. Inspect how the nested value is represented after deserialization, then add a regression test showing that the resulting data can be deserialized into class b and preserves the expected fields.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
data
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 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.