Repository navigation
INTERNAL: Convert metadata between JSON and BSON - #15
Draft
ing-eoking wants to merge 1 commit into
Draft
ing-eoking wants to merge 1 commit into
ing-eoking wants to merge 1 commit into
Conversation
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. CodeRabbit Verify
|
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🔗 Related Issue
develop에 바로 올립니다.⌨️ What I did
메타데이터를 전송할 때는 JSON 객체로, 엔진에 저장할 때는 BSON 문서로 다룹니다.
src/bson.rs가 둘 사이를 변환합니다.bsoncrate(MongoDB 공식 구현)와serde_json을 의존성에 추가했습니다.serde_json의preserve_order를 켜서 JSON → BSON → JSON을 거쳐도 키 순서가 그대로 유지됩니다.from_json: JSON 객체를 BSON 문서로 바꿉니다.{"$numberLong":"5"}는 int64 5로 저장됩니다.{"$date":..,"a":..}도 날짜가 아닌 일반 객체로 처리합니다.to_json: BSON 문서를 공백 없는 JSON으로 바꿉니다. relaxed extended JSON을 쓰므로from_json으로 저장한 값은 일반 JSON으로 돌아옵니다. 소수점이 있는 double은1.0처럼 소수부를 유지합니다.#[expect(dead_code)]로 표시했습니다.에러
CLIENT_ERROR bad valueSERVER_ERROR internal