Mantis Bug Tracker

View Revisions: Issue #6535 All Revisions ] Back to Issue ]
Summary 0006535: JsonReadNotecard() does not work as expected for non-root paths
Revision 2013-02-07 18:44 by justincc
Steps To Reproduce This script will reproduce the all new multi-component path behaviour.

key storeID;
key requestID;

default
{
    touch_start(integer n)
    {
        storeID = JsonCreateStore("{}");
        requestID = JsonReadNotecard(storeID, "foo.bar", "nc1");
    }

    link_message(integer sender, integer ival, string sval, key id)
    {
        integer res = JsonTestPath(storeID, "Hello");
        llOwnerSay("Result for Hello " + (string)res);
        
        integer res2 = JsonTestPath(storeID, "foo.bar.Hello");
        llOwnerSay("Result for foo.bar.Hello " + (string)res2);
    }
}

with the notecard "nc1" containing

{"Hello":"World"}
Revision 2013-02-07 18:31 by justincc
Steps To Reproduce This script will reproduce the all new multi-component path behaviour.

key storeID;
key requestID;

default
{
    touch_start(integer n)
    {
        storeID = JsonCreateStore("{}");
        requestID = JsonReadNotecard(storeID, "foo.bar", "nc1");
    }

    link_message(integer sender, integer ival, string sval, key id)
    {
        integer res = JsonTestPath(storeID, "Hello");
        llOwnerSay("Result for Hello " + (string)res);
        
        integer res2 = JsonTestPath(storeID, "foo.bar.Hello");
        llOwnerSay("Result for foo/bar/Hello " + (string)res2);
    }
}

with the notecard "nc1" containing

{"Hello":"World"}
Revision 2013-02-07 17:14 by justincc
Steps To Reproduce This script will reproduce it

key storeID;
key requestID;

default
{
    touch_start(integer n)
    {
        storeID = JsonCreateStore("{}");
        requestID = JsonReadNotecard(storeID, "foo/bar", "nc1");
    }

    link_message(integer sender, integer ival, string sval, key id)
    {
        integer res = JsonTestPath(storeID, "Hello");
        llOwnerSay("Result for Hello " + (string)res);
        
        integer res2 = JsonTestPath(storeID, "foo/bar/Hello");
        llOwnerSay("Result for foo/bar/Hello " + (string)res2);
    }
}

with the notecard "nc1" containing

{"Hello":"World"}


Copyright © 2000 - 2012 MantisBT Group
Powered by Mantis Bugtracker