json-view
json-view copied to clipboard
[Feature Request]: Support to rename fields
Hi,
It is common that sometimes output json format requires different field names from POJO fields. So I think it would be nice if developers could rename field name(s) when serializing POJO to json.
Thanks for your great work!
What would that look like? Just an option like .rename(field, name)
or did you have something else in mind?
Yes, that option looks good. Maybe something like .rename(field1, name1, field2, name2 ...)
, which could specify multiple renamed fields.