Skip to content

Conversation

@cyril-cpm
Copy link

Change behavior of ProjectConfig().to_json() to produce real object instead of array (with key as index 0 and value as index 1).
Example:

platformio project config --json-output:

{
  "env:test": {
    "build_flags": [
      "-D FLG_A",
      "-D FLG_B=1"
    ],
    "monitor_speed": 115200
  },
  "env:test2": {
    "build_flags": [
      "-D FLG_A",
      "-D FLG_B=1"
    ],
    "monitor_speed": 115200
  }
}

instead of:

[
  [
    "env:test",
    [
      [
        "build_flags",
        [
          "-D FLG_A",
          "-D FLG_B=1"
        ]
      ],
      [
        "monitor_speed",
        115200
      ]
    ]
  ],
  [
    "env:test2",
    [
      [
        "build_flags",
        [
          "-D FLG_A",
          "-D FLG_B=1"
        ]
      ],
      [
        "monitor_speed",
        115200
      ]
    ]
  ]
]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant