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

Will it work for lengthy values? #20

Open
jayudhandha opened this issue Mar 6, 2020 · 1 comment
Open

Will it work for lengthy values? #20

jayudhandha opened this issue Mar 6, 2020 · 1 comment

Comments

@jayudhandha
Copy link

jayudhandha commented Mar 6, 2020

I am converting it my map into yaml.

Map: {management.endpoints.web.exposure.include= health, info, refresh, shutdown, selftest, listProcessors}

Output of code Props2YAML.fromContent(yaml.dump(Map)).convert()

Expected Output:

management:
  endpoints:
    web:
      exposure:
        include: health, info, refresh, shutdown, selftest, listProcessors

Actual Output:

listProcessors: ''
management:
    endpoints:
        web:
            exposure:
                include: health, info, refresh, shutdown, selftest,

Note:

If i remove listProcessors from the map value than it's working fine.

I tried to play with this map in my sample file with below code

Props2YAML pr = new Props2YAML(yaml.dump(Map));

System.out.println(pr.convert());

This is giving me correct output.

Why i can't make it work with the code Props2YAML.fromContent(yaml.dump(Map)).convert() ?(Which is mentioned in README)

Thanks,
Jayesh

@jayudhandha
Copy link
Author

Ok I found the issue,

The issue is with the version of snakeyaml. If we download the zip of Props2YAML version 0.5, It contains the snakeyaml version 1.16.

My above issue is being reproduced when we use snakeyaml version 1.24 (In my case)

Above problme is not being reproduced with snakeyaml 1.16 which is being default shipped with the zip

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

No branches or pull requests

1 participant