adobe / adobe/aepsdk-edge-android

JSON comparison system - Add new param to allow custom validation start point in JSON hierarchy

Open
#120 0 comments 0 reactions 0 assignees View on GitHub
feature-request triage-required
Dominant language
Java
Stars
5
Forks
15
Avg merge
32m
Merged PRs (30d)
3

Description

### Prerequisites

- [X] This is not a Security Disclosure, otherwise please follow the guidelines in [Security Policy](https://github.com/adobe/aepsdk-edge-android/security/policy).
- [X] I have searched in this repository's issues to see if it has already been reported.

### Feature request summary

Enabling the ability to specify a custom starting point in the `actual` side JSON hierarchy will allow test writers to make the testing intent more clear:
1. The `actual` JSON does not have to be manipulated
2. The `expected` JSON does not need wrapper containers to match the hierarchy of `actual`

This supports the use case of test case validation that is only interested in a specific child node in the JSON hierarchy onwards. With the change, the user no longer has to maintain the JSON hierarchy outside of what they actually want to validate

### Current behavior

For example, in the current system given
`actual`
```json
{
"level1": {
"level2": {
"level3": 3
}
},
"key1": 1,
"key2": 2
}
```

your `expected` would have to be:
```json
{
"level1": {
"level2": {
"level3": 3
}
}
}
```

### Expected behavior

With this new proposal, it could be:
`actualStartPath: "level1.level2"` +
```json
{
"level3": 3
}
```

### Additional implementation details or code snippets

_No response_

Contributor guide

Open the contributing guide

Research direction

No source file or test is named in the issue. Start by locating the JSON comparison entry point and its handling of actual and expected JSON, then trace how nested paths are resolved. Done means a caller can provide an actual start path such as level1.level2 and compare the child object without wrapper containers, with coverage for the example.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
mobile, testing
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.