You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I could use a suggestion on how to best provide progress when parsing a JSON array of a zillion records. Been using the frameworks simple syntax to unmarshal the array with my object implementing Unmarshaling protocol. Works perfectly fine, but when I have many records, how can I provide a 'percent complete' back to the user?
`
// This one liner blasts thru the millions of elements in my JSON array to unmarshal,
// but doesn't let me know which index its on so I can give the user progress feedback.
let records: [MyRecord] = try? jsonObject.value(for: "BillonsOfRecords")
`
The text was updated successfully, but these errors were encountered:
That's a good question. As designed, I don't believe there's a good way for any of the existing API to expose and index. I'm not sure of a good way to handle this short of writing your own version of one of the existing functions that takes a closure which can accept an index and is called on each pass of the mapping.
I could use a suggestion on how to best provide progress when parsing a JSON array of a zillion records. Been using the frameworks simple syntax to unmarshal the array with my object implementing Unmarshaling protocol. Works perfectly fine, but when I have many records, how can I provide a 'percent complete' back to the user?
`
// This one liner blasts thru the millions of elements in my JSON array to unmarshal,
// but doesn't let me know which index its on so I can give the user progress feedback.
let records: [MyRecord] = try? jsonObject.value(for: "BillonsOfRecords")
`
The text was updated successfully, but these errors were encountered: