提交 79324466 编写于 作者: K Kamil Kisiel 提交者: Kohsuke Kawaguchi

Document use of literal_eval for Python API

上级 b8eb5137
......@@ -66,12 +66,18 @@ THE SOFTWARE.
<dt><a href="python">Python API</a></dt>
<dd>
Access the same data as Python for Python clients. This can be parsed into Python
object as <tt>eval(urllib.urlopen("...").read())</tt> and the resulting object
tree is identical to that of JSON.
<p>
Access the same data as Python for Python clients. This can be parsed into Python
object as <tt>eval(urllib.urlopen("...").read())</tt> and the resulting object
tree is identical to that of JSON.
However, when you do this, beware of the security implication. If you are connecting
to a non-trusted Jenkins, the server can send you malicious Python programs.
However, when you do this, beware of the security implication. If you are connecting
to a non-trusted Jenkins, the server can send you malicious Python programs.
</p>
<p>
In Python 2.6 or later you can safely parse this output using
<tt>ast.literal_eval(urllib.urlopen("...").read())</tt>
</p>
</dd>
</dl>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册