struberg commented on PR #142:
URL: https://github.com/apache/johnzon/pull/142#issuecomment-4999815206

   I've run a few tests with latest yasson (JSON-B reference implementation), 
and they behave like the JSON-B spec rather clearly defines:
   
   ```
   public record CarWithExtraMethod(String type, String color) {
   
       public String type() {
           return type;
       }
   
       public String name() {
           return color + " " + type;
       }
   }
   ```
   
   
   results in `{"color":"green","type":"skoda"}`
   
   But
   
   ```
   public record CarWithExtraMethod(String type, String color) {
   
       public String type() {
           return type;
       }
   
       public String getOtherName() {
           return color + " " + type;
       }
   }
   ```
   
   
   results in `{"color":"green","getOtherName":"green skoda","type":"skoda"}`
   
   So our old behaviour is CLEARLY a bug and we have to fix it!
   As I said: I understand that there is a benefit for having a backward compat 
flag to our (OUR, not the specs!) old behaviour, but the default behaviour MUST 
BE spec compliant. 


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to