Puppet prefers JSON but will fallback to PSON if there are binary fact values or if the catalog contains binary content, such as the {{file}} resource's {{{}content => binary_file('/path/to/bin'){}}}. Now that rich data is supported and enabled by default, we should look into eliminating PSON support. * Where does the fallback code live? Is it centralized or scattered around? * There are some [mentions of PSON|https://github.com/puppetlabs/puppetserver/blob/master/src/clj/puppetlabs/services/ca/certificate_authority_core.clj#L163-L166] in the CA endpoint code. This is to support agents requesting certs in PSON. Can we drop this support? * In what version did we add real rich data support that doesn't require PSON? That version is likely the oldest we can support if we do this. We think this happened in [Puppet 6|https://tickets.puppetlabs.com/browse/PUP-8587], which is likely too recent for this to be doable.
Steps: * Use to_json instead of to_pson in cases where PSON is not required * Guard PSON specific tests with pson feature * Lazily load PSON based on feature
Follow on tickets to create pson gem and remove pson code from puppet.