Uploaded image for project: '[Read Only] - Hippo Configuration Management'
  1. [Read Only] - Hippo Configuration Management
  2. HCM-22

snakeyaml may have to serialize a String value as a !!binary tagged base64 encoded value

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Normal
    • Resolution: Fixed
    • None
    • 1.0.0
    • None
    • 1
    • Platform Sprint 152

    Description

      An example would be a (Java) String embedding a non-serializable character, for example:

       String qux = String.valueOf((char)27); // see hippo-repository/engine/src/test/java/org/onehippo/repository/xml/EnhancedImportTest.java

      In JCR esv format such string values will also be base64 encoded, but the Yaml spec may have different rules what can/cannot be serialize without encoding.

      At any rate, snakeyaml will base64 encode the example string above, tagging the value with !!binary so that it can be read in again:

      qux: !!binary |-
             Gw==
      

      However, this loses the original/expected scalar string type, making it binary after reading back in.
      Instead what we need to retain the type info, it should be serialized something like:

      qux:
        type: string
        value: !!binary |-
             Gw==
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            adouma Ate Douma (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: