<human>:  2 write json object to file.
<bot>: Here is a Python function to write a json object to file

import json

def write_json_object_to_file(json_object, file_name):
  """
  Write json object to file
  """
  with open(file_name, 'w') as f:
    f.write(json.dumps(json_object))

# Enter the json object
json_object = {"a": 1, "b": 2}

# Calling the function
print((write_json_object_to_file(json_object, "test.json")))

#Example Output
# None

#Remember to inspect code for bugs.