You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When serializing POJO/Java Bean, I have some ideas to mention:
Follow common convention with common JSON library like Gson,Jackson,Fastjson
static fields should not be serialized
fields without public getter should not serialized
such that actual response body will be as same as possible with expected body describe by JSONDoc
Customize domain-specific business:
only fields with public setters should be serialized for request body
fields without public getters should not be serialized for response body
such that actual request body would not pass read-only fields to server, actual response body would not pass write-only fields to client.
and JSONDoc will be more tight-integrated with back-end services in real application scenarios.
The text was updated successfully, but these errors were encountered:
When serializing POJO/Java Bean, I have some ideas to mention:
such that actual response body will be as same as possible with expected body describe by JSONDoc
such that actual request body would not pass read-only fields to server, actual response body would not pass write-only fields to client.
and JSONDoc will be more tight-integrated with back-end services in real application scenarios.
The text was updated successfully, but these errors were encountered: