prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Need JSON format description
  The page on JSON serialization lacks information about the actual structure of produced data. This make it hard to see if networkx is a suitable tool for a backend of already existing JavaScript front.
  
  http://networkx.lanl.gov/reference/readwrite.json_graph.html
  
  
  </issue>
  <code>
  [start of networkx/readwrite/json_graph/__init__.py]
  1 """
  2 *********
  3 JSON data 
  4 *********
  5 Generate and parse JSON serializable data for NetworkX graphs.
  6 """
  7 from networkx.readwrite.json_graph.node_link import *
  8 from networkx.readwrite.json_graph.adjacency import *
  9 from networkx.readwrite.json_graph.tree import *
  10 from networkx.readwrite.json_graph.serialize import *
  11
  [end of networkx/readwrite/json_graph/__init__.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: diff --git a/networkx/readwrite/json_graph/__init__.py b/networkx/readwrite/json_graph/__init__.py
  --- a/networkx/readwrite/json_graph/__init__.py
  +++ b/networkx/readwrite/json_graph/__init__.py
  @@ -1,8 +1,16 @@
   """
   *********
  -JSON data 
  +JSON data
   *********
   Generate and parse JSON serializable data for NetworkX graphs.
  +
  +These formats are suitable for use with the d3.js examples http://d3js.org/
  +
  +The three formats that you can generate with NetworkX are:
  +
  + - node-link like in the d3.js example http://bl.ocks.org/mbostock/4062045
  + - tree like in the d3.js example http://bl.ocks.org/mbostock/4063550
  + - adjacency like in the d3.js example http://bost.ocks.org/mike/miserables/
   """
   from networkx.readwrite.json_graph.node_link import *
   from networkx.readwrite.json_graph.adjacency import *
  
verification_info: {"golden_diff": "diff --git a/networkx/readwrite/json_graph/__init__.py b/networkx/readwrite/json_graph/__init__.py\n--- a/networkx/readwrite/json_graph/__init__.py\n+++ b/networkx/readwrite/json_graph/__init__.py\n@@ -1,8 +1,16 @@\n \"\"\"\n *********\n-JSON data \n+JSON data\n *********\n Generate and parse JSON serializable data for NetworkX graphs.\n+\n+These formats are suitable for use with the d3.js examples http://d3js.org/\n+\n+The three formats that you can generate with NetworkX are:\n+\n+ - node-link like in the d3.js example http://bl.ocks.org/mbostock/4062045\n+ - tree like in the d3.js example http://bl.ocks.org/mbostock/4063550\n+ - adjacency like in the d3.js example http://bost.ocks.org/mike/miserables/\n \"\"\"\n from networkx.readwrite.json_graph.node_link import *\n from networkx.readwrite.json_graph.adjacency import *\n", "issue": "Need JSON format description\nThe page on JSON serialization lacks information about the actual structure of produced data. This make it hard to see if networkx is a suitable tool for a backend of already existing JavaScript front.\n\nhttp://networkx.lanl.gov/reference/readwrite.json_graph.html\n\n", "before_files": [{"content": "\"\"\"\n*********\nJSON data \n*********\nGenerate and parse JSON serializable data for NetworkX graphs.\n\"\"\"\nfrom networkx.readwrite.json_graph.node_link import *\nfrom networkx.readwrite.json_graph.adjacency import *\nfrom networkx.readwrite.json_graph.tree import *\nfrom networkx.readwrite.json_graph.serialize import *\n", "path": "networkx/readwrite/json_graph/__init__.py"}]}