This is what I tried to do. I am not sure what is wrong. anyone got ideas?
let data: Data? = try? JSONSerialization.data(withJSONObject: "")
and it says
reason: '*** +[NSJSONSerialization dataWithJSONObject:options:error:]: Invalid top-level type in JSON write'
even if i put in "{}" error is the same. thoughts?
Purpose for this is i want set this to a URLRequest.httpBody
Thoughts?