Skip to content

CborShapeSerializer#3871

Merged
pulimsr merged 6 commits into
mainfrom
schema-serde
Jul 22, 2026
Merged

CborShapeSerializer#3871
pulimsr merged 6 commits into
mainfrom
schema-serde

Conversation

@pulimsr

@pulimsr pulimsr commented Jul 20, 2026

Copy link
Copy Markdown
Collaborator

Check all that applies:

  • Did a review by yourself.
  • Added proper tests to cover this PR. (If tests are not applicable, explain.)
  • Checked if this PR is a breaking (APIs have been changed) change.
  • Checked if this PR will not introduce cross-platform inconsistent behavior.
  • Checked if this PR would require a ReadMe/Wiki update.

Check which platforms you have built SDK on to verify the correctness of this PR.

  • Linux
  • Windows
  • Android
  • MacOS
  • IOS
  • Other Platforms

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@pulimsr
pulimsr marked this pull request as ready for review July 21, 2026 14:26
Comment thread src/aws-cpp-sdk-core/source/smithy/client/schema/CborShapeSerializer.cpp Outdated
m_encoder.WriteText(Aws::Crt::ByteCursorFromArray(reinterpret_cast<const uint8_t*>(value.data()), value.size()));
}

void WriteTimestamp(const Schema& schema, const DateTime& value) {

@sbiscigl sbiscigl Jul 21, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should prolly keep this like the way we had it initially i.e. from the protocol test

just so that we are not changing the wire format at all and using what we did before. so this would become

void WriteTimestamp(const Schema& schema, const DateTime& value) {
  WriteFieldName(schema);
  encoder.WriteTag(1);
  encoder.WriteUInt(item_0.Seconds());
}

this way it stays exactly the same

private:
Aws::Crt::Cbor::CborEncoder m_encoder;
int m_depth = 0;
Aws::Array<bool, MAX_DEPTH> m_isMap{};

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

they already bounds check for us so i would just remove all bounds checking logic and fall back to theirs. also then we save logic and space on the object

@pulimsr
pulimsr enabled auto-merge July 22, 2026 17:43
@pulimsr
pulimsr disabled auto-merge July 22, 2026 20:13
@pulimsr
pulimsr added this pull request to the merge queue Jul 22, 2026
Merged via the queue into main with commit 94d5512 Jul 22, 2026
3 of 6 checks passed
@pulimsr
pulimsr deleted the schema-serde branch July 23, 2026 18:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants