You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now, a refererence tag is an internal type called ref that uses array revival for something like ref['path','to','data',0] which starts at the root of the object and recursively follows the object by field..
varobj=rootObject;// array or object root object of the JSOX resultfor(pathinrefPath){// ['path','to','data',0]obj=obj[path];}// obj at this point will point to the specified object.
References can ONLY refer to things that have already been encoded, there are no future references.
This means sometimes the objects don't yet exist in the real output object yet; so revisions had to be made to trace the active context stack following along until the temporary internal object is found, before it's linked into the resulting output object.
Idea
node.js/v8 util.format() for an object mark cyclic structures with <ref:1> and <ref:*1> (or something like that. This means that during stringification; previously computed string values have to be updated to include a reference to be later used, because when the object is stringified at a particular point, the reference can be used instead of showing the object's content.
However, such tags are much more brief; and through a large and twisted objects the current path notations may be a significant potion of increased size.
Intent
I suppose, I could also revisit the external usage API and allow specific user hooks to encode such things; the stringify IS kept in a array of strings that is joined as a concatenation, so it could be possible to prefix some thing(s)?
The text was updated successfully, but these errors were encountered:
Right now, a refererence tag is an internal type called
ref
that uses array revival for something likeref['path','to','data',0]
which starts at the root of the object and recursively follows the object by field..References can ONLY refer to things that have already been encoded, there are no future references.
During the process of reviving an object, based on comments made here
This means sometimes the objects don't yet exist in the real output object yet; so revisions had to be made to trace the active context stack following along until the temporary internal object is found, before it's linked into the resulting output object.
Idea
node.js/v8
util.format()
for an object mark cyclic structures with<ref:1>
and<ref:*1>
(or something like that. This means that during stringification; previously computed string values have to be updated to include a reference to be later used, because when the object is stringified at a particular point, the reference can be used instead of showing the object's content.However, such tags are much more brief; and through a large and twisted objects the current path notations may be a significant potion of increased size.
Intent
I suppose, I could also revisit the external usage API and allow specific user hooks to encode such things; the stringify IS kept in a array of strings that is joined as a concatenation, so it could be possible to prefix some thing(s)?
The text was updated successfully, but these errors were encountered: