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

Invalid configuration caused by the library itself? #63

Closed
bi3her opened this issue Jun 25, 2022 · 3 comments
Closed

Invalid configuration caused by the library itself? #63

bi3her opened this issue Jun 25, 2022 · 3 comments

Comments

@bi3her
Copy link

bi3her commented Jun 25, 2022

I don't write the yaml file manually, I use the library to do all that. But, for some reason, the configuration is still wrong?
image
that's the line where the error is.
image
and that's the error. What's the issue here? Keep in mind, this is a List that contains all these elements that I injected into '1'

@Carleslc
Copy link
Owner

Can you provide a code example to reproduce the issue?

@Carleslc
Copy link
Owner

Carleslc commented Aug 1, 2022

I cannot reproduce the issue, please provide your failing code.

Also ensure you're using the latest version of the library.

I was suspicious about using \n in a list element, but I tried and it's working for me with the following code in Simple-Yaml version 1.8:

YamlFile yamlFile = new YamlFile("examples/test63.yml");

yamlFile.createOrLoad();

List<String> list = List.of("749", "1912", "11180 snowballs 25/1\n7 each, 942 candy block", "890");

yamlFile.set("months.1", list);

yamlFile.save();

yamlFile.load();

System.out.println(yamlFile);
months:
  '1':
    - '749'
    - '1912'
    - |-
      11180 snowballs 25/1
      7 each, 942 candy block
    - '890'

@Carleslc
Copy link
Owner

I'm closing the issue for the time being until providing the failing code.

Ensure you're using the latest version.

If you're still having this issue with the latest version then feel free to open the issue again providing more details to reproduce it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants