Hi all,
I have a project where I need to download data from a JSON file. The binary data has been stored as a Base64 text in the JSON.
Since the JSON also composes of other question types I want to check if the string being handled is a valid Base64 string. If this is the case, I want the Base64ToBinary action from BinaryData extension to convert it back to binary and add it to a list of binary files to download later.
Is there any such action available in OutSystems?
Max
Hi Max,
I don't think this is available, but you can built very quickly an extension to do this on .NET and use it in OutSystems. Browsing quickly on Google, there are a few suggestions on how to do this, like this StackOverflow post.
Kind Regards,João
Thanks for the quick reply!
Will try to work on a .NET extension :)
Not sure what Base64ToBinary returns when it's not presented with a valid Base64 string? In case it raises an exception, you could encapsulate it in an action and handle the exception, e.g. returning an "IsValid" that's set to True if there's no exception.