Invalid serialization if single double quotation mark is present
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 45/100
Research direction
Start by reproducing the YAML serialization shown in the issue with the provided Java TestSettings configuration, focusing on how a lone double quotation mark is read across the next field. Done means the following field remains separate and the serialized output preserves both values and comments instead of consuming the next key.
Written by the indexing model from the issue text.
Description
If you insert only one double quotation mark in the field like this:
test-section:
# Some description for this test value1
value-test: "
# Some description for this test value2
value-test-2: "test2"
The result of the serialization will be as follows:
test-section:
# Some description for this test value1
value-test: " # Some description for this test value2 value-test-2: "
# Some description for this test value2
value-test-2: "test2"
It looks like reader keeps looking for the next double quote even when the next field starts.
Configuration used:
public class TestSettings extends YamlSerializable {
@Transient
private static final SerializerConfig CONFIG = new SerializerConfig.Builder()
.setCommentValueIndent(1)
.build();
@Transient
public static final TestSettings IMP = new TestSettings();
public TestSettings() {
super(CONFIG);
}
public TEST_SECTION TEST_SECTION = new TEST_SECTION();
public static class TEST_SECTION {
@Comment(value = {
@CommentValue("Some description for this test value1"),
}, at = Comment.At.PREPEND)
public String VALUE_TEST = "test1";
@Comment(value = {
@CommentValue("Some description for this test value2"),
}, at = Comment.At.PREPEND)
public String VALUE_TEST2 = "test2";
}
}
- Dominant language
- Java
- Stars
- 27
- Forks
- 4
- PR merge metrics
- No merged PRs in 30d
Getting set up
We have not checked this project's setup files yet. Start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Elytrium/java-serializer
-
Difficulty 3/5 1-2 days Newbie friendliness 50/100
-
Kotlin features?Open
Difficulty 5/5 Over a week Newbie friendliness 25/100
Elytrium/java-serializer#1 · 1 comment · 2 reactions ·
All issues in Elytrium/java-serializer
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
oracle/javavscode#652 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
OpenAPITools/openapi-generator#25014 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
AloisSeckar/demos-java#380 ·