Provide a stripped down library for just the simplest object support
Currently, when trying to use snakeyaml in our application with a minimal JRE 10 it fails because java.sql.Date is required (though not used by our application).
I would appreciate it to have a stripped down snakeyaml library that only supports the core objects like json-simple (primitives, List, Map) and move all the other, more advanced stuff to a separate library.
Comments (13)
-
-
reporter I'm using SnakeYAML 1.1 and according to my knowledge SQL is not part of SnakeYAML, so it should not have a dependency on it - especially where Java 9+ allows to create stripped down JREs. Of course, it would be possible to add the SQL dependency to our project's JRE, but this sounds odd to me if it is just to make a third-party library happy without actually using any SQL/database code.
-
SnakeYAML supports Java 6 and java.sql is part of JDK 6. java.sql was included because SnakeYAML must parse !!timestamp tag, which is a part of YAML 1.1 spec. Removing java.sql would break backwards compatibility.
What is the reason not to switch to SnakeYAML engine and get support for YAML 1.2 ?
-
reporter Thank you for the explanation. Regarding the timestamp tag - why this is no java.util.Date, but a java.sql.Date (except of backward compatibility)?
I have used SnakeYAML instead of SnakeYAML Engine because it provides all what we need (and even more) and seems to actively been developed. I'll give SnakeYAML Engine a try.
-
SnakeYAML supports both java.sql.Date and java.util.Date
-
reporter OK, I have switched now to SnakeYAML Engine and it works fine without the java.sql.Date dependency.
Thank you very much for your effort and the support in this ticket which now became obsolete.
-
Do you work on an OpenSource project ? Can you share your experience in a blog to help others to migrate to SnakeYAML Engine ?
-
reporter I'm not opening on OpenSource projects, but I'm happy to share my positive experience with SnakeYAML Engine.
-
I mean if you can expose the instructions to migrate you can save a lot of time for other users.
-
Support java.sql classes without the need to depend on java.sql module in java9+ Fixes
#422→ <<cset 085289d24b52>>
-
Hello! Thanks a lot for this fix! As far as I understand, this fix is not in a released version yet. Would be great if we can get a release out.
Thanks again!
-
Next month - Feb 2019
-
Thanks!
- Log in to comment
SnakeYAML Engine is a YAML 1.2 processor for the Java Virtual Machine version 8 and higher.
Feedback is welcome !