adobe / adobe/aepsdk-edge-android
JSON comparison system - refactor APIs to only allow valid JSON types
- Dominant language
- Java
- Stars
- 5
- Forks
- 15
- Avg merge
- 32m
- Merged PRs (30d)
- 3
Description
### Task description
Currently the JSON comparison assertion public APIs are too permissive where they allow for any incoming types:
1. It's more confusing at the call site what types to use
2. It allows for known invalid comparisons (at the call site)
An immediate solution could be only allowing `JSONObject` == `JSONObject` and `JSONArray` == `JSONArray` comparisons as the API param types
A future looking solution could be something like creating a sealed class (that works like a union type) that can create a better type interface for mixing and matching types, especially if the feature of allowing custom validation start point paths is implemented
### Additional implementation details or code snippet(s)
_No response_
Contributor guide
Research direction
No files, tests, or entry points are named in the issue. Start by locating the JSON comparison assertion APIs and their callers, then determine which parameter types are currently accepted. Done means the public APIs reject invalid JSON-type comparisons while valid JSONObject and JSONArray comparisons remain covered by tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- testing
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100