toJSON recursive test