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

Preserve property order to and from JSON Schema #336

Open
schani opened this issue Dec 12, 2017 · 3 comments
Open

Preserve property order to and from JSON Schema #336

schani opened this issue Dec 12, 2017 · 3 comments
Assignees
Labels
IR JSON Schema JSON Schema Output

Comments

@schani
Copy link
Member

schani commented Dec 12, 2017

We're using Javascript objects to represent JSON Schema, so we end up with essentially random order. I think I'd like to keep using objects, but represent the keys as an array of name-type pairs, instead of as an object that maps from names to types. That means for JSON Schema input we'll have to manually parse the data, and for output we might have to just print the JSON ourselves.

@schani schani added IR JSON Schema JSON Schema Output labels Dec 12, 2017
@schani schani self-assigned this Dec 12, 2017
@schani
Copy link
Member Author

schani commented Mar 17, 2018

Depends on #646

@amorscher
Copy link
Contributor

Hi schani, are there any plans to fix this in the near future? If not I would try to solve the issue.
Cheers

amorscher added a commit to amorscher/quicktype that referenced this issue Nov 14, 2019
 -if propertyOrder array is available on an object use index of the array as order for bindings
 -default behavior(alphabetic order) preserved when no particular order is provided
amorscher added a commit to amorscher/quicktype that referenced this issue Nov 14, 2019
 -if propertyOrder array is available on an object use index of the array as order for bindings
 -default behavior(alphabetic order) preserved when no particular order is provided
amorscher added a commit to amorscher/quicktype that referenced this issue Nov 14, 2019
 -if propertyOrder array is available on an object use index of the array as order for bindings
 -default behavior(alphabetic order) preserved when no particular order is provided
amorscher added a commit to amorscher/quicktype that referenced this issue Nov 14, 2019
 -if propertyOrder array is available on an object use index of the array as order for bindings
 -default behavior(alphabetic order) preserved when no particular order is provided
schani added a commit that referenced this issue May 29, 2020
Added possibility to specify order in JSON-Schema #336
@rambabusaravanan
Copy link

@schani
Usually, I am much more concerned about the order of variables I declare. I believe the order matters a lot for clarity.
I am exploring this quicktype tool to convert JSONSchema to Typescript and may I expect this near future?

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

No branches or pull requests

3 participants