Quantcast
Channel: Adobe Community : Unanswered Discussions - ColdFusion
Viewing all articles
Browse latest Browse all 5794

CF11: serializejson generate invalid json format

$
0
0

I migrated my application from CF9 to CF11, and got a serializejson issue. When serialize object data with empty string,  the serializejson function generates invalid string.

 

I have function getConfiguration in A.cfc and function getImageResult in B.cfc. The function getConfiguration would get an object data and serialize them to json, then return the json data. Below are the object data and the generated invalid json. In this case, I would got json parsing error when deserialize json in getImageResult function.

 

Object data:

{

      RESULT: true

      MESSAGE: call function getConfiguration successfully

      OBJECT: {

          HID: [empty string]

         TF_LAB_USE_DOCUMENT_MANAGEMENT: [empty string]

         PARENT_HID: [empty string]

      }

     CODE: [empty string]

  }

 

json:

{""MESSAGE"":""call function getConfiguration successfully"",""CODE"":"""",""OBJECT"":{""HID"":,""PARENT_HID"":,""TF_LAB_USE_DOCUMENT_M ANAGEMENT"":},""RESULT"":true,""VALIDATIONMESSAGE"":""""}"

   

Do we have solutions to fix this problem? Thanks for help


Viewing all articles
Browse latest Browse all 5794

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>