Skip to content

Conversation

@zenangst
Copy link
Contributor

@zenangst zenangst commented Jun 7, 2016

This PR adds configuration options for NSJSONSerialization.

It can be configured like this;

CacheJSONOptions.writeOptions = .PrettyPrinted

@mention-bot
Copy link

By analyzing the blame information on this pull request, we identified @vadymmarkov to be a potential reviewer

import Foundation

/// A configuration struct
public struct CacheJSONOptions {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zenangst Can it be just JSONOptions ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zenangst Could it be an enum?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah we could totally do that! 😁

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@onmyway133 I added the namespace to scope it as it is global.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zenangst it is OK
Although every "global" is actually under the framework namespace 😬

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is actually true!

@zenangst
Copy link
Contributor Author

zenangst commented Jun 7, 2016

@vadymmarkov @onmyway133 is it okay now?

@vadymmarkov
Copy link
Contributor

@zenangst Please roll back to struct 😄

@zenangst
Copy link
Contributor Author

zenangst commented Jun 7, 2016

@vadymmarkov oh you! :)

@zenangst
Copy link
Contributor Author

zenangst commented Jun 7, 2016

Done

@vadymmarkov
Copy link
Contributor

I got it wrong, thought it like a wrapper, but actually it's a config.

@vadymmarkov vadymmarkov merged commit d6f0b01 into master Jun 7, 2016
@vadymmarkov vadymmarkov deleted the feature/config-for-json-serialization branch June 7, 2016 12:29
@zenangst
Copy link
Contributor Author

zenangst commented Jun 7, 2016

No worries 😁

@vadymmarkov
Copy link
Contributor

@zenangst

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

Successfully merging this pull request may close these issues.

5 participants