socket.io-client-swift
socket.io-client-swift copied to clipboard
How to convert SocketAnyEvent to json?
Hi there,
I'm quite new to Swift, so forgive me if there is a simple solution.
I'm building a cordova plugin and would like to relay the socket.onAny() events to the JS app.
I thought I could simply relay the event as JSON, but I can't find a way to encode the SocketAnyEvent because it has an [Any] property which can't be simply json-encoded...
Each SocketAnyEvent has a different items structure, I'm struggling (can't use Swift's Codable)
Has anyone of you already done that? Thanks alot for your help.