Skip to content

Adding full details on what are the requirements for the SPI#4162

Open
pmlopes wants to merge 2 commits intomasterfrom
issues/improve-json-spi-javadocs
Open

Adding full details on what are the requirements for the SPI#4162
pmlopes wants to merge 2 commits intomasterfrom
issues/improve-json-spi-javadocs

Conversation

@pmlopes
Copy link
Contributor

@pmlopes pmlopes commented Nov 9, 2021

Signed-off-by: Paulo Lopes pmlopes@gmail.com

Motivation:

Users trying to implement a custom JsonCodec face application failures because the expectations of the SPI are not well documented. For example, nothing is stated over how to encode JsonObject/JsonArray or the RFCs vert.x implements.

This PR is mostly a documentation update explaining the expectations so users can write working codecs.

Signed-off-by: Paulo Lopes <pmlopes@gmail.com>
*/
public String encode() {
return Json.CODEC.toString(this, false);
return Json.CODEC.toString(this.list, false);
Copy link
Member

Choose a reason for hiding this comment

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

this seems to be more than a detail, is it a bug ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

As I was debugging to figure out the behavior I noticed that we can reduce jackson work, as it internally doesn't need to do a 1st lookup on the registered classes for see that JsonArray needs some extra processing. Which is unwrapping the list.

So the behavior didn't change, the stacktraces are just shorter because we help jackson.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Same applies to JsonObject

Signed-off-by: Paulo Lopes <pmlopes@gmail.com>
@vietj vietj modified the milestones: 4.2.2, 4.2.3, 4.2.4 Dec 14, 2021
@vietj vietj modified the milestones: 4.2.4, 4.2.5 Jan 20, 2022
@vietj vietj modified the milestones: 4.2.5, 4.2.6 Feb 16, 2022
@vietj vietj modified the milestones: 4.2.6, 4.2.7 Mar 17, 2022
@vietj vietj modified the milestones: 4.2.7, 4.2.8 Apr 13, 2022
@vietj vietj modified the milestones: 4.2.8, 4.3.1 May 12, 2022
@vietj vietj modified the milestones: 4.3.1, 4.3.2 May 25, 2022
@vietj vietj modified the milestones: 4.3.2, 4.3.3 Jul 6, 2022
@vietj vietj modified the milestones: 4.3.3, 4.3.4 Aug 9, 2022
@vietj vietj modified the milestones: 4.3.4, 4.3.5 Oct 1, 2022
@vietj vietj modified the milestones: 4.3.5, 4.4.0 Nov 18, 2022
@vietj vietj modified the milestones: 4.5.11, 4.5.12 Nov 12, 2024
@vietj vietj modified the milestones: 4.5.12, 4.5.13 Jan 23, 2025
@vietj vietj modified the milestones: 4.5.13, 4.5.14 Feb 10, 2025
@vietj vietj modified the milestones: 4.5.14, 4.5.15 Apr 3, 2025
@vietj vietj modified the milestones: 4.5.15, 4.5.16 May 16, 2025
@vietj vietj modified the milestones: 4.5.16, 4.5.17 Jun 19, 2025
@vietj vietj modified the milestones: 4.5.17, 4.5.18 Aug 5, 2025
@vietj vietj modified the milestones: 4.5.18, 4.5.19 Aug 13, 2025
@vietj vietj modified the milestones: 4.5.19, 4.5.20, 4.5.21 Aug 27, 2025
@vietj vietj modified the milestones: 4.5.21, 4.5.22 Sep 3, 2025
@vietj vietj modified the milestones: 4.5.22, 4.5.23 Oct 22, 2025
@vietj vietj modified the milestones: 4.5.23, 4.5.24 Dec 15, 2025
@vietj vietj modified the milestones: 4.5.24, 4.5.25 Jan 15, 2026
@vietj vietj modified the milestones: 4.5.25, 4.5.26 Feb 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants