Beispiel #1
0
    // TODO GetTopLevel

    public static P6any FromJson(string inp)
    {
        JsyncReader j = new JsyncReader();

        j.from = inp;
        j.SkipWhite(true);
        Variable top = j.GetFromJson(true);

        j.SkipWhite(false);
        if (j.ix != inp.Length)
        {
            j.Err("Trailing garbage after object");
        }

        return(top.Fetch());
    }
Beispiel #2
0
    [ImplicitConsts] public static P6any from_json(Constants c, string inp)
    {
        JsyncReader j = new JsyncReader()
        {
            setting = c.setting
        };

        j.from = inp;
        j.SkipWhite(true);
        Variable top = j.GetFromJson(true);

        j.SkipWhite(false);
        if (j.ix != inp.Length)
        {
            j.Err("Trailing garbage after object");
        }

        return(top.Fetch());
    }