<｜begin▁of▁sentence｜>### Instruction:
Given a desired number of nodes (n) and a probability of edge creation (p) between nodes, can you use NetworkX's erdos_renyi_graph function to generate a graph based on the Erdős-Rényi model and print its adjacency list representation in JSON format?
### Response:
import networkx as nx
import json

# Generate a graph based on the Erdős-Rényi model
n = 10  # Number of nodes
p = 0.5  # Probability of edge creation
g = nx.erdos_renyi_graph(n, p)

# Convert the generated graph to the adjacency list format
adjacency_list = json.dumps(nx.to_dict_of_lists(g))
print(adjacency_list)
<|EOT|>
