Skip to content

Conversation

@hetzge
Copy link

@hetzge hetzge commented Jun 2, 2022

No description provided.

@bolerio
Copy link
Owner

bolerio commented Oct 4, 2024

Apologies for the late response. Project was in a bit of hiatus, but will pick it up in a bit more active maintenance now. I think this could be useful, but I'd have some changes to suggest:

  1. The pattern for adding new methods is to throw UnsupportedOperationException instead of declaring abstract methods.
  2. Indentation is often very helpful when serialization JSON, so I would be nice to have that as an option. To make this and other options really optional, the method could be declared with a variable number of arguments: write(Object...options) which would also open the door for other options in the future.

Let me know if you are interested in making these amendments?

And thanks so much for the effort! In general I'd very reluctant to be adding new methods to the API, I'd prefer to have some design for an "extended library" where other utiities could go, but this one comes up often enough and is very practical in APIs etc.

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.

2 participants