Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Invalid serialization if single double quotation mark is present

Open
#2 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
java
Domain
backend

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Elytrium/java-serializer

All issues in Elytrium/java-serializer

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.