Skip to content

[matter] Map JS undefined to Java Null#20096

Merged
lsiepel merged 1 commit intoopenhab:mainfrom
digitaldan:matter-json-undefined-values
Jan 24, 2026
Merged

[matter] Map JS undefined to Java Null#20096
lsiepel merged 1 commit intoopenhab:mainfrom
digitaldan:matter-json-undefined-values

Conversation

@digitaldan
Copy link
Copy Markdown
Contributor

Fixes #20032

This is a candidate for backporting.

Fixes openhab#20032

Signed-off-by: Dan Cunningham <dan@digitaldan.com>
@digitaldan digitaldan marked this pull request as ready for review January 18, 2026 17:04
@digitaldan digitaldan requested a review from Copilot January 18, 2026 17:04
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes a bug in the Matter binding where JavaScript undefined values were being incorrectly serialized as the string "undefined" in JSON, causing interoperability issues with the Java layer which expects JSON null values.

Changes:

  • Updated the JSON serializer to map JavaScript undefined to JSON null instead of the string "undefined"

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@lolodomo
Copy link
Copy Markdown
Contributor

If necessary I can test that with the test mode of my smoke sensor.

@lolodomo lolodomo closed this Jan 19, 2026
@lolodomo lolodomo reopened this Jan 19, 2026
@lsiepel lsiepel added the bug An unexpected problem or unintended behavior of an add-on label Jan 24, 2026
Copy link
Copy Markdown
Contributor

@lsiepel lsiepel left a comment

Choose a reason for hiding this comment

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

Thanks, LGTM

@lsiepel lsiepel merged commit c97515b into openhab:main Jan 24, 2026
10 checks passed
@lsiepel lsiepel added this to the 5.2 milestone Jan 24, 2026
lsiepel pushed a commit that referenced this pull request Jan 24, 2026
Fixes #20032

Signed-off-by: Dan Cunningham <dan@digitaldan.com>
@lsiepel lsiepel added the backported A PR that has been cherry-picked to a patch release branch label Jan 24, 2026
Merlin10437 pushed a commit to Merlin10437/openhab-addons that referenced this pull request Mar 24, 2026
Fixes openhab#20032

Signed-off-by: Dan Cunningham <dan@digitaldan.com>
Signed-off-by: Merlin10437 <152161717+Merlin10437@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backported A PR that has been cherry-picked to a patch release branch bug An unexpected problem or unintended behavior of an add-on

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[matter] Exception when using the test button of my Heiman smoke detector

4 participants