示例#1
0
文件: jld.go 项目: develrns/resilient
/*
GetNRef returns the id of a node reference if the input is one.
*/
func GetNRef(input interface{}) (string, bool) {
	var (
		nref map[string]interface{}
	)

	if !ld.IsNodeReference(input) {
		return "", false
	}
	nref = input.(map[string]interface{})
	return nref["@id"].(string), true
}
示例#2
0
文件: jld.go 项目: develrns/resilient
/*
IsNref returns true if the input is a JSON LD node reference.
*/
func IsNref(input interface{}) bool {
	return ld.IsNodeReference(input)
}