diff --git a/Gemfile.lock b/Gemfile.lock index 7a7ee4d..54cb81c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - dachsfisch (0.2.0) + dachsfisch (1.0.0) nokogiri (>= 1.14.1, < 2.0.0) GEM diff --git a/README.md b/README.md index 773d3f7..d3d2d02 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,8 @@ The rules for converting XML documents to JSON using Badgerfish are: - CDATA sections become properties named `#1`, `#2`, etc. Please see our [examples](spec/support/examples.rb) for more details. Those rules are derived from [this list](http://dropbox.ashlock.us/open311/json-xml/). +Own additions: +- The order of nodes gets saved in `@@order` (JSON is unordered per definition) ## Installation @@ -53,7 +55,7 @@ json = Dachsfisch::XML2JSONConverter.perform(xml: xml) ### JSON-to-XML ```ruby -json = '{ "alice": { "$" : "bob" } }' +json = '{ "alice": { "$1": "bob", "@@order": ["$1"] }, "@@order": ["alice"] }' xml = Dachsfisch::JSON2XMLConverter.perform(json: json) ``` diff --git a/lib/dachsfisch/version.rb b/lib/dachsfisch/version.rb index 7ed9d64..89aa6e5 100644 --- a/lib/dachsfisch/version.rb +++ b/lib/dachsfisch/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module Dachsfisch - VERSION = '0.2.0' + VERSION = '1.0.0' end