我尝试在ubuntu 18.04中为python2.7安装pylint,但是使用以下单词会引发错误:
pip install pylint
Collecting pylint
Using cached https://pypi.tuna.tsinghua.edu.cn/packages/04/1f/1d3929051b45c3e4015178c5fe5bbee735fb4e362e0fc4f0fbf3f68647ad/pylint-2.1.1.tar.gz
pylint requires Python '>=3.4.*' but the running Python is 2.7.15
Run Code Online (Sandbox Code Playgroud)
我已经使用pip3成功为python3.6安装了pylint。
那么,如何为python2.7安装pylint?
我有一个关于 C 解析 json 数组的问题,我知道 cJSON 如何解析 json 使用 C,但是我在 Google 中找不到任何关于如何解析 json 数组的结果,我看过Using cJSON to read in a JSON array,但它不适合我。
我从 Web API 接收到一个 json 数组,它看起来像这样:
[{\"id\":\"25139\",\"date\":\"2016-10-27\",\"name\":\"Komfy Switch With Camera DKZ-201S\\/W Password Disclosure\"},{\"id\":\"25117\",\"date\":\"2016-10-24\",\"name\":\"NETDOIT weak password Vulnerability\"}]
Run Code Online (Sandbox Code Playgroud)
如您所见,数组中有很多 json,那么,如何使用 cJSON lib 解析数组?