Dumping the json result into json file
See original GitHub issueI have two questions.
-
How can I dump the json output to a json file instead of printing out? I currently have
docker run -v $(pwd):/tmp mythril/myth analyze /tmp/simple_int_overflow.sol -o json --solv 0.4.24 --execution-timeout 86400
to print out the json output. I tried adding-j /tmp/test.sol
, but it doesn’t seem like the outputs are the same. -
If I want to recursively run mythril on the background to scan through a directory of smart contracts and print the results to
.json
in Python, how can I do that?
Issue Analytics
- State:
- Created a year ago
- Comments:8
Top Results From Across the Web
python - How do I write JSON data to a file?
import json with open('data.json', 'w') as f: json.dump(data, f). On a modern system (i.e. Python 3 and UTF-8 support), you can write a...
Read more >Reading and Writing JSON to a File in Python
To write JSON contents to a file in Python - we can use json.dump() and json.dumps() . These are separate methods and achieve...
Read more >Python Tutorial: json.dump(s) & json.load(s) - 2021
dumps ()" returns a string as indicated by the "s" at the end of "dumps". This process is called encoding. Let's write it...
Read more >Python JSON dump() and dumps() for JSON Encoding
The json.dump() method (without “s” in “dump”) used to write Python serialized object as JSON formatted data into a file. ; The json.dumps() ......
Read more >Python JSON: Encode(dumps), Decode(loads) & Read ...
What is JSON? JSON is a standard format for data exchange, which is inspired by JavaScript. Generally, JSON is in string or text...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
You can directly run the cli
myth a file.sol -o json > output_file.json
through python with something likeos.system()
orsubprocess.call
functionsThank you so much!