-
Notifications
You must be signed in to change notification settings - Fork 37
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
[feature-request] Add option to allow unchanged localName properties while generating mappings. #82
Comments
I would also appreciate an option to keep the original localNames and property names. That would be very cool and would make our work a lot easier. Thank you :) |
You mean JSON property names should be exactly as local names of respective attributes/elements? There are some properties which may contain several elements. Won't work in that case, but for other cases should be quite doable. |
Thanks for your fast reply. and i would like to keep the underscore and perhaps also the uppercase (but thats not necessarily required). So instead of being converted to:
Would this be possible? fyi reason for my request: We use this for converting SAP Idoc Schema files to typescript types via this project's json schema generation. And for SAP Idoc Files it is very common to use underscores in field names. And to easily find the usage of a certain SAP Idoc field it would be very helpful to search with the original field names. So this would be mainly for keeping a kind of type description consistency. Therefore it wouldn't be a must-have but a cool nice-to-have feature :) |
Ok, this can be quite easily implemented for "simple" property types like attribute property and element property. This won't work for other properties (value, elements, element reference, elements reference, any attribute, any element). |
...so will it be implemented for simple types at least? |
Any progress on this topic? |
Allowing unchanged localName names (exactly the same as in XML eg
<Element_With_Underscore>
makes JSON propElement_With_Underscore
) would help to use library likecxsd
. One could generate TypeScript types for intellisense and use it to compose JSON to generate XML using Jsonix mappingsThe text was updated successfully, but these errors were encountered: