Skip to content

Conversation

@rerorero
Copy link

@rerorero rerorero commented Oct 3, 2025

This PR fixes an issue with Context.EmbedObject() that produces invalid JSON when

  • the given object's MarshalZerologobject adds no fields (empty object)
  • and the parent context has existing fields.

When MarshalZerologObject adds no fields (e.g., all fields are conditionally skipped), an extra comma is inserted:

  {"level":"info","parent_field":"parent_value",,"message":"test"}

@rerorero rerorero marked this pull request as ready for review October 3, 2025 15:23
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.

1 participant