Hi Rob,
I believe understand what you are trying to do, but I believe it can be done more simply in Javascript,
providing that you take advantage of the fact that Javascript is actually not object-oriented.
So, say I have a string object, e.g.
var funnyString = new String("funny");
I can add anything I want to it, and it will be carried along.
funnyString.rider= "another";
funnyString this will be accepted and passed through by anything that accepts Strings, but anytime you want, you can access the rider.
function getRider(possiblyFunnyString)
{
if(possiblyFunnyString.rider)
return possiblyFunnyString.rider;
}
So to implement your "pointer" concept, just map a bunch of objects, and then add the map as a rider to each object
var riderMap = {};
ridermap["main"]=new String("funny");
ridermap["main"].rider = riderMap;
ridermap["alt"]=new String("another");
ridermap["alt"].rider = riderMap;
Now get a "pointer" to one of the objects
var pointer = ridermap["main"]; // this is a much faster lookup than JSon Pointers.
If you pass the pointer around, it will go anywhere that Strings go.
However, at any time you can do this... (after verifying it has a rider)
pointer = pointer.rider["alt"]; // or pointer = pointer.rider.alt;
and now the pointer can also be passed around like any other String, but with the other value.
This pointing technique can be used with any object types in Javascript, just not the primitives.
You can point to objects that are considered separate, or to objects that are already inside a hierarchy of some sort, it doesn't really matter.
And you don't need to drag in any additional Javascript libraries.
Regards,
--Bert