human
Give me a Python function to stream json to a file.
assistant
Here is a Python function to stream json to a file

import json

def json_to_file(json_string, filename):
    """
    Stream json to a file

    :param json_string:
    :param filename:
    """
    with open(filename, 'w') as f:
        f.write(json_string)

# Enter the json string
json_string = "{\"hello\": \"world\"}"

# Enter the filename
filename = "test.json"

# Calling the function
print((json_to_file(json_string, filename)))

#Example Output
# None

#Remember to inspect code for bugs.