On 7/19/2017 5:55 AM, Ken McWilliams wrote: > Lukasz it's good to hear the JSON plugin is on the horizon. For my own work > I created a new JSON Result type using FlexJson, for some reason I liked it > better when serializing JPA Entities, it will by default serialize > primitive types on the object but will not travel the graph unless you > explicitly tell it the collections to traverse. Because it was the business > of the action to fetch what was needed (so it knew what needed to be > returned) there was no issue specifying these strings. Each action had an > instance of the JSON Serializer, along with a getter for it. After setting > it the way I wanted, the result just fetched the configured instance from > the action it self. It didn't have any pretty annotations or anything but > it was mindlessly simple to configure and using the object that performed > the Json serialization directly was very convenient.
Hello Ken, Does [1] fit your requirement? However, it is global and not every action but I'm interested in your opinion. [1] http://struts.apache.org/plugins/json/#customizing-the-output