transform this local object to JSON
        :param ignore_genealogy: ignore the genealogy of this object if true (awaited format for Ariane server)
        :return: the resulting JSON of transformation
552752
def injector_ui_tree_menu_entity_2_json(self, ignore_genealogy=False):
        
        LOGGER.debug("InjectorUITreeEntity.injector_ui_tree_menu_entity_2_json")
        if ignore_genealogy:
            json_obj = {
                'id': self.id,
                'value': self.value,
                'type': self.type,
                'description': self.description if self.description is not None else "",
                'contextAddress': self.context_address if self.context_address is not None else "",
                'icon': self.icon if self.icon is not None else ""
            }
            if self.display_permissions is not None:
                json_obj['displayPermissions'] = self.display_permissions
            if self.display_roles is not None:
                json_obj['displayRoles'] = self.display_roles
            if self.other_actions_perms is not None:
                json_obj['otherActionsPerms'] = self.other_actions_perms
            if self.other_actions_roles is not None:
                json_obj['otherActionsRoles'] = self.other_actions_roles
            if self.remote_injector_tree_entity_gears_cache_id is not None and \
                    self.remote_injector_tree_entity_gears_cache_id:
                json_obj['remoteInjectorTreeEntityGearsCacheId'] = self.remote_injector_tree_entity_gears_cache_id
            if self.remote_injector_tree_entity_components_cache_id is not None and \
                    self.remote_injector_tree_entity_components_cache_id:
                json_obj['remoteInjectorTreeEntityComponentsCacheId'] = \
                    self.remote_injector_tree_entity_components_cache_id
        else:
            json_obj = {
                'id': self.id,
                'value': self.value,
                'type': self.type,
                'description': self.description if self.description is not None else "",
                'contextAddress': self.context_address if self.context_address is not None else "",
                'icon': self.icon if self.icon is not None else "",
                'parentTreeMenuEntityID': self.parent_id
            }
            if self.child_ids is not None:
                json_obj['childsID'] = self.child_ids
            if self.display_permissions is not None:
                json_obj['displayPermissions'] = self.display_permissions
            if self.display_roles is not None:
                json_obj['displayRoles'] = self.display_roles
            if self.other_actions_perms is not None:
                json_obj['otherActionsPerms'] = self.other_actions_perms
            if self.other_actions_roles is not None:
                json_obj['otherActionsRoles'] = self.other_actions_roles
            if self.remote_injector_tree_entity_gears_cache_id is not None and \
                    self.remote_injector_tree_entity_gears_cache_id:
                json_obj['remoteInjectorTreeEntityGearsCacheId'] = self.remote_injector_tree_entity_gears_cache_id
            if self.remote_injector_tree_entity_components_cache_id is not None and \
                    self.remote_injector_tree_entity_components_cache_id:
                json_obj['remoteInjectorTreeEntityComponentsCacheId'] = \
                    self.remote_injector_tree_entity_components_cache_id

        return json_obj
887895
def serialize(self, pid, record, links_factory=None, **kwargs):
        
        return json.dumps(
            self.transform_record(pid, record, links_factory, **kwargs),
            **self._format_args())
211320
def _to_json(self, sort_keys=False, indent=4):
        
        return json.dumps(self, sort_keys=sort_keys, indent=indent, cls=CtabAtomBondEncoder)
1302303
function toJSON(unfilteredOptions) {
        const options = ghostBookshelf.Model.filterOptions(unfilteredOptions, 'toJSON');
        options.omitPivot = true;

        // CASE: get JSON of previous attrs
        if (options.previous) {
            const clonedModel = _.cloneDeep(this);
            clonedModel.attributes = this._previousAttributes;

            if (this.relationships) {
                this.relationships.forEach((relation) => {
                    if (this._previousRelations && this._previousRelations.hasOwnProperty(relation)) {
                        clonedModel.related(relation).models = this._previousRelations[relation].models;
                    }
                });
            }

            return proto.toJSON.call(clonedModel, options);
        }

        return proto.toJSON.call(this, options);
    }
725708
def to_json(self, minimal=True):
        
        if minimal:
            return json.dumps(self.json_repr(minimal=True), cls=MarathonMinimalJsonEncoder, sort_keys=True)
        else:
            return json.dumps(self.json_repr(), cls=MarathonJsonEncoder, sort_keys=True)
324054
def to_json(self):
        
        capsule = {}
        capsule["Hierarchy"] = []
        for (
            dying,
            (persistence, surviving, saddle),
        ) in self.merge_sequence.items():
            capsule["Hierarchy"].append(
                {
                    "Dying": dying,
                    "Persistence": persistence,
                    "Surviving": surviving,
                    "Saddle": saddle,
                }
            )
        capsule["Partitions"] = []
        base = np.array([None, None] * len(self.Y)).reshape(-1, 2)
        for (min_index, max_index), items in self.base_partitions.items():
            base[items, :] = [min_index, max_index]
        capsule["Partitions"] = base.tolist()

        return json.dumps(capsule)
