How to de/serialize an instance from/to Json/Yaml with dynamically typed attribute
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 20/100
- Loại issue
- Tài liệu
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- java
- Lĩnh vực
- documentation
Hướng nghiên cứu
No repository files or tests are named. Start with the Java example in the issue and read the linked Stack Overflow and Baeldung references; document a reproducible answer covering serialization and deserialization of dynamically typed attributes in JSON or YAML.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
public class FlowExecutor {
private String flowName;
@JsonTypeInfo(use = JsonTypeInfo.Id.CLASS, property = "className")
private List<PreProcessor> preProcessors;
@JsonTypeInfo(use = JsonTypeInfo.Id.CLASS, property = "className")
private List<PostProcessor> postAnalyzers;
}
public interface PreProcessor {
void process(Request request, Context context);
}
YAMLFactory f = new YAMLFactory();
f.disable(YAMLGenerator.Feature.USE_NATIVE_TYPE_ID);
ObjectMapper mapper = new ObjectMapper(f);
String config = mapper.writeValueAsString(executor);
see:
https://stackoverflow.com/questions/55008706/how-to-de-serialize-an-instance-with-dynamically-typed-attribute
https://www.baeldung.com/jackson-inheritance
- Ngôn ngữ chính
- Python
- Star
- 5
- Fork
- 2
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của davideuler/programming-tips
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 35/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 35/100
-
list tags for docker imageĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 35/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 45/100
-
build milvus on MacĐang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
Tất cả issue của davideuler/programming-tips
Issue tương tự
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
jbacalso24/mimry#291 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
good first issue
Độ khó 2/5 Dưới một giờ Mức phù hợp với người mới 82/100
eli-alvarado/us-watchlist-alerts#14 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
from-review-extraction python severity:nit
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 80/100
LearningCircuit/local-deep-research#7462 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
mermaid_extract.py silently discards single-line state-diagram notes; sequence notes are keptĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
cathrynlavery/diagram-design#441 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
[Cleanup] Include the public header in work_split.cppCó thể đã có người làm @blozano-tt đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
tenstorrent/tt-metal#60850 ·
Maintainer thường phản hồi trong vòng 1 ngày