Uploaded image for project: 'Puppet'
  1. Puppet
  2. PUP-8976

A hash containing the key __ptype cannot be serialized using the human readable JSON format

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: PUP 6.0.0
    • Component/s: DOCS, Language, Type System
    • Labels:
      None
    • Template:
    • Team:
      Platform Core
    • Sub-team:
    • Method Found:
      Needs Assessment
    • Release Notes:
      Bug Fix
    • Release Notes Summary:
      Hide
      It was not possible to use a hash key `__pcore_type` in a hash as that would trigger the special handling during serialization. Now in Puppet 6.0.0, the special key has changed to `__ptype` and it is not also possible to use that as a key in a hash and still be able to serialize it (for example use it in a catalog).
      Show
      It was not possible to use a hash key `__pcore_type` in a hash as that would trigger the special handling during serialization. Now in Puppet 6.0.0, the special key has changed to `__ptype` and it is not also possible to use that as a key in a hash and still be able to serialize it (for example use it in a catalog).
    • QA Risk Assessment:
      Needs Assessment

      Description

      Using a Hash with the key __ptype will not serialize correctly as that is a reserved tag.
      There is already a mechanism in place to use an alternative representation when a Hash contains non JSON string compliant keys so the fix is simply to treat a hash with the key in question as one that has non-string keys as that will use the alternative encoding.

        Attachments

          Activity

            jsd-sla-details-panel

              People

              • Assignee:
                Unassigned
                Reporter:
                henrik.lindberg Henrik Lindberg
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: