Noear.Snacks.ONode.tryLoad C# (CSharp) Method

tryLoad() public static method

public static tryLoad ( String ops ) : ONode
ops String
return ONode
    public static ONode tryLoad(String ops)
    {
        if (ops == null || ops.Length < 2)
                return new ONode();

            try {
                if (ops[0] == '<')
                    return readXmlValue(new XmlReader(ops));
                else
                    return readJsonValue(new JsonReader(ops));
            }
            catch {
                return new ONode();
            }
    }