I am trying to get some info out of a json file online. I obtain and parse the file just fine but I can't for the life of me figure out what statement i need to make in order to get the info I need.
The problem stems from the format of the json file:
[{"Event_ID":15642,"Event_Title":"Saturday 6pm Service","Event_Start_Date":"2016-07-02T18:00:00","Event_End_Date":"2016-07-02T19:30:00","Enable_Event_Streaming":true,"Ministry_Name":"Weekend Worship","Congregation_ID":5,"Congregation_Name":"CCM Melbourne","Description":"Children's ministry is available for infants through 6th grade.","WebHTML":null}]
This is the entirety of the file in question. As a start, i've been trying to make a statement to check the boolean "Enable_Event_Streaming". The following is what I have in code:
sub CreateLiveMenu()
Stream = CreateObject("roAssociativeArray")
link_url = [the url link to the json file]
json_str = GetXML_1(link_url) 'retrieves the json file information (ignore the name). I am already assured this works so don't worry about it for now
json = ParseJson(json_str) 'I have already confirmed this statement works through a print statement displaying all the information in the file correctly
will_stream = json.Enable_Event_Streaming
if will_stream = true
print "will stream"
else
print "won't stream"
end if
return
end sub
Any help in sorting out this issue would be appreciated.
I AM THE ARCHMAGE... who is also rather new to Brightscript so forgive me for seeming inept at times.