I am looking to reuase some (iOS) client side code into a sample Vapor serverside project.
The code in question relies on SwiftyJSON functionality, defined as a struct JSON; now this name slot is not 'free', but already used inside a package that Vapor relies upon (the package name is JSON, as well).
While I can point to the JSON thing I want in my former client side code (as App.JSON), the controller that is boilerplated into the code also uses JSON. And apparently putting as I did the SwiftyJSON library files into the App namespace actually overrides the moduleless references to Vapor's JSON.
I tried to refer then to JSON.JSON, but it does not get recognized. JSON is a defined and compiled framework in the project. Should it not define implicitely a module name, as well?
How can I reach Vapor's JSON, then?
Thanks..
As a matter of fact, the
Vapor
module also exportsJSON
. So, the following works: