title: How to tackle with error ''Object of type int32 is not JSON serializable''
body: <p>I am trying to save one dict data in .json file format.
  When I try json.dump(JSON, json_file), it throws the error: Object of type int32 is not JSON serializable.</p>
  
  <p>I know, it is because I am using some numpy data in dictionary.</p>
  
  <p>Here is the code, that I tried.</p>
  
  <pre class="lang-py prettyprint-override"><code>import json
  for i in range(1):
      g = Balea_coordinate[i] # numpy array
      h = DM_coordinate[i]  # numpy array
      JSON = {"img_metadata" :  {
              "date" : "date",
              "Method" : "SIFT+RANSACK",
              "filename" : "Balea_",
              "size" : "SIZE",
              "regions":[{"0":{"shape_attributes":{"name":"polygon","all_points_x":[g[0,0,0],g[1,0,0],g[2,0,0],g[3,0,0]],
              "all_points_y":[g[0,0,1],g[1,0,1],g[2,0,1],g[3,0,1]]},
              "region_attributes":{"name":"Logo","type":"Balea"}},
              "1":{"shape_attributes":{"name":"polygon","all_points_x":[h[0,0,0],h[1,0,0],h[2,0,0],h[3,0,0]],
              "all_points_y":[h[0,0,1],h[1,0,1],h[2,0,1],h[3,0,1]]},
              "region_attributes":{"name":"Logo","type":"DM"}}}]}}
      with open('personal.json', 'w') as json_file:
          json.dump(JSON, json_file)
  ´´´
  </code></pre>