Elytrium / Elytrium/java-serializer

Invalid serialization if single double quotation mark is present

Đang mở
#2 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Java
Star
27
Fork
4
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

If you insert only one double quotation mark in the field like this:
```yaml
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:
```yaml
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:
```java
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";

}
}
```

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Hướng nghiên cứu

Bắt đầu bằng việc tái hiện quá trình tuần tự hóa YAML được hiển thị trong issue bằng cấu hình Java TestSettings đã cung cấp, tập trung vào cách một dấu ngoặc kép đơn lẻ được đọc xuyên qua trường tiếp theo. Được xem là hoàn tất khi trường tiếp theo vẫn tách biệt và đầu ra đã tuần tự hóa giữ nguyên cả hai giá trị và các chú thích thay vì tiêu thụ khóa tiếp theo.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
java
Lĩnh vực
backend
Loại issue
Lỗi
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
45/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.