Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
1.8.4, 2.4.1
Description
Consider the attached Groovy script. It defines two classes. Each has public properties explicitly defined. When I send the resulting objects to JsonOutput.toJson(), I expect the public properties of the object to be serialized into the JSON output. This is not working as expected. The only properties that get serialized are those created via "def propName" and those that seem to have getter methods (this in not actually the case).
Attached is a screenshot of GroovyConsole running the attached script.
Attachments
Attachments
Issue Links
- is cloned by
-
GROOVY-10449 Include public fields in the list of properties returned by MetaClassImpl#getProperties()
- Closed
- is related to
-
GROOVY-10438 DGM: getMetaPropertyValues and getProperties includes private entries
- Closed