Skip to content

fix: WriteJson should write data as a JSON value when dataContentType… #1162

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 3, 2025

Conversation

alank-ps
Copy link
Contributor

…=application/cloudevents+json (and batch)

#1161

@alank-ps alank-ps requested a review from a team as a code owner May 28, 2025 06:32
Copy link
Member

@embano1 embano1 left a comment

Choose a reason for hiding this comment

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

Thx, just a nit

@embano1
Copy link
Member

embano1 commented May 28, 2025

Also, you need to -s sign off your commit(s).

@@ -165,7 +165,97 @@ func TestMarshal(t *testing.T) {
"source": "http://example.com/source",
},
},
"struct data v1.0": {
"structured mode data v1.0": {
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you add a test that sends a string that just happens to look like json? Just to make sure it stays a string on both ends.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Are you referring to this test case?

"string data v1.0": {

If so, it is already there and no regression (test still pass ✅ )

Copy link
Member

Choose a reason for hiding this comment

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

I think this is good. Merging.

…=application/cloudevents+json (and batch)

Signed-off-by: Alan Kan <[email protected]>
Copy link
Member

@embano1 embano1 left a comment

Choose a reason for hiding this comment

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

Thx!

@embano1 embano1 merged commit a50d97a into cloudevents:main Jun 3, 2025
9 checks passed
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.

3 participants