docs(capture): omit null object properties during serialization - #60
Merged
Conversation
marandaneto
marked this pull request as ready for review
September 8, 2026 06:28
ioannisj
approved these changes
Sep 8, 2026
Member
Author
|
@eli-r-ph is there anything else against allowing null values for all SDKs? some dont, not sure why |
rorylshanks
approved these changes
Sep 8, 2026
This was referenced Sep 9, 2026
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.
Summary
Require
capture,capture_ai, andcapture_exceptionto omit null/undefined-valued custom object properties during event serialization for the wire or disk-backed event queues/caches. Preserve existing public APIs that already accept those values.{"test": null}serializes as{}. Do not reject the event.["1", null, 2]stays unchanged. JavaScript undefined array entries follow normal JSON serialization as null without shifting positions.false,0, empty strings, and the literal strings"null"and"undefined".before_send, and to serialized events written to disk or restored for delivery.The owner selected object-member omission to align SDK output with planned backend removal. That backend work is still in progress, so this does not claim the backend already removes every null-valued property.
The canonical specs are synced. One consolidated archive contains the full final contract for all three capture methods:
openspec/changes/archive/2026-09-08-preserve-nullable-capture-api/.This PR changes specifications only. SDK implementation, compatibility review, and rollout remain separate. Adopting the contract changes serialized output for SDKs that retain null-valued object members, not the acceptance of previously supported public inputs.
Context: PostHog/posthog-python#926
Validation
origin/main. Consolidation leaves canonical specs and acceptance scenarios unchanged.git diff --checkpassed.origin/mainpassed with no actionable findings on6259b1b.These checks validate the specification files, not SDK/backend conformance. API compatibility was checked statically; SDK compilation and runtime tests were not run.