Codearte/props2yaml

Property with numeric subkey will be incorrectly converted

Closed this issue · 4 comments

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.

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

szpak commented

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

@szpak I've already made a pull request: #15 - and it has already been merged too: 5c1ba13

szpak commented

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).