Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proposals on POJO/Java Bean serializing #230

Open
fuweichin opened this issue Apr 21, 2017 · 0 comments
Open

Proposals on POJO/Java Bean serializing #230

fuweichin opened this issue Apr 21, 2017 · 0 comments

Comments

@fuweichin
Copy link

When serializing POJO/Java Bean, I have some ideas to mention:

  1. 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

  1. 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant