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

Refactor JSON API into own Module #229

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

BjoernAkAManf
Copy link

This PR should not be merged as is and is simply a basic design that could be leveraged in the future. I did not document alot of the new functions, because most of them simply wrap the already existing methods / refactor them into new interfaces. This would allow to swap between implementations easily.

This PR is directly in contrast to #190 due to the nature of this PR. While i agree, that supporting Jackson is a good thing, i would kindly disagree, to simply switch the whole code base into a new model that is not backed by any standard (Obligatory XKCD).

See #37 #189 for more context to this issue.

JSON is widespread and many applications leverage it already. Adding support for Schemas to a existing Solution might cause some hindrance due to the various Json Implementations (e.g. Gson, org.json, jackson) currently existing. Relying on a specific JSON implementation requires consuming parties to choose between libraries that support their own library or write conversion code from and to a library of their choice.

This work tries to introduce a new modular design, without breaking any existing code relying on org.json. After rewriting the Infrastructure it might be a good idea to remove some/all deprecation though.

Signed-off-by: Bjoern Heinrichs <bjoern@heinrichs.pro>
@erosb
Copy link
Contributor

erosb commented Oct 22, 2018

Hello @BjoernAkAManf ,

Thank you for putting effort into this PR. This is the 3rd attempt (see #190 and #220 ) to abstract the library away from org.json. We should spend time on taking the best of all three and have a solid solution for the problem.

@BjoernAkAManf
Copy link
Author

BjoernAkAManf commented Oct 22, 2018

I most certainly agree. For that we should define goals first. Such as backwards compatibility as a priority or not. I noticed many problems with the latter due to many public methods exposed, that some client might depend on. So it would be good idea to limit them in the future, define a deprecation strategy and remove / hide such methods.

Edit: Also a huge thank you for this library. Integration was very easy in my products.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.5%) to 92.099% when pulling 8e47194 on BjoernAkAManf:master into e24e578 on everit-org:master.

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.

None yet

3 participants