Codearte / props2yaml

Apache License 2.0
38 stars 17 forks source link

Property with numeric subkey will be incorrectly converted #14

Closed davidkarlsen closed 8 years ago

davidkarlsen commented 8 years ago

Given two properties:

authenticateStep.1.user = user
authenticateStep.1.pw = X

it will be converted to:

authenticateStep:
- null
-   pw: X
    user: user

while it should be:

authenticateStep:
  1:
    pw: X
    user: user

The problem is that TreeBuilder.applyArrayNotation is applied unconditionally as array indexes. This should probably be configurable - in my case they are not array indexes, but keys.

davidkarlsen commented 8 years ago

@szpak Any chance you could push out a release containing this?

szpak commented 8 years ago

You need to make a pull request first - https://help.github.com/articles/using-pull-requests/

davidkarlsen commented 8 years ago

@szpak I've already made a pull request: https://github.com/Codearte/props2yaml/pull/15 - and it has already been merged too: https://github.com/Codearte/props2yaml/commit/5c1ba130c352c601a05f9fc9aaeb18fdca94a449

szpak commented 8 years ago

I see. It was merged by @mariuszs and I missed it :). I will talk to Mariusz about the release - unfortunately in this our project it is not done automatically (yet).