[JAVA-3422] Provide a way to specify the order in which pojo fields should be serialised. Created: 01/Sep/19 Updated: 04/Nov/19 Resolved: 04/Nov/19 |
|
| Status: | Closed |
| Project: | Java Driver |
| Component/s: | Codecs |
| Affects Version/s: | 3.11.0 |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Daniel Warmin | Assignee: | John Stewart (Inactive) |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
At the moment it seems like pojo fields are always serialised in the alphabetical order. I haven't found a way to provide custom ordering without writing an encoder. The motivation here is to keep the crucial fields at the top of the document for human-readability. |
| Comments |
| Comment by Seth Payne [ 04/Nov/19 ] |
|
Let us know if you have any further questions. |
| Comment by John Stewart (Inactive) [ 15/Oct/19 ] |
|
napalonyprofesor@gmail.com Have you tried using a custom Convention? Conventions are very flexible. Take a look at Conventions in the documentation for more details and see if Conventions will work for you. |