23
Views
2
Comments
Solved
ODC read json resource
Question

Hello there,

In ODC we have a json file (a binary) in resources (Data) that we need to deserialize. I didn't find any component on forge to help with that. I've tryed BinaryDataToText but the result is not the best (comes with the double of comas and some NBSP).

Any ideas here?

Thanks

Solution

Hi Pedro,

The normal flow would be to:

  1. Convert the binary to text
  2. Use the JSON string generated in step 1 as input for the JSONDeserialize action to convert it into an OutSystems datatype

If you have formatting issues with your JSON string, you could explore the Javascript Utils Forge component that has some actions to correct a JSON string

Regards,

Daniel

Thank you Daniel

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