initial commit
hasPromise function
fixed recursive toJSON+promise combinations
fix for toJSON support