Uploaded image for project: 'Configuration Persistence Service'
  1. Configuration Persistence Service
  2. CPS-751

Replace GSON Parser with Jackson Parser

XMLWordPrintable

      Following from [Spike CPS-631|https://wiki.onap.org/display/DW/CPS-631+Spike%3A+Which+ObjectMapper+to+use+and+how+best+to+use+it+for+performance], decision was made to use the Jackson parser instead of GSON parser in all repos. 

      So remove any use of GSON like

      import com.google.gson.GsonBuilder
      Gson GSON = new GsonBuilder().create()
      GSON.fromJSON()
      GSON.toJSON()

      Replace with 

      import com.fasterxml.jackson.databind.ObjectMapper
      ObjectMapper objectMapper = new ObjectMapper()
      objectMapper.readValue()
      objectMapper.writeValueAsString()

      Scope, all relevant Repos (create subtasks if needed to track and split workload)

      1. CPS
      2. DMI-Plugin
      3. CPS-Temporal (might not be used here)

      A/C

      • GSON fis no longer present in any (CPS) POM files
        • ensure the relevant version property is removed too
      • (code review phase) Only one ObjectMapper should be instantiated per class to save memory. Possible use @autowire annotation to ensure 'singleton' pattern. (this might affect testware!)

       

       

            sourabh_sourabh Sourabh Sourabh
            lukegleeson lukegleeson
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: