A formal representation of the Puppet AST is needed for multiple purposes:
The current output from puppet parser dump is undocumented and not distinct enough to fully represent the AST (the AST cannot be recreated from this dump since some information is lost).
A well documented and unambiguous format is required to make it API.
A format is needed to facilitate cross-platform test suites for the parser.
The puppet parser dump needs to accept a flag for the new format so that those that use the old can continue doing so. For example --format=6.
It also needs to emit a deprecation warning for the regular format (that we can name format=5).
We need a ticket for Puppet 6.0.0 where the default format becomes 6.
We need to decide on when the old format is to be removed as we also need to update all of the tests that currently use the old format. (Or at least, make the old format not be available via the command line).
The S-Expression (clojure style data) format generated by {{puppet parser dump}} has been formalized and updated and is now considered a supported API for tools integration. The new format is available in text form as well as a Json version using the flag {{\--format}} with either {{pn}} for the new format, or {{json}} for the new format in Json. The old format is still the default, but is deprecated and will be removed in the next major version of puppet.
The S-Expression (clojure style data) format generated by {{puppet parser dump}} has been formalized and updated and is now considered a supported API for tools integration. The new format is available in text form as well as a Json version using the flag {{\--format}} with either {{pn}} for the new format, or {{json}} for the new format in Json. The flag {{\--pretty}} will add line breaks and indentation for the purpose of increasing readability.
The old format is still the default for {{puppet parser dump}}, but is deprecated and will be removed in the next major version of puppet.