← 输入框|github.com|刷新
Skip to content

refactor(models)!: remove the deprecated JsonUtil classes - #493

Merged
dargmuesli merged 1 commit into
betafrom
refactor/models/remove-json-util
Nov 5, 2026
Merged

dargmuesli merged 1 commit into
betafrom
refactor/models/remove-json-util

Conversation

@dargmuesli

Copy link
Copy Markdown
Member

Stacked on #492, which sits on #487. Removes the deprecated JsonUtil API: every model's nested JsonUtil class, their base class AbstractModelObject.JsonUtil and the interface IModelObject.IJsonUtil. All of it was deprecated in 10.x in favour of ModelObjects, and the library itself no longer calls any of it.

PlaylistItemFactory goes with them: its only method took a Gson JsonObject, and that reader now lives in the internal ModelObjectGson, so the model_objects.utils package is no longer exported from the module. MIGRATION.md maps each removed call to its ModelObjects replacement. The JsonObject and JsonArray overloads, and the variants that read a named member of the JSON, have no replacement, because ModelObjects takes the JSON as a String.

This is a breaking change, so the commit carries the ! and the removals are recorded in MIGRATION.md under 10.0.0 to 11.0.0. Verified locally: 426 tests pass, codegen/generate.py --check reports no drift, ci/check-docs.py checks all 115 examples, Javadoc passes doclint, and the examples module compiles.

@dargmuesli
dargmuesli force-pushed the refactor/build/generated-source-root branch from 8df3f20 to 21f14fd Compare November 5, 2026 12:36
Every model's nested JsonUtil, AbstractModelObject.JsonUtil and
IModelObject.IJsonUtil were deprecated in 10.x in favour of ModelObjects and
no longer used by the library. PlaylistItemFactory goes with them: its only
method took a Gson JsonObject, and the reader now lives in the internal
ModelObjectGson, so the model_objects.utils package is no longer exported.

MIGRATION.md maps each removed call to its ModelObjects replacement.

Refs #461
@dargmuesli
dargmuesli force-pushed the refactor/models/remove-json-util branch from acbdd85 to 6c5a6f4 Compare November 5, 2026 12:36
@codecov

codecov Bot commented Nov 5, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 55.55556% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 37.10%. Comparing base (21f14fd) to head (6c5a6f4).

Files with missing lines Patch % Lines
...ichaelthelin/spotify/internal/ModelObjectGson.java 55.55% 2 Missing and 2 partials ⚠️
Additional details and impacted files
@@                            Coverage Diff                             @@
##             refactor/build/generated-source-root     #493      +/-   ##
==========================================================================
+ Coverage                                   35.82%   37.10%   +1.27%     
  Complexity                                    509      509              
==========================================================================
  Files                                         107      106       -1     
  Lines                                        4446     4282     -164     
  Branches                                      205      196       -9     
==========================================================================
- Hits                                         1593     1589       -4     
+ Misses                                       2763     2603     -160     
  Partials                                       90       90              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Base automatically changed from refactor/build/generated-source-root to beta November 5, 2026 12:38
@dargmuesli
dargmuesli merged commit ee9c365 into beta Nov 5, 2026
6 checks passed
@dargmuesli
dargmuesli deleted the refactor/models/remove-json-util branch November 5, 2026 12:41
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