
try: 
    import simplejson as json
except ImportError: 
    import json

BANNER = "/* This file was automatically generated by art-packer and shouldn't be changed manually */\n"

class JSONMetadataSaver:
    def __init__(self, filename):
         self.filename = filename
  
    def save(self, metadata):
        content = BANNER + json.dumps(metadata, indent='  ')
        with open(self.filename, 'w') as fh:
            fh.write(content)
