krasa / StringManipulation

IntelliJ plugin - https://plugins.jetbrains.com/plugin/2162
Apache License 2.0
699 stars 81 forks source link

Fix #188 - preserve timestamps format when converting from YAML to JSON #192

Closed m-radzikowski closed 1 year ago

m-radzikowski commented 1 year ago

Fixes #188

SnakeYAML tries to be clever and detect data types, converting timestamps to Date. Then it's serialized to JSON in another date format.

This fix overrides the SnakeYAML config with a custom Resolver that does not detect timestamps and leaves them as a string.

krasa commented 1 year ago

Awesome, thanks!