Skip to content

Conversation

@lemnik
Copy link
Contributor

@lemnik lemnik commented Aug 18, 2025

Goal

Reduce the SDK size by replacing our vendored copy of dsl-json with a first-party JSON parser

Design

Our dsl-json code was largely used to parse JSON files for OnSendCallbacks. The new JsonCollectionParser direclty parses the UTF-8 bytes directly into Java collection classes (which is what we used dsl-json for).

This approach allows us to:

  • retain JVM testing without needing additional mocking for JSON parsing
  • retain parsing / mapping behaviour for downstream SDKs (Flutter, ReactNative)
  • avoid depending on OS JSON parsers
  • not introduce any new dependencies

Testing

Minor changes to existing tests, most code should be unaware of this change.

This PR does introduce some new fixtures to stress-test the JSON parsing.

@bugsnagbot
Copy link
Collaborator

bugsnagbot commented Aug 18, 2025

Android notifier sizes

Format Size impact of Bugsnag (kB) Size impact of Bugsnag when Minified (kB)
APK 1894.42 1635.23
arm64_v8a 704.77 442.63
armeabi_v7a 647.43 385.29
x86 774.38 516.34
x86_64 749.82 487.67

Generated by 🚫 Danger

@lemnik lemnik marked this pull request as ready for review August 29, 2025 07:49
YYChen01988
YYChen01988 previously approved these changes Sep 2, 2025
Copy link
Contributor

@YYChen01988 YYChen01988 left a comment

Choose a reason for hiding this comment

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

LGTM

yousif-bugsnag
yousif-bugsnag previously approved these changes Sep 2, 2025
Copy link
Contributor

@yousif-bugsnag yousif-bugsnag left a comment

Choose a reason for hiding this comment

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

nice! LGTM

@lemnik lemnik dismissed stale reviews from yousif-bugsnag and YYChen01988 via 834e695 September 12, 2025 15:33
@lemnik lemnik force-pushed the PLAT-14670/remove-dsljson branch from 5917c57 to 834e695 Compare September 12, 2025 15:33
@lemnik lemnik merged commit d9dba5d into next Sep 15, 2025
53 checks passed
@lemnik lemnik deleted the PLAT-14670/remove-dsljson branch September 15, 2025 14:42
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.

6 participants