Add write_json to improve compatibility
#381
+79
−5
Open