abbas abedi
Member
hello
I have problem
I wanna add a link list to a json text
this is my link list :
this is wrong result ("\"\/ \"") :
this is my b4a code:
so How can I fix it?
I have problem
I wanna add a link list to a json text
this is my link list :
B4X:
LinkList.Add("/neda/live-post-image/1.jpg")
LinkList.Add("/neda/live-post-image/2.jpg")
LinkList.Add("/neda/live-post-image/3.jpg")
this is wrong result ("\"\/ \"") :
B4X:
{"repeated_string":{
"value":[
"\"\/neda\/live-post-image\/1.jpg\"",
"\"\/neda\/live-post-image\/2.jpg\"",
"\"\/neda\/live-post-image\/3.jpg\""
]
}}
this is my b4a code:
B4X:
Private LinkListAs List
LinkList.Initialize
LinkList.Add("/neda/live-post-image/1.jpg")
LinkList.Add("/neda/live-post-image/2.jpg")
LinkList.Add("/neda/live-post-image/3.jpg")
Private parser As JSONParser
parser.Initialize(<JsonTEXT>)
Private jRoot As Map = parser.NextObject
Private Images_repeated_string As Map = jRoot.Get("repeated_string")
Images_repeated_string.Put("value",LinkList)
jRoot.Put("repeated_string",Images_repeated_string)
Private JSONGenerator1 As JSONGenerator
JSONGenerator1.Initialize(jRoot)
NewJsonTEXT = JSONGenerator1.ToString
Log(NewJsonTEXT)
so How can I fix it?
Last edited: