tsgrp / HPI

OpenContent Management Suite (OCMS)
http://www.tsgrp.com/products
17 stars 5 forks source link

Update OC to be compatible with latest version (2020) of JSON #2363

Closed jlittle-tsg closed 3 years ago

jlittle-tsg commented 3 years ago

Overview

Solution

jlittle-tsg commented 3 years ago

Closed with OC commit #26713

JSON COMPATIBILITY - updating version of JSON jar brought in by core build.gradle.

As a result of this, some changes needed to be made to the way we pull string values from JSON objects. In JSON 2009, JSONObject#getString() will return a stringified version of an object regardless of type. In JSON 2020, JSONObject#getString() is type safe meaning we will encounter an error if the key does not map to a string value. This is causing OC to break in multiple spots, most notable when creating ActiveWizard forms.

This commit will change every occurrence of JSONObject#getString() to JSONObject#get().toString()

CRs: nwoodbine, dgrumieaux