Parse the pushed record of the charts example with JSON.parse - #1649
Merged
Merged
Conversation
The WebSocket charts example parsed every pushed message with jQuery.parseJSON. jQuery 4 removed that function, and master now uses jQuery 4 by default, so each push threw "TypeError: jQuery.parseJSON is not a function" and the chart was no longer updated. With the jQuery-free Ajax engine selected, jQuery is not loaded at all and the same line failed with a ReferenceError. JSON.parse is what jQuery.parseJSON delegated to in jQuery 3, so the example behaves as before with either jQuery version and either engine. GitHub issue #1647 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
reiern70
approved these changes
Oct 5, 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.
Fixes #1647.
The WebSocket charts example parsed every pushed message with
jQuery.parseJSON, which jQuery 4 removed. Master now defaults to jQuery 4, so every push threwTypeError: jQuery.parseJSON is not a functionand the chart stopped updating. With the jQuery-free engine selected, jQuery isn't loaded at all. This PR usesJSON.parseinstead, which works with either jQuery version and either engine.Checked in headless Chrome by loading the real
charts.jswith jQuery 4, the default engine and a stubbed Google Charts loader, then publishing a/websocket/message. Master's version throws; the fixed one draws the pushed record. I did not run the example itself in Jetty.mvn clean verify -Pjs-testis green.🤖 Generated with Claude Code