JSON Structure into Key-Value Pair| ardoJSON | JSON_Listify

Hi All,

I am trying to convert JSON Structure into Key-Value Pair as shown in the image using ardoJSON-JSON_Listify. My doubt is if i try to convert a JSON value that has apostrophe(For example: "source":"GB'P"), it is throwing an error. How to convert JSON values with apostrophe? Please do help me.



Hi Hemalatha,

I think it can parse the datatype  text  "source":"GB'P"  .Please try to parse using below url 

https://jnb.outsystemscloud.com/ardoJSONReactiveDemo/JSON_Listify

The problem here i think is if the datatype is integer/decimal and we are giving apostrophe in between for example  "source":99'9 than it would throw error "Unexpected character encountered while parsing number" same as your screen shot.

So make sure if the datatype is integer than apostrophe  should not be there.

Best Regards

Devendra




Hi 

Now this is different error  remove the first and last single quote from the input JSON string 

Instead of 

'{

   "success":"true",

   "timestamp":1234,

   "source":"GBP",

   "quotes":{

      "GBPPED":"lath'a",

      "GBPOUT":234,

      "GBPGTH":4567

   }

}'

try with 

{

   "success":"true",

   "timestamp":1234,

 "source":"GBP",

 "quotes":{

      "GBPPED":"lath'a",

      "GBPOUT":234,

      "GBPGTH":4567

   }

}

Attached is the screen shot

Hi Hemalatha,

I think it can parse the datatype  text  "source":"GB'P"  .Please try to parse using below url 

https://jnb.outsystemscloud.com/ardoJSONReactiveDemo/JSON_Listify

The problem here i think is if the datatype is integer/decimal and we are giving apostrophe in between for example  "source":99'9 than it would throw error "Unexpected character encountered while parsing number" same as your screen shot.

So make sure if the datatype is integer than apostrophe  should not be there.

Best Regards

Devendra




Hi Devendra,

Thanks for the reply.

I have tried and got the below error.

JSON Structure:

'{

   "success":"true",

   "timestamp":1234,

   "source":"GBP",

   "quotes":{

      "GBPPED":"lath'a",

      "GBPOUT":234,

      "GBPGTH":4567

   }

}'





Hi 

Now this is different error  remove the first and last single quote from the input JSON string 

Instead of 

'{

   "success":"true",

   "timestamp":1234,

   "source":"GBP",

   "quotes":{

      "GBPPED":"lath'a",

      "GBPOUT":234,

      "GBPGTH":4567

   }

}'

try with 

{

   "success":"true",

   "timestamp":1234,

 "source":"GBP",

 "quotes":{

      "GBPPED":"lath'a",

      "GBPOUT":234,

      "GBPGTH":4567

   }

}

Attached is the screen shot

Hi Devendra,

Thanks so much. It is working fine.

But when I use the same JSON Structure in outsystems, it is showing the below error. I am a beginner. Could you please look into below screenshot?

Hi,

Replace the  " by "" same as below screen

Hi Devendra,

Thanks so much. It is working fine now.

Regards,

Hema

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.