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
{{ message }}
This repository was archived by the owner on Oct 7, 2022. It is now read-only.
You can reduce the size of the JSON output significantly just by dropping the subCounter field as well as empty children fields.
toJSON() {
return JSON.stringify(this, function(key, value) {
return key === 'subCounter' || (key === 'children' && value.length === 0) ? undefined : value
})
}
You would need to add a check for children in fromJSON to either default children to [] or skip processing children if the field is undefined.