We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I have JSON array like this.
{ "id": "7397632", "studentid": "554", "daily_attendance": [ { "period_id": "29", "attendance_type_id": "1" }, { "period_id": "30", "attendance_type_id": "1" }, { "period_id": "31", "attendance_type_id": "1" }, { "period_id": "32", "attendance_type_id": "1" } ] }, { "id": "5397643", "studentid": "626", "daily_attendance": [ { "period_id": "30", "attendance_type_id": "1" }, { "period_id": "31", "attendance_type_id": "1" }, { "period_id": "32", "attendance_type_id": "1" } ] }
This is my class
import JSONJoy struct StudentTimeTable : JSONJoy {
let id : String? let studentid : String? let daily_attendance : [Daily_attendance]? init(_ decoder: JSONLoader) throws { id = try decoder["id"].get() studentid = try decoder["studentid"].get() //daily_attendance = try [Daily_attendance(decoder["daily_attendance"])] daily_attendance = try decoder["daily_attendance"].get() }
Problem is it does not create the 'daily_attendance' array Object.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I have JSON array like this.
This is my class
import JSONJoy
struct StudentTimeTable : JSONJoy {
Problem is it does not create the 'daily_attendance' array Object.
The text was updated successfully, but these errors were encountered: