Export a pipeline to json.
174415
def export_pipeline(conf, args):
    """"""
    # Export the source pipeline and save it to file
    src = conf.config['instances'][args.src_instance]
    src_url = api.build_pipeline_url(build_instance_url(src))
    src_auth = tuple([conf.creds['instances'][args.src_instance]['user'],
                      conf.creds['instances'][args.src_instance]['pass']])
    verify_ssl = src.get('verify_ssl', True)
    export_json = api.export_pipeline(src_url, args.src_pipeline_id, src_auth, verify_ssl)
    with open(args.out, 'w') as outFile:
        outFile.write(json.dumps(export_json, indent=4, sort_keys=False))
        return (0, '')
565003
def dumps(obj):
    """"""
    return json.dumps(obj, indent=4, sort_keys=True, cls=CustomEncoder)
243460
def to_json(object, use_alias = false)
      hash = to_hash(object, use_alias)
      JSON.dump(hash)
    end
1315836
def to_json(self, *, include_keys=None, exclude_keys=None, use_default_excludes=True,
              pretty=False):
    
    return to_json(
      self.to_dict(
        include_keys=include_keys,
        exclude_keys=exclude_keys,
        use_default_excludes=use_default_excludes),
      pretty=pretty)
811753
def log_to_json(log):
    """"""
    return [log.timestamp.isoformat()[:22],
            log.level, log.process, log.message]
1253527
def dump(obj, fp, **kwargs):
    """"""
    kwargs['default'] = serialize
    return json.dump(obj, fp, **kwargs)
1281822
def dump(self):
        """"""

        return {
            'title': self.title,
            'issue_id': self.issue_id,
            'reporter': self.reporter,
            'assignee': self.assignee,
            'status': self.status,
            'product': self.product,
            'component': self.component,
            'created_at': self.created_at,
            'updated_at': self.updated_at,
            'closed_at': self.closed_at,
            'status_code': self.status_code
        }
384516
def to_json(self, obj, host=None, indent=None):
        """"""
        if indent:
            return json.dumps(deep_map(lambda o: self.encode(o, host), obj),
                              indent=indent)
        else:
            return json.dumps(deep_map(lambda o: self.encode(o, host), obj))
702418
def dump(self, file, sort_keys: bool = True, **kwargs) -> None:
        """"""
        json.dump(self.to_json(), file, sort_keys=sort_keys, **kwargs)
735407
def to_output(self, value):
        """"""
        return json.loads(resolwe_runtime_utils.save_file(self.name, value.path, *value.refs))
787718
def to_json(payload, mode="history"):
    """"""
    for key, val in six.iteritems(payload):
        if isinstance(val, dict):
            payload[key] = to_json(val, mode)
        else:
            payload[key] = val_to_json(
                key, val, mode, step=payload.get("_step"))
    return payload
40810
def to_json(options = {})
      options.reverse_merge!({ :root => Rabl.configuration.include_json_root })
      result = to_dumpable(options)
      format_json(result)
    end
437914
def as_json(context):
    """"""
    info = {
        'info': cgi.escape(pprint.pformat(context.context)),
    }
    return Response(content_type='application/json', body=json.dumps(info))
1146720
def dumps(self, sort_keys: bool = True, **kwargs) -> str:
        """"""
        return json.dumps(self.to_json(), sort_keys=sort_keys, **kwargs)
505043
def export_as_json(self):
        
        return {
            "items": {
                str(jid): item.export_as_json()
                for jid, item in self.items.items()
            },
            "ver": self.version
        }
512765
def publish_json(self, channel, obj):
        """"""
        return self.publish(channel, json.dumps(obj))
321781
def to_json(self, path: Optional[str] = None, **kwargs) -> str:
        
        from .io import save_json
        return save_json(self, path, **kwargs)