**Well, the one issue I'm reworking is the fact that having too many properties (600+) really kills the time to set a variable, but getting is instant.
Basically what I do is create a new property for any complex data structures and leave a pointer in the parent structure. So, by default, you can put an object inside an object, but that internal object is replace with a pointer and then given a property. For example:
Code: Select all
[H: obj2 = json.append("",1,2,3)]
[H: obj1 = json.set("{}","obj1",obj2)]
[H: createTable("My Table")]
[H: addTableField("mytable","Object 0",obj1)]
- createTable creates a property named h.tData_mytable = {}and a property named h.tIndex_mytable = "My Table"
- addTableField see the data is an object so it creates a new property h.tData_mytable.object0 and it's index. It then puts in the h.tData_mytable a pointer to the new property.
- When writing the new object, it notices there is an object inside (an array), so it creates a new property h.tData_mytable.object0.obj1 and it's index
You can get an idea from my code on what I'm doing. I included my WIP token. Here's a list of function names:
Function Names
Code: Select all
cleanVar,
glp,
indexPropName,
makePath,
propName,
slp,
createPointerReference,
getPointerLevel,
getPointerRef,
isPointer,
updatePointerSubLevel,
*getTableJSON,
*removeFromTableList,
addTableNode,
appendTableList,
createTable,
getTableField,
getTableIndex,
getTableIndexes,
getTableJSON,
getTableRaw,
removeFromTableList,
setTableField
Oops.. left my debug code in there, but no debug macro.. I updated the token.