snakeyaml Questions
3
I'm using SnakeYAML 2.0 to parse YAML files in Java. But I face a problem here. This is my User class:
package ir.sharif;
import java.util.ArrayList;
import java.util.List;
public class User {
i...
3
I am using snakeyaml library to parse yaml files, and dump it later from xml. I was wondering if there is any way to control final yaml indentation. For example, list in final file will look like t...
3
Solved
I have YAML file like this..
Product:
ProductA:
Suite:
SuiteName_A:
Environment_1: ["A","B","C"]
Environment_2: ["X","Y","Z"]
Suite...
4
Solved
Im my project we are using spring boot 2.6.6 version. When I run the below test class separately I am getting below error.
java.lang.NoSuchMethodError: 'void org.yaml.snakeyaml.LoaderOptions.setMax...
Willie asked 13/7, 2022 at 6:2
4
How can we modify an existing YAML and preserve comments in it.
Is there any Java parser which does that ?
For example if i have following YAML:
#This is a test YAML
name: abcd
age: 23
#Test YA...
5
Solved
I want to read a YAML document to a map of custom objects (instead of maps, which snakeYaml does by default). So this:
19:
typeID: 2
limit: 300
20:
typeID: 8
limit: 100
Would be loaded to a ...
5
SnakeYaml jar present at classPath: snakeyaml-1.26.jar
2330 [main] ERROR org.springframework.boot.SpringApplication - Application run failed
java.lang.NoSuchMethodError: org.yaml.snakeyaml.Yaml.<...
Flange asked 29/11, 2021 at 11:44
4
Solved
Consider the following code:
public static void dumpObjectToYaml(String key, Object O, String path) throws IOException
{
Map<String, Object> data = new HashMap<>();
data.put(key, O)...
Darren asked 25/7, 2014 at 6:38
3
Solved
This code will output:(YAML)
--- !!org.test.bean.Person
address: 4011 16th Ave S
.....
Can hide my bean type(org.test.bean.Person) anyway !?
(prefer to use snakeyaml config...i can't find it..)...
2
I am using SnakeYaml to parse yaml file, is there anyway to ignore properities from the yaml file ?
1
Solved
I see there is reference to snakeyaml 2.0 in the bugfixes of the new SPringBoot release 3.10-M2 & the older version, but when we look at the source code, we see that the snakeyaml library versi...
Aleurone asked 28/3, 2023 at 19:22
2
Solved
I've been trying to deserialize the following yaml to a List<Stage> using SnakeYaml:
- name: Stage1
items:
- item1
- item2
- name: Stage2
items:
- item3
public class Stage {
priv...
4
Solved
Have springboot project in which wanted to either exclude snakeyaml 1.30 or upgrade it 1.31 inorder to avoid fortify issue reporting
with snakeyaml 1.30 version there is security vulnerability
<...
Shopper asked 13/9, 2022 at 18:32
5
I want to read a list of hosts from a yaml file (application.yml), the file looks like this:
cors:
hosts:
allow:
- http://foo1/
- http://foo2/
- http://foo3/
(Example 1)
My class used def...
Technocracy asked 27/10, 2015 at 13:52
4
I have the following in YAML:
key1
key2: "value"
key1
key2
key3: "value2"
Get exception duplicate key key1.
Caused by: org.yaml.snakeyaml.parser.ParserException: while pars...
Suzerainty asked 6/12, 2017 at 6:39
4
Solved
./gradlew test
Task :compileTestJava FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':compileTestJava'.
> Could not find snakeyaml-1.27-android.ja...
4
When decrypting I get following error:
$ eyaml decrypt -s 'ENC and the key goes on here'
.gnupg --quiet --no-secmem-warning --no-permission-warning --no-tty --yes --decrypt)
failed with: gpg: S...
Whisper asked 29/7, 2016 at 12:43
1
Solved
I have a yaml file, for example:
# this is the part I don't care about
config:
key-1: val-1
other-config:
lang: en
year: 1906
# below is the only part I care about
interesting-setup:
port: 1234...
1
Solved
I'm trying to figure out how to fine control a specific feature in SnakeYaml (local tags).
Unfortunately, I seem to be unable to find a project homepage or the repository of Snake Yaml?
All referen...
4
Solved
When I parse config.yaml using SnakeYaml 1.14 I get a "Class not found exception". The following is the code used for parsing. I have used maven to build the project.
public class AppConfiguratio...
3
Solved
I have the following method which I use to get the object converted to yaml representation (which I can eg. print to console)
@Nonnull
private String outputObject(@Nonnull final ObjectToPrint pack...
2
I have a YAML configuration file with a map of properties:
properties:
a.b.c: 1
Boot will parse this as:
{a:{b:{c:1}}}
However, what I desire is :
{'a.b.c': 1}
Is there anyway to coax it ...
Decode asked 28/4, 2014 at 20:40
3
Solved
I am trying to read config.yaml file using the snakeYaml library in java.
I am able to get the Module name (i.e [{ABC=true}, {PQR=false}]) in my config file.
Is there a way where I can directly re...
3
I have a YAML file in my directory and I want to validate the YAML file was in correct structure using java programming. In online it having lot of YAML checker but I want to validate that on java ...
2
Solved
Let's say we have a configuration properties class:
@ConfigurationProperties(prefix = "whitespace.test")
public class WhitespaceTestConfig {
private Map<String, String> configs;
public M...
Adrien asked 4/9, 2019 at 21:15
1 Next >
© 2022 - 2024 — McMap. All rights reserved.