Skip to content

issue-673 fix#694

Open
redmitry wants to merge 2 commits intoeclipse-ee4j:masterfrom
redmitry:master
Open

issue-673 fix#694
redmitry wants to merge 2 commits intoeclipse-ee4j:masterfrom
redmitry:master

Conversation

@redmitry
Copy link

@redmitry redmitry commented Jan 21, 2026

merged commits

Sorry since I merged several commits github closed previous pull request:
#674

Signed-off-by: redmitry <redmitry@list.ru>

Jsonb jsonb = JsonbBuilder.create(
new JsonbConfig().withDeserializers(new Issue673.ReferenceableDeserializer()));
jsonb.fromJson(json, Issue673.LocationInterface.class);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
jsonb.fromJson(json, Issue673.LocationInterface.class);
LocationInterface result = jsonb.fromJson(json, Issue673.LocationInterface.class);
assertNotNull(result);
assertTrue(result instanceof Location);
Location location = (Location) result;
Referenceable refAble = location.getReference();
assertNotNull(refAble);
assertFalse(refAble instanceof Reference);
assertTrue(refAble instanceof IRIReference);
IRIReference ref = (IRIReference) refAble;
assertEquals("dummy reference", ref.getValue());

suggestion: this test just verifiers that no exception is thrown, ensure the correct object is returned.

Signed-off-by: redmitry <redmitry@list.ru>
@redmitry
Copy link
Author

Well although the response assertions are not about the tested case, more assertions wont hurt.
I also removed unnecessary JsonbConfig as the serializers defined via method annotation.

Copy link
Member

@KyleAure KyleAure left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. A committer to this project will need to approve it to get this merged. @m0mus

@redmitry
Copy link
Author

Looks good to me. A committer to this project will need to approve it to get this merged. @m0mus

ACHTUNG! I just realized that I use Java 17 if (v instanceof JsonArray arr), while Yasson is Java 11 !!!???

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants