mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2026-10-05 11:18:24 +00:00
Follow-ups from the branch audit: - Adds commons/util/JsonTreeUtils.kt: one shared set of total, null-safe JsonObject accessors (parseJsonObjectOrNull, stringOrNull, intOrNull, longOrNull, doubleOrNull, booleanOrNull, objectOrNull, withString) for ad-hoc JSON trees. Replaces the two near-identical private sets this branch had introduced (nappletHost's JsonEnvelope.kt, now deleted, and EmbeddedImeBridge's file-local helpers) and FeedDefinitionSerializer's identical bool/int/long copies. FeedDefinitionSerializer keeps its deliberately stricter isString-guarded string(), now documented, and NappletProtocolJson keeps its throwing accessors (rejecting malformed input at the trust boundary is its job). Quartz's copies stay: quartz cannot depend on commons. - Adds EmbeddedImeBridgeTest (16 JVM tests) pinning parseImeEvent / parseSelectionGeometry: per-event parsing, defaulting of absent fields, the total-accessor behavior for mistyped fields, and the ime.resync envelope. This parser became JVM-testable when it moved off Android's org.json; the browser suite in tools/ime-test still owns the page side. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AVcZwp65oybotmq5o66foW