You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@johnzon.apache.org by "rmannibucau (via GitHub)" <gi...@apache.org> on 2023/04/25 19:32:46 UTC

[GitHub] [johnzon] rmannibucau commented on a diff in pull request #103: don't serialize BigInteger/BigDecimal as strings in jsonb

rmannibucau commented on code in PR #103:
URL: https://github.com/apache/johnzon/pull/103#discussion_r1176954566


##########
johnzon-jsonb/src/main/java/org/apache/johnzon/jsonb/JohnzonBuilder.java:
##########
@@ -234,6 +236,10 @@ public Jsonb build() {
                         Integer.parseInt(it.toString()))
                 .ifPresent(builder::setSnippetMaxLength);
 
+        // drop johnzon-mapper BigInteger/BigDecimal built in adapters to not serialize those types as JsonString. See JSON-B spec 3.4.1

Review Comment:
   1. maybe replace the stored list by two toggles since we don't aim at storing it in mem at runtime there (this is used in a fallback of fallback we can rework later ;))
   2. for me string is the right choice by default (see https://github.com/jakartaee/jsonb-api/issues/187) so maybe introduce a toggle in the jsonb config (and fallback on a system prop - static -  to easily pass tck?)
   
   :+1: for te test



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@johnzon.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org