refactor(android): replace Gson with org.json in SQLHTTPServer
Merged
RI
3d ago+592+592+012345678901234567890123456789-74-74-01234567890123456789
What
- Parse
/executeand/batchHTTP request bodies withorg.jsoninstead of Gson inSQLHTTPServer. - Centralize SQL param conversion in
HttpRequestJsonParams(null, bool, string, number truncation, nested objects). - Remove
com.google.code.gson:gsonfromandroid/build.gradle. - Add JVM unit tests for param parsing semantics.
- Pin all GitHub Actions
uses:references to latest major tags (no SHAs or patch versions).
Why
- Drop an extra dependency; Android already ships
org.json. - Keep HTTP SQL param behavior unchanged for existing clients.
- Align CI workflows with repository action pinning policy.
How
JSONObject/JSONArrayfor request parsing (malformed JSON still surfaces as request errors via existing exception handling).- Number params use Gson-compatible
getAsLonglogic (parse as long, else truncate viadouble) withgetAsDoublefallback onNumberFormatException. - Object params still coerce field values with
getAsString-equivalent semantics. - Workflow updates:
actions/checkout@v7,actions/setup-node@v7,actions/setup-java@v6,softprops/action-gh-release@v3, patch/SHA pins removed.
Testing
HttpRequestJsonParamsTest(null, bool, string, int, decimal truncation, object fields, skipped arrays, malformed JSON).- CI:
bun run verify(Android Gradle build/test, iOS, web).
Not Tested
- Live device HTTP integration against a running
SQLHTTPServerinstance (covered indirectly by existing plugin flows).


Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.
Summary by CodeRabbit
- Bug Fixes
- Android HTTP requests handle JSON parameters—including nulls, booleans, strings, numbers, and flat object values—with more consistent results. Decimal numbers retain compatible conversion behavior; unsupported nested values remain unavailable as request parameters.
- Chores
- Updated the tooling used for automated builds, tests, releases, publishing, and deployments. Workflow triggers, build steps, and configured Node.js versions remain unchanged.