This is the JSON file I am working with:
I can parse thru all the information and add the chapters to an list. I also put all the chapter contents into an array of strings and use the list index to show the contents in a web control. Can anyone tell me how to convert the hex in the contents property to a normal string?? I tried the bit.hex function but returns an error. Do I need to parse thru the string one at a time to get a result?
B4X:
{"content": { "btitle":"Bob" "author":"Robert" "publisher":"sdfsdf" "other":"dsfsdf" "chapters":"1"
"chapter0": {
"title":"bob"
"content":"3C666F6E7420666163653D275365676F65205549272073697A653D2732273E73646673642066646E736473646620736D6A666C73646D6673203C623E6A6E666B6A6E736B6A6465667364666E202073646A666E6B6A7364666B6B64736D666B6C73646D666B6C6D6C736D6A736B6C6466203C2F623E646A6E6D666B6C6E736B6C64663C2F666F6E743E"
"chapter1": {
"title":"toy"
"content":"3C666F6E7420666163653D275365676F65205549272073697A653D2732273E6E646B6A666E6A736B646E667A7364662073646A666E6A736B646673643C2F666F6E743E"
}
}
}}
I can parse thru all the information and add the chapters to an list. I also put all the chapter contents into an array of strings and use the list index to show the contents in a web control. Can anyone tell me how to convert the hex in the contents property to a normal string?? I tried the bit.hex function but returns an error. Do I need to parse thru the string one at a time to get a result?