Closed ssilverman closed 3 years ago
Per your comments in my other issues, I understand that these tests are intended to test the Glassfish JSON-P implementation. This issue might be another case where the implementation disagrees with an interpretation of the Javadocs/API spec.
Philosophical question: Should the implementation be fixed to match the API specification or the API spec be changed to match the implementation? For future readers who haven't seen https://github.com/leadpony/jsonp-test-suite/issues/4, I mentioned there that it might be worthwhile to split the tests into "Glassfish implementation tests" and "JSON-P API spec tests".
@ssilverman
In JSON-P world, JsonValue
and its derived object are immutable, like String
class in Java language.
https://javadoc.io/doc/jakarta.json/jakarta.json-api/latest/jakarta.json/jakarta/json/JsonValue.html
JsonValue represents an immutable JSON value.
Therefore we cannot modify any of them through the API.
I believe this problem is resolved.
The Javadocs for
JsonPointer
don't say that the target can't be modified. What leads me to believe this isn't an oversight is that theJsonPatch
Javadocs say explicitly that the target isn't modified, so my thinking is that the omission was on purpose.I've written my
JsonPointer
implementation to modify the target, and I think this behaviour is the intended one, at least it's my working assumption.