Convert XML to JSON in Dart with the Parker, Badgerfish, GData or OpenRally conventions
open sourceMITfree
xml2json is a Dart and Flutter package that parses XML strings, using the xml package, and turns the parse tree into JSON following one of four conventions: Parker, a lean but lossy form for simple collections (optionally with attributes), Badgerfish and Google Data (GData), which keep attributes and namespaces for feeds such as Atom, and OpenRally. Its README documents the exact rules each converter follows.
Problems it solves
- turn an XML API response into JSON in a Flutter app
- convert an Atom feed to JSON in Dart while keeping attributes and namespaces
- parse simple XML records into JSON maps in Dart
Features
- Parker conversion, optionally with attributes
- Badgerfish conversion
- Google Data (GData) conversion
- OpenRally conversion
- parses with the xml package
