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

Provide static factory methods for JsonArray #12

Closed
ralfstx opened this issue May 15, 2013 · 2 comments
Closed

Provide static factory methods for JsonArray #12

ralfstx opened this issue May 15, 2013 · 2 comments
Labels

Comments

@ralfstx
Copy link
Owner

ralfstx commented May 15, 2013

Ideally, these factory methods should support varargs. Not sure about the method name.

JsonArray.createArray( 1, 2, 3 );

Or should the methods go to JsonValue to be next to valueOf( ... )?

JsonValue.createArray( "a", "b", "c" );

Or on a Util class like so:

Json.createJsonArray( 1, 2, 3 );
@sbandara
Copy link

For the sake of keeping minimal-json minimal, a util class Json would look the very least attractive to me. Since you already have collection type-specific factories such as JsonArray.readFrom, my favorite would be JsonArray.createArray. Need an assignee?

@ralfstx
Copy link
Owner Author

ralfstx commented Jun 2, 2015

@sbandara Actually, I have this idea of a Json class for quite some time and find it more and more appealing for the reasons outlined in #52.

Need an assignee?

Implementation is the least of all efforts, but I'm thankful for thoughts and discussion!

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

No branches or pull requests

2 participants