Customizing JSON serialization in Play
问题 I'm using renderJSON(Object) to return some objects as JSON values, and it's working fine except for one field. Is there an easy way to add in that one field without having to manually create the whole json template? 回答1: Play uses GSON to build the JSON string. If your one field is a specific object type, then you can easily do this by providing a customised serialisation for that type. See the documentation here http://sites.google.com/site/gson/gson-user-guide#TOC-Custom-Serialization-and