Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-48619

ExpandoValueServiceSoap.getJSONData throws JSONException if custom field value contains a line break

    Details

      Description

      Steps to reproduce

      1. Create a User Custom Field "c1" with type "Text Box"
      2. Fill this field out with multiline value.
      3. Go to http://localhost:8080/api/jsonws?signature=%2Fexpandovalue%2Fget-json-data-5-companyId-className-tableName-columnName-classPK to test get-json-data method.
        • companyId => Control Panel -> Portal Instances -> Use the instance ID
        • className = com.liferay.portal.model.User
        • tableName = CUSTOM_FIELDS
        • columnName = c1
        • classPK => userId of the user you entered the Custom Fields for
      4. Click Invoke

      Result:

      com.liferay.portal.kernel.json.JSONException: org.json.JSONException: Expected a ',' or '}' at 12 [character 1 line 3]
      

      Expected: service method returns a valid JSON object

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  5 years, 17 weeks, 2 days ago

                  Packages

                  Version Package
                  6.1.X EE
                  6.2.2 CE GA3
                  6.2.X EE
                  7.0.0 M1