This project is a sandbox for Open311 GeoReport v2 XML to JSON API conversions using the parker convention.
For more info on Open311 GeoReport: wiki.open311.org/GeoReport_v2 For more info on the Parker Convention: code.google.com/p/xml2json-xslt/wiki/TransformingRules
-
ruby, rubygems, and bundler installed
To install:
bundle install
ruby xml2json.rb
-
Created a service-definition-fix.xml that adds a parent “attributes” node:
github.com/connectedbits/open311_xml2json/blob/master/samples/xml/service-definition-fix.xml
-
The XSLT results will treat collections with 1 node vs multiple nodes differently. In practice we want to consistently return an [] for 0, 1, or many records:
github.com/connectedbits/open311_xml2json/blob/master/samples/json/service-definition-fix.json
-
The XSLT drops the request node when returning a list of service requests:
github.com/connectedbits/open311_xml2json/blob/master/samples/json/service-requests.json
See github.com//open311_xml2json/issues
Developed by Connected Bits, LLC
See parker/COPYRIGHT.txt for usage of the parker code.