*/
JSONObject jsonFromElement(Element element) {
boolean isEdge = element instanceof Edge;
boolean showTypes = mode == GraphsonMode.EXTENDED;
Set<String> propertyKeys = isEdge ? this.edgePropertyKeys : this.vertexPropertyKeys;
ElementPropertiesRule elementPropertyConfig = isEdge ? this.edgePropertiesRule : this.vertexPropertiesRule;
JSONObject jsonElement = createJSONMap(createPropertyMap(element, propertyKeys, elementPropertyConfig), propertyKeys, showTypes);
if ((isEdge && this.includeReservedEdgeId) || (!isEdge && this.includeReservedVertexId)) {
putObject(jsonElement, GraphsonTokens._ID, element.getId());