How JSONSerialization with GraphQLEnum<Object>

I try to JSONSerialization response data but it’s not work
I receive this error

invalid type in json write (__swiftvalue)

This is my code

func serialization(data: JSONObject) {
    if let object = try JSONSerialization.data(withJSONObject: data) {
        print(object)
    }
}
1 Like