Title: Controllable Order of Json Properties · Issue #2 · JavaWebStack/abstract-data · GitHub
Open Graph Title: Controllable Order of Json Properties · Issue #2 · JavaWebStack/abstract-data
X Title: Controllable Order of Json Properties · Issue #2 · JavaWebStack/abstract-data
Description: Is your feature request related to a problem? Please describe. There is no way to configure the order that objects return their attributes in JSON Response. This leads to unintuitive responses though they are functionally the same. The o...
Open Graph Description: Is your feature request related to a problem? Please describe. There is no way to configure the order that objects return their attributes in JSON Response. This leads to unintuitive responses thou...
X Description: Is your feature request related to a problem? Please describe. There is no way to configure the order that objects return their attributes in JSON Response. This leads to unintuitive responses thou...
Opengraph URL: https://github.com/JavaWebStack/abstract-data/issues/2
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Controllable Order of Json Properties","articleBody":"**Is your feature request related to a problem? Please describe.**\r\nThere is no way to configure the order that objects return their attributes in JSON Response. This leads to unintuitive responses though they are functionally the same. The order depends on the attribute names and their alphanumerical value and length it seems.\r\n\r\n**Describe the solution you'd like**\r\nI would like the order to be the same order in which the attributes are defined.\r\n\r\n**Describe alternatives you've considered**\r\nOtherwise adding annotations could achieve more fine-grained control, but seems too much and to verbose of a solution.\r\n\r\n**Additional context**\r\nTo see the effect you can try:\r\n\r\n\r\n```\r\npublic class Nonsense {\r\n public int a;\r\n public String b;\r\n\r\n public Nonsense(int test, String test2) {\r\n this.a = test;\r\n this.b = test2;\r\n }\r\n}\r\n```\r\n\r\nand then \r\n\r\n```\r\npublic class Nonsense {\r\n public int c;\r\n public String b;\r\n\r\n public Nonsense(int test, String test2) {\r\n this.c = test;\r\n this.b = test2;\r\n }\r\n}\r\n```\r\n\r\nwith a controller like this:\r\n\r\n```\r\npublic class RootController extends HttpController {\r\n\r\n @Inject\r\n public WebApplication webApplication;\r\n\r\n @Get(\"/\")\r\n public Nonsense getRoot() {\r\n return new Nonsense(23, \"HET\");\r\n }\r\n\r\n}\r\n```\r\n\r\n","author":{"url":"https://github.com/TimothyGillespie","@type":"Person","name":"TimothyGillespie"},"datePublished":"2021-03-01T02:07:25.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":6},"url":"https://github.com/2/abstract-data/issues/2"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:073d3ede-efad-50e6-fb67-c652a7cbe752 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BAF4:EDC08:18205C:1ED43A:697DC20B |
| html-safe-nonce | f1dec813fbd79f5f15fd795c9328e096e6d0c9bed398ce228c334b3903aac84f |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCQUY0OkVEQzA4OjE4MjA1QzoxRUQ0M0E6Njk3REMyMEIiLCJ2aXNpdG9yX2lkIjoiNDI0MTQzNzYzMDAwNjE0OTY0MyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 3dad02de64679a355fe5605425cf861ee1104958831a840c15b463705dcb14d8 |
| hovercard-subject-tag | issue:920407367 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/JavaWebStack/abstract-data/2/issue_layout |
| twitter:image | https://opengraph.githubassets.com/8eafcd3d379e77baa7bc664b4f8b32f207071364fbdc1ad82b7cbbd50c13a938/JavaWebStack/abstract-data/issues/2 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/8eafcd3d379e77baa7bc664b4f8b32f207071364fbdc1ad82b7cbbd50c13a938/JavaWebStack/abstract-data/issues/2 |
| og:image:alt | Is your feature request related to a problem? Please describe. There is no way to configure the order that objects return their attributes in JSON Response. This leads to unintuitive responses thou... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | TimothyGillespie |
| hostname | github.com |
| expected-hostname | github.com |
| None | 60279d4097367e16897439d16d6bbe4180663db828c666eeed2656988ffe59f6 |
| turbo-cache-control | no-preview |
| go-import | github.com/JavaWebStack/abstract-data git https://github.com/JavaWebStack/abstract-data.git |
| octolytics-dimension-user_id | 73674659 |
| octolytics-dimension-user_login | JavaWebStack |
| octolytics-dimension-repository_id | 311194306 |
| octolytics-dimension-repository_nwo | JavaWebStack/abstract-data |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 311194306 |
| octolytics-dimension-repository_network_root_nwo | JavaWebStack/abstract-data |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 7c85641c598ad130c74f7bcc27f58575cac69551 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width