O7:Format JASON-string
Phil (OmnisList)
phil at pgpotter.co.uk
Wed Jan 6 23:00:00 UTC 2021
Hi Daniel,
Omnis 7 - JSON - I suspect JSON came after O7 development ceased.
I suspect the only way is for you to write a procedure to do it for
yourself.
Currently I believe Studio functions would create a row/list variable
which may include other list row variables for the multi part sections,
like items, and types...
Maybe someone else wrote something before, but I don't know of an O7
external or anything to do it for you.
If you have a later Omnis Studio, you might want to try out its
functions to see what it does, so you can try and replicate it in code?
regards
Phil Potter
Based in Chester in the UK.
On 06/01/2021 19:50, Daniel Sananes wrote:
> Hallo
>
> Is there some code or other tool that I could implement in Omnis 7 to format a JSON-string so it will be readable.
> Below is a string received from an API-call:
> [{"depo":{"srsId":"0002547061341"},"items":[{"number":"902","name":"Helpall Grå","types":[{"value":0,"name":"OK"}]},{"number":"901","name":"Helpall Svart","types":[{"value":0,"name":"OK"}]}]},{"depo":{"srsId":"0002547061358"},"items":[{"number":"901","name":"Helpall Svart","types":[{"value":0,"name":"OK"}]}]}]
>
> I would like to extract the information and put the values into variables.
>
> This JSON thing is new to me but I know it is a common subject here in our forum.
> ---
>
> Best regards to everyone.
>
> Daniel
>
More information about the omnisdev-en
mailing list