You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Guillaume Laforge (Jira)" <ji...@apache.org> on 2023/09/05 08:40:00 UTC

[jira] [Created] (GROOVY-11167) JsonOutput should handle Records like POGOs

Guillaume Laforge created GROOVY-11167:
------------------------------------------

             Summary: JsonOutput should handle Records like POGOs
                 Key: GROOVY-11167
                 URL: https://issues.apache.org/jira/browse/GROOVY-11167
             Project: Groovy
          Issue Type: Improvement
          Components: JSON
    Affects Versions: 3.0.19, 4.0.14
            Reporter: Guillaume Laforge


The following assertion fails:

 
{code:java}
import groovy.json.JsonOutput
record Person(String name) {}
assert JsonOutput.toJson([new Person('Guillaume')]) == '[{"name":"Guillaume"}]'{code}
 

All records are serialized 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)