Please can anyone get me started with the following question?
I get a php file from a website that contains lots of data but I only need some of it. The file is so large I cannot paste it here.
I want to extract the data which is in JSON format and work with it in python.
The file for the example is named JSON1.php. When I open it using a text editor the contents are laid out in this format. Though this is a JSON example I found online.
{
"glossary": {
"title": "example glossary",
"GlossDiv": {
"title": "S",
"GlossList": {
"GlossEntry": {
"ID": "SGML",
"SortAs": "SGML",
"GlossTerm": "Standard Generalized Markup Language",
"Acronym": "SGML",
"Abbrev": "ISO 8879:1986",
"GlossDef": {
"para": "A meta-markup language, used to create markup languages such as DocBook.",
"GlossSeeAlso": ["GML", "XML"]
},
"GlossSee": "markup"
}
}
}
}
}
From what I can see it is standard JSON.
What I have been able to google and what I have found here doesn't deal with JSON data saved in a file with .php extention.
Many thanks!