[ https://issues.apache.org/jira/browse/GROOVY-11167?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Paul King resolved GROOVY-11167. -------------------------------- Fix Version/s: 5.0.0-alpha-2 Assignee: Paul King Resolution: Fixed Proposed PR merged. > 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: 4.0.14, 3.0.19 > Reporter: Guillaume Laforge > Assignee: Paul King > Priority: Major > Fix For: 5.0.0-alpha-2, 4.0.15 > > > 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 serialised as {{{}}} > I would expect records to be serialised as normal POGOs or Maps, etc. -- This message was sent by Atlassian Jira (v8.20.10#820010)