Json

60 views
Skip to first unread message

max

unread,
Oct 3, 2025, 4:06:12 PM (2 days ago) Oct 3
to The Ring Programming Language
Hallo Mahmoud,

look please this example

load "stdlib.ring"
load "jsonlib.ring"
load "simplejson.ring"


st2 = `{
    "item": [
        "hallo",
        [
            1,
            2,
            3
        ]
    ]
}`

// using load "simplejson.ring"
listdata = json_decode(st2)
? list2code(listdata)
jsonString = json_encode(listdata,1)
? jsonString


// using load "jsonlib.ring"

alist = JSON2List(st2)
ajsonStr = List2JSON(aList)   // Erorrrrrrrrrrr
? ajsonStr  

Mahmoud Fayed

unread,
Oct 3, 2025, 5:06:35 PM (2 days ago) Oct 3
to The Ring Programming Language
Hello Max

Thanks for the report, the problem is fixed the the JSONLib package is update :D

To get the update, use the next command

ringpm update jsonlib



Keep up the GREAT WORK :D

Greetings,
Mahmoud

max

unread,
Oct 3, 2025, 5:22:40 PM (2 days ago) Oct 3
to The Ring Programming Language
Hallo Mahmoud,

Thanks for the quick fix.

Mahmoud Fayed

unread,
Oct 3, 2025, 5:27:59 PM (2 days ago) Oct 3
to The Ring Programming Language
Hello Max

You are welcome :D

Greetings,
Mahmoud

max

unread,
Oct 3, 2025, 5:37:48 PM (2 days ago) Oct 3
to The Ring Programming Language
Hallo Mahmoud,

hier is another problem


load "stdlib.ring"

load "jsonlib.ring"

load "simplejson.ring"



st2 = `{
    "item": [
        [
            1,
            2,
            3
        ],
        1,
        2,
        3
    ]
}`


// using load "simplejson.ring"

listdata = json_decode(st2)

? list2code(listdata)

jsonString = json_encode(listdata,1)

? jsonString



// using load "jsonlib.ring"


alist = JSON2List(st2)

ajsonStr = List2JSON(aList) // Erorrrrrrrrrrr

? ajsonStr

? list2code(alist)

Mahmoud Fayed

unread,
Oct 3, 2025, 5:56:28 PM (2 days ago) Oct 3
to The Ring Programming Language
Hello Max

Thanks for the report, the problem is fixed and the JSONLib package is updated :D

To get the update, use the next command

ringpm update jsonlib



Greetings,
Mahmoud

Reply all
Reply to author
Forward
0 new messages