# Path: cloudvolume/lib.py
# def jsonify(obj, **kwargs):
#   return json.dumps(obj, cls=NumpyEncoder, **kwargs)


import re
import numpy as np
from ....lib import jsonify

  @property
  def basepath(self):
    return self.meta.basepath

  @property
  def cloudpath(self):
    return self.meta.cloudpath

  @property
  def layerpath(self):
    return self.meta.join(self.meta.cloudpath, self.mesh_path)

  def fetch_info(self):
    if 'mesh' not in self.meta.info or not self.meta.info['mesh']:
      return self.default_info()

    info = self.cache.download_json(self.meta.join(self.mesh_path, 'info'))
    if not info:
      return self.default_info()
    return info

  def refresh_info(self):
    self.info = self.fetch_info()
    return self.info

  def commit_info(self):
    if self.info:
      self.cache.upload_single(
        self.meta.join(self.mesh_path, 'info'),

# Path: cloudvolume/lib.py
# def jsonify(obj, **kwargs):
#   return json.dumps(obj, cls=NumpyEncoder, **kwargs)


# Path: cloudvolume/datasource/precomputed/mesh/metadata.py
import re
import numpy as np
from ....lib import jsonify


  @property
  def basepath(self):
    return self.meta.basepath

  @property
  def cloudpath(self):
    return self.meta.cloudpath

  @property
  def layerpath(self):
    return self.meta.join(self.meta.cloudpath, self.mesh_path)

  def fetch_info(self):
    if 'mesh' not in self.meta.info or not self.meta.info['mesh']:
      return self.default_info()

    info = self.cache.download_json(self.meta.join(self.mesh_path, 'info'))
    if not info:
      return self.default_info()
    return info

  def refresh_info(self):
    self.info = self.fetch_info()
    return self.info

  def commit_info(self):
    if self.info:
      self.cache.upload_single(
        self.meta.join(self.mesh_path, 'info'),

        jsonify(self.info), 