1347876
def get_person_from_legacy_format(profile_record):
    

    if not is_profile_in_legacy_format(profile_record):
        raise ValueError("Not a legacy profile")

    profile = profile_record

    try:
        profile = json.loads(json.dumps(profile))
    except ValueError:
        pass

    images = []
    accounts = []
    profile_data = {
        "@type": "Person"
    }

    if profile.has_key("name") and type(profile["name"]) == dict \
            and profile["name"].has_key("formatted"):
        profile_data["name"] = profile["name"]["formatted"]

    if profile.has_key("bio"):
        profile_data["description"] = profile["bio"]

    if profile.has_key("location") and type(profile["location"]) == dict \
            and profile["location"].has_key("formatted"):
        profile_data["address"] = {
            "@type": "PostalAddress",
            "addressLocality": profile["location"]["formatted"]
        }

    if profile.has_key("avatar") and type(profile["avatar"]) == dict and \
            profile["avatar"].has_key("url"):
        images.append({
            "@type": "ImageObject",
            "name": "avatar",
            "contentUrl": profile["avatar"]["url"]
        })

    if profile.has_key("cover") and type(profile["cover"]) == dict and \
            profile["cover"].has_key("url"):
        images.append({
            "@type": "ImageObject",
            "name": "cover",
            "contentUrl": profile["cover"]["url"]
        })

    if len(images) > 0:
        profile_data["image"] = images

    if profile.has_key("website") and type(profile["website"]) in [str, unicode]:
        profile_data["website"] = [{
            "@type": "WebSite",
            "url": profile["website"]
        }]

    for service_name in ["twitter", "facebook", "github"]:
        if profile.has_key(service_name):
            accounts.append(
                format_account(service_name, profile[service_name])
            )

    if profile.has_key("bitcoin") and type(profile["bitcoin"]) == dict and \
            profile["bitcoin"].has_key("address"):
        accounts.append({
            "@type": "Account",
            "role": "payment",
            "service": "bitcoin",
            "identifier": profile["bitcoin"]["address"]
        })

    if profile.has_key("auth"):
        if len(profile["auth"]) > 0 and type(profile["auth"]) == dict:
            if profile["auth"][0].has_key("publicKeychain"):
                accounts.append({
                    "@type": "Account",
                    "role": "key",
                    "service": "bip32",
                    "identifier": profile["auth"][0]["publicKeychain"]
                })

    if profile.has_key("pgp") and type(profile["pgp"]) == dict \
            and profile["pgp"].has_key("url") \
            and profile["pgp"].has_key("fingerprint"):
        accounts.append({
            "@type": "Account",
            "role": "key",
            "service": "pgp",
            "identifier": profile["pgp"]["fingerprint"],
            "contentUrl": profile["pgp"]["url"]
        })

    profile_data["account"] = accounts 

    return profile_data
287020
def featureclass_to_json(fc):
    """"""
    if arcpyFound == False:
        raise Exception("ArcPy is required to use this function")
    desc = arcpy.Describe(fc)
    if desc.dataType == "Table" or desc.dataType == "TableView":
        return recordset_to_json(table=fc)
    else:
        return arcpy.FeatureSet(fc).JSON
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)
250911
def _serialize(self, include_run_logs=False, strict_json=False):
        
        result = {'dagobah_id': self.dagobah_id,
                  'created_jobs': self.created_jobs,
                  'jobs': [job._serialize(include_run_logs=include_run_logs,
                                          strict_json=strict_json)
                           for job in self.jobs]}
        if strict_json:
            result = json.loads(json.dumps(result, cls=StrictJSONEncoder))
        return result
570669
def to_JSON(self):
        
        return json.dumps({'id': self.id,
                           'external_id': self.external_id,
                           'name': self.name,
                           'created_at': timeformatutils.to_ISO8601(self.created_at),
                           'updated_at': timeformatutils.to_ISO8601(self.updated_at),
                           'lat': self.lat,
                           'lon': self.lon,
                           'alt': self.alt if self.alt is not None else 'None',
                           'rank': self.rank})
864397
def to_json(self):
        ''' 
        '''

        skip_list = []
        for u, v, connection_type in self.skip_connections:
            skip_list.append({"from": u, "to": v, "type": connection_type})
        return {"node_list": self.layers, "skip_list": skip_list}
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))
260866
def as_json(*args)
      document = { COLLECTION => collection, ID => id }
      document.merge!(DATABASE => database) if database
      document
    end
367532
def to_json(self):
        

        result = super(Snapshot, self).to_json()
        result.update({
            'snapshot': self.snapshot.to_json(),
        })
        return result
505043
def export_as_json(self):
        
        return {
            "items": {
                str(jid): item.export_as_json()
                for jid, item in self.items.items()
            },
            "ver": self.version
        }
417679
def as_json(only: nil, except: nil, context: {})
      execute(Introspection::INTROSPECTION_QUERY, only: only, except: except, context: context).to_h
    end