A fact for a person or relationship.

@see {@link https://github.com/FamilySearch/gedcomx/blob/master/specifications/json-format-specification.md#fact-conclusion|GEDCOM X JSON Spec}

@class
@extends Conclusion
@param {Object} [json]
961127
function(json){
  
  // Protect against forgetting the new keyword when calling the constructor
  if(!(this instanceof Fact)){
    return new Fact(json);
  }
  
  // If the given object is already an instance then just return it. DON'T copy it.
  if(Fact.isInstance(json)){
    return json;
  }
  
  this.init(json);
}
1027505
def has_ref?(json_object)
      if json_object["_ref"].nil?
        return false
      end
      if @wsapi_version =~ /^v2/
        return true if json_object["_ref"] =~ /^https:\/\/\S*(\/slm\/webservice)\S*$/
      else
        return true if json_object["_ref"] =~ /^https:\/\/\S*(\/slm\/webservice)\S*.js$/
      end
      false
    end
1349816
def from_json(cls, data, json_schema_class=None):
        
        schema = cls.json_schema if json_schema_class is None else json_schema_class()
        return super(InfinityVertex, cls).from_json(data=data, json_schema_class=schema.__class__)
646559
function(json, facet, options) {	
	var related_facet = (options && options.related_facet) || 'related_facet'
	, series_list = _.plain(json).sortPlain(facet || 'parent').keys().value()
	, series = [ related_facet];
	
	facet = facet || this.getParent( json );
	
	// map over the object to aggregate row values
	return({
		values: _mapSeries( _.reduce(json, function(res, hash, key) {
			res[key] = _formatRow(null, hash, related_facet);
			return res;
		}, {}), _.keys(json), series ),
		facet: facet,
		series: series,
		series_list: series_list,
		series_length: series_list.length,
		depth: depth(json)
	});
}
481113
function(json){
  
  // Protect against forgetting the new keyword when calling the constructor
  if(!(this instanceof TextValue)){
    return new TextValue(json);
  }
  
  // If the given object is already an instance then just return it. DON'T copy it.
  if(TextValue.isInstance(json)){
    return json;
  }
  
  this.init(json);
}
745238
function(rs, facts, doTagging, resolvedImplicitFactSet) {
        var deferred = q.defer(), promises = [], cons = [], filteredFacts;
        for (var key in rs) {            
            if (doTagging) {
                promises.push(this.evaluateThroughRestrictionWithTagging(rs[key], facts, resolvedImplicitFactSet));
            } else {
                promises.push(this.evaluateThroughRestriction(rs[key], facts));
            }
        }
        try {                    
            q.all(promises).then(function (consTab) {                
                for (var i = 0; i < consTab.length; i++) {
                    cons = cons.concat(consTab[i]);
                }
                deferred.resolve({cons: cons});
            });
        } catch(e) {
            deferred.reject(e);
        }
        return deferred.promise;
    }
1118538
function(json){
  
  // Protect against forgetting the new keyword when calling the constructor
  if(!(this instanceof NamePart)){
    return new NamePart(json);
  }
  
  // If the given object is already an instance then just return it. DON'T copy it.
  if(NamePart.isInstance(json)){
    return json;
  }
  
  this.init(json);
}
687135
function(fact) {
        if ((this.explicit != fact.explicit) ||
            (this.subject != fact.subject) ||
            (this.predicate != fact.predicate) ||
            (this.object != fact.object)) {
            return false;
        }
        return true;
    }
351377
function(a, b) {

            function sort(object) {
                if (typeof object !== "object" || object === null) {
                    return object;
                }

                return Object.keys(object).sort().map(function(key) {
                    return {
                        key: key,
                        value: sort(object[key])
                    };
                });
            }

            return JSON.stringify(sort(a)) === JSON.stringify(sort(b));
        }
873824
def __json_truefalse_parse(json_object):
        
        for key in ('follow', 'favourite', 'reblog', 'mention'):
            if (key in json_object and isinstance(json_object[key], six.text_type)):
                if json_object[key] == 'True':
                    json_object[key] = True
                if json_object[key] == 'False':
                    json_object[key] = False
        return json_object
53173
function(json){
  
  // Protect against forgetting the new keyword when calling the constructor
  if(!(this instanceof Qualifier)){
    return new Qualifier(json);
  }
  
  // If the given object is already an instance then just return it. DON'T copy it.
  if(Qualifier.isInstance(json)){
    return json;
  }
  
  this.init(json);
}
755218
function(json, type) {
			var Def, def, val, desc, types = Object.create(null);
			var base = type.constructor.prototype;
			var name = type.constructor.$classname;
			evalheaders(json, type);
			definitions(type).forEach(function(key) {
				def = type[key];
				val = json[key];
				switch (def) {
					case Object:
						//	console.error('TODO: Support Object in edb.ObjectPopulator');
						type[key] = {};
						break;
					case Array:
						if (val && Array.isArray(val)) {
							type[key] = val.slice();
						} else {
							type[key] = [];
						}
						break;
					default:
						if (isdefined(val)) {
							if (isdefined(def)) {
								if (iscomplex(def)) {
									if (isfunction(def)) {
										if (!isconstructor(def)) {
											def = def(val);
										}
										if (isconstructor(def)) {
											if (val !== null) {
												Def = def;
												types[key] = Def.from(json[key]);
											}
										} else {
											failconstructor(name, key);
										}
									} else {
										types[key] = edb.Type.cast(isdefined(val) ? val : def);
									}
								}
							} else {
								faildefined(name, key);
							}
						} else {
							if (isregular(key) && edb.Type.isConstructor(def)) {
								/*
								 * TODO: cleanup something here
								 */
								if (edb.Array.isConstructor(def)) {
									json[key] = [];
								} else {
									json[key] = null; // TODO: stay null somehow...
								}
								Def = def;
								types[key] = Def.from(json[key]);
							} else {
								if ((desc = lookupDescriptor(base, key))) {
									Object.defineProperty(json, key, desc);
								}
							}
						}
						break;
				}
			});
			gui.Object.nonmethods(json).forEach(function(key) {
				var def = json[key];
				if (isregular(key) && gui.Type.isComplex(def)) {
					if (!types[key]) {
						types[key] = edb.Type.cast(def);
					}
				}
			});
			return types;
		}
999508
function(kind, inFor) {
      var node = this.startNode(_VariableDeclaration);
      var allowIn = !inFor;
      var declarations = this.parseVariableDeclarationList(allowIn);

      if (!inFor) {
        this.expectSemicolon();
      }

      node.declarations = declarations;
      node.kind = kind;
      return this.finishNode(node);
    }
540608
function(json){
  
  // Protect against forgetting the new keyword when calling the constructor
  if(!(this instanceof Identifiers)){
    return new Identifiers(json);
  }
  
  // If the given object is already an instance then just return it. DON'T copy it.
  if(Identifiers.isInstance(json)){
    return json;
  }
  
  this.init(json);
}
540227
function(t, explicit, notUsingValid) {
        if(explicit === undefined) {
            explicit = true;
        }
        return new Fact(t.predicate.toString(), t.subject.toString(), t.object.toString()/*.format()*/, [], explicit, [], [], notUsingValid, t.toString())
    }
761012
def final_definitions
      parent_definitions = Hash(parent&.definitions&.dup)
      definitions.each_with_object(parent_definitions) do |(key, val), obj|
        obj[key] = check_type(obj[key], val)
      end
    end
1190503
function parseOn(cls, alias, method, joinTable, joinAlias, on) {
    cls[method](`${joinTable} as ${joinAlias}`, function () {
        for (let n in on) {
            if (n.toLowerCase() === 'or') {
                if (!helper.isArray(on[n])) {
                    continue;
                }
                on[n].map(item => {
                    for (let i in item) {
                        this.orOn(`${alias}.${i}`, '=', `${joinAlias}.${item[i]}`);
                    }
                });
            } else {
                this.on(`${alias}.${n}`, '=', `${joinAlias}.${on[n]}`);
            }
        }
    });
}