Provides for the conversion of XML to JSON using a single XSL file and config.xml file. Supports BadgerFish convention or complete customization of JSON output.
Provides the following features:
- BadgerFish Convention
- Custom attribute property prefix and suffix
- Custom text property prefix and suffix
- Custom property and property value wrappers
- Datatyping based on any or exact match using standard xpath expressions. Support for date, datetime, boolean, number, native JavaScript function and strings.
- Global escaping of result characters based on config xml settings.
- Flatten simple elements into parent object
- Treat simple elements in collections as simple arrays.
- Check for duplication child nodes conflicting with parent attribute names and assign suffix to property name.
- Drop root xml element
- Wrap resulting JSON within array structure or not
Both the XSL file and Config file have extensive commenting. If you wish to learn more click on the links to the left which point to my Blog. In each of the 3 blog postings I go into great detail the development and usage of the XSL and Config file.
As time permits I will migrate the code examples from the blog directly to this project as wiki pages.
Please feel free to comment and provide your own feedback or improvements.
Regards
Keith Chadwick