Re: How to use json in aubit
Mike Aubury <[email protected]> Thu, 3 Nov 2022 14:22:07 +0000
| Newsgroups | gmane.comp.lang.4gl.aubit.general |
|---|---|
| Message-ID | <CAGAq4WFPRJ0PvNPMnEGk0T4_D2iSOT7eEaYt8B=GhVqt3ibz0Q@mail.gmail.com> |
Its still experimental - but something like :
main
define lv_str char(2000)
define lv_rec record
a char(20),
b integer
end record
let lv_rec.a="hello"
let lv_rec.b=123
# Serialise to JSON
*let lv_str=TO JSON(lv_rec)*
display lv_str clipped
let lv_str= "{\"a\":\"world\",\"b\":987}"
# Deserialise from JSON
*LET FROM JSON lv_rec = lv_str*
display lv_rec.a
display lv_rec.b
end main
When executed :
{"a":"hello","b":123}
world
987
On Thu, 3 Nov 2022 at 13:46, Iwan AB <[email protected]> wrote:
> Dear Mike,
>
> Can you give us an example of how to use json in aubit, since it's already
> implemented in the aubit4gl-r12787 release?
>
> Best regards,
>
> Iwan
> _______________________________________________
> Aubit4gl-discuss mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/aubit4gl-discuss
>
_______________________________________________
Aubit4gl-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/aubit4gl-discuss