add shorthand functions for serialization
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 30/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- python
- Lĩnh vực
- backend-api-design
Hướng nghiên cứu
Bắt đầu bằng cách đọc các yêu cầu trong microsoft/kiota#3406 và kiểm tra các abstraction hiện có cho việc tuần tự hóa/giải tuần tự hóa model và collection. Xác định các helper cho string và stream được hỗ trợ, các biến thể content-type và JSON, các đường dẫn reflection hoặc callback, đồng thời xác nhận rằng toàn bộ API được bao phủ mà không có xung đột tên.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
to facilitate serialization and deserialization of models and collections of models, we're adding static helper functions.
More details to be found at https://github.com/microsoft/kiota/issues/3406
For serialization we need:
- Serialize(contentType, model): string
- Serialize(contentType, model): stream
- SerializeCollection(contentType, models): string
- SerializeCollection(contentType, models): stream
- Serialize(model): stream (maps to same one passing the json content type as a constant)
- Serialize(model): string (same)
- Serialize(models): stream (same)
- Serialize(models): string (same)
Note: if converting from stream to string is trivial we can ommit the string overloads
Note: if another parameter for the serialization method needs to be added, feel free to do so
Note: if both a string and and stream method need to be added, but can't have the same name, name the string methods with AsString suffix
Note: if the Json methods and the ones accepting the same content type can't have the same namde/would need to be aliased in the consuming code to avoid conflicts, as a ToJsonSuffix (full convention with string SerializeCollectionToJsonAsString)
For deserialization we need:
- Deserialize(contentType, stream, createTFromDiscriminatorMethod): T
- Deserialize(contentType, string, createTFromDiscriminatorMethod): T
- Deserialize(contentType, stream): T (uses reflection, only if possible, calls into the previous one)
- Deserialize(contentType, string): T (same)
- DeserializeCollection(contentType, stream, createCallback): T[]
- DeserializeCollection(contentType, string, createCallback): T[]
- reflection version x2
- Json equivalent with constant for all the previous
Note: the same notes as serialization apply
Note: if the collection and single methods can have the same name, make them same
- Ngôn ngữ chính
- Python
- Star
- 31
- Fork
- 39
- Merge trung bình
- 13 giờ 21 phút
- Pull request đã merge (30 ngày)
- 46
Hướng dẫn đóng góp
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 microsoft/kiota-python
-
help wanted type:bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
microsoft/kiota-python#477 · 2 bình luận ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
microsoft/kiota-python#745 ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
microsoft/kiota-python#744 · 1 bình luận ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 72/100
microsoft/kiota-python#737 · 1 bình luận ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
microsoft/kiota-python#722 · 1 bình luận ·
Tất cả issue của microsoft/kiota-python
Issue tương tự
-
triage/confirmed
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
agentscope-ai/agentscope#2775 ·
-
comp/desktop P3 type/bug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
NousResearch/hermes-agent#118866 ·
-
bug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
apache/cloudstack#14222 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100