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
      ]
    ]
  ]
]

@ivankravets ivankravets added this to the 7.0 milestone Dec 8, 2025
@ivankravets ivankravets added feature config platformio.ini labels Dec 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

config platformio.ini feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants