From 8130e1c54f570cbfbbb975352e36c3d12592695d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=A4rkl?= Date: Sun, 17 Mar 2019 14:02:47 +0100 Subject: [PATCH] Add warning about json commands to docs --- docs/source/plugins/tutorial-python.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/source/plugins/tutorial-python.rst b/docs/source/plugins/tutorial-python.rst index 28616b3c..832364b4 100644 --- a/docs/source/plugins/tutorial-python.rst +++ b/docs/source/plugins/tutorial-python.rst @@ -143,6 +143,10 @@ Many commands in radare2 can be suffixed with a ``j`` to return JSON output. ``cmdj()`` will automatically deserialize the JSON into python dicts and lists, so the information can be easily accessed. +.. warning:: + When fetching data that is not meant to be used only as readable text, **always** use the JSON variant of a command! + Regular command output is not meant to be parsed and is subject to change at any time, which will break your code. + In our case, we use the two commands ``pd`` (Print Disassembly) and ``pdj`` (Print Disassembly as JSON) with a parameter of 1 to fetch a single line of disassembly.