bandicoot.io.
to_json
(objects, filename, warnings=True)¶Export the indicators of one or several users to JSON.
Parameters: |
|
---|
Examples
This function can be use to export the results of :meth`bandicoot.utils.all`. >>> U_1 = bc.User() >>> U_2 = bc.User() >>> bc.to_json([bc.utils.all(U_1), bc.utils.all(U_2)], ‘results_1_2.json’)
If you only have one object, you can simply pass it as argument: >>> bc.to_json(bc.utils.all(U_1), ‘results_1.json’)