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
Im getting a crash on the assert in this function in the JobBuilder class.
/// Custom parameters will be forwarded to create method
public func with(params: [String: Any]) -> Self {
assert(JSONSerialization.isValidJSONObject(params))
info.params = params
return self
}
Before moving to the new code I was passing things like delegates and callbacks to my job but since those are not valid JSON but conform to Any it crashes on this assertion.
I'm not sure if this is intended or not but it does mention "Validate JSON argument" int the 1.4.0 change log so maybe. If it was intended, is there a better way to get callback blocks and updates from a job?
The text was updated successfully, but these errors were encountered:
Hi,
The params will be converted to string JSON when serialising the task. However, I should only validate this if the persistence is required. I will update this.
Im getting a crash on the
assert
in this function in theJobBuilder
class.Before moving to the new code I was passing things like delegates and callbacks to my job but since those are not valid JSON but conform to
Any
it crashes on this assertion.I'm not sure if this is intended or not but it does mention "Validate JSON argument" int the 1.4.0 change log so maybe. If it was intended, is there a better way to get callback blocks and updates from a job?
The text was updated successfully, but these errors were encountered: