我工作的情绪API,它使输出JSON格式 现在我想解析它在PHP解析JSON格式输出
{ "status": "OK", "usage": "By accessing AlchemyAPI or using information generated by AlchemyAPI, you are agreeing to be bound by the AlchemyAPI Terms of Use: http://www.alchemyapi.com/company/terms.html", "url": "", "language": "english", "docSentiment": { "type": "neutral" } }
这是我的输出JSON格式。
我想输出只是"type" = "neutral"
的例子只是使用'json_decode'! '$ decode = json_decode($ jsonString,true); echo $ decode ['docSentiment'] ['type'];'[check here](http://codepad.org/UnbsM1HJ) –
Json格式需要':'不是'=' – Bora
这个问题已被多次询问并且在互联网上很容易找到。你显然没有做任何事情找到一个解决方案之前发布它在这里... – NDM