this test harness system requires:
ss_TEST_ppJSONstringify() // the test wrapper/call for ss_ppJSONstringify_(objXtest, "objXtest", objLogConfig)
ss_test_ppJSONstringify_objTest1_() // an object to feed into ss_ppJSONstringify_ for testing (also provided objTest2_
ss_test_ppJSONstringify_objLogConfig1_() the config object if you want to control the output more then the default
the functions you are testing are:
function ss_ppJSONstringify_(blobX, blobXname, objLogConfig) // the function
function ss_ppJSONstringify_func1_build_tree_string_(dataTemp, numLevel, objConfig, strCurrentPath) // recursive helper function
function ss_TEST_ppJSONstringify() {
var objXtest = ss_test_ppJSONstringify_objTest1_()
var objLogConfig = ss_test_ppJSONstringify_objTest1_()
// Run the universal logger!
var temp = ss_ppJSONstringify_(objXtest, "objXtest", objLogConfig);
console.log(temp)
}
=====================================================
function ss_test_ppJSONstringify_objTest1_(){
var objTest = {
arrays: {
domains: {
arrRS: [
["domainName", "countZoneRecords"],
["alpha.com", 14],
["beta.org", 5],
["gamma.net", 9],
["delta.io", 22],
["epsilon.co", 1]
]
}
},
meta: {
status: "success",
timestamp: "2026-11-08"
}
}
return objTest;
}
=============================================================
function ss_test_ppJSONstringify_objLogConfig1_(){
var objLogConfig = {
// 1. VIP Sorter
sortPriority: ["meta", "timestamp","status", "arrays", "domains", "arrRS" ],
// 2. Row Limits
arrayRowLimits: {
"default_1D": 10,
"default_2D": 5,
"arrays.domains.arrRS": 3 // Force this to truncate early
},
// 3. View Overrides (Replaces legacy func2 and func3)
viewOverrides: {
"objDoneX.extra1": "summary",
"objDoneX.extra2": "array_of_objects_flatten"
}
}
return objLogConfig;
}
function ss_test_ppJSONstringify_objTest2_(){
objDoneX: {
doneX: "doneX_complete",
message: "Data fetched successfully",
extra1: {
user: "admin",
role: "superuser",
lastLogin: "2026-11-07",
preferences: "dark_mode",
sessionToken: "xyz123"
},
extra2: [
{ tenant: "Acme Corp", status: "active", tier: "enterprise" },
{ tenant: "Globex", status: "inactive", tier: "basic" },
{ tenant: "Initech", status: "active", tier: "pro" },
{ tenant: "Umbrella", status: "active", tier: "enterprise" }
]
}
}
return objTest;
}
function ss_test_ppJSONstringify_objLogConfig1_(){
var objLogConfig = {
// 1. VIP Sorter
sortPriority: ["objDoneX","doneX","message","extra2","extra1"],
// 2. Row Limits
arrayRowLimits: {
"default_1D": 10,
"default_2D": 5,
"objDoneX.extra2": 2 // Force truncate early
},
// 3. View Overrides (Replaces legacy func2 and func3)
viewOverrides: {
"objDoneX.extra1": "summary",
"objDoneX.extra2": "array_of_objects_flatten"
}
}
return objLogConfig;
/*
var myLogConfig = {
sortPriority: [
"meta", "parsing", "security", "arrays",
"sqlTemplate", "select", "from", "where", "orderBy"
],
arrayRowLimits: {
"default_1D": 10,
"default_2D": 5,
"arrays.domains.arrRS": 3, // Explicit breadcrumb override
"arrays.ddTenants.arrRS": "all", // 'all' ignores the limit
"parsing.domains.arrWhereRules": 20
}
};
*/
}
NOTE: the following are the functios required for this test:
function ss_ppJSONstringify_(blobX, blobXname, objLogConfig) // the function