XSD to JSON Conversion CamelCase
This should cover W3C XML Schema, Relax NG and DTD related problems.
-
- Posts: 7
- Joined: Mon Sep 12, 2022 7:58 pm
XSD to JSON Conversion CamelCase
Post by michaelgrudgings »
Is there a setting to force JSON conversions to use camel case for the elements? When I convert the XSD, the JSON holds whatever format the XSD is in? I want to always convert to camel case if possible?
Code: Select all
"PostalAddress": {
"type": "object",
"required": [
"FirstLineAddress",
"CityName",
"PostalCode"
],
"properties": {
"FirstLineAddress": {"type": "string"},
"SecondLineAddress": {"type": "string"},
"ThirdLineAddress": {"type": "string"},
"CityName": {"type": "string"},
"StateProvinceCode": {"$ref": "#/$defs/StateProvince"},
"PostalCode": {"type": "string"},
"CountryCode": {"$ref": "#/$defs/Country"}
}
Code: Select all
"PostalAddress": {
"type": "object",
"required": [
"firstLineAddress",
"cityName",
"postalCode"
],
"properties": {
"firstLineAddress": {"type": "string"},
"secondLineAddress": {"type": "string"},
"thirdLineAddress": {"type": "string"},
"cityName": {"type": "string"},
"stateProvinceCode": {"$ref": "#/definitions/StateProvince"},
"postalCode": {"type": "string"},
"countryCode": {"$ref": "#/definitions/Country"}
}
Michael J Grudgings
Business Architect
Business Architect
-
- Posts: 38
- Joined: Wed Sep 09, 2020 3:17 pm
Re: XSD to JSON Conversion CamelCase
Post by florin_nica »
Hi Michael,
Thanks for your feedback.
You could try disabling the option "Preserve case of names from the XSD" within the dialog, which is checked by default. If unchecked, the resulting JSON Schema will not hold the same naming format as the XSD, and it should use a lowerCamelCase naming format. Notice that special characters such as: "-", "_", "." etc. are removed from the elements' name.
Regards,
Florin
Thanks for your feedback.
You could try disabling the option "Preserve case of names from the XSD" within the dialog, which is checked by default. If unchecked, the resulting JSON Schema will not hold the same naming format as the XSD, and it should use a lowerCamelCase naming format. Notice that special characters such as: "-", "_", "." etc. are removed from the elements' name.
Regards,
Florin
-
- Posts: 7
- Joined: Mon Sep 12, 2022 7:58 pm
Re: XSD to JSON Conversion CamelCase
Post by michaelgrudgings »
Much appreciated! I find it hard to believe I did not see that option when I generated the JSON. 

Michael J Grudgings
Business Architect
Business Architect
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service