passepartoutvpn / passepartout-app

VPN client for Apple platforms.
https://passepartoutvpn.app
GNU General Public License v3.0
775 stars 119 forks source link

Shift dependency on GenericJSON #306

Closed keeshux closed 1 year ago

keeshux commented 1 year ago

Most packages don't need to decode map internals, i.e. provider presets and VPN configurations, only the VPNImpl package does. Therefore, plug the dependency there and rely on generic [String: Any] in all the underlying packages.

keeshux commented 1 year ago

Actually, GenericJSON resolves a Codable limitation at the domain level. Codable needs a type to be defined in advance, which is why [String: Any] is not Codable. JSONSerialization does handle it though.

TL;DR: keep the dependency in Core.