Uploaded image for project: 'Hippo CMS'
  1. Hippo CMS
  2. CMS-12888

PageModelSerializerModifier should not return the specialized PageModelSerializer for every object

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Normal
    • Resolution: Fixed
    • None
    • 14.2.0, 100.2.0
    • site-toolkit
    • None
    • 0.25
    • Quasar

    Description

      Currently it contains this"

          @Override
          public JsonSerializer<?> modifySerializer(SerializationConfig config, BeanDescription beanDesc,
                                                    JsonSerializer<?> serializer) {
              return new PageModelSerializer((JsonSerializer<Object>) serializer, jsonPointerFactory, metadataDecorators);
          }
      

      However, when serializing a String object for example, there is no point in returning the PageModelSerializer.

      We only need to return the PageModelSerializer for

      1. Objects that implement PageModelEntity (see HSTTWO-4750)
      2. The object AggregatedPageModel.RootReference

      All the other objects can just be serialized using the default object mapper serialized and do not need our enhanced PageModelSerializer

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              aschrijvers Ard Schrijvers
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: