It would be handy to have a settable flag to convert lists to vectors if that level of detail isn't needed. For example:
puts YAML.dump EDN.read('[1 (2 [3 4] #{5 6} {:a 7 :b 8})]')
puts
puts
puts YAML.dump EDN.read('[1 [2 [3 4] #{5 6} {:a 7 :b 8}]]')
---
- 1
- !ruby/array:EDN::Type::List
- 2
- - 3
- 4
- !ruby/object:Set
hash:
5: true
6: true
- :a: 7
:b: 8
---
- 1
- - 2
- - 3
- 4
- !ruby/object:Set
hash:
5: true
6: true
- :a: 7
:b: 8
Currently this behavior can be invoked with a one-line change of line 37 in lib/edn/transform.erb:
rule(:list => subtree(:array)) { EDN::Type::List.new(*array) }
to:
rule(:list => subtree(:array)) { array }