Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Turn objects into JSON #229

Closed
cannyboy opened this issue May 19, 2016 · 1 comment
Closed

Turn objects into JSON #229

cannyboy opened this issue May 19, 2016 · 1 comment

Comments

@cannyboy
Copy link

It's useful to play with the potential structure of a page, for instance in the init here: https://github.com/hyperoslo/Spots/blob/master/Examples/Apple%20News/AppleNews/Controllers/ExploreController.swift

After playing with the components, i'd like to see how it would appear if pulled from a server as a JSON file.

Is there a way to convert the programmatically created components into JSON?

@zenangst
Copy link
Owner

@cannyboy hey man! Yeah there is, Spotable objects have convenience property called dictionary that gives you a JSON representation of that component.

If you want the entire controller, you have the same property on SpotsController.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants