-
Notifications
You must be signed in to change notification settings - Fork 19
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
[QUESTION] Should I remove JSON parser code? #51
Comments
Hey there, This is a proposal, where you could keep (and maybe simplify) your JsonObject interface JSONParser {
JsonObject marshall(byte[] bytes) throws JsonParsingError;
byte[] unmarshall(JsonObject jsonObject);
} For instance I'm using Vert.x and Jackson. I'd really like to have the ability to add Jackson in my classpath and provide VaultConfig a Jackson JSON parser impl. var parser = new JacksonJSONParser();
vaultConfig.jsonParser(parser); For this project, it is a provided dependency for out-of-box supported parser (you mentioned two), and yes an implementation. For the user it is adding a dependency of there choice (and possibly a default one) in order to use it. You could apply the same for Happy to chat about it if you want. |
I second @benoitgravitee and believe an interface would provide the best compatibility without breaking existing implementations. I would propose keeping the current json-minimal code within the library but implementing an additional interface that would allow people to configure with a JSON library they wish to use (be it Jackson Databind, GSON) while defaulting to json-minimal if no external JSON library is configured. I'm happy to contribute some code that will test this and implement the appropriate interface and drivers for the Jackson Databind library and json-minimal library. |
According to codebase, the JSON parser code is injected from json-minimal project. Although this permits to maintain the zero-dependency promise, this creates two problems:
For these reasons, I want to break the zero-dependency promise and remove this code. As substitude, I want to use one of these two libraries:
Choice of one of these two libraries is made considering the low impact in terms of third party dependencies that they have. Major concerns are:
Any suggestion would be appreciated
The text was updated successfully, but these errors were encountered: