You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
hi, very often i am in need of testing some JSON response, whereas i don't care about whitespace and ordering of keys within the JSON (semantic comparison).
there is the JSONAssert library, which can do that. and sometimes i need to "dig into" the JSON, which can be done with json-path.
e.g. transforming JSONAssert.assertEquals(expectedJson, actualJson, jsontMode) into fun Assert<String>.isJsonEquals(expectedJson: String, mode: JsonMode = JsonMode.Strict)
my idea would be to create another artifact, depending on the "assertk-core" library, and simply adding a transitive dependency with such a thin layer making the libs reusable via the fluent assertk assertions.
Seems like a good idea. We've been planning an android extension lib in a similar vein for a while, but haven't had the time for it. If you want to work on it, I'd be glad to help review the design.
One thing to note: right now assertk is multiplatform and it would be cool for a json artifact to be as well. But the libs you linked to are java only. Re-implementing in kotlin would be a fair bit of work though if those don't already exist so understand if you wouldn't want to go down that route.
i wasn't aware of the fact that assertk is multiplatform, until my first PR ;) very sophisticated, nice job.
and yes, you are right, it seems a bit much to re-implement a proper json assertion functionality from scratch... have to check the licenses and maybe just copy'n'paste the relevant stuff might be enough?!
how about "to help review the design"? where can i be of support exactly?
Activity
evant commentedon Feb 3, 2020
Seems like a good idea. We've been planning an android extension lib in a similar vein for a while, but haven't had the time for it. If you want to work on it, I'd be glad to help review the design.
evant commentedon Feb 3, 2020
One thing to note: right now assertk is multiplatform and it would be cool for a json artifact to be as well. But the libs you linked to are java only. Re-implementing in kotlin would be a fair bit of work though if those don't already exist so understand if you wouldn't want to go down that route.
seepick commentedon Feb 3, 2020
i wasn't aware of the fact that assertk is multiplatform, until my first PR ;) very sophisticated, nice job.
and yes, you are right, it seems a bit much to re-implement a proper json assertion functionality from scratch... have to check the licenses and maybe just copy'n'paste the relevant stuff might be enough?!
how about "to help review the design"? where can i be of support exactly?
evant commentedon Feb 3, 2020
I meant I can help review prs/help with any discussions on what the api should look like, if you were interested in implementing this feature.